/* ══════════════════════════════════════════════════════════════
   SeatSniper — APP SKIN  (cinematic dark, matches the landing)
   Loads after style.css/schedule.css. Re-skins /app to the landing's
   committed "cinematic dark" system: warm near-black #0a0708, animated
   aurora, ember (#e0564f) + maroon accents, glass cards, Satoshi /
   General Sans, film grain. App + landing now read as one product.
   ══════════════════════════════════════════════════════════════ */

/* Override the base tokens for EVERY theme app.js sets (committed dark, like the landing) */
:root, :root[data-theme="dark"] {
  --bg: #0a0708;
  --bg-alt: #0f0a0b;
  --card-bg: rgba(255,255,255,0.035);
  --text: #ece6e4;
  --text-muted: #9c918d;
  --border: rgba(255,255,255,0.09);
  --gray-50: rgba(255,255,255,0.04);
  --gray-100: rgba(255,255,255,0.06);
  --red: #8b1a1a;
  --red-dark: #6f1414;
  --red-subtle: rgba(224,86,79,0.12);
  --ember: #e0564f;
  --ember-soft: #ff7a6b;
  --green: #3ddc97;
  --green-bg: rgba(61,220,151,0.12);
  --error-bg: rgba(224,86,79,0.12);
  --app-font: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --app-display: 'General Sans', 'Satoshi', system-ui, sans-serif;
}

html, body { background: #0a0708 !important; color: var(--text) !important; overflow-x: hidden; }
body { font-family: var(--app-font); position: relative; -webkit-font-smoothing: antialiased; }

/* dark, slim scrollbars so they don't read as a stray light bar on the dark UI */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); background-clip: padding-box; }

/* Flat clean dark — no aurora (removed per Frank: "i dont like the aurora") */
/* keep real content above the atmosphere */
.navbar, .page, main, footer, .modal { position: relative; z-index: 2; }

/* day/night toggle — visible, glassy pill in the navbar */
.dark-mode-toggle {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.05) !important; border: 1px solid var(--border) !important;
  color: var(--text-muted) !important; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.dark-mode-toggle:hover { color: var(--text) !important; background: rgba(255,255,255,0.09) !important; }
.dark-mode-toggle svg { width: 18px; height: 18px; }
/* show the correct icon for the active theme */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ════════════ NAVBAR — glass on dark ════════════ */
.navbar {
  background: rgba(10,7,8,0.55) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border) !important;
}
.navbar-brand { color: var(--ember) !important; }
.navbar-logo { filter: drop-shadow(0 0 8px rgba(224,86,79,0.5)); }
.navbar-link { color: var(--text-muted) !important; font-family: var(--app-display); font-weight: 600; border-radius: var(--radius-sm); }
.navbar-link:not(.active):hover { color: #fff !important; background: rgba(255,255,255,0.05) !important; }
.navbar-link.active {
  color: #fff !important;
  background: linear-gradient(120deg, var(--ember), #b8362a) !important;
  box-shadow: 0 6px 22px rgba(224,86,79,0.45);
}
.navbar-alert-badge { background: var(--ember) !important; color: #1a0c0a !important; font-weight: 700; box-shadow: 0 0 12px rgba(224,86,79,0.5); }

/* ════════════ HERO ════════════ */
.hero { background: transparent !important; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; display: none !important; overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(78% 130% at 50% -12%, #000 34%, transparent 72%);
          mask-image: radial-gradient(78% 130% at 50% -12%, #000 34%, transparent 72%);
}
.hero-content { position: relative; z-index: 1; }
.brand { font-family: var(--app-display) !important; color: #fff !important; letter-spacing: -0.03em; font-weight: 700 !important; }
.brand-icon { color: var(--ember) !important; filter: drop-shadow(0 0 12px rgba(224,86,79,0.5)); }
/* tagline → glowing glass chip, like the landing hero-tag */
.tagline {
  display: inline-block; padding: 7px 16px;
  background: rgba(255,255,255,0.05) !important; color: var(--text) !important;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(224,86,79,0.12), 0 8px 30px rgba(0,0,0,0.4);
  font-weight: 500 !important; font-size: 14px !important; letter-spacing: 0 !important; text-transform: none !important;
}
.tagline::before { content: none !important; }

/* ════════════ SEARCH CONSOLE ════════════ */
.search-bar {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px -24px rgba(0,0,0,0.8) !important;
  position: relative; z-index: 50;
}
.search-bar:focus-within { border-color: var(--ember) !important; box-shadow: 0 0 0 3px rgba(224,86,79,0.18), 0 18px 50px -22px rgba(224,86,79,0.3) !important; }
#course-search { color: var(--text) !important; font-family: var(--app-font) !important; letter-spacing: 0 !important; }
#course-search::placeholder { color: #6b6f78 !important; }
.search-icon { color: var(--ember) !important; }
.term-pill {
  background: rgba(255,255,255,0.05) !important; border: 1px solid var(--border) !important; color: var(--text) !important;
  text-transform: none !important; font-size: 13px !important; letter-spacing: 0 !important; font-family: var(--app-font) !important; font-weight: 600;
}
.search-submit { background: linear-gradient(120deg, var(--ember), #b8362a) !important; border: none !important; box-shadow: 0 6px 22px rgba(224,86,79,0.4); }
.search-submit:hover { background: linear-gradient(120deg, var(--ember-soft), var(--ember)) !important; filter: none; box-shadow: 0 10px 30px rgba(224,86,79,0.55) !important; }
/* dropdowns need a near-solid dark bg so text stays readable */
.term-dropdown, .custom-select-dropdown, .autocomplete-list {
  background: #251619 !important; border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 28px 70px -12px rgba(0,0,0,0.95) !important;
}
.autocomplete-list { z-index: 120 !important; }
.term-dropdown li, .custom-select-dropdown li, .autocomplete-list li { color: var(--text) !important; font-family: var(--app-font) !important; }
.term-dropdown li:hover, .custom-select-dropdown li:hover, .autocomplete-list li:hover, .autocomplete-list li.active { background: rgba(224,86,79,0.12) !important; color: #fff !important; }
.ac-code { color: var(--ember) !important; font-weight: 700 !important; font-family: var(--app-font) !important; }
.ac-title { color: var(--text-muted) !important; font-family: var(--app-font) !important; }

/* ════════════ TRUST LINE ════════════ */
.trust-item { color: var(--text-muted) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-family: var(--app-font) !important; }
.trust-item svg { color: var(--ember) !important; }
.trust-item strong { color: var(--ember) !important; }
.trust-sep { color: #5d5450 !important; }

/* ════════════ CARDS — glass, hover-glow ════════════ */
.card {
  background: var(--card-bg) !important; border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3) !important;
}
.card::before, .card::after { content: none !important; }
.card h2, #results-title { font-family: var(--app-display) !important; color: #fff !important; text-transform: none !important; letter-spacing: -0.02em !important; font-weight: 600 !important; }
.card h2 svg { color: var(--ember) !important; }
.form-hint, label, .form-group label { color: var(--text-muted) !important; }
input[type="email"], input[type="text"], select { background: rgba(255,255,255,0.04) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
input::placeholder { color: #6b6f78 !important; }

/* ════════════ RESULTS TABLE ════════════ */
.section-table thead th { font-family: var(--app-font) !important; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px !important; color: #6b6f78 !important; border-bottom: 1px solid var(--border) !important; }
.section-table tbody td { border-bottom: 1px solid var(--border) !important; color: var(--text) !important; }
.section-table tbody tr:hover { background: rgba(224,86,79,0.06) !important; }
.col-type, .col-activity, .activity-badge { color: var(--text-muted) !important; font-family: var(--app-font) !important; }
.seat-badge { font-family: var(--app-font) !important; font-weight: 600; border: 1px solid transparent; border-radius: var(--radius-full); }
.seat-open { color: var(--green) !important; background: var(--green-bg) !important; border-color: rgba(61,220,151,0.3) !important; text-shadow: 0 0 12px rgba(61,220,151,0.4); }
.seat-full { color: var(--ember) !important; background: var(--error-bg) !important; border-color: rgba(224,86,79,0.3) !important; }
.seat-badge-summary { padding: 9px 16px !important; font-size: 14px !important; border-radius: var(--radius-full); display: inline-flex; align-items: center; gap: 8px; }
.seat-badge-summary::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.watcher-badge { color: var(--ember) !important; background: rgba(224,86,79,0.12) !important; border: 1px solid rgba(224,86,79,0.25) !important; border-radius: var(--radius-full); font-family: var(--app-font) !important; }

/* ════════════ MY ALERTS / sub-cards ════════════ */
#subscriptions-list { display: grid; gap: 12px; margin-top: 16px; }
.sub-card {
  background: var(--card-bg) !important; border: 1px solid var(--border) !important;
  border-left: 3px solid var(--ember) !important; border-radius: var(--radius-md) !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3) !important;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.sub-card:hover { transform: translateY(-3px); border-color: rgba(224,86,79,0.4) !important; box-shadow: 0 24px 60px -18px rgba(0,0,0,0.6), 0 0 40px rgba(224,86,79,0.1) !important; }
.sub-info, .sub-info strong { color: #fff !important; }
.sub-info > *:first-child::before { content: none !important; }
.sub-meta { color: var(--text-muted) !important; font-family: var(--app-font) !important; font-size: 13px !important; }

/* ════════════ EMPTY STATES ════════════ */
.empty-state-compact, .empty-state-card { color: var(--text-muted) !important; font-family: var(--app-font) !important; }
.empty-state-compact strong { color: var(--ember) !important; }
.empty-state-card { background: var(--card-bg) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg); }
.empty-state-card h3 { font-family: var(--app-display) !important; text-transform: none !important; letter-spacing: -0.02em !important; color: #fff !important; }
.empty-icon { filter: drop-shadow(0 0 8px rgba(224,86,79,0.4)); }

/* ════════════ BUTTONS ════════════ */
.btn-primary { background: linear-gradient(120deg, var(--ember), #b8362a) !important; border: none !important; color: #fff !important; box-shadow: 0 8px 30px rgba(224,86,79,0.4), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:hover { background: linear-gradient(120deg, var(--ember-soft), var(--ember)) !important; transform: translateY(-2px); box-shadow: 0 14px 44px rgba(224,86,79,0.55) !important; filter: none; }
.btn-ghost { background: rgba(255,255,255,0.04) !important; border: 1px solid var(--border) !important; color: var(--text) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.08) !important; border-color: rgba(255,255,255,0.2) !important; }
.btn-danger, .unsubscribe-btn { color: var(--ember) !important; border: 1px solid rgba(224,86,79,0.35) !important; background: rgba(224,86,79,0.06) !important; }
.btn-danger:hover, .unsubscribe-btn:hover { background: rgba(224,86,79,0.14) !important; }

/* ════════════ MODAL ════════════ */
.modal-backdrop { background: rgba(4,3,4,0.7) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-content { background: #120c0c !important; border: 1px solid var(--border) !important; box-shadow: 0 40px 120px -30px rgba(0,0,0,0.9) !important; }
.modal-content h2 { font-family: var(--app-display) !important; color: #fff !important; }
.modal-step { background: rgba(255,255,255,0.12) !important; }
.modal-step.is-active { background: linear-gradient(90deg, var(--ember), #b8362a) !important; }
.field-input { background: rgba(255,255,255,0.04) !important; border-color: var(--border) !important; color: var(--text) !important; }
.field-label { color: #6b6f78 !important; }
.field-input:focus { border-color: var(--ember) !important; box-shadow: 0 0 0 3px rgba(224,86,79,0.18) !important; }
.field-input:focus + .field-label, .field-input:not(:placeholder-shown) + .field-label { color: var(--ember) !important; }
.scope-mark { box-shadow: 0 0 10px rgba(224,86,79,0.5); }
.verify-banner { background: rgba(224,86,79,0.1) !important; border: 1px solid rgba(224,86,79,0.25) !important; }
.verify-pulse { background: var(--ember) !important; }
.ntfy-topic-row code, code { background: rgba(255,255,255,0.05) !important; color: var(--ember-soft) !important; border: 1px solid var(--border); }
.store-badges a { border: 1px solid var(--border) !important; color: var(--text) !important; background: rgba(255,255,255,0.04) !important; }
.store-badges a:hover { border-color: var(--ember) !important; background: rgba(224,86,79,0.1) !important; }
.auto-test-note { background: rgba(255,255,255,0.03) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-md); color: var(--text-muted) !important; }

/* ════════════ SCHEDULE PAGE ════════════ */
.ss-panel.card, .ss-result-card, .ss-selected-course { background: var(--card-bg) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
.ss-label, .ss-time-bound-label, .ss-label-hint, .ss-legend-label { color: var(--text-muted) !important; font-family: var(--app-font) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; }
.ss-day-btn { background: rgba(255,255,255,0.04) !important; border: 1px solid var(--border) !important; color: var(--text) !important; font-family: var(--app-font) !important; }
.ss-day-btn[aria-pressed="true"] { background: rgba(224,86,79,0.14) !important; border-color: var(--ember) !important; color: var(--ember) !important; }
.ss-time-range-fill { background: linear-gradient(90deg, #b8362a, var(--ember)) !important; }
.custom-select-toggle { background: rgba(255,255,255,0.04) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
.ss-course-count { color: var(--ember) !important; font-family: var(--app-font) !important; }

/* ════════════ FOOTER ════════════ */
footer { background: #070506; border-top: 1px solid var(--border); color: var(--text-muted); }
footer strong { color: #fff; }
.footer-note a { color: var(--ember) !important; }
/* Legal links: themed muted (were rendering as default browser blue) */
.footer-legal { margin-top: 6px; font-size: 12.5px; }
.footer-legal a { color: var(--text-muted) !important; text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--ember) !important; }
kbd { background: rgba(255,255,255,0.06) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }

/* ════════════ PLAN / ENTITLEMENT BADGE ════════════ */
.account-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.account-status.hidden { display: none; }
.acct-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; font-family: var(--app-font, 'Satoshi', sans-serif); }
.acct-unlimited { color: #f3c969; background: rgba(243,201,105,0.12); border: 1px solid rgba(243,201,105,0.32); }
.acct-unlimited svg { color: #f3c969; }
.acct-free { color: var(--text-muted); background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.acct-upgrade { font-size: 12.5px; font-weight: 600; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--ember, #e0564f); background: rgba(224,86,79,0.12); color: var(--ember, #e0564f); cursor: pointer; font-family: inherit; transition: background .12s; }
.acct-upgrade:hover { background: rgba(224,86,79,0.22); }

/* ════════════ SIGN-IN + NTFY TEST ════════════ */
.navbar-signin { background: transparent; border: 1px solid var(--border) !important; color: var(--text) !important; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px; cursor: pointer; font-family: var(--app-font, 'Satoshi', sans-serif); transition: background .12s, border-color .12s, color .12s; white-space: nowrap; }
.navbar-signin:hover { background: rgba(224,86,79,0.12); border-color: rgba(224,86,79,0.4) !important; color: var(--ember, #e0564f) !important; }
.signin-modal { max-width: 420px; }
.signin-modal h2 { margin: 0 0 8px !important; }
/* The sign-in input has no floating label, so override the base field's
   floating-label top padding (20px/8px) with symmetric padding — otherwise the
   placeholder sits low instead of vertically centered. */
.signin-modal .field-input { width: 100%; margin: 14px 0; padding: 14px 16px; }
.signin-msg, .ntfy-test-msg { margin: 10px 0 0; font-size: 13px; min-height: 16px; }
.signin-msg.ok, .ntfy-test-msg.ok { color: var(--green, #3ddc97); }
.signin-msg.err, .ntfy-test-msg.err { color: var(--ember, #e0564f); }
/* "Send a test alert" in the My Alerts card */
.test-alert-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.test-alert-msg { font-size: 13px; }
.test-alert-msg.ok { color: var(--green, #3ddc97); }
.test-alert-msg.err { color: var(--ember, #e0564f); }
.ntfy-step-hint { color: var(--text-muted); font-size: 13px; margin: 4px 0 10px; }
.ntfy-weblink { display: inline-block; margin: 10px 0 2px; color: var(--text-muted); font-size: 12px; text-decoration: underline; }
.ntfy-weblink:hover { color: var(--ember-soft); }
@media (max-width: 600px) { .navbar-signin { padding: 5px 10px; font-size: 12px; } }

/* Lift each page hero (and its in-hero autocomplete dropdown) above the content
   cards. The cards use backdrop-filter, which forms a stacking context that
   would otherwise paint OVER an absolutely-positioned dropdown, making the
   autocomplete suggestions appear to bleed through a loaded course card. */
.hero { z-index: 30; }

/* ════════════ MOTION ════════════ */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .sub-card:hover, .btn-primary:hover { transform: none; }
}

/* ════════════ RESPONSIVE: results table → cards on phones ════════════ */
@media (max-width: 640px) {
  .section-table, .section-table thead, .section-table tbody, .section-table tr, .section-table td { display: block; width: 100%; }
  .section-table thead { display: none; }
  .section-table tbody tr { border: 1px solid var(--border); border-left: 3px solid var(--ember); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px; background: var(--card-bg); }
  .section-table tbody td { border: none !important; padding: 3px 0 !important; }
  .section-table tbody td::before { content: attr(data-label); display: inline-block; min-width: 92px; font-family: var(--app-font); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b6f78; font-weight: 600; }
}

/* (sniper reticle cursor + click-to-snipe removed per Frank — not wanted in the app) */
.reticle { display: none !important; }

/* ════════════ Branded hero — big centered SeatSniper logo, then search ════════════ */
.hero-content { text-align: center; }
.brand {
  display: flex !important; align-items: center; justify-content: center; gap: 14px;
  font-size: clamp(40px, 5.2vw, 60px) !important; line-height: 1 !important; margin-bottom: 14px !important;
}
.brand-icon { width: 0.92em !important; height: 0.92em !important; flex: none; }
/* Never hide the brand when alerts exist — logo first, search below (like ScheduleSniper) */
.hero.hero-compact { padding: 66px 0 30px !important; }
.hero.hero-compact .brand { display: flex !important; }
.hero.hero-compact .brand-icon { display: inline-block !important; }
.hero.hero-compact .tagline { display: inline-block !important; }
.hero.hero-compact .trust-line { display: none; }
.hero-search { max-width: 660px !important; margin: 22px auto 0 !important; }

/* ════════════ Tighter, aligned content (kill the stacked-empty-boxes look) ════════════ */
#tab-subscriptions { max-width: 660px; margin-left: auto; margin-right: auto; }
/* "Targets Locked" was a big empty card — make it a slim header */
#tab-subscriptions > .card {
  background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 14px !important;
}
#tab-subscriptions > .card h2 { font-size: 16px !important; margin-bottom: 5px !important; }
#tab-subscriptions > .card .form-hint { margin: 0 !important; font-size: 12.5px !important; opacity: 0.6; }
/* denser, aligned watched-course list */
#subscriptions-list { display: flex; flex-direction: column; gap: 8px; }
.sub-card { padding: 14px 18px !important; }
.alerts-section { margin-top: 30px !important; }

/* ════════════ Fixes: hero padding parity, term picker, alerts badge ════════════ */
/* All three heroes share ScheduleSniper's roomier title/logo padding so the
   wordmark gets the same breathing room on every tab. */
.hero, .hero.hero-schedule, .hero.hero-compact { padding: 66px 0 30px !important; }

/* term pill — kill the leftover light-theme seam (#e0e0e0) + square corners */
.term-pill { box-shadow: none !important; border-radius: 10px !important; }

/* term dropdown — clearly above everything, fully opaque, no bleed-through */
.term-dropdown { z-index: 400 !important; margin-top: 8px !important; border-radius: 12px !important; overflow: hidden; }
.term-dropdown li.selected { background: var(--red) !important; color: #fff !important; }

/* alerts badge — a clear labelled pill, not a mysterious lone "3" */
.navbar-alert-badge {
  min-width: 0 !important; width: auto !important; height: auto !important;
  border-radius: 99px !important; padding: 4px 11px !important;
  font-size: 12px !important; font-weight: 700 !important; line-height: 1 !important;
  background: rgba(224,86,79,0.14) !important; color: var(--ember-soft) !important;
  border: 1px solid rgba(224,86,79,0.35) !important; display: inline-flex !important; align-items: center;
}
.navbar-alert-badge::after { content: " seats opened in 24h"; font-weight: 500; opacity: 0.85; margin-left: 4px; }

/* ════════════ Search bar — cleaner term pill + contained submit glow ════════════ */
.term-pill {
  background: rgba(255,255,255,0.06) !important; border: none !important; box-shadow: none !important;
  border-radius: 9px !important; padding: 8px 12px !important; margin: 0 8px !important;
  font-size: 13px !important; font-weight: 600 !important; gap: 6px !important; color: var(--text) !important;
}
.term-pill:hover { background: rgba(255,255,255,0.1) !important; }
.term-chevron { opacity: 0.55; width: 14px !important; height: 14px !important; }
.search-submit { box-shadow: none !important; border-radius: 0 var(--radius-lg) var(--radius-lg) 0 !important; }
.search-submit:hover { box-shadow: 0 0 22px rgba(224,86,79,0.45) !important; }

/* ════════════ Refined term dropdown — layered surface, subtle selected + check ════════════ */
.term-dropdown {
  left: auto !important; right: 0 !important; min-width: 172px !important;
  background: #241619 !important; border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 26px 64px -14px rgba(0,0,0,0.92) !important;
  border-radius: 12px !important; padding: 5px !important; overflow: hidden;
}
.term-dropdown li {
  padding: 9px 12px !important; border-radius: 8px !important; margin: 0 !important;
  font-size: 13.5px !important; font-weight: 500 !important; color: var(--text) !important;
  display: flex !important; align-items: center; justify-content: space-between;
  transition: background .12s ease;
}
.term-dropdown li:hover { background: rgba(255,255,255,0.07) !important; color: #fff !important; }
.term-dropdown li.selected { background: rgba(224,86,79,0.13) !important; color: var(--ember-soft) !important; font-weight: 600 !important; }
.term-dropdown li.selected::after {
  content: ""; width: 14px; height: 14px; flex: none; margin-left: 10px; background: var(--ember);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ════════════ Term segmented toggle (replaces the 2-option dropdown) ════════════ */
.term-segment {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; margin: 0 8px;
}
.term-seg {
  appearance: none; -webkit-appearance: none; border: none; background: transparent; cursor: pointer;
  font-family: var(--app-font); font-size: 12.5px; font-weight: 600; line-height: 1;
  color: var(--text-muted); padding: 7px 11px; border-radius: 7px; white-space: nowrap;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.term-seg:hover:not(.selected) { color: #fff; background: rgba(255,255,255,0.05); }
.term-seg.selected { background: rgba(255,255,255,0.13); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
@media (max-width: 640px) { .term-segment { margin: 8px; } .term-seg { padding: 8px 10px; } }

/* ════════════ Search bar — UI/UX standards polish ════════════ */
.search-bar { border-radius: 16px !important; }
.search-bar input[type="text"] { font-size: 16px !important; padding: 18px 14px 18px 52px !important; }
.search-icon { left: 19px !important; width: 19px !important; height: 19px !important; }
/* visually group the input | controls with a subtle divider */
.term-segment { margin: 0 10px 0 4px !important; position: relative; }
.term-segment::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 24px; background: var(--border);
}
/* clearer selected segment (AA contrast on dark) */
.term-seg.selected { background: rgba(255,255,255,0.16) !important; color: #fff !important; box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important; }
.term-seg:not(.selected) { color: var(--text-muted) !important; }
/* submit: flush full-height, radius matched to the bar */
.search-submit { width: 54px !important; align-self: stretch !important; height: auto !important; border-radius: 0 16px 16px 0 !important; }
.search-bar:focus-within { box-shadow: 0 0 0 3px rgba(224,86,79,0.20), 0 18px 50px -22px rgba(224,86,79,0.32) !important; }

/* ── Segment spacing fix: even inset + balanced margins, no divider ── */
.term-segment { margin: 0 12px !important; padding: 4px !important; gap: 3px !important; }
.term-segment::before { content: none !important; display: none !important; }
.term-seg { padding: 7px 13px !important; }

/* ════════════ Mobile: app-like bottom tab bar + bottom-sheet modal (thumb zone) ════════════ */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  /* The navbar's backdrop-filter creates a containing block, which would pin the
     "fixed bottom" nav to the navbar instead of the viewport. Drop it on mobile,
     give a solid bg, and clear the notch. */
  .navbar {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    background: rgba(10,7,8,0.97) !important;
    padding-top: env(safe-area-inset-top) !important; height: auto !important;
  }
  /* Search bar: stack the input over [toggle + submit] so nothing overflows the edge */
  .search-bar { flex-wrap: wrap !important; padding: 4px !important; }
  #course-search { flex: 1 1 100% !important; width: 100% !important; padding: 15px 14px 15px 46px !important; }
  .term-segment { margin: 0 auto 0 4px !important; }
  .search-submit { align-self: center !important; height: 44px !important; width: 52px !important; border-radius: 10px !important; margin: 4px !important; }

  /* Move the SeatSniper/ScheduleSniper tabs to a fixed bottom bar */
  .navbar-links {
    position: fixed !important; left: 0; right: 0; bottom: 0; top: auto !important; z-index: 1000;
    display: flex !important; justify-content: space-around; align-items: stretch; gap: 0 !important;
    background: #0d0a0b !important; -webkit-backdrop-filter: none; backdrop-filter: none;
    border-top: 1px solid var(--border) !important;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom)) !important; margin: 0 !important; height: auto !important;
  }
  .navbar-link {
    flex: 1; flex-direction: column !important; align-items: center; justify-content: center;
    gap: 4px !important; font-size: 11px !important; padding: 6px 4px !important; min-height: 50px; border-radius: 12px;
  }
  .navbar-link svg { display: block !important; width: 22px !important; height: 22px !important; }
  .page, body { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
  .navbar-badge-wrap { display: none !important; }  /* stat badge clutters the tight mobile navbar */

  /* TAP FIX: lift the navbar (and its fixed bottom bar) above the .page stacking
     context, otherwise the page's empty bottom-padding area swallows every tap. */
  .navbar { z-index: 1000 !important; }

  /* Clean iOS-style tab bar: colour-only active state (no heavy gradient box that
     bleeds off the edge) + a slim ember indicator on the active tab. */
  .navbar-link { color: var(--text-muted) !important; background: none !important; box-shadow: none !important; position: relative; }
  .navbar-link:not(.active):active { background: rgba(255,255,255,0.05) !important; }
  .navbar-link.active { color: var(--ember) !important; background: none !important; box-shadow: none !important; }
  .navbar-link.active svg { color: var(--ember) !important; filter: drop-shadow(0 0 7px rgba(224,86,79,0.45)); }
  .navbar-link.active::before {
    content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ember); box-shadow: 0 0 8px rgba(224,86,79,0.6);
  }

  /* Search magnifier aligns with the INPUT row, not the centre of the wrapped bar. */
  .search-icon { top: 27px !important; bottom: auto !important; transform: translateY(-50%) !important; }

  /* ntfy modal -> native-style bottom sheet */
  #subscribe-modal .modal-content {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    transform: none !important; max-width: 100% !important; width: 100% !important; margin: 0 !important;
    border-radius: 22px 22px 0 0 !important; max-height: 92vh; overflow-y: auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
    animation: sheetUp .32s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes sheetUp { from { transform: translateY(100%) !important; } to { transform: translateY(0) !important; } }

  /* comfortable touch targets */
  .btn, .search-submit, .sub-card .btn, .term-seg { min-height: 44px; }
}

/* ── School picker (multi-campus) ── */
.school-picker { position: relative; margin-left: 4px; }
.school-current { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.06); border: 1px solid var(--border, #2a2a2e); color: var(--text, #e8e8ea); border-radius: 9px; padding: 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1; }
.school-current:hover { background: rgba(255,255,255,0.11); }
.school-caret { font-size: 10px; opacity: .7; }
/* The dropdown is always dark (both themes), so colors are explicit, not theme
   vars — otherwise light mode flips text to dark and it vanishes on the dark menu. */
.school-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 184px; background: #1c1c20 !important; border: 1px solid rgba(255,255,255,0.12) !important; border-radius: 12px; padding: 6px; z-index: 1200; box-shadow: 0 16px 38px -12px rgba(0,0,0,.6); }
.school-menu.hidden { display: none; }
.school-menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #8d8d93 !important; padding: 6px 8px 4px; }
.school-cap { color: #e0564f; flex: none; }
.school-name { font-weight: 600; }
.school-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: #ece6e4 !important; padding: 10px 11px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.school-opt:hover { background: rgba(255,255,255,0.08); }
.school-opt.active { color: #ff7a6b !important; font-weight: 700; }
.school-check { color: #ff7a6b !important; font-weight: 700; }
.school-menu-soon { font-size: 11px; color: #8d8d93 !important; padding: 8px 8px 4px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4px; }
@media (max-width: 600px) { .school-current { padding: 5px 8px; font-size: 12px; } .school-picker { margin-left: 2px; } }

/* Navbar must sit above page content so the school dropdown is clickable
   (page content is also z-index:2 and later in DOM, so it was covering it). */
.navbar { z-index: 100 !important; }

/* ════════ Upgrade modal — value screen at the paywall (before Stripe) ════════ */
.upgrade-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); padding: 20px; }
.upgrade-overlay.hidden { display: none; }
.upgrade-card { position: relative; width: 100%; max-width: 400px; background: #14100f;
  border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px 22px; text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.75); animation: upPop .26s cubic-bezier(0.16,1,0.3,1); }
@keyframes upPop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
.upgrade-x { position: absolute; top: 13px; right: 15px; background: none; border: none; color: var(--text-muted);
  font-size: 24px; line-height: 1; cursor: pointer; }
.upgrade-x:hover { color: var(--text); }
.upgrade-icon { width: 54px; height: 54px; margin: 2px auto 15px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--ember), #b8362a); color: #fff; box-shadow: 0 10px 26px rgba(224,86,79,0.45); }
.upgrade-icon svg { width: 28px; height: 28px; }
.upgrade-title { font-family: var(--app-display); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin: 0 0 8px; }
.upgrade-msg { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
.upgrade-perks { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.upgrade-perks li { color: var(--text); font-size: 14.5px; display: flex; align-items: flex-start; gap: 11px; }
.upgrade-perks li::before { content: "✓"; color: var(--green); font-weight: 800; flex: none; }
.upgrade-go { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; border-radius: 12px; cursor: pointer;
  font-family: var(--app-font); color: #fff; border: none;
  background: linear-gradient(120deg, var(--ember), #b8362a); box-shadow: 0 8px 24px rgba(224,86,79,0.42); }
.upgrade-go:hover { filter: brightness(1.08); box-shadow: 0 12px 30px rgba(224,86,79,0.55); }
.upgrade-later { width: 100%; margin-top: 9px; padding: 9px; background: none; border: none;
  color: var(--text-muted); font-size: 14px; cursor: pointer; font-family: var(--app-font); }
.upgrade-later:hover { color: var(--text); }
@media (max-width: 600px) {
  .upgrade-overlay { align-items: flex-end; padding: 0; }
  .upgrade-card { max-width: 100%; border-radius: 22px 22px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: upSheet .3s cubic-bezier(0.16,1,0.3,1); }
  @keyframes upSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
}
