/* ============================================================
   GORVIA DESIGN SYSTEM — Cream & Professional
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette */
  --cream:       #FAFAF8;
  --cream-dark:  #F2F0EB;
  --white:       #FFFFFF;
  --navy:        #1A1A2E;
  --navy-mid:    #2D2D44;
  --navy-light:  #4A4A6A;
  --blue-tint:   #EBF4FF;
  --blue:        #3B82F6;
  --blue-dark:   #1D4ED8;
  --orange:      #F97316;
  --orange-dark: #EA580C;
  --orange-tint: #FFF4ED;
  --green:       #10B981;
  --green-tint:  #ECFDF5;
  --green-dark:  #047857;
  --red:         #EF4444;
  --red-tint:    #FEF2F2;
  --indigo:      #6366F1;
  --gold:        #F59E0B;
  --text-primary:   #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-muted:     #94A3B8;
  --text-light:     #CBD5E1;
  --border:      #E2E8F0;
  --border-dark: #CBD5E1;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl:   0 24px 60px rgba(0,0,0,.12);
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
.serif { font-family: 'Instrument Serif', serif; }

h1,h2,h3 { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -.3px; }

/* ── TOP HEADER ── */
.g-header {
  position: sticky; top: 0; z-index: 200;
  height: 64px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: var(--shadow-sm);
}
.g-header-left { display: flex; align-items: center; gap: .85rem; }
.g-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-size: 1rem;
  color: #fff; font-weight: 400; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(59,130,246,.25);
}
.g-header-greet { font-size: .68rem; color: var(--text-muted); }
.g-header-name  { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.g-btn-orange {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.15rem;
  background: var(--orange); color: #fff;
  border: none; border-radius: 100px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .8rem;
  text-decoration: none; cursor: pointer; transition: all .18s;
  box-shadow: 0 2px 8px rgba(249,115,22,.3);
  white-space: nowrap;
}
.g-btn-orange:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(249,115,22,.35); color: #fff; text-decoration: none; }

/* ── BOTTOM NAV ── */
.g-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.07);
}
.g-nav-track {
  display: flex; height: 62px;
  max-width: 500px; margin: 0 auto;
}
.g-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text-muted);
  font-size: .58rem; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  border: none; background: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  position: relative; transition: color .18s;
  -webkit-tap-highlight-color: transparent;
}
.g-nav-item::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--orange);
  opacity: 0; transition: opacity .2s;
}
.g-nav-ico { font-size: 1.18rem; line-height: 1; transition: transform .2s; }
.g-nav-item.active { color: var(--orange); }
.g-nav-item.active::after { opacity: 1; }
.g-nav-item.active .g-nav-ico,
.g-nav-item:hover .g-nav-ico { transform: translateY(-2px); }
.g-nav-item:hover { color: var(--navy-light); text-decoration: none; }

/* Centre book button */
.g-nav-book .g-nav-ico {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(249,115,22,.35);
  margin-top: -14px;
  transition: transform .2s, box-shadow .2s;
}
.g-nav-book::after { display: none; }
.g-nav-book { color: var(--text-muted); }
.g-nav-book.active, .g-nav-book:hover { color: var(--orange); }
.g-nav-book:hover .g-nav-ico,
.g-nav-book.active .g-nav-ico { transform: translateY(-4px) scale(1.06); box-shadow: 0 8px 22px rgba(249,115,22,.45); }

/* ── CARDS ── */
.g-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.g-card-head {
  padding: .85rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size: .65rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted);
}
.g-card-body { padding: 1.35rem; }

/* ── FORM ELEMENTS ── */
.g-label {
  display: block; font-size: .68rem; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: .4rem;
}
.g-input-wrap { position: relative; }
.g-input-icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: .9rem; pointer-events: none;
}
.g-input {
  width: 100%; height: 46px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 .9rem 0 2.6rem;
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: var(--text-primary);
  transition: all .18s; outline: none;
}
.g-input::placeholder { color: var(--text-light); }
.g-input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.g-input.no-icon { padding-left: .9rem; }
.g-input[type="date"] { color-scheme: light; }

/* ── BUTTONS ── */
.g-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.5rem;
  border-radius: 100px; border: none;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all .18s; text-decoration: none;
  white-space: nowrap;
}
.g-btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; box-shadow: 0 3px 12px rgba(249,115,22,.28);
}
.g-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(249,115,22,.38); color: #fff; text-decoration: none; }
.g-btn-secondary { background: var(--white); color: var(--text-secondary); border: 1.5px solid var(--border); }
.g-btn-secondary:hover { border-color: var(--border-dark); color: var(--text-primary); text-decoration: none; }
.g-btn-full { width: 100%; justify-content: center; height: 50px; border-radius: var(--radius-sm); font-size: .95rem; }

/* ── BADGES ── */
.g-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .7rem; border-radius: 100px;
  font-size: .65rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.g-badge-green  { background: var(--green-tint);  color: var(--green-dark); }
.g-badge-orange { background: var(--orange-tint); color: var(--orange-dark); }
.g-badge-red    { background: var(--red-tint);    color: var(--red); }
.g-badge-blue   { background: var(--blue-tint);   color: var(--blue-dark); }
.g-badge-gray   { background: var(--cream-dark);  color: var(--text-secondary); }

/* ── ALERTS ── */
.g-alert {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1.1rem; border-radius: var(--radius);
  font-size: .85rem; margin-bottom: 1rem;
}
.g-alert-ok  { background: var(--green-tint);  border: 1px solid rgba(16,185,129,.2); color: var(--green-dark); }
.g-alert-err { background: var(--red-tint);    border: 1px solid rgba(239,68,68,.2);  color: var(--red); }
.g-alert-warn { background: #FFFBEB; border: 1px solid rgba(245,158,11,.2); color: #92400E; }

/* ── BOARDING PASS (signature element) ── */
.g-pass {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.g-pass-top {
  background: var(--navy);
  padding: 1.5rem 1.75rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.g-pass-route-city {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #fff; line-height: 1; letter-spacing: -.5px;
}
.g-pass-route-label { font-size: .65rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.4); margin-top: .3rem; }
.g-pass-arrow { color: var(--orange); font-size: 1.5rem; align-self: center; }
.g-pass-tear {
  height: 0;
  border-top: 2px dashed var(--border);
  margin: 0 1.75rem;
  position: relative;
}
.g-pass-tear::before, .g-pass-tear::after {
  content: ''; position: absolute; top: -11px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
}
.g-pass-tear::before { left: -30px; }
.g-pass-tear::after  { right: -30px; }
.g-pass-body { padding: 1.5rem 1.75rem; }
.g-pass-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .2rem;
}
.g-pass-meta-item { padding: .75rem .85rem; }
.g-pass-meta-label { font-size: .6rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: .22rem; }
.g-pass-meta-val { font-size: .88rem; font-weight: 600; color: var(--text-primary); }
.g-pass-seat { color: var(--blue-dark); }
.g-pass-amount { color: var(--orange-dark); font-family: 'Instrument Serif', serif; font-size: 1.1rem; }

/* ── STAT CARDS ── */
.g-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.g-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.g-stat-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; margin-bottom: .7rem;
}
.g-stat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 1.75rem; color: var(--text-primary); line-height: 1; margin-bottom: .2rem;
}
.g-stat-lbl { font-size: .62rem; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--text-muted); }
.g-stat-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }

/* ── SECTION LABEL ── */
.g-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.g-sec-title { font-family: 'Instrument Serif', serif; font-size: 1.12rem; color: var(--text-primary); }
.g-sec-link { font-size: .78rem; font-weight: 600; color: var(--blue); text-decoration: none; transition: color .15s; }
.g-sec-link:hover { color: var(--blue-dark); }

/* ── WRAP ── */
.g-wrap { max-width: 1060px; margin: 0 auto; padding: 1.75rem 1.5rem 2rem; }

/* ── TABLE ── */
.g-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.g-table thead th { font-size: .6rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); padding: .7rem 1rem; text-align: left; border-bottom: 2px solid var(--border); white-space: nowrap; background: var(--cream); }
.g-table tbody td { padding: .82rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: middle; }
.g-table tbody tr:last-child td { border-bottom: none; }
.g-table tbody tr:hover td { background: var(--cream); }

/* ── RESPONSIVE ── */
@media (max-width: 380px) {
  .g-nav-lbl { display: none; }
  .g-nav-track { height: 54px; }
  body { padding-bottom: 68px; }
}
