/* style-app.css — shared components for the authed pages (me / admin / captain
   / guide). Loaded after style.css, which owns the CT//T HUD design tokens +
   primitives (glass, notch, buttons, crest). This is the quieter "product"
   register: same palette + glass language, dialed down for dense tools.
   Class names preserved; surface treatment updated to the HUD look. */

/* ── buttons ─────────────────────────────────────────────────────────── */
.app-btn {
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  color: #1a1400;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 12px 26px -14px rgba(224,162,19,.6);
  transition: transform .16s var(--ease-snap, cubic-bezier(.2,.8,.2,1)), box-shadow .2s, background .2s, filter .2s, border-color .2s, color .2s;
}
.app-btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(224,162,19,.8); }
.app-btn:active { transform: translateY(0) scale(.985); transition-duration: .06s; }
.app-btn[disabled] { opacity: 0.55; cursor: not-allowed; background: var(--ink-3); box-shadow: none; filter: none; transform: none; }
.app-btn.ghost {
  background: var(--glass-2);
  border: 1px solid var(--glass-bd);
  color: var(--ink);
  clip-path: none;
  box-shadow: none;
}
.app-btn.ghost:hover { border-color: var(--ct); color: var(--ink); background: rgba(90,169,255,.16); filter: none; }
/* Destructive primary — solid loss fill for the affirmative-but-dangerous
   action inside a confirm dialog (e.g. RESET). */
.app-btn.danger { background: var(--loss); color: #1a0a06; box-shadow: 0 12px 26px -14px rgba(255,90,71,.6); }
.app-btn.danger:hover { background: color-mix(in oklch, var(--loss), white 10%); filter: none; }

@media (prefers-reduced-motion: reduce) {
  .app-btn:hover, .app-btn:active, .app-tab:hover, .app-tab:active { transform: none; }
}

/* ── confirm dialog ─────────────────────────────────────────────────────
   Native <dialog> styled to the tool aesthetic. */
.app-dialog {
  border: 1px solid var(--glass-bd);
  background: var(--bg-raised);
  color: var(--ink);
  padding: 0;
  width: 100%;
  border-radius: 14px;
  max-width: min(460px, calc(100vw - 32px));
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
}
.app-dialog::backdrop { background: rgba(8,14,26,0.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.app-dialog__inner {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(20px, 3vw, 28px);
}
.app-dialog__title {
  margin: 0;
  font-family: var(--t-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
}
.app-dialog__body {
  margin: 0;
  font-family: var(--t-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.app-dialog__actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px;
  margin-top: 6px;
}

/* ── status line (form / action feedback) ───────────────────────────── */
.app-status {
  margin-top: 16px;
  font-family: var(--t-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.app-status.ok    { color: var(--win); }
.app-status.error { color: var(--loss); }

.app-status.sent {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--gold-bd);
  border-radius: 12px;
  background: color-mix(in oklch, var(--ember), transparent 90%);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--ink);
  font-family: var(--t-body);
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.5;
}
.app-status.sent strong {
  font-family: var(--t-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.app-status.sent b { color: var(--ember); }
.app-status.sent small { color: var(--ink-2); font-size: 12px; }

/* ── sign-in / locked card ───────────────────────────────────────────── */
.app-card {
  padding: clamp(28px, 3vw, 44px);
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: 16px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 22px 54px -28px rgba(6,12,26,.5), inset 0 1px 0 var(--glass-hi);
  max-width: 600px;
}
.app-card h2 {
  font-family: var(--t-display);
  font-weight: 800;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.app-card p { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-bottom: 16px; max-width: 52ch; }
.app-card code { font-family: var(--t-mono); font-size: 12px; background: var(--bg-deeper); padding: 2px 6px; border-radius: 4px; color: var(--ember); }

/* ── content section panel (me + captain) ─────────────────────────────── */
.app-section {
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: 14px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 22px 54px -30px rgba(6,12,26,.45), inset 0 1px 0 var(--glass-hi);
  padding: clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 18px;
}
.app-section header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.app-section h2 {
  font-family: var(--t-display);
  font-weight: 800;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
}
.app-section .help {
  font-family: var(--t-body);      /* Inter, like the Guide prose — readable */
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: normal;
  color: var(--ink-2);
  max-width: 72ch;
}
.app-section .help b { color: var(--ink); font-weight: 600; }

/* ── tab nav — real chip buttons (me + captain + guide) ─────────────────── */
.app-tabs {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin: clamp(8px, 1.5vw, 14px) 0 clamp(22px, 3vw, 32px);
}
.app-tab {
  appearance: none;
  cursor: pointer;
  padding: 12px 22px;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2);
  background: var(--glass-2);
  border: 1px solid var(--glass-bd);
  clip-path: var(--notch);
  font-family: var(--t-display);
  text-transform: uppercase;
  position: relative;
  transition: transform .16s var(--ease-snap), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.app-tab:hover { color: var(--ink); border-color: var(--ct); background: rgba(90,169,255,.16); transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgba(50,128,250,.7); }
.app-tab:active { transform: translateY(-1px) scale(.98); transition-duration: .06s; }
.app-tab[aria-current="page"] {
  color: #1a1400;
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  border-color: transparent;
  box-shadow: 0 12px 26px -12px rgba(224,162,19,.7);
}
.app-tab[aria-current="page"]:hover { filter: brightness(1.06); border-color: transparent; }
.app-tab .app-tab-num {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  transition: color 220ms var(--ease-out-quart);
}
.app-tab[aria-current="page"] .app-tab-num { color: #1a1400; opacity: .7; }
.app-tab .app-tab-label {
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: 0.01em;
}
@media (max-width: 520px) {
  .app-tab { padding: 10px 14px 12px; gap: 8px; }
  .app-tab .app-tab-label { font-size: 14px; }
  .app-tab .app-tab-num { font-size: 9px; }
}

/* ── native form popups ───────────────────────────────────────────────
   Every select on the signed-in tools is styled dark, but the NATIVE
   dropdown popup follows the OS light theme unless told otherwise —
   leaving near-white text on a white popup. Declare the controls dark
   so the popup matches, with explicit option colours as the fallback. */
select { color-scheme: dark; }
select option { background: var(--bg-deeper); color: var(--ink); }
