/*
 * modern.css — RailEnquiry.IN design upgrade
 * Enhances ProUI template while keeping existing color palette
 * Colors: sidebar #394263, accent #1bbae1, page-bg #eaedf1
 */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === GLOBAL RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    color: #394263;
    background-color: #1a1f38;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === SIDEBAR === */
#sidebar, #sidebar-alt {
    background: linear-gradient(180deg, #2d3255 0%, #394263 60%, #2a3058 100%);
    box-shadow: 2px 0 20px rgba(0,0,0,0.35);
}

/* Sidebar brand */
.sidebar-brand {
    background: linear-gradient(135deg, #1bbae1 0%, #0d8fb3 100%) !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    padding: 18px 20px !important;
    display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s;
}
.sidebar-brand:hover {
    background: linear-gradient(135deg, #16a7cc 0%, #0c7ea0 100%) !important;
    text-decoration: none;
}

/* Sidebar nav items */
.sidebar-nav > li > a {
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    font-weight: 500;
    padding: 11px 18px;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    letter-spacing: 0.2px;
}
.sidebar-nav > li > a:hover,
.sidebar-nav > li > a.active,
.sidebar-nav > li.active > a {
    color: #fff;
    background: rgba(27,186,225,0.12);
    border-left-color: #1bbae1;
}

/* Sidebar sub-nav */
.sidebar-nav ul li a {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    padding: 8px 18px 8px 38px;
    transition: color 0.15s;
}
.sidebar-nav ul li a:hover {
    color: #1bbae1;
    text-decoration: none;
}

/* Sidebar section headers */
.sidebar-header {
    padding: 14px 18px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
}

/* Sidebar user area */
.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}
.sidebar-user-links a {
    color: rgba(255,255,255,0.55);
    margin-right: 8px;
    transition: color 0.15s;
}
.sidebar-user-links a:hover { color: #1bbae1; }

/* === TOP NAVIGATION BAR === */
.navbar.navbar-default {
    background: #fff;
    border-bottom: 1px solid #dde3ea;
    box-shadow: 0 2px 12px rgba(57,66,99,0.1);
    min-height: 58px;
    padding: 0;
}

.navbar-nav-custom > li > a {
    color: #394263;
    font-weight: 500;
    font-size: 13px;
    padding: 18px 14px;
    transition: color 0.15s, background 0.15s;
    line-height: 22px;
}
.navbar-nav-custom > li > a:hover {
    color: #1bbae1;
    background: rgba(27,186,225,0.06);
}

/* Brand logo in navbar */
.navbar-nav-custom > li > a .gi-train {
    font-size: 28px !important;
    vertical-align: middle;
    margin-right: 6px;
}
.navbar-nav-custom > li > a strong {
    font-size: 16px;
    font-weight: 700;
    color: #394263;
    vertical-align: middle;
}

/* Dropdown menus */
.dropdown-menu {
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(57,66,99,0.15);
    padding: 6px 0;
    margin-top: 4px;
}
.dropdown-menu > li > a {
    padding: 9px 18px;
    font-size: 13px;
    color: #394263;
    font-weight: 400;
    transition: background 0.12s, color 0.12s;
}
.dropdown-menu > li > a:hover {
    background: rgba(27,186,225,0.08);
    color: #1bbae1;
}
.dropdown-custom { min-width: 220px; }

/* === SEARCH HEADER BAR (train search form) === */
.navbar.navbar-default .navbar-form .form-control {
    border-radius: 6px;
    border: 1px solid #dde3ea;
    background: #f7f9fc;
    color: #394263;
    font-size: 13px;
    height: 36px;
    padding: 6px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}
.navbar.navbar-default .navbar-form .form-control:focus {
    border-color: #1bbae1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(27,186,225,0.12);
    outline: none;
}
.navbar.navbar-default .navbar-form .form-control::placeholder {
    color: #a0aec0;
}

/* === PAGE CONTENT AREA === */
#page-content {
    background: #eaedf1;
    padding: 20px 18px 10px;
    min-height: calc(100vh - 125px);
}

/* === WIDGETS / CARDS === */
.widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(57,66,99,0.07);
    margin-bottom: 20px;
    border: 1px solid #e8ecf2;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.widget:hover {
    box-shadow: 0 4px 20px rgba(57,66,99,0.12);
}

.widget-advanced {
    border-radius: 0;
    background: transparent;
}

/* Widget header */
.widget-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #394263 0%, #2d3255 100%);
    border-radius: 10px 10px 0 0;
}
.widget-header h3,
.widget-header .widget-content-light {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Widget content */
.widget-main {
    padding: 18px;
}

/* === BLOCK ELEMENTS === */
.block {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(57,66,99,0.07);
    border: 1px solid #e8ecf2;
    margin-bottom: 20px;
    overflow: hidden;
}
.block-title {
    padding: 0;
    border-bottom: 1px solid #e8ecf2;
    background: #fff;
}
.block-title h2 {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #394263;
}
.block-title .nav-tabs {
    border-bottom: none;
    padding: 0 18px;
}
.block-title .nav-tabs > li > a {
    font-size: 13px;
    font-weight: 500;
    color: #6b7a99;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 13px 14px;
    transition: color 0.15s, border-color 0.15s;
}
.block-title .nav-tabs > li.active > a,
.block-title .nav-tabs > li > a:hover {
    color: #1bbae1;
    border-bottom-color: #1bbae1;
    background: transparent;
}

/* === TABLES === */
.table {
    font-size: 12.5px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}
.table thead tr {
    background: linear-gradient(135deg, #394263 0%, #2d3255 100%);
}
.table thead tr td,
.table thead tr th {
    color: #fff !important;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 11px 10px;
    border: none;
    white-space: nowrap;
}
.table tbody tr {
    transition: background 0.12s;
}
.table tbody tr:nth-child(even) {
    background: #f7f9fc;
}
.table tbody tr:hover {
    background: rgba(27,186,225,0.06);
}
.table tbody td {
    padding: 9px 10px;
    border-top: 1px solid #edf0f5;
    color: #394263;
    vertical-align: middle;
}
.table tbody td a {
    color: #1bbae1;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.table tbody td a:hover { color: #0d8fb3; }
.table-striped tbody tr.warning {
    background: #fffbef;
}
.table-vcenter td { vertical-align: middle; }

/* Train availability class cells */
.table tbody td a[id$="1A"],
.table tbody td a[id$="2A"],
.table tbody td a[id$="3A"],
.table tbody td a[id$="SL"],
.table tbody td a[id$="CC"],
.table tbody td a[id$="2S"],
.table tbody td a[id$="3E"],
.table tbody td a[id$="FC"] {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(27,186,225,0.1);
    font-size: 11px;
    font-weight: 600;
    color: #0d8fb3;
    border: 1px solid rgba(27,186,225,0.25);
}
.table tbody td a[id$="1A"]:hover,
.table tbody td a[id$="2A"]:hover,
.table tbody td a[id$="3A"]:hover,
.table tbody td a[id$="SL"]:hover,
.table tbody td a[id$="CC"]:hover,
.table tbody td a[id$="2S"]:hover,
.table tbody td a[id$="3E"]:hover,
.table tbody td a[id$="FC"]:hover {
    background: #1bbae1;
    color: #fff;
    border-color: #1bbae1;
}

/* Day availability: green Y / grey dash */
.table td[style*="color:green"] { color: #27ae60 !important; font-weight: 700; }
.table td[style*="color:grey"]  { color: #c0c7d6 !important; }

/* === BUTTONS === */
.btn {
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    padding: 7px 16px;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    letter-spacing: 0.2px;
}
.btn-primary {
    background: #1a3d7c;
    border-color: #16336a;
    color: #fff;
    box-shadow: 0 2px 6px rgba(26,61,124,0.22);
}
.btn-primary:hover, .btn-primary:focus {
    background: #16316a;
    border-color: #112858;
    color: #fff;
    box-shadow: 0 3px 10px rgba(26,61,124,0.32);
}
.btn-primary:active {
    background: #122d60;
    border-color: #0e2350;
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    border-color: #1e8449;
    color: #fff;
    box-shadow: 0 2px 8px rgba(39,174,96,0.28);
}
.btn-success:hover {
    background: linear-gradient(135deg, #219a52 0%, #196f3d 100%);
    box-shadow: 0 4px 14px rgba(39,174,96,0.35);
    color: #fff;
}
.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2176ae 100%);
    border-color: #2176ae;
    color: #fff;
}
.btn-default {
    background: #fff;
    border-color: #dde3ea;
    color: #394263;
}
.btn-default:hover {
    background: #f2f5fa;
    border-color: #c8d0de;
    color: #394263;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* === FORM CONTROLS === */
.form-control {
    border-radius: 6px;
    border: 1px solid #dde3ea;
    background: #fff;
    color: #394263;
    font-size: 13px;
    height: 36px;
    padding: 6px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    font-family: inherit;
}
.form-control:focus {
    border-color: #1bbae1;
    box-shadow: 0 0 0 3px rgba(27,186,225,0.12);
    outline: none;
}
.form-control::placeholder { color: #a0aec0; }

select.form-control { padding-right: 28px; appearance: none; }

.input-group .input-group-btn .btn {
    border-radius: 0 6px 6px 0;
    height: 36px;
}
.input-group .form-control:first-child {
    border-radius: 6px 0 0 6px;
}

/* === LABELS & BADGES === */
.label-primary, .badge {
    background: linear-gradient(135deg, #1bbae1, #0d8fb3);
    font-weight: 600;
    font-size: 10px;
    border-radius: 10px;
    padding: 3px 7px;
}

/* === PRELOADER === */
.preloader {
    background: linear-gradient(135deg, #2d3255 0%, #394263 100%);
}
.preloader h1 strong { color: #1bbae1; }

/* === FOOTER === */
#page-content + footer {
    background: #fff;
    border-top: 1px solid #e8ecf2;
    padding: 14px 20px;
    font-size: 12px;
    color: #6b7a99;
    box-shadow: 0 -1px 8px rgba(57,66,99,0.05);
}
#page-content + footer a {
    color: #1bbae1;
    font-weight: 500;
    text-decoration: none;
}
#page-content + footer a:hover { color: #0d8fb3; }

/* === MODAL === */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(57,66,99,0.25);
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(135deg, #394263 0%, #2d3255 100%);
    border-bottom: none;
    padding: 18px 24px;
}
.modal-header .modal-title, .modal-header h4 {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.modal-header .close { color: rgba(255,255,255,0.7); opacity: 1; }
.modal-header .close:hover { color: #fff; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #edf0f5;
    background: #f7f9fc;
    border-radius: 0 0 12px 12px;
}

/* === ALERTS === */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 12.5px;
    padding: 10px 14px;
}
.alert-info    { background: rgba(27,186,225,0.1);  color: #0d8fb3; }
.alert-success { background: rgba(39,174,96,0.1);   color: #1e8449; }
.alert-warning { background: rgba(243,156,18,0.1);  color: #d4890a; }
.alert-danger  { background: rgba(231,76,60,0.1);   color: #c0392b; }
.alert-alt { background: #f7f9fc; color: #394263; border-left: 3px solid #1bbae1; border-radius: 0 8px 8px 0; }

/* === SIDEBAR THEMES (color swatches) === */
.sidebar-themes li a {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.2);
    transition: transform 0.15s, border-color 0.15s;
}
.sidebar-themes li a:hover {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.7);
}

/* === TOOLTIP === */
.tooltip-inner {
    background: #394263;
    border-radius: 6px;
    font-size: 12px;
    padding: 5px 10px;
}
.tooltip.top .tooltip-arrow { border-top-color: #394263; }
.tooltip.bottom .tooltip-arrow { border-bottom-color: #394263; }

/* === TRAIN SEARCH AREA (homepage) === */
#trainsearch {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(57,66,99,0.1);
    border: 1px solid #e8ecf2;
}
#trainsearch h3 {
    font-size: 18px;
    font-weight: 700;
    color: #394263;
    margin: 0 0 18px;
}

/* Welcome heading on homepage */
#topresult h2 {
    font-size: 22px;
    font-weight: 700;
    color: #394263;
    margin: 0 0 6px;
}
#topresult h2 .gi-train { vertical-align: middle; }

/* === RUNNING STATUS RESULT AREA === */
#runningresultdiv {
    background: #fff;
    border-radius: 10px;
}

/* === SCROLLBAR (webkit) === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(57,66,99,0.05); }
::-webkit-scrollbar-thumb { background: rgba(57,66,99,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27,186,225,0.5); }

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.widget, .block { animation: fadeInUp 0.25s ease both; }

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 767px) {
    .navbar.navbar-default .navbar-form { padding: 8px 10px; margin: 0; }
    .navbar.navbar-default .navbar-form .form-control { height: 34px; font-size: 12px; }
    #page-content { padding: 12px 10px; }
    .block-title .nav-tabs > li > a { padding: 10px 10px; font-size: 12px; }
    .table thead tr td, .table thead tr th { font-size: 10.5px; padding: 8px 6px; }
    .table tbody td { padding: 7px 6px; font-size: 12px; }
    .widget-header { padding: 12px 14px; }
    .widget-main { padding: 14px; }
}

/* === HEADER SEARCH BAR ENHANCEMENTS === */
.navbar-form { margin: 0; padding: 10px 12px; }
.navbar-form .form-group { margin-bottom: 0; margin-right: 6px; }

/* Date picker */
.input-datepicker-close {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%231bbae1'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5C3.89 4 3 4.9 3 6v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Station exchange button */
.fa-exchange { color: #1bbae1; padding: 0 4px; vertical-align: middle; }

/* Select quota dropdown */
#quota { min-width: 130px; }

/* Show trains button */
#search_trains {
    background: #1a3d7c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(26,61,124,0.22);
    transition: all 0.18s;
    white-space: nowrap;
}
#search_trains:hover {
    background: #16316a;
    box-shadow: 0 3px 10px rgba(26,61,124,0.32);
    color: #fff;
}

/* === TAB PANES === */
.tab-pane { padding: 14px 0; }
.tab-content { padding: 0 18px 14px; }

/* === SIDEBAR SCROLL === */
#sidebar-scroll, #sidebar-alt-scroll { overflow-y: auto; overflow-x: hidden; }

/* === MAIN CONTAINER TRANSITION === */
#main-container { transition: margin-left 0.2s ease; }

/* === INPUT GROUP ADDON === */
.input-group-addon {
    background: #f7f9fc;
    border: 1px solid #dde3ea;
    color: #6b7a99;
    font-size: 13px;
    border-radius: 6px;
}

/* === PNR / TRAIN RESULT AREAS === */
#pnrhistory, #rtrainhistory {
    margin-top: 10px;
}
#rtrainhistory .btn, #pnrhistory .btn {
    font-size: 11px;
    color: #6b7a99;
    border-color: #e0e5ef;
}

/* === FORM GROUPS IN SIDEBAR PANES === */
.col-sm-12.input-group { margin-bottom: 10px; }

/* === NEWS TABLE ON HOMEPAGE === */
.table-vcenter > tbody > tr > td a {
    color: #394263;
    font-weight: 500;
}
.table-vcenter > tbody > tr > td a:hover { color: #1bbae1; }
.table-vcenter > thead > tr.active > th {
    background: linear-gradient(135deg, #394263 0%, #2d3255 100%);
    color: #fff;
    font-weight: 700;
    padding: 12px 14px;
    font-size: 13px;
}

/* === DATEPICKER POPUP === */
.datepicker {
    border-radius: 10px;
    border: 1px solid #e8ecf2;
    box-shadow: 0 8px 30px rgba(57,66,99,0.15);
    font-family: 'Inter', sans-serif;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover {
    background: linear-gradient(135deg, #1bbae1, #0d8fb3);
    border-color: #0d8fb3;
}
.datepicker table tr td:hover {
    background: rgba(27,186,225,0.1);
    color: #0d8fb3;
}

/* === UTILITY === */
.text-info { color: #1bbae1!important; }
.themed-background { background: linear-gradient(135deg, #2d3255 0%, #394263 100%)!important; }

/* smooth page load */
#page-container { opacity: 1; transition: opacity 0.3s ease; }
#page-wrapper.page-loading #page-container { opacity: 0; }


/* ============================================================
   RUNNING STATUS — Fix 2: result div auto height
   ============================================================ */
#runningresultdiv {
    height: auto !important;
    min-height: 200px;
    overflow: visible !important;
}


/* ============================================================
   RUNNING STATUS — Fix 3: Timeline styles
   ============================================================ */

/* --- Pulse animation for current station --- */
@keyframes rs-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(240,173,78,0.45); }
    60%  { box-shadow: 0 0 0 7px rgba(240,173,78,0); }
    100% { box-shadow: 0 0 0 0   rgba(240,173,78,0); }
}

/* --- Header card --- */
.rs-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #2d3255 0%, #394263 100%);
    color: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    gap: 14px;
}

.rs-train-no {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.rs-train-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    margin-top: 4px;
}

.rs-header-mid { text-align: center; }

.rs-route {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.rs-startdate {
    font-size: 12px;
    color: rgba(255,255,255,0.70);
    margin-top: 4px;
}

.rs-header-right { text-align: right; }

.rs-total-delay {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.rs-total-delay.late {
    background: rgba(231,76,60,0.18);
    color: #ff8070;
    border: 1px solid rgba(231,76,60,0.35);
}

.rs-total-delay.ontime {
    background: rgba(39,174,96,0.18);
    color: #5edb95;
    border: 1px solid rgba(39,174,96,0.35);
}

.rs-rstatus {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- Controls bar --- */
.rs-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #f7f9fc;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    gap: 10px;
    font-size: 12px;
    border: 1px solid #e8ecf2;
}

.rs-cpos {
    font-weight: 500;
    color: #394263;
}

.rs-controls-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rs-lastupd {
    color: #6b7a99;
}

.rs-refresh-btn {
    cursor: pointer;
    color: #1bbae1;
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.15s;
}

.rs-refresh-btn:hover {
    text-decoration: underline;
    color: #0d8fb3;
}

.rs-map-link {
    cursor: pointer;
    color: #1bbae1;
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.15s;
}

.rs-map-link:hover {
    text-decoration: underline;
    color: #0d8fb3;
}

/* --- Timeline container --- */
.rs-timeline {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8ecf2;
}

/* --- Station row --- */
.rs-stn {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f3f8;
    transition: background 0.15s;
}

.rs-stn:last-child {
    border-bottom: none;
}

.rs-stn.passed {
    background: transparent;
}

.rs-stn.current {
    background: rgba(240,173,78,0.04);
}

/* --- Timeline column (dot + line) --- */
.rs-tl {
    width: 32px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
}

.rs-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #c8d0de;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.rs-stn.passed .rs-dot {
    background: #27ae60;
    border-color: #27ae60;
}

.rs-stn.current .rs-dot {
    width: 18px;
    height: 18px;
    background: #f0ad4e;
    border-color: #e6971a;
    box-shadow: 0 0 0 4px rgba(240,173,78,0.20);
    animation: rs-pulse 1.8s ease-out infinite;
}

/* Source station dot */
.rs-stn.source .rs-dot {
    background: #394263;
    border-color: #394263;
}

/* Destination station dot — reached (passed) keeps green; future is grey */
.rs-stn.dest.passed .rs-dot {
    background: #e74c3c;
    border-color: #e74c3c;
}

.rs-stn.dest.future .rs-dot {
    background: #c8d0de;
    border-color: #c8d0de;
}

.rs-line {
    width: 2px;
    min-height: 30px;
    flex-grow: 1;
    background: #e0e5ef;
    margin-top: 4px;
}

.rs-stn.passed .rs-line {
    background: #27ae60;
}

/* --- Body --- */
.rs-body {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
}

.rs-name-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
}

.rs-stn-name {
    font-weight: 700;
    font-size: 13px;
    color: #394263;
}

.rs-stn-code {
    font-size: 11px;
    color: #1bbae1;
    text-decoration: none;
}

.rs-stn-code:hover {
    text-decoration: underline;
    color: #0d8fb3;
}

.rs-stn-hindi {
    font-size: 11px;
    color: #6b7a99;
}

/* --- Times row --- */
.rs-times {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.rs-time-block {
    min-width: 70px;
}

.rs-tl-label {
    font-size: 10px;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rs-sch {
    font-size: 11px;
    color: #6b7a99;
    margin-top: 1px;
}

.rs-act {
    font-size: 13px;
    font-weight: 600;
    color: #394263;
    margin-top: 1px;
}

.rs-act.late  { color: #e74c3c; }
.rs-act.ontime { color: #27ae60; }
.rs-act.early  { color: #1bbae1; }

/* --- Delay badge --- */
.rs-delay-block {
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

.rs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.rs-badge.late {
    background: rgba(231,76,60,0.10);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.25);
}

.rs-badge.ontime {
    background: rgba(39,174,96,0.10);
    color: #27ae60;
    border: 1px solid rgba(39,174,96,0.25);
}

.rs-badge.early {
    background: rgba(27,186,225,0.10);
    color: #1bbae1;
    border: 1px solid rgba(27,186,225,0.25);
}

/* --- Right column (platform / distance) --- */
.rs-right {
    flex-shrink: 0;
    text-align: right;
    margin-left: 12px;
    min-width: 52px;
}

.rs-pf-label {
    font-size: 12px;
    color: #6b7a99;
}

.rs-pf-label strong {
    color: #394263;
    font-weight: 700;
}

.rs-dist {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
}

/* --- Footer row --- */
.rs-footer-row {
    padding: 12px 16px;
    font-size: 12px;
    color: #6b7a99;
    background: #f7f9fc;
    border-top: 1px solid #e8ecf2;
}

/* ============================================================
   RUNNING STATUS — Responsive (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
    .rs-header {
        flex-direction: column;
        gap: 10px;
    }

    .rs-header-mid,
    .rs-header-right {
        text-align: left;
    }

    .rs-times {
        gap: 8px;
    }

    .rs-right {
        margin-left: 0;
    }

    .rs-stn {
        padding: 10px 10px;
    }

    .rs-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .rs-controls-right {
        gap: 8px;
    }
}


/* ================================================================
   PREMIUM OVERHAUL — v3
   Complete redesign of running status + global refinements
   ================================================================ */

/* ── Global refinements ── */
body { background: #0f1422; }

#page-container {
    min-height: 100vh;
    background: #0f1422;
}

#main-container {
    background: #eaedf1;
    min-height: 100vh;
}

#page-content {
    min-height: calc(100vh - 130px);
    background: #eaedf1;
    padding: 16px 16px 24px;
}

/* Better widget cards */
.widget {
    box-shadow: 0 1px 6px rgba(57,66,99,0.08), 0 4px 20px rgba(57,66,99,0.06);
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Better table header */
.table thead tr,
.table > thead > tr:first-child {
    background: linear-gradient(90deg,#2d3255,#394263);
}
.table thead tr td,
.table thead tr th {
    padding: 12px 12px;
    font-size: 11px;
    letter-spacing: 0.6px;
    color: #fff;
}

/* .info rows used as table headers — dark bg + white text */
.table thead tr.info,
.table tbody tr.info {
    background: linear-gradient(90deg,#2d3255,#394263) !important;
}
.table thead tr.info > td,
.table thead tr.info > th,
.table tbody tr.info > td,
.table tbody tr.info > th {
    background: transparent !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* Train list table — row hover + current station link */
.table tbody tr:hover { background: rgba(27,186,225,0.05) !important; }

/* Better footer */
footer.clearfix {
    background: #fff;
    border-top: 1px solid #e4e9f2;
    padding: 14px 24px;
    font-size: 12px;
    color: #6b7a99;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
footer.clearfix a { color: #1bbae1; font-weight: 500; text-decoration: none; }
footer.clearfix a:hover { color: #0d8fb3; }
footer.clearfix .pull-left,
footer.clearfix .pull-right { float: none !important; }

/* ── Running status: error box ── */
.rs-error {
    margin: 16px;
    padding: 14px 18px;
    background: rgba(231,76,60,0.07);
    border-left: 4px solid #e74c3c;
    border-radius: 0 8px 8px 0;
    color: #c0392b;
    font-size: 13px;
}

/* ── Hero header ── */
.rs-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg,#1a1f38 0%,#2d3255 55%,#394263 100%);
    border-radius: 14px;
    padding: 20px 24px;
    color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 6px 28px rgba(26,31,56,0.35);
    border: 1px solid rgba(255,255,255,0.07);
}

.rs-hero-no {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1;
}
.rs-hero-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}
.rs-hero-date {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
}
.rs-hero-date .fa { margin-right: 3px; }

.rs-hero-mid {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
}
.rs-hero-stn { text-align: center; }
.rs-hero-stn-right { text-align: center; }
.rs-hero-stn-code {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
.rs-hero-stn-name {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.rs-hero-arrow {
    font-size: 22px;
    color: rgba(27,186,225,0.7);
    flex-shrink: 0;
}

.rs-hero-right { text-align: right; flex-shrink: 0; }
.rs-hero-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.rs-hero-badge.late   { background: rgba(231,76,60,0.22); color: #ff8070; border: 1px solid rgba(231,76,60,0.4); }
.rs-hero-badge.ontime { background: rgba(39,174,96,0.22); color: #5edb95;  border: 1px solid rgba(39,174,96,0.4); }
.rs-hero-badge.early  { background: rgba(27,186,225,0.22); color: #6de3f7; border: 1px solid rgba(27,186,225,0.4); }
.rs-hero-status {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Controls bar ── */
.rs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    padding: 9px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e4e9f2;
    font-size: 12px;
    flex-wrap: wrap;
}
.rs-bar-cpos { color: #394263; font-weight: 500; flex: 1; min-width: 0; }
.rs-bar-cpos .fa { color: #1bbae1; margin-right: 4px; }
.rs-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.rs-bar-upd { color: #6b7a99; }
.rs-bar-upd .fa { margin-right: 3px; }
.rs-bar-refresh, .rs-bar-map {
    color: #1bbae1;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.rs-bar-refresh:hover, .rs-bar-map:hover { color: #0d8fb3; }
.rs-bar-select {
    height: 28px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid #dde3ea !important;
    color: #394263 !important;
    display: inline-block;
    width: auto !important;
    min-width: 0 !important;
}

/* ── Adsense block ── */
.rs-ad-block { text-align: center; margin-bottom: 10px; }

/* ── Timeline wrapper ── */
.rs-tl-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e9f2;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(57,66,99,0.06);
}

/* ── Column header row ── */
.rs-tl-head {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg,#2d3255,#394263);
    padding: 0;
}
.rs-tl-head-dot {
    width: 40px;
    flex-shrink: 0;
}
.rs-tl-head-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 94px 94px 76px 40px;
    padding: 10px 16px 10px 6px;
    gap: 0 6px;
}
.rs-tl-head-grid > div {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgba(255,255,255,0.75);
}
.rs-tl-head-grid > div:not(:first-child) { text-align: center; }

/* ── Station row ── */
.rs-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f3f8;
    transition: background 0.12s;
}
.rs-row:last-child { border-bottom: none; }
.rs-row.passed  { background: transparent; }
.rs-row.current { background: rgba(240,173,78,0.05); }
.rs-row.future  { background: transparent; }
.rs-row:hover   { background: rgba(27,186,225,0.03); }
.rs-row.current:hover { background: rgba(240,173,78,0.08); }

/* ── Spine (dot + line) ── */
.rs-spine {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 18px;
}
.rs-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid #c8d0de;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.rs-row.passed  .rs-dot { background: #27ae60; border-color: #27ae60; }
.rs-row.source  .rs-dot { background: #394263; border-color: #394263; width: 14px; height: 14px; }
.rs-row.dest.passed .rs-dot  { background: #e74c3c; border-color: #e74c3c; }
.rs-row.dest.future .rs-dot  { background: #c8d0de; border-color: #c8d0de; }
.rs-row.current .rs-dot {
    width: 16px; height: 16px;
    background: #f0ad4e;
    border-color: #e6971a;
    animation: rs-pulse 1.8s ease-out infinite;
}

@keyframes rs-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(240,173,78,0.5); }
    60%  { box-shadow: 0 0 0 6px rgba(240,173,78,0); }
    100% { box-shadow: 0 0 0 0   rgba(240,173,78,0); }
}

.rs-line {
    width: 2px;
    flex-grow: 1;
    min-height: 32px;
    background: #e4e9f2;
    margin-top: 4px;
}
.rs-row.passed .rs-line,
.rs-row.source.passed .rs-line { background: #27ae60; }

/* ── Row grid ── */
.rs-row-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 94px 94px 76px 40px;
    align-items: center;
    gap: 0 6px;
    padding: 13px 16px 13px 6px;
}

/* Col 1 — station */
.rs-col-stn { min-width: 0; padding-right: 6px; }
.rs-stn-title {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: nowrap;
    overflow: hidden;
}
.rs-stn-name {
    font-weight: 700;
    font-size: 13px;
    color: #1a1f38;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rs-row.current .rs-stn-name { color: #d4890a; }
.rs-row.future  .rs-stn-name { color: #6b7a99; }
.rs-stn-code {
    font-size: 10.5px;
    color: #1bbae1;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.rs-stn-code:hover { text-decoration: underline; }
.rs-here-icon { color: #f0ad4e; font-size: 11px; margin-left: 2px; animation: rs-pulse 1.5s ease infinite; }
.rs-stn-sub { font-size: 11px; color: #9aa5bc; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cols 2 & 3 — time */
.rs-col-t {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.rs-t-lbl {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #a0aec0;
}
.rs-t-sch { font-size: 11.5px; color: #6b7a99; }
.rs-t-act { font-size: 12px; font-weight: 700; }
.rs-t-act.late   { color: #e74c3c; }
.rs-t-act.ontime { color: #27ae60; }
.rs-t-act.early  { color: #1bbae1; }
.rs-row.future .rs-t-sch { color: #a0aec0; }

/* Col 4 — delay badge */
.rs-col-delay { display: flex; align-items: center; justify-content: center; }
.rs-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}
.rs-badge.late   { background: rgba(231,76,60,0.10); color: #e74c3c; border: 1px solid rgba(231,76,60,0.2); }
.rs-badge.ontime { background: rgba(39,174,96,0.10);  color: #27ae60; border: 1px solid rgba(39,174,96,0.2); }
.rs-badge.early  { background: rgba(27,186,225,0.10); color: #1bbae1; border: 1px solid rgba(27,186,225,0.2); }
.rs-badge.none   { color: #c8d0de; background: none; border: none; font-size: 13px; }

/* Col 5 — platform */
.rs-col-pf { display: flex; flex-direction: column; align-items: center; }
.rs-pf-num { font-size: 15px; font-weight: 800; color: #394263; line-height: 1; }
.rs-pf-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; color: #a0aec0; letter-spacing: 0.4px; }
.rs-row.future .rs-pf-num { color: #9aa5bc; }

/* ── Info bar ── */
.rs-info-bar {
    padding: 10px 16px;
    font-size: 12px;
    color: #6b7a99;
    background: #f7f9fc;
    border-top: 1px solid #e4e9f2;
}
.rs-info-bar .fa { margin-right: 5px; color: #1bbae1; }

/* ── Mobile ad ── */
.rs-mob-ad { padding: 8px; text-align: center; background: #f7f9fc; border-bottom: 1px solid #f0f3f8; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .rs-hero { flex-direction: column; gap: 14px; padding: 16px 18px; }
    .rs-hero-mid { width: 100%; }
    .rs-hero-right { text-align: left; width: 100%; }
    .rs-hero-stn-name { max-width: 100%; }

    .rs-row-grid {
        grid-template-columns: 1fr 78px 78px 64px 34px;
        padding: 10px 10px 10px 4px;
        gap: 0 4px;
    }
    .rs-tl-head-grid {
        grid-template-columns: 1fr 78px 78px 64px 34px;
        padding: 8px 10px 8px 4px;
    }
    .rs-spine { width: 32px; }
    .rs-tl-head-dot { width: 32px; }
    .rs-stn-name { font-size: 12px; }
    .rs-t-sch { font-size: 11px; }
    .rs-t-act { font-size: 11px; }
    .rs-badge { font-size: 9.5px; padding: 2px 7px; }
    .rs-pf-num { font-size: 13px; }
}

@media (max-width: 480px) {
    .rs-row-grid {
        grid-template-columns: 1fr 68px 68px 56px 30px;
        gap: 0 2px;
        padding: 9px 8px 9px 2px;
    }
    .rs-tl-head-grid { grid-template-columns: 1fr 68px 68px 56px 30px; }
    .rs-bar { flex-direction: column; align-items: flex-start; }
    .rs-bar-right { flex-wrap: wrap; gap: 8px; }
}

/* ── Override old rs-* classes that conflict ── */
.rs-header, .rs-controls, .rs-timeline, .rs-stn,
.rs-tl, .rs-body, .rs-times, .rs-time-block,
.rs-right, .rs-footer-row { all: unset; display: revert; }


/* ============================================================
   HOME PAGE — Premium overhaul
   ============================================================ */

/* Reset the topresult container on homepage */
#topresult { text-align: left; }

/* Wrapper for welcome + news */
.hp-home {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 8px;
}

/* ── Welcome hero ── */
.hp-welcome {
    background: linear-gradient(135deg, #1a2d5a 0%, #243a72 55%, #1073a0 100%);
    border-radius: 12px;
    padding: 28px 28px 24px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 18px rgba(26,45,90,0.22);
}
.hp-welcome-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}
.hp-welcome-brand .gi-train { font-size: 30px; color: #5bc8e8; line-height: 1; }
.hp-welcome-name { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; }
.hp-rail    { color: #fff; }
.hp-enquiry { color: #5bc8e8; }
.hp-in      { color: rgba(255,255,255,0.45); font-size: 16px; font-weight: 400; }
.hp-welcome-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin: 6px 0 18px;
    letter-spacing: 0.2px;
}
.hp-quick-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.hp-ql {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.11);
    color: rgba(255,255,255,0.92);
    padding: 7px 16px;
    border-radius: 22px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.18);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    letter-spacing: 0.1px;
}
.hp-ql:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    text-decoration: none;
}
.hp-ql .fa, .hp-ql .gi { font-size: 12px; }

/* ── News card ── */
.hp-news {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e9f2;
    box-shadow: 0 2px 10px rgba(57,66,99,0.07);
    overflow: hidden;
}
.hp-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid #edf0f6;
    background: #f8fafd;
}
.hp-news-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1f38;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hp-news-title .fa {
    color: #1bbae1;
    font-size: 15px;
}
.hp-news-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #1a3d7c;
    text-decoration: none;
    padding: 4px 12px;
    border: 1.5px solid #c8d5eb;
    border-radius: 20px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hp-news-more:hover {
    background: #1a3d7c;
    border-color: #1a3d7c;
    color: #fff;
    text-decoration: none;
}
.hp-news-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid #f2f5fa;
    text-decoration: none;
    color: #394263;
    transition: background 0.12s;
    cursor: pointer;
}
.hp-news-item:last-child { border-bottom: none; }
.hp-news-item:hover {
    background: #f5f8ff;
    text-decoration: none;
    color: #1a1f38;
}
.hp-news-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c8d5eb;
    flex-shrink: 0;
    transition: background 0.12s;
}
.hp-news-item:hover .hp-news-dot { background: #1bbae1; }
.hp-news-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #394263;
    line-height: 1.45;
}
.hp-news-item:hover .hp-news-text { color: #1a1f38; }
.hp-news-arrow {
    color: #c8d5eb;
    font-size: 13px;
    flex-shrink: 0;
    transition: color 0.12s, transform 0.12s;
}
.hp-news-item:hover .hp-news-arrow {
    color: #1bbae1;
    transform: translateX(3px);
}

/* ── Right sidebar refinements ── */
.block-title .nav-tabs > li > a {
    padding: 11px 14px;
}
.tab-content { padding: 0 16px 16px; }
.tab-pane .form-group label.control-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7a99;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 5px;
}
.tab-pane .btn-block {
    margin-top: 4px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive home */
@media (max-width: 768px) {
    .hp-welcome { padding: 20px 16px 18px; }
    .hp-welcome-name { font-size: 22px; }
    .hp-ql { padding: 6px 12px; font-size: 12px; }
    .hp-news-head { padding: 11px 14px; }
    .hp-news-item { padding: 10px 14px; }
}

/* ── Modal backdrop — keep page visible ── */
.modal-backdrop,
.modal-backdrop.fade.in {
    opacity: 0.45 !important;
    background-color: #1a1f38 !important;
}

/* ── Result/running status panels — light background so empty state isn't black ── */
#runningresultdiv,
#resultdiv,
#resultdiv1 {
    background: #f7f9fc;
    border-radius: 0 0 10px 10px;
}

/* ── Modal styling — cleaner look ── */
.modal-dialog { margin-top: 60px; }
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 40px rgba(26,31,56,0.35);
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(135deg, #1a2d5a 0%, #243a72 100%);
    border-bottom: none;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
}
.modal-header h3 { color: #fff; font-size: 15px; font-weight: 600; margin: 0; }
.modal-header .close { color: #fff; opacity: 0.7; text-shadow: none; font-size: 22px; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 16px 20px; background: #fff; max-height: 65vh; overflow-y: auto; }
.modal-footer { background: #f7f9fc; border-top: 1px solid #e4e9f2; padding: 12px 20px; }

