/* =====================================================================
   AIR INDIA VIRTUAL — Portal layout
   Sleek sidebar + topbar + content shell aligned to Vista brand.
   ===================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, #14101220 0%, #0a070918 100%), var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}
.sidebar-head {
  padding: 22px 20px 16px;
  display: flex; align-items: center; gap: 12px;
}
.sidebar-head .crest {
  width: 38px; height: 38px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--ai-red), var(--ai-aubergine));
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(218,25,47,.4);
}
.sidebar-head .name { font-family: var(--font-display); font-weight:700; font-size: 15px; letter-spacing:-.01em; line-height:1; }
.sidebar-head .sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--ai-gold-bright); margin-top: 3px; }

.sidebar-nav {
  flex: 1; padding: 8px 10px 12px; overflow-y: auto;
}
.nav-group { margin-bottom: 14px; }
.nav-group-title {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-mute);
  padding: 6px 12px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  margin-bottom: 1px;
}
.nav-item:hover { background: rgba(245,240,232,.05); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(218,25,47,.16), rgba(74,27,65,.06));
  color: var(--ai-cream);
  box-shadow: inset 2px 0 0 var(--ai-gold);
}
.nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; display:flex; align-items:center; justify-content:center; }
.nav-item .chip {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 9.5px;
  padding: 2px 7px; border-radius: 99px;
  background: rgba(199,165,108,.15); color: var(--ai-gold-bright);
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-foot .pilot { display: flex; align-items: center; gap: 10px; }
.sidebar-foot .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-red), var(--ai-aubergine));
  display:flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 12px; color: var(--ai-cream);
}
.sidebar-foot .info { flex: 1; min-width: 0; }
.sidebar-foot .pname { font-size: 12px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.sidebar-foot .prank {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ai-gold-bright);
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 8;
}
.topbar .breadcrumb { flex: 1; display: flex; align-items: center; gap: 10px; }
.topbar .breadcrumb .page-title { font-family: var(--font-display); font-weight:600; font-size: 17px; color: var(--ai-cream); letter-spacing: -.01em; }
.topbar .breadcrumb .sub {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-mute);
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.topbar .clock-grp { display:flex; align-items:center; gap: 12px; }
.topbar .clock { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.topbar .clock .lbl { color: var(--ai-gold-bright); font-size:9px; letter-spacing:.22em; text-transform:uppercase; margin-right: 6px;}
/* FSUIPC live-connection chip (driven by AIVA.FSUIPC events) */
.topbar .fs-chip {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
  user-select: none;
  transition: all .25s var(--ease);
}
.topbar .fs-chip.fs-off {
  color: rgba(248,113,113,.85);
  border-color: rgba(248,113,113,.32);
  background: rgba(248,113,113,.06);
}
.topbar .fs-chip.fs-on {
  color: #6EE7B7;
  border-color: rgba(110,231,183,.42);
  background: rgba(110,231,183,.10);
  box-shadow: 0 0 0 1px rgba(110,231,183,.08), 0 0 14px rgba(110,231,183,.18);
}
.topbar .iconbtn {
  width: 34px; height: 34px; border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid var(--border); color: var(--text-dim);
  transition: all var(--t) var(--ease); cursor: pointer;
}
.topbar .iconbtn:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------- Content ---------- */
.content {
  padding: 26px 32px 80px;
  max-width: var(--content-max);
  width: 100%;
}
.content > section { margin-bottom: 26px; animation: fadeUp .32s var(--ease-emph) both; }
/* Sections that host floating autocomplete dropdowns need a higher
   stacking context than their following siblings, otherwise the
   per-section CSS animation creates a stacking context at z=0 and
   the next section paints over the open dropdown. */
.content > section:has(.airport-drop) {
  position: relative;
  z-index: 50;
}
.section-title {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px; gap: 16px; flex-wrap: wrap;
}
.section-title h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ai-cream); letter-spacing: -.015em; }
/* Sub-label was mono ALL-CAPS, looked over-engineered everywhere.
   Switched to the display sans at small weight + tighter tracking. */
.section-title .sub { font-family: var(--font-display); font-weight: 500; font-size: 12.5px; letter-spacing: .02em; text-transform: none; color: var(--text-mute); margin-top: 6px; }
.section-title .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero-card {
  position: relative;
  padding: 36px 40px 32px;
  border-radius: 24px;
  background:
    radial-gradient(at 100% 0%, rgba(218,25,47,.22) 0%, transparent 50%),
    radial-gradient(at 0% 100%, rgba(74,27,65,.34) 0%, transparent 50%),
    linear-gradient(135deg, #1a0d12 0%, #141012 100%);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  min-height: 200px;
}
.hero-card .vista-bg-art {
  position:absolute; right:-60px; top:-60px;
  opacity:.16; pointer-events:none;
}
.hero-card .eyebrow {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--ai-gold-bright); margin-bottom: 10px;
}
.hero-card h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.04; letter-spacing: -.022em;
  color: var(--ai-cream);
}
.hero-card h1 em { font-style: italic; color: var(--ai-red-bright); font-weight: 700; }
.hero-card .namaste {
  font-family: var(--font-display); color: var(--ai-gold-bright);
  margin-top: 10px; font-size: 14px; font-weight: 500;
}
.hero-card .hero-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 24px; }
.hero-card .meta-item .lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
.hero-card .meta-item .val { font-size: 14px; color: var(--text); margin-top: 4px; font-weight: 500; }

/* ---------- Flight card ---------- */
.flight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--t) var(--ease);
}
.flight-card:hover { border-color: var(--border-strong); }
.flight-card.active {
  border-color: var(--border-red);
  background: radial-gradient(at 100% 0%, rgba(218,25,47,.14) 0%, transparent 60%), var(--surface);
}
.flight-card .head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; gap: 12px; }
.flight-card .head .left .fno { font-family: var(--font-display); font-weight:700; font-size: 28px; color: var(--ai-cream); letter-spacing: -.015em; }
.flight-card .head .left .cs { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); letter-spacing: .12em; }
.flight-card .route-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 14px 0; }
.flight-card .ap .code { font-family: var(--font-display); font-weight:600; font-size: 30px; color: var(--ai-cream); letter-spacing: -.015em; }
.flight-card .ap .city { font-size: 12px; color: var(--text-dim); }
.flight-card .ap .time { font-family: var(--font-mono); font-size: 14px; color: var(--text); margin-top: 4px; }
.flight-card .ap.to { text-align: right; }
.flight-card .arrow {
  position: relative; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ai-gold), transparent);
  border-radius: 2px; min-width: 80px;
}
.flight-card .arrow::after {
  content: '✈'; position: absolute;
  right: 0; top: 50%; transform: translate(50%, -50%);
  color: var(--ai-gold); font-size: 14px;
  filter: drop-shadow(0 0 6px var(--ai-gold));
}
.flight-card .foot { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.flight-card .foot .item .lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
.flight-card .foot .item .val { font-size: 13px; color: var(--text); margin-top: 2px; }
.flight-card .actionbar { display:flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  position: relative; overflow: hidden;
}
.kpi .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
.kpi .val { font-family: var(--font-display); font-weight: 700; font-size: 36px; margin-top: 6px; color: var(--ai-cream); letter-spacing: -.02em; line-height: 1; }
.kpi .sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.kpi .bar { position:absolute; left:0; bottom:0; height:2px; background: linear-gradient(90deg, var(--ai-red), var(--ai-gold)); }

/* ---------- Roster cells ---------- */
.roster-strip {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; overflow-x: auto;
}
@media (max-width: 980px) { .roster-strip { grid-template-columns: repeat(4, minmax(120px, 1fr)); } }
.roster-day {
  border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
  background: var(--surface);
  min-height: 110px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  position: relative;
}
.roster-day:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.roster-day .day-line { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.roster-day .day-num { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin-top: 2px; color: var(--ai-cream); }
.roster-day .duty { margin-top: 8px; padding: 6px 8px; border-radius: 7px; font-size: 11px; }
.roster-day .duty-PAIRING { background: rgba(218,25,47,.14); color: var(--ai-red-bright); border: 1px solid var(--border-red); }
.roster-day .duty-RDO     { background: rgba(74,222,128,.1); color: var(--ok); border: 1px solid rgba(74,222,128,.2); }
.roster-day .duty-STBY    { background: rgba(251,191,36,.1); color: var(--warn); border: 1px solid rgba(251,191,36,.2); }
.roster-day .duty-LEAVE   { background: rgba(110,45,92,.18); color: #c79cb8; border: 1px solid rgba(110,45,92,.32); }
.roster-day.today { box-shadow: 0 0 0 1px var(--ai-gold) inset, 0 0 24px rgba(199,165,108,.18); }
.roster-day .today-pin {
  position:absolute; top: 8px; right: 10px;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--ai-gold-bright); letter-spacing: .12em;
}
.roster-day.empty { border-style: dashed; opacity: .55; }
.roster-day.empty .duty { background: rgba(245,240,232,.04); color: var(--text-mute); border-color: var(--border); }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.tbl tr:hover td { background: rgba(245,240,232,.03); }
.tbl .mono { font-family: var(--font-mono); }

/* ---------- Doc card ---------- */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  display: block;
}
.doc-card:hover { transform: translateY(-2px); border-color: var(--border-gold); }
.doc-card .doc-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ai-gold-bright); }
.doc-card .doc-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-top: 6px; color: var(--ai-cream); }
.doc-card .doc-desc { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.55; }
.doc-card .doc-meta { display:flex; gap: 12px; margin-top: 10px; }
.doc-card .doc-meta span { font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); letter-spacing: .12em; }

/* ---------- Map containers ---------- */
.map-host {
  width: 100%; height: 540px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #050507;
  position: relative;
}
.map-host.tall { height: 70vh; min-height: 540px; }

/* ---------- Form layouts ---------- */
.field-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }

/* ---------- METAR block ---------- */
.metar-block {
  font-family: var(--font-mono); font-size: 12px;
  background: #050507;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ---------- Note callout ---------- */
.note-callout {
  border-left: 3px solid var(--ai-gold);
  padding: 12px 16px;
  background: rgba(199,165,108,.05);
  border-radius: 0 12px 12px 0;
  font-size: 13px; color: var(--text-dim); line-height: 1.6;
}
.note-callout b { color: var(--ai-gold-bright); }

.card-hover { transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.card-hover:hover { transform: translateY(-2px); border-color: var(--text-dim); box-shadow: var(--shadow); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; top: 0; height: 100vh; width: 240px; transition: left var(--t) var(--ease); }
  .sidebar.open { left: 0; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .mobile-burger { display: flex !important; }
}
.mobile-burger { display: none; }

/* ---------- Chakra spin ---------- */
.chakra-spin { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--ai-gold); border-radius: 50%; animation: spin .9s linear infinite; }

/* ---------- Aircraft picker chips ---------- */
.ac-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.ac-chip:hover { border-color: var(--text-dim); }
.ac-chip.on {
  background: var(--ai-red); color: var(--ai-cream);
  border-color: var(--ai-red);
  box-shadow: 0 4px 14px rgba(218,25,47,.3);
}

/* ---------- Trip length tabs ---------- */
.trip-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.trip-tab {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  text-align: center;
  min-width: 110px;
}
.trip-tab .lbl { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ai-cream); }
.trip-tab .sub { font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.trip-tab:hover { border-color: var(--text-dim); }
.trip-tab.on { background: linear-gradient(135deg, var(--ai-red), var(--ai-aubergine)); border-color: var(--ai-red); box-shadow: 0 6px 18px rgba(218,25,47,.32); }
.trip-tab.on .lbl { color: var(--ai-cream); }
.trip-tab.on .sub { color: var(--ai-gold-bright); }

/* ---------- News card ---------- */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  display: block;
}
.news-card:hover { transform: translateY(-2px); border-color: var(--border-gold); }
.news-card .src { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ai-gold-bright); }
.news-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-top: 6px; color: var(--ai-cream); line-height: 1.3; }
.news-card .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mute); margin-top: 10px; letter-spacing: .12em; }
.news-card .excerpt { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; line-height: 1.55; }

/* ---------- Fleet image card ---------- */
.fleet-img-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--t) var(--ease);
}
.fleet-img-card:hover { transform: translateY(-3px); border-color: var(--border-gold); }
.fleet-img-card .ph {
  aspect-ratio: 16/9; background-size: cover; background-position: center;
  background-color: #14101220;
}
.fleet-img-card .body { padding: 14px 18px; }
.fleet-img-card .reg { font-family: var(--font-mono); font-size: 14px; color: var(--ai-gold-bright); letter-spacing: .12em; font-weight: 500; }
.fleet-img-card .type { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-top: 4px; color: var(--ai-cream); }
.fleet-img-card .meta { font-size: 11px; color: var(--text-mute); margin-top: 6px; font-family: var(--font-mono); letter-spacing: .1em; }

/* ====================================================================
   Welfare / Bylaws / FAQ / Maharaja Club
   ==================================================================== */
/* Maharaja Club banner on Crew page */
.club-banner {
  position: relative;
  overflow: hidden;
}
.club-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 10% 50%, rgba(218,165,32,.10) 0%, transparent 40%),
    radial-gradient(circle at 90% 50%, rgba(218,165,32,.10) 0%, transparent 40%);
  pointer-events: none;
}

/* FAQ accordion */
.faq-item {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px 0;
}
.faq-item:first-of-type { border-top: 0; padding-top: 4px; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ai-cream);
  padding: 6px 4px;
  border-radius: 8px;
  transition: background .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,255,255,.03); }
.faq-item summary .chev {
  color: var(--ai-gold-bright);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-a {
  margin-top: 10px;
  padding: 0 8px 8px 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* Bylaws side-nav */
.bylaw-nav { color: var(--text-dim); transition: background .15s, color .15s; }
.bylaw-nav:hover { background: rgba(255,225,89,.06); color: var(--ai-gold-bright); }

/* Active flight progress on dashboard */
.fp-card {
  background: linear-gradient(135deg, rgba(168,16,31,.12), rgba(255,225,89,.04));
  border: 1px solid rgba(255,225,89,.32);
}
.fp-card .fp-bar {
  height: 8px; border-radius: 99px;
  background: rgba(255,255,255,.08); overflow: hidden;
  position: relative;
}
.fp-card .fp-fill {
  height: 100%; background: linear-gradient(90deg, #FFE159, #C8102E);
  transition: width .8s;
}
.fp-card .fp-phase {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  color: var(--ai-gold-bright); text-transform: uppercase;
}
