/* PropFlying design system — shared by the public site and the app. No frameworks. */
:root {
  --navy-900: #071a33;
  --navy-800: #0b2545;
  --navy-700: #13315c;
  --navy-600: #1d4477;
  --sky-500: #1b8fd6;
  --sky-400: #3aa8ec;
  --sky-100: #e5f3fc;
  --amber-500: #f2a541;
  --amber-600: #d98a1f;
  --green-600: #1f8a5b;
  --green-100: #e2f5ec;
  --red-600: #c43d3d;
  --red-100: #fbe7e7;
  --yellow-100: #fff5d6;
  --ink: #142235;
  --ink-2: #44546a;
  --ink-3: #6b7a8f;
  --line: #e1e7ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(7, 26, 51, .06), 0 6px 24px rgba(7, 26, 51, .07);
  --shadow-lg: 0 18px 50px rgba(7, 26, 51, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-500); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--sky-500); color: #fff; }
.btn-primary:hover { background: #157cbc; }
.btn-accent { background: var(--amber-500); color: var(--navy-900); }
.btn-accent:hover { background: var(--amber-600); }
.btn-dark { background: var(--navy-800); color: #fff; }
.btn-dark:hover { background: var(--navy-700); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: #fff; border-color: #c7d2e0; }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 8px 12px; }
.btn-ghost:hover { background: rgba(7, 26, 51, .06); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-success { background: var(--green-600); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .875rem; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
/* Every text-like input (including inputs written without a type attribute), selects and textareas share one look. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=hidden]),
select, textarea {
  width: 100%; padding: 0 12px; border: 1px solid #cfd8e3; border-radius: var(--radius-sm); font: inherit; font-size: 1rem; line-height: 1.4;
  color: var(--ink); background-color: #fff; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; margin: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=hidden]),
select:not([multiple]) { height: 44px; }
select[multiple] { padding: 6px 8px; height: auto; }
input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1px solid #cfd8e3; border-radius: var(--radius-sm); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(27, 143, 214, .18); }
textarea { min-height: 96px; resize: vertical; padding: 10px 12px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.check input { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; }
.chip-toggle span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; background: #fff; }
.chip-toggle input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip-toggle input:focus-visible + span { box-shadow: 0 0 0 3px rgba(27, 143, 214, .3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Cards, badges, tables ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h3 { margin-bottom: .4em; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: #eef2f7; color: var(--ink-2); white-space: nowrap; }
.badge-blue { background: var(--sky-100); color: #0f6aa3; }
.badge-green { background: var(--green-100); color: var(--green-600); }
.badge-red { background: var(--red-100); color: var(--red-600); }
.badge-amber { background: var(--yellow-100); color: #9a6200; }
.badge-navy { background: var(--navy-800); color: #fff; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid transparent; }
.alert-info { background: var(--sky-100); border-color: #c4e3f7; }
.alert-warning { background: var(--yellow-100); border-color: #f4dd9b; }
.alert-danger { background: var(--red-100); border-color: #f2c0c0; }
.alert-success { background: var(--green-100); border-color: #b8e3cd; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 700; color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f7fafd; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .value { font: 800 1.8rem/1.1 var(--font-head); color: var(--navy-800); }
.kpi .label { color: var(--ink-3); font-size: .85rem; }
.stat-bar { display: block; height: 3px; background: var(--sky-500); opacity: .55; border-radius: 2px; margin-bottom: 4px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy-800); color: #fff; font-size: .78rem; line-height: 1.35; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 5; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
#chart .hit.on { fill: rgba(27, 143, 214, .08); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--sky-100); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy-700); flex: none; }
.avatar-lg { width: 112px; height: 112px; font-size: 2rem; }

/* ---------- Toasts & dialogs ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: calc(100vw - 32px); }
.toast { background: var(--navy-800); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; animation: slideup .2s ease-out; }
.toast.error { background: var(--red-600); }
.toast.success { background: var(--green-600); }
@keyframes slideup { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(7, 26, 51, .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }

/* =================== PUBLIC SITE =================== */
.topbar { background: var(--navy-900); color: #c9d6e8; font-size: .85rem; }
.topbar .container { display: flex; gap: 20px; justify-content: flex-end; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #e6eef8; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
/* Desktop: logo left, menu centered on the page (the home page has no logo here). Phones keep logo left, ☰ right. */
@media (min-width: 961px) {
  .site-header .container { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .site-header .brand { grid-column: 1; justify-self: start; }
  .site-header .nav { grid-column: 2; }
}
@media (max-width: 960px) { body[data-page="home"] .site-header .container { justify-content: flex-end; } }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-800) !important; text-decoration: none !important; font: 800 1.25rem var(--font-head); }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav .dropdown > button { color: var(--ink); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none; }
.nav > a:hover, .nav .dropdown > button:hover, .nav a.active { background: var(--sky-100); color: var(--navy-800); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: none; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-800); margin: 5px 0; border-radius: 2px; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px 20px; box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 72px); overflow: auto; }
  .nav.open { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; display: block; padding: 0 0 0 12px; min-width: 0; }
  .nav .btn { margin-top: 8px; }
}

.hero { position: relative; color: #fff; background: var(--navy-800); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-img, none) center/cover no-repeat; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7, 26, 51, .95) 0%, rgba(7, 26, 51, .7) 45%, rgba(7, 26, 51, .15) 100%); }
.hero .container { position: relative; z-index: 1; padding-top: clamp(64px, 10vw, 128px); padding-bottom: clamp(64px, 10vw, 128px); }
.hero h1 { color: #fff; max-width: 760px; }
/* Home: white logo on the left, the headline group pushed to the right. */
.hero-split { display: flex; align-items: center; justify-content: space-between; gap: clamp(32px, 5vw, 72px); }
.hero-logo { flex: none; height: clamp(220px, 27vw, 340px); width: auto; filter: invert(1) brightness(2); opacity: .95; }
.hero-split > [data-edit] { flex: 0 1 720px; min-width: 0; }
@media (max-width: 860px) {
  .hero-split { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-logo { height: 120px; }
  .hero-split > [data-edit] { flex-basis: auto; }
}
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d7e3f2; max-width: 620px; }
.hero .eyebrow { color: var(--amber-500); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--sky-500); margin-bottom: 10px; display: block; }
.page-hero { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; }
.page-hero .container { padding-top: 56px; padding-bottom: 56px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: #cfdcec; margin: 10px 0 0; max-width: 720px; font-size: 1.1rem; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--navy-800); color: #dbe6f3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); font-size: 1.05rem; }
.prose h2 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }

.feature { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); height: 100%; }
.feature .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--sky-100); color: var(--sky-500); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature p { color: var(--ink-2); margin: 0; }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.stat-band .num { font: 800 2.4rem/1 var(--font-head); color: var(--amber-500); }
.stat-band .lbl { color: #c4d3e6; margin-top: 6px; }

.program-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.program-card .top { background: linear-gradient(135deg, var(--navy-700), var(--sky-500)); color: #fff; padding: 22px; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; }
.program-card .top h3 { color: #fff; margin: 0; }
.program-card .body { padding: 18px 22px 22px; color: var(--ink-2); flex: 1; }
.program-card .more { color: var(--sky-500); font-weight: 700; margin-top: 10px; display: inline-block; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.rounded-img { border-radius: 20px; box-shadow: var(--shadow-lg); }

/* Admin › Settings: every section the same width, stacked with the same gap */
.settings-section { max-width: 960px; }
.settings-section + .settings-section { margin-top: 18px; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--ink-3); font-size: .85rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.stripe-field { height: 44px; padding: 12px; border: 1px solid #cfd8e3; border-radius: var(--radius-sm); background: #fff; }
.stripe-field.StripeElement--focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.stripe-field.StripeElement--invalid { border-color: #c62828; }
.slideshow { position: relative; aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-800); }
.slideshow > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.slideshow > img.active, .slideshow:not(.ready) > img:first-child { opacity: 1; }
.slideshow-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(10, 20, 40, .55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; }
.slideshow-nav.prev { left: 12px; } .slideshow-nav.next { right: 12px; }
.slideshow:hover .slideshow-nav, .slideshow-nav:focus-visible { opacity: 1; }
@media (hover: none) { .slideshow-nav { opacity: .85; } }
.slideshow-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.slideshow-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; }
.slideshow-dots button.active { background: #fff; transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) { .slideshow > img { transition: none; } }
.purdue-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.purdue-strip img { width: 220px; height: 220px; object-fit: cover; border-radius: 14px; scroll-snap-align: start; flex: none; }

.req-table { display: grid; grid-template-columns: 1fr 1.6fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.req-table > div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.req-table > div:nth-child(odd) { font-weight: 700; color: var(--navy-800); background: #fafcfe; }
.req-table > div:nth-last-child(-n+2) { border-bottom: 0; }
.req-table ul { margin: 0; padding-left: 18px; }
@media (max-width: 640px) { .req-table { grid-template-columns: 1fr; } .req-table > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; } }

.callout { background: linear-gradient(135deg, #fff8ec, #fff); border: 1px solid #f6dfb5; border-left: 5px solid var(--amber-500); border-radius: var(--radius); padding: 18px 22px; }

.price-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); align-items: center; }
.price-row:last-child { border-bottom: 0; }
.price-row .name { font-weight: 700; color: var(--navy-800); }
.price-row .desc { color: var(--ink-3); font-size: .9rem; }
.price-row .price { font: 800 1.3rem var(--font-head); color: var(--navy-800); white-space: nowrap; text-align: right; }
.price-row .price small { display: block; font: 500 .8rem var(--font); color: var(--ink-3); }

.instructor { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 24px; }
.instructor img { border-radius: 14px; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.instructor .creds { color: var(--sky-500); font-weight: 700; margin-bottom: 14px; }
.instructor blockquote { margin: 16px 0 0; padding: 12px 18px; border-left: 4px solid var(--amber-500); background: #fffaf0; font-style: italic; border-radius: 0 10px 10px 0; }
@media (max-width: 760px) { .instructor { grid-template-columns: 1fr; } .instructor img { max-width: 320px; } }

.hof-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.hof-filters button { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; font: 600 .9rem var(--font); cursor: pointer; }
.hof-filters button.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.hof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.hof-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
.hof-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hof-card .meta { padding: 14px 16px; }
.hof-card .name { font-weight: 800; color: var(--navy-800); font-family: var(--font-head); }
.hof-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(7, 26, 51, .92); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 85vh; border-radius: 12px; }
.lightbox .cap { color: #fff; text-align: center; margin-top: 12px; }

.site-footer { background: var(--navy-900); color: #a9bad0; padding: 56px 0 28px; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #d5e1ef; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; }

.auth-wrap { min-height: calc(100vh - 160px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: radial-gradient(1200px 500px at 10% 0%, #dcefff 0%, transparent 60%), var(--bg); }
.auth-card { width: min(460px, 100%); }
.auth-card .card { padding: 32px; }

/* ---------- Inline page editor ---------- */
.pf-editing [data-edit] { outline: 2px dashed var(--sky-400); outline-offset: 6px; border-radius: 4px; min-height: 24px; }
.pf-editing [data-edit]:focus { outline: 2px solid var(--sky-500); background: rgba(229, 243, 252, .35); }
.pf-edit-fab { position: fixed; right: 18px; bottom: 18px; z-index: 300; box-shadow: var(--shadow-lg); }
.pf-toolbar { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 400; display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: var(--navy-900); padding: 6px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 16px); }
.pf-toolbar button { background: transparent; color: #e6eef8; border: 0; min-width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font: 600 .85rem var(--font); padding: 0 8px; }
.pf-toolbar button:hover { background: rgba(255, 255, 255, .12); }
.pf-toolbar .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .2); margin: 0 4px; }
.pf-toolbar .save { background: var(--green-600); }
.pf-toolbar .cancel { background: rgba(255, 255, 255, .1); }

/* =================== APP SHELL =================== */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-900); color: #b8c7da; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff !important; padding: 4px 10px 18px; font-size: 1.1rem; }
.sidebar .brand img { height: 90px; filter: invert(1) brightness(2); }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #c9d6e8; padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: .93rem; text-decoration: none; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.active { background: var(--sky-500); color: #fff; }
.sidebar nav .group { text-transform: uppercase; font-size: .7rem; letter-spacing: .12em; color: #7088a8; margin: 18px 12px 6px; font-weight: 800; }
.sidebar nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .me { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; gap: 10px; align-items: center; }
.sidebar .me .name { color: #fff; font-weight: 700; font-size: .9rem; }
.sidebar .me a { color: #8fb3d9; font-size: .8rem; }
.main { min-width: 0; }
.appbar { display: none; }
.content { padding: 28px clamp(16px, 3vw, 36px) 60px; max-width: 1320px; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title h1 { font-size: 1.75rem; margin: 0; }
.section-label { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--ink-3); margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 100; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .appbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--navy-900); color: #fff; position: sticky; top: 0; z-index: 90; }
  .appbar button { background: none; border: 0; color: #fff; padding: 6px; }
  .content { padding-top: 18px; }
}

.list-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; color: var(--navy-800); }
.date-tile { width: 54px; text-align: center; border-radius: 10px; background: var(--sky-100); color: var(--navy-800); padding: 6px 0; flex: none; }
.date-tile .m { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.date-tile .d { font: 800 1.35rem/1 var(--font-head); }
.session-live { border: 2px solid var(--green-600); background: linear-gradient(135deg, #f1fbf6, #fff); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 0 rgba(31, 138, 91, .6); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(31, 138, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 138, 91, 0); } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: 600 .92rem var(--font); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--navy-800); border-color: var(--sky-500); }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .field { margin: 0; min-width: 160px; }
.meter-row { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; align-items: center; }
.meter-row .lbl { font-weight: 700; color: var(--navy-800); }
.total-box { background: var(--navy-800); color: #fff; border-radius: 12px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.total-box .v { font: 800 1.6rem var(--font-head); }

/* ---------- Scheduler ---------- */
.sched { --row-h: 56px; --hour-w: 84px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; position: relative; }
.sched-grid { display: grid; position: relative; min-width: max-content; }
.sched-corner, .sched-hour { position: sticky; top: 0; background: #fff; z-index: 3; border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--ink-3); font-weight: 700; padding: 8px 6px; height: 36px; }
.sched-corner { left: 0; z-index: 4; }
.sched-hour { border-left: 1px solid var(--line); }
.sched-res { position: sticky; left: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--line); padding: 8px 12px; font-weight: 700; color: var(--navy-800); font-size: .88rem; height: var(--row-h); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); width: 170px; }
.sched-res small { color: var(--ink-3); font-weight: 500; }
.sched-group { background: #f4f7fb; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.sched-group span { position: sticky; left: 0; padding: 0 12px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sched-cell { border-bottom: 1px solid var(--line); border-left: 1px solid #f0f3f7; height: var(--row-h); cursor: pointer; }
.sched-cell.closed { background: repeating-linear-gradient(-45deg, #f6f8fb, #f6f8fb 6px, #eef2f7 6px, #eef2f7 12px); }
.sched-cell:hover { background: var(--sky-100); }
.sched-block { position: absolute; border-radius: 8px; padding: 4px 8px; font-size: .78rem; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); line-height: 1.25; z-index: 1; white-space: nowrap; text-overflow: ellipsis; }
.sched-block.pending { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px); outline: 2px dashed rgba(0, 0, 0, .25); }
.sched-block.private { background: #9aa8ba !important; }
.sched-block.mine { box-shadow: 0 0 0 2px var(--amber-500); }
/* Aircraft not available (maintenance): hatched, not clickable through to "new booking" */
.sched-block.down { background: repeating-linear-gradient(-45deg, #5b6b80 0 8px, #6e7d91 8px 16px) !important; cursor: default; }
.avail-cell.down { background: repeating-linear-gradient(-45deg, #8593a6 0 4px, #9aa6b7 4px 8px); }
.downtime-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 8px; align-items: end; margin-bottom: 6px; }
.downtime-row .field { margin: 0; }
@media (max-width: 600px) { .downtime-row { grid-template-columns: 1fr 1fr; } }
.sched-now { position: absolute; top: 36px; bottom: 0; width: 2px; background: var(--red-600); z-index: 2; pointer-events: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

.schedule-editor .day { display: grid; grid-template-columns: 110px 1fr 1fr 40px; gap: 8px; align-items: center; margin-bottom: 6px; }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .no-print, .sidebar, .appbar, #toasts { display: none !important; }
  .card { box-shadow: none; padding: 0; }
}

/* Booking dialog: availability strip (30-minute slots) */
.avail-head { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.avail-head .field { margin: 0; }
.avail { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; background: #fff; }
.avail-grid { display: grid; min-width: max-content; user-select: none; -webkit-user-select: none; }
.avail-label { position: sticky; left: 0; z-index: 2; background: #fff; padding: 3px 8px; font-size: .76rem; font-weight: 700; color: var(--navy-800); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.avail-label small { font-weight: 500; color: var(--ink-3); font-size: .68rem; }
.avail-label.all { background: #f8fafc; }
.avail-hour { font-size: .66rem; color: var(--ink-3); padding: 4px 3px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.avail-cell { height: 30px; border-left: 1px solid #edf1f6; border-bottom: 1px solid var(--line); background: var(--green-100); cursor: pointer; position: relative; }
.avail-cell.hr { border-left-color: var(--line); }
.avail-cell.closed { background: repeating-linear-gradient(-45deg, #f6f8fb, #f6f8fb 5px, #e6ebf2 5px, #e6ebf2 10px); }
.avail-cell.busy { background: var(--sky-500); }
.avail-cell.busy.other { background: #9aa8ba; }
.avail-cell.busy.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 5px, transparent 5px 10px); }
.avail-cell:hover:not(.sel) { outline: 2px solid var(--navy-600); outline-offset: -2px; z-index: 1; }
.avail-cell.sel::after { content: ""; position: absolute; inset: 0; background: rgba(13, 45, 94, .28); border-top: 3px solid var(--navy-800); border-bottom: 3px solid var(--navy-800); pointer-events: none; }
.avail-cell.sel.s0::after { border-left: 3px solid var(--navy-800); }
.avail-cell.sel.s1::after { border-right: 3px solid var(--navy-800); }
.avail-cell.sel.busy::after { background: rgba(220, 38, 38, .6); border-color: var(--red-600); }
.avail-cell.sel.closed::after { background: rgba(245, 158, 11, .45); }
.avail-grip { position: absolute; right: -7px; top: 3px; bottom: 3px; width: 12px; border-radius: 4px; background: var(--navy-800); cursor: ew-resize; z-index: 3; touch-action: none; }
.avail-grip::before { content: ""; position: absolute; left: 4px; right: 4px; top: 30%; bottom: 30%; border-left: 1px solid #fff; border-right: 1px solid #fff; }
.avail-info { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 600px) { .avail-grid { --avail-label: 86px; } }

/* Public "Book a discovery flight" window */
.dsc section { margin-bottom: 18px; }
.dsc h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1rem; color: var(--navy-800); }
.dsc-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: .78rem; }
.dsc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.dsc-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.dsc-card > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dsc-card:hover { border-color: var(--sky-400); }
.dsc-card.on { border-color: var(--navy-800); background: #f3f7fc; box-shadow: 0 0 0 3px rgba(13, 45, 94, .12); }
.dsc-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--sky-100); }
.dsc-initials, .dsc-plane { display: grid; place-items: center; font-weight: 700; color: var(--navy-800); font-size: 1.1rem; }
.dsc-plane { border-radius: 12px; font-size: 1.5rem; }
.dsc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dsc-days { display: flex; gap: 6px; align-items: center; }
.dsc-days-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; flex: 1; }
.dsc-day { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font: inherit; color: var(--ink); line-height: 1.15; }
.dsc-day b { font-size: 1.15rem; }
.dsc-day .dsc-count { font-size: .66rem; color: var(--green-600); margin-top: 2px; }
.dsc-day:disabled { opacity: .45; cursor: default; }
.dsc-day:disabled .dsc-count { color: var(--ink-3); }
.dsc-day.on { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.dsc-day.on .dsc-count { color: #cfe6ff; }
.dsc-times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dsc-time { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; font-weight: 600; color: var(--navy-800); }
.dsc-time:hover { border-color: var(--sky-400); }
.dsc-time.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.dsc-pay-choice { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.dsc-sum { background: #f6f8fb; border-radius: var(--radius-sm); padding: 12px 14px; }
.dsc-sum:empty { display: none; }
.dsc-sum-what { font-weight: 700; color: var(--navy-800); margin-bottom: 6px; }
.dsc-sum table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dsc-sum td { padding: 3px 0; }
.dsc-sum td:last-child { text-align: right; white-space: nowrap; }
.dsc-sum .tot td { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 700; }
.dsc [data-err] { margin-top: 12px; }
.dsc-done { text-align: center; padding: 10px 0; }
.dsc-done-icon { font-size: 2.4rem; width: 72px; height: 72px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--green-100); color: var(--green-600); }
@media (max-width: 600px) {
  .dsc-days { gap: 4px; }
  .dsc-days-list { gap: 3px; }
  .dsc-day { padding: 5px 0; }
  .dsc-day .small { font-size: .62rem; }
  .dsc-day .dsc-count { font-size: .58rem; }
}

/* ---- Resources (reference library) ---- */
.res-tools { flex-wrap: nowrap; }
.res-search { min-width: 220px; }
.res-layout { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); gap: 18px; align-items: start; }
.res-groups { padding: 10px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.res-group-list { display: flex; flex-direction: column; gap: 2px; }
.res-group { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.res-group:hover { background: #eef2f7; }
.res-group.active { background: var(--sky-100); }
.res-group.active .res-group-name { color: #0f6aa3; }
.res-folder { font-size: 1.15rem; flex: none; }
.res-group-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.res-group-name { font-weight: 700; overflow-wrap: anywhere; }
.res-group-desc { font-size: .8rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-docs { min-height: 220px; transition: box-shadow .15s; }
.res-docs.res-drop { box-shadow: 0 0 0 3px var(--sky-400), var(--shadow); }
.res-pre { white-space: pre-line; }
.res-doc { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.res-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: #eef2f7; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* file-type badge on Resources; PDFs stay red */
.res-ext.pdf { background: var(--red-600); }
.res-ext { font-weight: 800; font-size: .72rem; color: #fff; background: var(--navy-600); max-width: 56px; overflow: hidden; text-overflow: ellipsis; padding: 3px 7px; border-radius: 4px; letter-spacing: .04em; }
.res-doc-title { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.res-doc-title:hover { color: var(--sky-500); text-decoration: underline; }
.res-doc-desc { font-size: .9rem; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.res-doc .small { overflow-wrap: anywhere; }
.res-doc-actions { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .res-layout { grid-template-columns: 1fr; }
  .res-groups { position: static; max-height: 40vh; }
  .res-doc { grid-template-columns: 52px minmax(0, 1fr); }
  .res-thumb { width: 52px; height: 52px; }
  .res-doc-actions { grid-column: 2; justify-content: flex-start; margin-left: -10px; }
  .res-search { min-width: 0; flex: 1; }
}

/* ---- 100-hour inspection gauge (Aircrafts) ---- */
.hh-bar { min-width: 170px; }
.hh-track { height: 8px; border-radius: 999px; background: #e6ebf2; overflow: hidden; margin: 4px 0 3px; }
.hh-track > span { display: block; height: 100%; border-radius: 999px; background: var(--hh, var(--green-600)); }
.hh-ok { --hh: var(--green-600); }
.hh-soon { --hh: var(--amber-600); }
.hh-over { --hh: var(--red-600); }
.hh-over b, .hh-over .hh-big { color: var(--red-600); }
.hh-soon b, .hh-soon .hh-big { color: #a8650f; }
.hh-gauge { display: flex; align-items: center; gap: 12px; }
.hh-gauge svg { width: 128px; height: 72px; flex: none; }
.hh-arc-bg, .hh-arc { fill: none; stroke-width: 12; stroke-linecap: round; }
.hh-arc-bg { stroke: #e6ebf2; }
.hh-arc { stroke: var(--hh, var(--green-600)); }
.hh-big { font: 800 1.35rem/1.2 var(--font-head); color: var(--ink); }
