/* ─────────────────────────────────────────────────────────────
   Hi-Line Flying Club — Single dark theme
   Palette: deep charcoal + warm amber + sky blue
   Load BEFORE any page <style> block so variables resolve.
───────────────────────────────────────────────────────────── */

:root {
  /* ── Brand ───────────────────────────────────────────── */
  --amber:      #E8A030;        /* primary CTA, highlights     */
  --amber-lt:   #F0B84A;        /* hover state                 */
  --sky:        #4A9ECC;        /* links, info, secondary CTA  */
  --sky-lt:     #5BB8E8;        /* hover state                 */
  --green:      #3D9970;        /* available / success         */
  --green-lt:   #4DB888;        /* hover                       */
  --red:        #C0392B;        /* grounded / error            */
  --red-lt:     #E04030;        /* hover                       */

  /* ── Layout backgrounds ──────────────────────────────── */
  --body-bg:    linear-gradient(160deg, #0E1118 0%, #141824 55%, #111520 100%);
  --nav-bg:     rgba(14, 17, 26, 0.98);

  /* Surfaces */
  --surface:     rgba(255, 255, 255, 0.06);
  --surface-mid: rgba(255, 255, 255, 0.10);
  --surface-hi:  rgba(255, 255, 255, 0.15);
  --modal-bg:    #141824;

  /* ── Borders ─────────────────────────────────────────── */
  --border:     rgba(255, 255, 255, 0.12);
  --border-c:   rgba(255, 255, 255, 0.12);
  --border-dim: rgba(255, 255, 255, 0.06);
  --border-sub: rgba(255, 255, 255, 0.06);

  /* ── Text ────────────────────────────────────────────── */
  --text:       rgba(255, 255, 255, 0.93);
  --text-dim:   rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-faint: rgba(255, 255, 255, 0.28);

  /* ── Inputs ─────────────────────────────────────────── */
  --input-bg:     rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.20);
  --input-text:   rgba(255, 255, 255, 0.93);
  --placeholder:  rgba(255, 255, 255, 0.35);

  /* ── Interactive states ──────────────────────────────── */
  --hover-bg:   rgba(255, 255, 255, 0.07);

  /* ── Calendar ────────────────────────────────────────── */
  --cal-header:  rgba(255, 255, 255, 0.05);
  --cal-past:    rgba(0, 0, 0, 0.22);
  --slot-hover:  rgba(74, 158, 204, 0.12);
  --slot-select: rgba(232, 160, 48, 0.25);

  /* ── Accent text / borders ──────────────────────────── */
  --sky-text:   #4A9ECC;
  --sky-border: rgba(74, 158, 204, 0.38);

  /* ── Amber accent text / borders ────────────────────── */
  --amber-text:   #E8A030;
  --amber-border: rgba(232, 160, 48, 0.38);

  /* ── Status chips (bg / border / text) ──────────────── */
  --ok-bg:    rgba( 61, 153, 112, 0.18);  --ok-border:    rgba( 61, 153, 112, 0.42);  --ok-text:    #5DDBA6;
  --err-bg:   rgba(192,  57,  43, 0.18);  --err-border:   rgba(192,  57,  43, 0.42);  --err-text:   #FF7060;
  --warn-bg:  rgba(232, 160,  48, 0.16);  --warn-border:  rgba(232, 160,  48, 0.38);  --warn-text:  #E8A030;
  --info-bg:  rgba( 74, 158, 204, 0.14);  --info-border:  rgba( 74, 158, 204, 0.35);  --info-text:  #4A9ECC;

  /* ── Elevation / Shadows ─────────────────────────────── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.08);
  --shadow-lg:    0 10px 24px rgba(0,0,0,0.20), 0 4px 8px rgba(0,0,0,0.08);
  --shadow-xl:    0 24px 48px rgba(0,0,0,0.28), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-card:  0 2px 16px rgba(0,0,0,0.28);
  --shadow-modal: 0 24px 64px rgba(0,0,0,0.50);
  --shadow-nav:   0 2px 16px rgba(0,0,0,0.45);

  /* ── Border Radius Scale ─────────────────────────────── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-full: 9999px;

  /* ── Spacing Scale (4px base) ────────────────────────── */
  --space-1:  4px;   --space-2:  8px;   --space-3: 12px;
  --space-4: 16px;   --space-5: 20px;   --space-6: 24px;
  --space-8: 32px;   --space-10: 40px;

  /* ── Transitions ─────────────────────────────────────── */
  --dur-fast:   0.15s;
  --dur-normal: 0.20s;
  --dur-slow:   0.30s;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global resets ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Form input baseline ───────────────────────────────── */
input, select, textarea {
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.92em;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(74, 158, 204, 0.5);
  outline-offset: 1px;
  border-color: rgba(74, 158, 204, 0.5);
}
select option { background: #141824; color: rgba(255,255,255,0.9); }

/* ── Mobile Bottom App Bar ─────────────────────────────── */
/* Shared across all portal pages. Pages add the HTML;
   CSS here handles display, sizing, and safe-area offsets. */
.bottom-app-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1100;
  background: rgba(11,17,26,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-app-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 9px;
  text-decoration: none;
  color: rgba(255,255,255,0.40);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.6em;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.bottom-app-bar a:active { opacity: 0.65; }
.bottom-app-bar a.bar-active { color: #E8A030; }
.bottom-app-bar a .bar-icon {
  font-size: unset;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-app-bar a .bar-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
}
/* Book button always highlighted in amber */
.bottom-app-bar a.bar-book { color: #E8A030; }
.bottom-app-bar a.bar-book .bar-icon {
  background: rgba(232,160,48,0.15);
  border: 1px solid rgba(232,160,48,0.35);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1px;
}
@media (max-width: 680px) {
  .bottom-app-bar { display: flex; }
}

/* ── Doc tile icons (Lucide SVG in doc-icon slot) ─────────── */
.doc-icon {
  font-size: unset;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-icon svg {
  width: 28px; height: 28px;
  stroke: var(--amber);
  stroke-width: 1.75;
  fill: none;
}

/* ── Unified Button System ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-weight: 700; font-size: 0.88em; cursor: pointer;
  font-family: 'Montserrat', sans-serif; border: none;
  transition: all var(--dur-normal) var(--ease);
  text-decoration: none; line-height: 1;
}
.btn-primary {
  background: var(--amber); color: #fff;
  box-shadow: 0 0 12px rgba(232,160,48,0.25);
}
.btn-primary:hover {
  background: var(--amber-lt);
  box-shadow: 0 0 20px rgba(232,160,48,0.40);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--hover-bg); color: var(--text);
  border-color: var(--border-c);
}
.btn-danger {
  background: var(--err-bg); color: var(--err-text);
  border: 1px solid var(--err-border);
}
.btn-danger:hover { background: rgba(220,53,69,0.28); }
.btn-ghost {
  background: transparent; color: var(--text-muted); border: none;
}
.btn-ghost:hover { color: var(--text); background: var(--hover-bg); }
.btn-sm { padding: 6px 14px; font-size: 0.80em; }
.btn-lg { padding: 13px 28px; font-size: 0.95em; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Card hover elevation ──────────────────────────────────── */
.dash-card {
  transition: box-shadow var(--dur-normal) var(--ease);
}
.dash-card:hover {
  box-shadow: var(--shadow-lg);
}
