/* ═══════════════════════════════════════════════════════════════════════════
   RailEnquiry.in — IRCTC-inspired professional theme on Mofi Admin
   Header/Sidebar: #1a3a5c (Navy)  |  CTA: #f26522 (Orange)
   Cards/Forms: Clean white with soft blue accents
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --rail-navy:         #1a3a5c;
  --rail-navy-light:   #264d73;
  --rail-navy-dark:    #132d47;
  --rail-orange:       #f26522;
  --rail-orange-dark:  #d9571c;
  --rail-blue:         #2980b9;
  --rail-blue-light:   #e8f4fc;
  --rail-blue-pale:    #f0f7fd;
  --rail-text:         #2c3e50;
  --rail-text-muted:   #7f8c8d;
  --rail-border:       #dee2e6;
  --rail-bg:           #f5f7fa;

  --theme-deafult:     #2980b9;
  --theme-secondary:   #f26522;
}

/* ── Body ─────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--rail-bg);
  color: var(--rail-text);
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════════ */
.page-header {
  background: var(--rail-navy) !important;
  border-bottom: 3px solid var(--rail-orange) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.page-header .header-wrapper { background: transparent !important; }

/* Logo */
.rail-logo-text, .rail-logo-sidebar {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}
.logo-rail    { color: #fff; }
.logo-enquiry { color: #f26522; }
.logo-in      { color: rgba(255,255,255,0.5); font-size: 0.9rem; font-weight: 400; }

/* Header text & icons */
.page-header .page-title h4 { color: #fff !important; font-size: 0.92rem; }
.page-header svg, .page-header .nav-menus > li > svg { stroke: rgba(255,255,255,0.8); }
.page-header .mode svg { stroke: rgba(255,255,255,0.7); }
.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item a { color: rgba(255,255,255,0.75); }
.breadcrumb-item.active { color: rgba(255,255,255,0.5); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar-wrapper {
  background: var(--rail-navy-dark) !important;
}
.sidebar-wrapper .sidebar-link span {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.88rem;
}
.sidebar-wrapper .sidebar-main-title h6 {
  color: var(--rail-orange) !important;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.sidebar-wrapper .sidebar-link.active,
.sidebar-wrapper .sidebar-list.active > .sidebar-link {
  background: rgba(255,255,255,0.08) !important;
  border-left: 3px solid var(--rail-orange);
}
.sidebar-wrapper .sidebar-list.active > .sidebar-link span {
  color: #fff !important;
  font-weight: 600;
}
.sidebar-wrapper .sidebar-link:hover {
  background: rgba(255,255,255,0.05) !important;
}
.sidebar-wrapper .stroke-icon use,
.sidebar-wrapper .fill-icon use {
  stroke: rgba(255,255,255,0.55);
}
.sidebar-wrapper .sidebar-list.active .stroke-icon use {
  stroke: var(--rail-orange);
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.btn-irctc-primary {
  background: var(--rail-orange);
  border-color: var(--rail-orange);
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
}
.btn-irctc-primary:hover, .btn-irctc-primary:focus {
  background: var(--rail-orange-dark);
  border-color: var(--rail-orange-dark);
  color: #fff;
}
.btn-irctc-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 6px;
}
.btn-irctc-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

.form-action-btn {
  min-width: 140px;
  font-weight: 600;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   CARDS — Mofi defaults with subtle blue accent
   ══════════════════════════════════════════════════════════════════════════ */
/* Form card headers — white bg, blue left border */
.rail-card-header {
  background: #fff !important;
  border-bottom: 1px dashed rgba(106, 113, 133, 0.3);
  border-left: 4px solid var(--rail-blue);
  padding: 16px 24px;
}
.rail-card-header h4, .rail-card-header h5 {
  color: var(--rail-text) !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: none;
}
.rail-card-header svg { color: var(--rail-blue); }

/* Result card headers — blue gradient */
.rail-result-header {
  background: linear-gradient(135deg, var(--rail-navy) 0%, var(--rail-navy-light) 100%);
  padding: 16px 24px;
}
.rail-result-header h5 { color: #fff !important; margin: 0; font-weight: 600; font-size: 1rem; }
.rail-result-header small { color: rgba(255,255,255,0.8) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════════════════ */
.rail-thead th {
  background: var(--rail-blue-pale);
  color: var(--rail-navy);
  font-weight: 600;
  font-size: 0.83rem;
  white-space: nowrap;
  border-color: #d6e4f0;
}
.table-irctc-highlight {
  background-color: rgba(41, 128, 185, 0.04) !important;
}
.rs-table { font-size: 0.85rem; }
.rs-table td, .rs-table th { padding: 0.4rem 0.6rem; }

/* ══════════════════════════════════════════════════════════════════════════
   HERO SEARCH CARD (Homepage)
   ══════════════════════════════════════════════════════════════════════════ */
.rail-hero-card {
  background: linear-gradient(135deg, var(--rail-navy) 0%, var(--rail-navy-light) 60%, #2e6891 100%);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(26, 58, 92, 0.3);
}
.rail-hero-title {
  color: #fff;
  font-size: 1.65rem;
  font-weight: 700;
}
.rail-hero-card .text-muted { color: rgba(255,255,255,0.7) !important; }
.rail-hero-card .form-label { color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 500; }

/* Search tabs */
.rail-search-tabs { border-bottom: none !important; }
.rail-search-tabs .nav-link {
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px 8px 0 0;
  margin-right: 3px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  transition: all 0.15s;
}
.rail-search-tabs .nav-link:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }
.rail-search-tabs .nav-link.active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  border-bottom-color: transparent;
  color: #fff;
  font-weight: 600;
}
.tab-content {
  background: rgba(0,0,0,0.12);
  border-radius: 0 8px 8px 8px;
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
}

/* Hero form inputs — semi-transparent on dark bg */
.rail-hero-card .form-control,
.rail-hero-card .form-select {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.rail-hero-card .form-control::placeholder { color: rgba(255,255,255,0.45); }
.rail-hero-card .form-control:focus,
.rail-hero-card .form-select:focus {
  background: rgba(255,255,255,0.22);
  border-color: var(--rail-orange);
  box-shadow: 0 0 0 0.2rem rgba(242, 101, 34, 0.2);
  color: #fff;
}
.rail-hero-card .form-select option { color: #333; background: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   QUICK LINK CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.quick-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--rail-blue);
}
.quick-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.quick-icon svg, .quick-icon i { width: 20px; height: 20px; }

/* ══════════════════════════════════════════════════════════════════════════
   FORM STYLING — use Mofi defaults, just set focus color
   ══════════════════════════════════════════════════════════════════════════ */
.card-body .form-label {
  font-size: 0.85rem;
  color: var(--rail-text);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.card-body .form-control:focus,
.card-body .form-select:focus {
  border-color: var(--rail-blue);
  box-shadow: 0 0 0 0.15rem rgba(41, 128, 185, 0.15);
}

/* ══════════════════════════════════════════════════════════════════════════
   COLORS & UTILITIES
   ══════════════════════════════════════════════════════════════════════════ */
.text-irctc { color: var(--rail-blue) !important; }
.bg-irctc   { background-color: var(--rail-blue) !important; }
.badge.bg-irctc { background-color: var(--rail-blue) !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.input-group-text.bg-irctc {
  background-color: var(--rail-navy) !important;
  border-color: var(--rail-navy);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.footer { border-top: 2px solid var(--rail-orange); }

/* ══════════════════════════════════════════════════════════════════════════
   STATION AUTOCOMPLETE DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */
.station-ac-wrap { position: relative; }
.station-ac-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid var(--rail-border);
  border-top: 2px solid var(--rail-blue);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.station-ac-dropdown.show { display: block; }
.station-ac-dropdown .ac-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f5f5f5;
}
.station-ac-dropdown .ac-item:last-child { border-bottom: none; }
.station-ac-dropdown .ac-item:hover,
.station-ac-dropdown .ac-item.active {
  background: var(--rail-blue-light);
}
.station-ac-dropdown .ac-code {
  font-weight: 700;
  color: var(--rail-navy);
  font-size: 0.85rem;
  min-width: 50px;
  background: var(--rail-blue-pale);
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}
.station-ac-dropdown .ac-name {
  color: var(--rail-text);
  flex: 1;
  padding-left: 8px;
}
.station-ac-dropdown .ac-loading {
  padding: 12px;
  text-align: center;
  color: var(--rail-text-muted);
  font-size: 0.85rem;
}
/* Hero & header autocomplete needs white bg override */
.rail-hero-card .station-ac-dropdown,
.quick-search-form .station-ac-dropdown {
  background: #fff; border-color: var(--rail-border);
}
.rail-hero-card .station-ac-dropdown .ac-item,
.quick-search-form .station-ac-dropdown .ac-item { color: var(--rail-text); }
.rail-hero-card .station-ac-dropdown .ac-name,
.quick-search-form .station-ac-dropdown .ac-name { color: var(--rail-text); }

/* ══════════════════════════════════════════════════════════════════════════
   HEADER QUICK SEARCH
   ══════════════════════════════════════════════════════════════════════════ */
.quick-search-form .input-group { background: rgba(255,255,255,0.08); border-radius: 6px; }
.quick-search-form .form-control {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.85rem;
}
.quick-search-form .form-control::placeholder { color: rgba(255,255,255,0.45); }
.quick-search-form .form-control:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  box-shadow: none;
}
.quick-search-form .btn-outline-secondary {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.65);
}
.quick-search-form .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.quick-search-form .btn-irctc-primary {
  background: var(--rail-orange);
  border-color: var(--rail-orange);
}

/* ══════════════════════════════════════════════════════════════════════════
   SWAP BUTTON
   ══════════════════════════════════════════════════════════════════════════ */
.swap-btn {
  border-radius: 50% !important;
  width: 34px; height: 34px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   MISC
   ══════════════════════════════════════════════════════════════════════════ */
.btn-xs { padding: 0.2rem 0.45rem; font-size: 0.75rem; border-radius: 4px; }
.spinner-border.text-primary { color: var(--rail-blue) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .rail-hero-title { font-size: 1.3rem; }
  .rail-hero-card .card-body { padding: 1rem; }
  .tab-content { padding: 0.75rem; }
  .rs-table { font-size: 0.75rem; }
  .form-action-btn { width: 100%; }
  .rail-search-tabs .nav-link { font-size: 0.78rem; padding: 0.4rem 0.65rem; }
}
