/* ============================================
   Chart Vacancy Checker — Styles
   ============================================ */

/* Hero */
.cv-hero {
  background: var(--gradient-2);
  padding: 8rem 5% 3rem;
  text-align: center;
  color: var(--white);
}

.cv-hero-content h1 {
  font-family: "Sora", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cv-hero-content h1 i {
  margin-right: 0.5rem;
  color: var(--accent);
}

.cv-hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Search Section */
.cv-search-section {
  max-width: 800px;
  margin: -2rem auto 2rem;
  padding: 0 5%;
  position: relative;
  z-index: 10;
}

.cv-search-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.cv-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.cv-form-group {
  display: flex;
  flex-direction: column;
}

.cv-form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--secondary);
}

.cv-form-group label i {
  margin-right: 0.3rem;
}

.cv-form-group input {
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: "Space Mono", monospace;
  transition: var(--transition);
  background: var(--bg-light);
  cursor: pointer;
}

.cv-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.cv-form-group input[type="date"] {
  cursor: text;
}

/* Date picker buttons */
.cv-date-picker {
  display: flex;
  gap: 8px;
}

.cv-date-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: var(--bg-light);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.cv-date-btn:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.04);
}

.cv-date-btn.active {
  border-color: #ff6b35;
  background: #ff6b35;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.cv-date-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.cv-date-btn.active .cv-date-label {
  color: #fff;
  opacity: 1;
}

.cv-date-value {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.cv-date-btn.active .cv-date-value {
  color: #fff;
}

.cv-form-group input#trainNumber {
  cursor: text;
}

.cv-station-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.cv-search-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--gradient-1);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: "DM Sans", sans-serif;
}

.cv-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4);
}

.cv-search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Station Picker Modal */
.cv-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.cv-modal-overlay.active {
  display: flex;
}

.cv-modal {
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cv-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.cv-modal-header h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  color: var(--secondary);
}

.cv-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.3rem;
  transition: var(--transition);
}

.cv-modal-close:hover {
  color: var(--primary);
}

.cv-modal-body {
  overflow-y: auto;
  padding: 0.75rem;
  flex: 1;
}

.cv-station-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cv-station-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.75rem;
}

.cv-station-item:hover {
  background: var(--bg-light);
}

.cv-station-item .station-code {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  font-size: 0.95rem;
}

.cv-station-item .station-name {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.cv-station-item .station-order {
  margin-left: auto;
  font-size: 0.75rem;
  color: #94a3b8;
  background: var(--bg-light);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.cv-station-empty {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Progress Section */
.cv-progress-section {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 0 5%;
}

.cv-progress-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.cv-progress-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cv-progress-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cv-progress-header h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.cv-progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.cv-progress-bar {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.cv-progress-status {
  font-size: 0.9rem;
  color: #64748b;
}

.cv-progress-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.cv-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cv-stat-value {
  font-family: "Space Mono", monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.cv-stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* Results Section */
.cv-results-section {
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 5%;
}

/* Train Banner */
.cv-train-banner {
  background: var(--gradient-2);
  color: var(--white);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cv-train-banner .cv-train-info h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
}

.cv-train-banner .cv-train-info p {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.cv-train-banner .cv-train-vacancy {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-align: center;
}

.cv-train-banner .cv-train-vacancy .count {
  font-family: "Space Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
}

.cv-train-banner .cv-train-vacancy .label {
  font-size: 0.72rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart Status */
.cv-chart-status {
  margin-bottom: 1rem;
}

.cv-chart-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.cv-chart-badge.prepared {
  background: #dcfce7;
  color: #166534;
}

.cv-chart-badge.not-prepared {
  background: #fef3c7;
  color: #92400e;
}

/* Tabs */
.cv-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cv-tab {
  padding: 0.65rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: var(--white);
  color: #64748b;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: "DM Sans", sans-serif;
}

.cv-tab i {
  margin-right: 0.35rem;
}

.cv-tab.active {
  background: var(--gradient-1);
  color: var(--white);
  border-color: var(--primary);
}

.cv-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.cv-tab-content {
  display: none;
}

.cv-tab-content.active {
  display: block;
}

/* Coach Grid */
.cv-coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.cv-coach-card {
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.cv-coach-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cv-coach-card.has-vacancy {
  border-color: #86efac;
  background: #f0fdf4;
}

.cv-coach-card.no-vacancy {
  border-color: #fca5a5;
  background: #fef2f2;
  opacity: 0.7;
}

.cv-coach-card .coach-name {
  font-family: "Space Mono", monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary);
}

.cv-coach-card .coach-class {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cv-coach-card .coach-vacant {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.cv-coach-card.has-vacancy .coach-vacant {
  color: #16a34a;
}

.cv-coach-card.no-vacancy .coach-vacant {
  color: #dc2626;
}

/* Filters */
.cv-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cv-filter-chip {
  padding: 0.4rem 0.9rem;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: "DM Sans", sans-serif;
  color: #64748b;
}

.cv-filter-chip.active {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.cv-filter-chip:hover:not(.active) {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Stats Row */
.cv-seats-stats {
  margin-bottom: 0.85rem;
}

.cv-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 12px rgba(26, 35, 126, 0.06);
}

.cv-stats-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cv-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
}

.cv-stat-chip strong {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.cv-stat-chip.total {
  background: rgba(26, 35, 126, 0.1);
  color: #1a237e;
}

.cv-stat-chip.vacant {
  background: rgba(67, 160, 71, 0.1);
  color: #2e7d32;
}

.cv-stat-chip.partial {
  background: rgba(255, 152, 0, 0.1);
  color: #e65100;
}

.cv-vacancy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: "DM Sans", sans-serif;
  background: rgba(26, 35, 126, 0.08);
  color: #1a237e;
}

.cv-vacancy-toggle.active {
  background: linear-gradient(135deg, #43a047, #66bb6a);
  color: var(--white);
}

.cv-vacancy-toggle:hover {
  transform: translateY(-1px);
}

/* Seats List — Card Design (Flutter-style) */
.cv-seats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cv-seat-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid #e2e8f0;
}

.cv-seat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cv-seat-card.vacant {
  border-color: rgba(67, 160, 71, 0.2);
}

.cv-seat-card.partial {
  border-color: rgba(255, 152, 0, 0.2);
}

/* Main seat row */
.cv-seat-main {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  gap: 0.85rem;
}

/* Berth type icon box (like Flutter's gradient box) */
.cv-seat-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  flex-shrink: 0;
}

.cv-seat-type-icon.vacant {
  background: linear-gradient(135deg, #43a047, #66bb6a);
}

.cv-seat-type-icon.partial {
  background: linear-gradient(135deg, #ff9800, #ffb74d);
}

/* Seat info */
.cv-seat-info {
  flex: 1;
  min-width: 0;
}

.cv-seat-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cv-seat-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a237e;
}

.cv-cabin-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(26, 35, 126, 0.08);
  color: #1a237e;
}

.cv-seat-coach-label {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
  display: block;
}

/* Status badge */
.cv-seat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.cv-seat-status.vacant {
  background: rgba(67, 160, 71, 0.1);
  color: #2e7d32;
}

.cv-seat-status.partial {
  background: rgba(255, 152, 0, 0.1);
  color: #e65100;
}

.cv-seat-status i {
  font-size: 0.7rem;
}

/* Vacant segments footer */
.cv-seat-segments {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid #f1f5f9;
}

.cv-seat-segments.vacant {
  background: rgba(67, 160, 71, 0.04);
}

.cv-seat-segments.partial {
  background: rgba(255, 152, 0, 0.04);
}

.cv-seg-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  padding-top: 0.15rem;
}

.cv-seg-label i {
  margin-right: 0.25rem;
  font-size: 0.72rem;
}

.cv-seg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cv-seg-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.cv-seg-chip.vacant {
  background: rgba(67, 160, 71, 0.12);
  color: #2e7d32;
}

.cv-seg-chip.partial {
  background: rgba(255, 152, 0, 0.12);
  color: #e65100;
}

/* Journey Paths — Flutter-matching Design */
.cv-paths-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Journey Path Card ────────────────────────────────────── */
.jp-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(26, 35, 126, 0.15);
  box-shadow: 0 8px 24px rgba(26, 35, 126, 0.12);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.jp-card:hover {
  box-shadow: 0 12px 36px rgba(26, 35, 126, 0.16);
  transform: translateY(-2px);
}

.jp-card.direct {
  border-color: rgba(67, 160, 71, 0.15);
  box-shadow: 0 8px 24px rgba(67, 160, 71, 0.12);
}

.jp-card.direct:hover {
  box-shadow: 0 12px 36px rgba(67, 160, 71, 0.16);
}

/* ── Card Header ──────────────────────────────────────────── */
.jp-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg,
      rgba(26, 35, 126, 0.08),
      rgba(26, 35, 126, 0.02));
  border-bottom: 1px solid rgba(26, 35, 126, 0.06);
}

.jp-card-header.direct {
  background: linear-gradient(135deg,
      rgba(67, 160, 71, 0.08),
      rgba(67, 160, 71, 0.02));
  border-bottom-color: rgba(67, 160, 71, 0.06);
}

.jp-path-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a237e, rgba(26, 35, 126, 0.7));
  color: #fff;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

.jp-path-number.direct {
  background: linear-gradient(135deg, #43a047, rgba(67, 160, 71, 0.7));
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.3);
}

.jp-header-text {
  flex: 1;
  min-width: 0;
}

.jp-header-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a237e;
}

.jp-header-subtitle {
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  color: #78909c;
  margin-top: 2px;
}

.jp-hop-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.jp-hop-badge.multi {
  background: rgba(26, 35, 126, 0.1);
  color: #1a237e;
}

.jp-hop-badge.direct {
  background: rgba(67, 160, 71, 0.1);
  color: #43a047;
}

.jp-hop-badge i {
  font-size: 0.68rem;
}

/* ── Journey Path Class Filter ────────────────────────────── */
.jp-class-filter {
  display: flex;
  gap: 8px;
  padding: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.jp-class-filter::-webkit-scrollbar {
  display: none;
}

.jp-class-chip {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(26, 35, 126, 0.15);
  background: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #757575;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.jp-class-chip:hover {
  border-color: rgba(26, 35, 126, 0.3);
  color: #1a237e;
}

.jp-class-chip.active {
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26, 35, 126, 0.25);
}

/* ── Vertical Stepper ─────────────────────────────────────── */
.jp-stepper {
  padding: 8px 16px 16px;
}

.jp-step {
  display: flex;
  align-items: stretch;
  min-height: 0;
}

/* Stepper column: dots + lines */
.jp-stepper-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}

.jp-stepper-line-top {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(to bottom,
      rgba(26, 35, 126, 0.3),
      rgba(26, 35, 126, 0.5));
}

.jp-stepper-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a237e, rgba(26, 35, 126, 0.7));
  color: #fff;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(26, 35, 126, 0.4);
}

.jp-stepper-dot.step-last {
  background: linear-gradient(135deg, #43a047, rgba(67, 160, 71, 0.7));
  box-shadow: 0 3px 8px rgba(67, 160, 71, 0.4);
}

.jp-stepper-dot i {
  font-size: 0.75rem;
}

.jp-stepper-dot span {
  font-size: 0.8rem;
}

.jp-stepper-line-bottom {
  flex: 1;
  width: 3px;
  min-height: 16px;
  border-radius: 2px;
  margin: 4px 0;
  background: linear-gradient(to bottom,
      rgba(26, 35, 126, 0.5),
      rgba(26, 35, 126, 0.3));
}

/* ── Step Content ─────────────────────────────────────────── */
.jp-step-content {
  flex: 1;
  margin-left: 0;
  padding: 14px;
  margin-top: 0;
  margin-bottom: 12px;
  background: rgba(26, 35, 126, 0.04);
  border: 1px solid rgba(26, 35, 126, 0.15);
  border-radius: 14px;
}

.jp-step-content.step-last {
  background: rgba(67, 160, 71, 0.04);
  border-color: rgba(67, 160, 71, 0.15);
  margin-bottom: 0;
}

.jp-step:first-child .jp-step-content {
  margin-top: 0;
}

/* Station row */
.jp-station-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.jp-station-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jp-station-badge.departure {
  background: rgba(26, 35, 126, 0.1);
  color: #1a237e;
}

.jp-station-badge.arrival {
  background: linear-gradient(135deg, #43a047, #66bb6a);
  color: #fff;
}

.jp-arrow {
  font-size: 0.85rem;
  color: #1a237e;
  flex-shrink: 0;
}

.jp-arrow.step-last {
  color: #43a047;
}

/* ── Seat Info Card ───────────────────────────────────────── */
.jp-seat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 10px;
}

.jp-seat-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(26, 35, 126, 0.1);
  color: #1a237e;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.jp-seat-type-icon.step-last {
  background: rgba(67, 160, 71, 0.1);
  color: #43a047;
}

.jp-seat-info {
  flex: 1;
  min-width: 0;
}

.jp-seat-number {
  font-family: "Sora", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a237e;
}

.jp-seat-coach {
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  color: #78909c;
  margin-top: 2px;
}

.jp-seat-icon-right {
  color: rgba(26, 35, 126, 0.35);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.jp-seat-icon-right.step-last {
  color: rgba(67, 160, 71, 0.35);
}

/* ── More Seats for this Segment ─────────────────────────── */
.jp-more-seats-container {
  padding: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  border: 1px solid rgba(26, 35, 126, 0.18);
  position: relative;
  overflow: hidden;
}

.jp-more-seats-container.step-last {
  border-color: rgba(67, 160, 71, 0.18);
}

.jp-more-seats-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(26, 35, 126, 0.75);
}

.jp-more-seats-container.step-last .jp-more-seats-header {
  color: rgba(67, 160, 71, 0.75);
}

.jp-more-seats-header i {
  font-size: 0.65rem;
}

.jp-more-seats-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 35, 126, 0.15) transparent;
}

.jp-more-seats-scroll.blurred {
  filter: blur(5px);
  pointer-events: none;
  opacity: 0.6;
  user-select: none;
}

.jp-more-seats-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  z-index: 10;
}

.jp-more-seats-container:hover .jp-overlay-content {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.jp-overlay-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff6b35, #ff8f5e);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.jp-overlay-content i {
  font-size: 0.9rem;
}

.jp-more-seats-scroll::-webkit-scrollbar {
  height: 4px;
}

.jp-more-seats-scroll::-webkit-scrollbar-thumb {
  background: rgba(26, 35, 126, 0.15);
  border-radius: 2px;
}

.jp-more-seat-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 62px;
  padding: 4px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(26, 35, 126, 0.12);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.jp-more-seat-compact.step-last {
  border-color: rgba(67, 160, 71, 0.12);
}

.jp-more-seat-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(26, 35, 126, 0.1);
}

.jp-compact-number {
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a237e;
  line-height: 1.2;
}

.jp-more-seat-compact.step-last .jp-compact-number {
  color: #43a047;
}

.jp-compact-coach {
  font-family: "DM Sans", sans-serif;
  font-size: 0.58rem;
  color: #78909c;
  line-height: 1.3;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.jp-compact-type {
  font-family: "Space Mono", monospace;
  font-size: 0.52rem;
  font-weight: 700;
  color: rgba(26, 35, 126, 0.5);
  line-height: 1;
  margin-top: 2px;
}

.jp-more-seat-compact.step-last .jp-compact-type {
  color: rgba(67, 160, 71, 0.5);
}

/* ── Instruction labels ───────────────────────────────────── */
.jp-instruction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
}

.jp-instruction.switch {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.jp-instruction.switch i {
  font-size: 0.65rem;
}

.jp-instruction.destination {
  background: rgba(67, 160, 71, 0.1);
  color: #43a047;
  border: 1px solid rgba(67, 160, 71, 0.3);
}

.jp-instruction.destination i {
  font-size: 0.65rem;
}

/* ── Responsive adjustments ───────────────────────────────── */
@media (max-width: 540px) {
  .jp-card-header {
    padding: 12px;
    gap: 10px;
  }

  .jp-path-number {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .jp-header-title {
    font-size: 0.92rem;
  }

  .jp-hop-badge {
    padding: 5px 10px;
    font-size: 0.65rem;
  }

  .jp-stepper {
    padding: 6px 12px 12px;
  }

  .jp-stepper-col {
    width: 34px;
  }

  .jp-stepper-dot {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .jp-step-content {
    padding: 10px;
  }

  .jp-station-badge {
    font-size: 0.65rem;
    padding: 4px 8px;
    max-width: 110px;
  }

  .jp-seat-card {
    gap: 8px;
    padding: 6px 10px;
  }

  .jp-seat-type-icon {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .jp-seat-number {
    font-size: 0.78rem;
  }
}

/* No results */
.cv-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.cv-no-results i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.cv-no-results h4 {
  color: #1e293b;
  margin-bottom: 0.35rem;
}

/* Error Section */
.cv-error-section {
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 0 5%;
}

.cv-error-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #fca5a5;
}

.cv-error-card>i {
  font-size: 2.5rem;
  color: #ef4444;
  margin-bottom: 0.75rem;
}

.cv-error-card h3 {
  font-family: "Sora", sans-serif;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.cv-error-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  word-break: break-word;
}

.cv-retry-btn {
  padding: 0.7rem 1.5rem;
  background: var(--gradient-1);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: "DM Sans", sans-serif;
}

.cv-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

/* Info Section */
.cv-info-section {
  max-width: 960px;
  margin: 2rem auto 3rem;
  padding: 0 5%;
}

.cv-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.cv-info-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

.cv-info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cv-info-card i {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.cv-info-card h4 {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
}

.cv-info-card p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .cv-hero {
    padding: 7rem 5% 2.5rem;
  }

  .cv-hero-content h1 {
    font-size: 1.6rem;
  }

  .cv-hero-content p {
    font-size: 0.95rem;
  }

  .cv-form-grid {
    grid-template-columns: 1fr;
  }

  .cv-train-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cv-tabs {
    gap: 0.35rem;
  }

  .cv-tab {
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
  }

  .cv-coach-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .cv-seat-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cv-seat-range {
    flex-basis: 100%;
    order: 5;
  }

  .cv-stats-row {
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
  }

  .cv-stats-chips {
    justify-content: center;
  }

  .cv-vacancy-toggle {
    align-self: center;
  }

  .cv-seat-main {
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
  }

  .cv-seat-type-icon {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .cv-seat-title {
    font-size: 0.88rem;
  }

  .cv-seat-segments {
    flex-direction: column;
    gap: 0.35rem;
  }

  .cv-path-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .cv-path-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
  }

  .cv-timeline {
    padding-left: 0.5rem;
  }

  .cv-timeline-seat-card {
    max-width: 100%;
    padding: 0.55rem 0.75rem;
  }

  .cv-timeline-code {
    font-size: 0.88rem;
  }

  .cv-timeline-name {
    font-size: 0.72rem;
  }

  .cv-seat-icon {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .cv-seat-label {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .cv-search-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

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

  .cv-coach-card {
    padding: 0.75rem;
    border-radius: 10px;
  }

  .cv-coach-card .coach-name {
    font-size: 1.1rem;
  }

  .cv-info-grid {
    grid-template-columns: 1fr;
  }

  .cv-timeline-segment {
    min-height: 48px;
  }

  .cv-timeline-dot {
    width: 12px;
    height: 12px;
  }

  .cv-timeline-node {
    gap: 0.65rem;
  }

  .cv-path-number {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
  }

  .cv-path-header h4 {
    font-size: 0.92rem;
  }
}

/* ── Search Limit Lock Popup ───────────────────────────────────────── */
.cv-search-limit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cv-search-limit-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cv-search-limit-popup {
  background: var(--white, #fff);
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cv-search-limit-overlay.active .cv-search-limit-popup {
  transform: translateY(0) scale(1);
}

.cv-search-limit-icon {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e53935, #ff6b35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2.2rem;
  color: #fff;
  box-shadow: 0 8px 28px rgba(229, 57, 53, 0.35);
  animation: cv-lock-pulse 2s ease-in-out infinite;
}

@keyframes cv-lock-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(229, 57, 53, 0.35); }
  50% { box-shadow: 0 8px 36px rgba(229, 57, 53, 0.55); }
}

.cv-search-limit-popup h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.cv-search-limit-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.cv-search-limit-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.cv-search-limit-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f8f9fa;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #333;
}

.cv-search-limit-feature i {
  color: #FF6B35;
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.cv-search-limit-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #e53935, #ff6b35);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.35);
}

.cv-search-limit-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(229, 57, 53, 0.5);
}

.cv-search-limit-download i {
  font-size: 1.2rem;
}

.cv-search-limit-dismiss {
  background: none;
  border: none;
  color: #999;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.85rem;
  padding: 0.4rem 0.8rem;
  transition: color 0.2s;
}

.cv-search-limit-dismiss:hover {
  color: #555;
}

/* ── App Download Popup ─────────────────────────────────────────── */
.cv-app-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cv-app-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cv-app-popup {
  background: var(--white, #fff);
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cv-app-popup-overlay.active .cv-app-popup {
  transform: translateY(0) scale(1);
}

.cv-app-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cv-app-popup-close:hover {
  background: #f0f0f0;
  color: #333;
}

.cv-app-popup-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FF6B35, #ff8f5e);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
}

.cv-app-popup h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.35rem;
}

.cv-app-popup-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1.5rem;
}

.cv-app-popup-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.cv-app-popup-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f8f9fa;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #333;
}

.cv-app-popup-feature i {
  color: #FF6B35;
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.cv-app-popup-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, #1a1a2e, #2d2d5e);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.3);
}

.cv-app-popup-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 26, 46, 0.4);
}

.cv-app-popup-download i {
  font-size: 1.2rem;
}

.cv-app-popup-dismiss {
  background: none;
  border: none;
  color: #999;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.85rem;
  padding: 0.4rem 0.8rem;
  transition: color 0.2s;
}

.cv-app-popup-dismiss:hover {
  color: #555;
}