:root {
  /* Colors */
  --bg-color: #ffffff; /* White */
  --bg-color-light: #ffffff;
  --page-bg: #f3f4f6; /* Light gray page background as in picture */
  --text-main: #0f172a; /* Dark text */
  --text-muted: #475569;
  --accent-primary: #059669; /* Emerald Green */
  --accent-primary-hover: #047857;
  --accent-secondary: #d97706; /* Amber/Orange */
  --border-color: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.85);
  
  /* Layout */
  --max-width: 900px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--page-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary-hover);
}

/* Header */
header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Main Content */
main {
  flex: 1;
  width: 100%;
  padding: 2rem 1rem;
}

/* Wrapper for the white card */
.cvt-wrapper {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 0 2rem 0; /* padding added inside sections */
  overflow: hidden;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 3rem 2rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Form Container */
.tool-container {
  background: var(--bg-color-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 0 2rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.tool-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="date"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-color);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn {
  display: block;
  background: var(--accent-primary);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.btn:hover {
  background: var(--accent-primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Result Section */
#result-container, 
#pnr-result-container, 
#fare-result-container {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.train-info h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin: 0;
}

.train-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.status-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.coach-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.coach-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
}

.coach-card.full {
  opacity: 0.6;
}

.coach-name {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.coach-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coach-status {
  font-weight: 600;
  font-size: 0.875rem;
}

.status-available { color: var(--accent-primary); }
.status-rac { color: var(--accent-secondary); }
.status-wl { color: #ef4444; }

/* Blog Article Styles */
.article-container {
  padding: 0 3rem 2rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.article-content ul, 
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .article-container {
    padding: 0 1.5rem 1.5rem;
  }
  .tool-container {
    margin: 0 1rem 2rem;
    padding: 1.5rem;
  }
  .nav-links {
    display: flex;
  }
}

/* FAQ Section */
.faq-section { margin: 3rem 0; padding: 2rem; background: var(--bg-color-light); border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-label { display: inline-block; background: rgba(16, 185, 129, 0.1); color: var(--accent-primary); padding: 0.25rem 0.75rem; border-radius: 999px; font-weight: 600; font-size: 0.875rem; margin-bottom: 1rem; }
.section-title { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.5rem; }
.section-desc { color: var(--text-muted); font-size: 1.1rem; }
.faq-container { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; transition: all 0.3s ease; }
.faq-item.active { border-color: var(--accent-primary); box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1); }
.faq-question { width: 100%; text-align: left; background: var(--bg-color); padding: 1.25rem 1.5rem; border: none; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; color: var(--text-main); cursor: pointer; transition: background 0.2s ease; }
.faq-question:hover { background: #f8fafc; }
.faq-question i { color: var(--text-muted); transition: transform 0.3s ease; }
.faq-item.active .faq-question i { transform: rotate(180deg); color: var(--accent-primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: var(--bg-color); }
.faq-content { padding: 0 1.5rem 1.25rem; color: var(--text-muted); line-height: 1.6; }
.faq-content p { margin: 0; font-size: 1.05rem; }

/* Tools Grid Section */
.tools-grid-section {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.tools-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .tools-grid-container {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
}

.tool-card:hover .tool-arrow {
  transform: translateX(4px);
}

.tool-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
}

.tool-content {
  flex: 1;
}

.tool-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.tool-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

.tool-arrow {
  color: #94a3b8;
  font-size: 1rem;
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
}
/* Newsletter & Footer Layout CSS */
.newsletter-section {
  background-color: #0c4a9d;
  padding: 3rem 1.5rem;
  color: white;
  margin-bottom: 0;
}
.newsletter-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .newsletter-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: center;
  }
}
.newsletter-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}
.newsletter-text p {
  color: #e2e8f0;
  font-size: 0.95rem;
}
.newsletter-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
}
.newsletter-form {
  display: flex;
  background: white;
  border-radius: var(--radius-md);
  padding: 0.25rem;
}
.newsletter-form input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--text-main);
  outline: none;
  box-shadow: none;
  min-width: 0;
}
.newsletter-form button {
  background-color: #f59e0b;
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover {
  opacity: 0.9;
}
.newsletter-privacy {
  font-size: 0.75rem;
  color: #93c5fd;
  text-align: center;
}
@media (min-width: 768px) {
  .newsletter-privacy {
    text-align: left;
  }
}

.site-footer-main {
  background-color: #0f172a;
  padding: 3rem 2rem;
  text-align: center;
  color: #94a3b8;
  margin-top: 0;
  border-top: none;
}
.footer-links-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.footer-links-container a {
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}
.footer-links-container a:hover {
  color: white;
}
.footer-cache-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.2;
}
.footer-cache-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}
.footer-cache-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.cache-toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 999999;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #10b981;
  animation: toastSlideUp 0.3s ease forwards;
}
@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.site-footer-main p {
  font-size: 0.85rem;
  color: #64748b;
}

/* Premium Hero Styling */
.premium-hero {
  text-align: center;
  padding: 4rem 2rem 2.5rem;
  position: relative;
  background: radial-gradient(circle at top center, rgba(16, 185, 129, 0.08), transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-primary);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gradient-heading {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #0f172a; /* Fallback */
  letter-spacing: -1px;
}

[data-theme="dark"] .gradient-heading {
  background: linear-gradient(135deg, #f8fafc 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f8fafc;
}

.premium-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .gradient-heading {
    font-size: 2.2rem;
  }
  .premium-hero {
    padding: 3rem 1.5rem 1.5rem;
  }
  .premium-hero p {
    font-size: 1rem;
  }
}

/* Mobile Responsive Header */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1.25rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Firefox */
  }

  .nav-links::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .nav-links a {
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .logo img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 70px;
  }
}

/* Sticky Mobile Ad */
.sticky-bottom-ad {
  display: none; /* Hidden by default (desktop) */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-align: center;
  padding: 5px 0;
  border-top: 1px solid var(--border-color);
}

.sticky-ad-close {
  position: absolute;
  top: -25px;
  right: 5px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .sticky-bottom-ad {
    display: block;
  }
  /* Add padding to body so content isn't hidden behind the ad */
  body {
    padding-bottom: 60px;
  }
}


/* ============================================================
   TRAIN CHART VACANCY - ENHANCED VACANT BERTHS & COACH LAYOUT
   ============================================================ */


/* Popular Trains Bar & Chips - Ultra-Polished Styling */
.popular-trains-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.6rem !important;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 0.85rem 1.15rem !important;
  margin-top: -0.5rem !important;
  margin-bottom: 1.75rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.chips-label {
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  margin-right: 0.25rem !important;
}
.chips-label i {
  color: #ef4444 !important;
}
.train-chip {
  all: unset !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  color: #065f46 !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: 999px !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  font-family: inherit !important;
}
.train-chip strong {
  color: #047857 !important;
  font-weight: 800 !important;
}
.train-chip:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}
.train-chip:hover strong {
  color: #ffffff !important;
}
.train-chip:hover i {
  color: #ffffff !important;
}
.train-chip:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2) !important;
}


/* Autocomplete Dropdown */
.autocomplete-wrapper {
  position: relative;
}
.train-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}
.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover, .autocomplete-item.active {
  background: #f0fdf4;
}
.autocomplete-train-info {
  display: flex;
  flex-direction: column;
}
.autocomplete-train-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}
.autocomplete-train-route {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
}
.autocomplete-badge {
  background: #ecfdf5;
  color: #059669;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* Chart Status Banner */
.chart-banner {
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.3);
  position: relative;
  overflow: hidden;
}
.chart-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.chart-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.chart-train-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}
.chart-train-route {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: #d1fae5;
  font-weight: 500;
  flex-wrap: wrap;
}
.chart-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.status-pill-prepared {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ecfdf5;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulseGreen 1.6s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.status-pill-booking {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chart-banner-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  color: #ecfdf5;
}
.chart-info-item {
  display: flex;
  flex-direction: column;
}
.chart-info-label {
  font-size: 0.75rem;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 2px;
}
.chart-info-val {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

/* KPI Summary Metric Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}
.kpi-card.highlight {
  border-color: #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.kpi-icon.green { background: #d1fae5; color: #059669; }
.kpi-icon.blue { background: #dbeafe; color: #2563eb; }
.kpi-icon.purple { background: #f3e8ff; color: #7c3aed; }
.kpi-icon.amber { background: #fef3c7; color: #d97706; }
.kpi-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.kpi-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.kpi-sub {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Horizontal Train Coach Rake Visualizer */
.rake-wrapper {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.rake-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rake-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rake-hint {
  font-size: 0.8rem;
  color: #6b7280;
}
.rake-track {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem;
  scrollbar-width: thin;
}
.rake-track::-webkit-scrollbar {
  height: 6px;
}
.rake-track::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.rake-engine {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  min-width: 60px;
  border-radius: 8px 18px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.rake-engine i {
  font-size: 1.2rem;
  margin-bottom: 2px;
  color: #f59e0b;
}
.rake-coach-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  min-width: 72px;
  padding: 0.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.rake-coach-btn:hover {
  border-color: #059669;
  background: #ecfdf5;
  transform: translateY(-2px);
}
.rake-coach-btn.active {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}
.rake-coach-code {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e293b;
}
.rake-coach-class {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}
.rake-vacant-badge {
  background: #10b981;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-top: 4px;
}
.rake-vacant-badge.zero {
  background: #94a3b8;
}

/* Tabs Navigation */
.chart-tabs-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.chart-tabs-bar::-webkit-scrollbar {
  display: none;
}
.chart-tab-btn {
  background: none;
  border: none;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chart-tab-btn:hover {
  color: #059669;
}
.chart-tab-btn.active {
  color: #059669;
  border-bottom-color: #059669;
}
.tab-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.725rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.chart-tab-btn.active .tab-badge {
  background: #059669;
  color: white;
}

/* Filter Toolbar for Empty Berths */
.vacant-toolbar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}
.toolbar-left, .toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.filter-select {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  background: white;
  outline: none;
  cursor: pointer;
}
.filter-select:focus {
  border-color: #059669;
}
.berth-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.type-filter-chip {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.type-filter-chip:hover {
  border-color: #059669;
  color: #059669;
}
.type-filter-chip.active {
  background: #059669;
  color: white;
  border-color: #059669;
}
.search-berth-input {
  padding: 0.45rem 0.85rem 0.45rem 2rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  width: 140px;
  background: white;
}
.search-wrapper {
  position: relative;
}
.search-wrapper i {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
}
.action-btn-sm {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}
.action-btn-sm:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Empty Berths Table */
.vacant-table-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.vacant-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.vacant-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
}
.vacant-table td {
  padding: 0.95rem 1rem;
  font-size: 0.875rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.vacant-table tr:last-child td {
  border-bottom: none;
}
.vacant-table tr:hover td {
  background: #f8fafc;
}

/* Berth Badges */
.berth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.775rem;
  font-weight: 700;
}
.berth-badge-lb { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.berth-badge-sl { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.berth-badge-mb { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.berth-badge-ub { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.berth-badge-su { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.berth-badge-ws { background: #ccfbf1; color: #115e59; border: 1px solid #99f6e4; }

.coach-tag {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}
.coach-subtag {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.bay-tag {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
}
.route-stretch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.route-stretch i {
  color: #10b981;
  font-size: 0.75rem;
}
.route-type-pill {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 2px;
  display: inline-block;
}
.route-type-pill.full { background: #ecfdf5; color: #047857; }
.route-type-pill.partial { background: #fffbeb; color: #b45309; }

.book-btn-table {
  background: #059669;
  color: white;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.book-btn-table:hover {
  background: #047857;
  transform: translateY(-1px);
}
.view-map-link {
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
}
.view-map-link:hover {
  text-decoration: underline;
}

/* Empty Berths Mobile Cards View */
.vacant-cards-mobile {
  display: none;
  gap: 0.85rem;
  flex-direction: column;
}
@media (max-width: 768px) {
  .vacant-table-container { display: none; }
  .vacant-cards-mobile { display: flex; }
}
.vacant-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.vacant-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.vacant-card-body {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.85rem;
}

/* Interactive Coach Seat Map Diagram */
.coach-map-wrapper {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.map-coach-info h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.map-coach-info p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 2px 0 0 0;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #475569;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.legend-box.vacant { background: #10b981; border: 1px solid #059669; }
.legend-box.booked { background: #cbd5e1; border: 1px solid #94a3b8; }
.legend-box.rac { background: #f59e0b; border: 1px solid #d97706; }
.legend-box.selected { background: #3b82f6; border: 2px solid #1d4ed8; }

/* The Coach Exterior Shell */
.coach-exterior-shell {
  background: #f8fafc;
  border: 3px solid #64748b;
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  overflow-x: auto;
}
.coach-end-doors {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  padding: 0 0.5rem;
}
.coach-bays-layout {
  display: flex;
  gap: 1.25rem;
  min-width: 750px;
}
.coach-bay-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.bay-num-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.bay-compartment {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bay-main-side {
  display: flex;
  gap: 0.75rem;
}
.bay-left-col, .bay-right-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.bay-side-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 50px;
}
.bay-gangway {
  border-left: 2px dashed #cbd5e1;
  margin: 0 0.35rem;
}

/* Individual Berth / Seat Box */
.seat-box {
  border-radius: 6px;
  padding: 0.45rem 0.25rem;
  text-align: center;
  font-size: 0.725rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
}
.seat-box.vacant {
  background: #10b981;
  color: white;
  border-color: #059669;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}
.seat-box.vacant:hover {
  background: #059669;
  transform: scale(1.08);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}
.seat-box.booked {
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
  cursor: default;
}
.seat-box.rac {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}
.seat-box.selected {
  outline: 3px solid #2563eb;
  transform: scale(1.1);
  z-index: 10;
}
.seat-box-num {
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
}
.seat-box-type {
  font-size: 0.65rem;
  opacity: 0.9;
  margin-top: 1px;
}

/* Berth Inspector Drawer / Modal */
.berth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.berth-modal-content {
  background: white;
  border-radius: 18px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.berth-modal-header {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.berth-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}
.berth-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.berth-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.berth-modal-body {
  padding: 1.5rem;
}
.berth-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  background: #f8fafc;
  padding: 1rem;
  border-radius: 12px;
}
.modal-info-item label {
  font-size: 0.725rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}
.modal-info-item span {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}
.modal-guidance {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #064e3b;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
}
.modal-btn-primary {
  flex: 1;
  background: #059669;
  color: white;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.modal-btn-primary:hover {
  background: #047857;
}
.modal-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}
.modal-btn-secondary:hover {
  background: #e2e8f0;
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #result-container, #result-container * {
    visibility: visible;
  }
  #result-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .chart-tabs-bar, .vacant-toolbar, .rake-wrapper, .popular-trains-bar, header, footer, .sticky-bottom-ad, button {
    display: none !important;
  }
  .vacant-table-container {
    display: block !important;
    border: 1px solid #000;
  }
}
