/* Falcon by Protecht - brand theme (deep blue, glass surfaces). */
:root {
  --navy-950: #061426;
  --navy-900: #0a1f3a;
  --navy-800: #0d2d52;
  --blue-600: #0b5c94;
  --blue-400: #38a3e8;
  --cyan: #5cc8ff;
  --violet: #6a3df0;

  --text: #f2f7fd;
  --muted: #a9bdd4;
  --faint: #7f97b3;
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(255, 255, 255, .24);
  --surface: rgba(8, 30, 58, .58);
  --surface-solid: #0c2545;
  --tile: rgba(255, 255, 255, .06);

  --ok: #3ddc97;
  --ok-bg: rgba(61, 220, 151, .13);
  --warn: #ffc94d;
  --warn-bg: rgba(255, 201, 77, .13);
  --bad: #ff7b7b;
  --bad-bg: rgba(255, 123, 123, .14);
  --err: #a9bdd4;
  --err-bg: rgba(169, 189, 212, .12);

  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px rgba(2, 10, 24, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--navy-900);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Heebo", "Rubik", "Arial Hebrew", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h3, p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: .92rem; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}
button:focus-visible, .dropzone:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .08); color: var(--text);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .4); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 7px 15px; font-size: .88rem; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(135deg, #2b8fe0 0%, #3a6cf0 50%, var(--violet) 100%);
  box-shadow: 0 8px 24px rgba(58, 108, 240, .38);
}
.btn.primary:hover { box-shadow: 0 10px 30px rgba(58, 108, 240, .55); filter: brightness(1.07); }
.btn.wide { width: 100%; padding: 13px; margin-top: 24px; font-size: 1rem; border-radius: var(--radius-sm); }

/* ================= login ================= */
.login-body {
  background: var(--navy-900) url("/static/brand/login-bg.jpg") left center / cover no-repeat fixed;
}
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: flex-end;
  padding: 24px clamp(16px, 9vw, 150px);
}
.login-card { width: 100%; max-width: 410px; padding: 38px 34px 28px; }
.login-logo { display: none; height: auto; margin: 0 auto 26px; }
.login-card h1 { font-size: 1.65rem; line-height: 1.25; margin: 8px 0 8px; letter-spacing: -.01em; }
.login-card label { display: block; margin: 20px 0 7px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.login-card input {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: rgba(4, 16, 34, .55); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(92, 200, 255, .16); outline: none; }
.login-error {
  margin-top: 18px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bad-bg); border: 1px solid rgba(255, 123, 123, .4); color: var(--bad);
  font-weight: 600; font-size: .92rem;
}
.login-foot { margin-top: 20px; text-align: center; font-size: .8rem; color: var(--faint); }
@media (max-width: 980px) {
  .login-body { background-position: right center; }
  .login-shell { justify-content: center; padding: 20px 16px; }
  .login-logo { display: block; }
  .login-card { text-align: center; }
  .login-card form { text-align: start; }
}

/* ================= app shell ================= */
.app-body {
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(56, 163, 232, .30), transparent 62%),
    radial-gradient(900px 600px at 0% 105%, rgba(106, 61, 240, .14), transparent 60%),
    linear-gradient(180deg, rgba(8, 52, 96, .42), rgba(6, 26, 50, .80)),
    url("/static/brand/app-bg.jpg") center / cover no-repeat fixed,
    var(--navy-900);
  background-attachment: fixed;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 20, 38, .72); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }
.brand-shield { height: 32px; width: auto; display: block; }
.brand-word { height: 15px; width: auto; display: block; }
.brand-divider { width: 1px; height: 22px; background: var(--line-strong); }
.brand-tool { font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); white-space: nowrap; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .84rem; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid transparent;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(61, 220, 151, .3); }
.pill-down { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 123, 123, .35); }
.pill-unknown { background: var(--err-bg); color: var(--err); }

.page { max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }
.hero { text-align: center; padding: 54px 0 30px; }
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em;
  margin: 12px 0 14px;
  background: linear-gradient(180deg, #ffffff 30%, #b9dcff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.06rem; }

/* ---------- dropzone ---------- */
.dropzone {
  position: relative; display: block; text-align: center; padding: 44px 20px 40px; cursor: pointer;
  border: 1.5px dashed rgba(92, 200, 255, .45);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--cyan); background: rgba(14, 48, 88, .72);
  box-shadow: var(--shadow), 0 0 0 5px rgba(92, 200, 255, .10);
}
.dropzone.over { transform: scale(1.008); }
.drop-icon {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2b8fe0, var(--violet));
  box-shadow: 0 12px 30px rgba(58, 108, 240, .45);
}
.drop-title { font-size: 1.28rem; font-weight: 700; margin-bottom: 6px; }
.drop-sub { color: var(--muted); font-size: .92rem; }
kbd {
  font: inherit; font-size: .8rem; padding: 1px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--line-strong);
}
.assurances {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; color: var(--muted); font-size: .88rem;
}
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances svg { color: var(--cyan); flex: none; }

/* ---------- summary ---------- */
.summary {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 40px;
}
.counts, .summary-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: .9rem;
  padding: 6px 14px; border-radius: 999px; background: var(--err-bg); color: var(--err); border: 1px solid var(--line);
}
.chip.v-approved { background: var(--ok-bg); color: var(--ok); border-color: rgba(61, 220, 151, .3); }
.chip.v-borderline { background: var(--warn-bg); color: var(--warn); border-color: rgba(255, 201, 77, .3); }
.chip.v-rejected { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 123, 123, .35); }

/* ---------- result card ---------- */
.results { display: grid; gap: 16px; margin-top: 16px; }
.card {
  --tone: var(--err); --tone-bg: var(--err-bg); --tone-line: var(--line);
  position: relative; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 22px;
  padding: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  animation: rise .35s ease both;
}
.card::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
  background: var(--tone); box-shadow: 0 0 22px var(--tone);
}
.card.v-approved { --tone: var(--ok); --tone-bg: var(--ok-bg); --tone-line: rgba(61, 220, 151, .32); }
.card.v-borderline { --tone: var(--warn); --tone-bg: var(--warn-bg); --tone-line: rgba(255, 201, 77, .32); }
.card.v-rejected { --tone: var(--bad); --tone-bg: var(--bad-bg); --tone-line: rgba(255, 123, 123, .36); }
.card.v-pending::before { background: var(--line-strong); box-shadow: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.media { display: flex; align-items: flex-start; justify-content: center; }
.frame {
  position: relative; display: inline-block; line-height: 0; overflow: hidden;
  border-radius: 13px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3);
}
.frame img { display: block; max-width: 100%; max-height: 360px; }
.facebox {
  position: absolute; padding: 0; background: transparent; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .9); border-radius: 8px; opacity: .7;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .45);
  transition: opacity .15s;
}
.facebox:hover { opacity: 1; }
.facebox.selected { opacity: 1; border-width: 3px; }
.facebox.selected[data-verdict="approved"] { border-color: var(--ok); }
.facebox.selected[data-verdict="borderline"] { border-color: var(--warn); }
.facebox.selected[data-verdict="rejected"] { border-color: var(--bad); }

.body { min-width: 0; padding-inline-end: 30px; }
.banner {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 13px;
  background: var(--tone-bg); border: 1px solid var(--tone-line); color: var(--tone); font-size: 1.16rem;
}
.banner strong { font-weight: 700; }
.card.v-pending .banner { color: var(--muted); font-size: 1rem; }
.banner-icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tone); color: var(--navy-950); font-weight: 800; font-size: 1.1rem; line-height: 1;
  box-shadow: 0 0 18px var(--tone-line);
}
.spinner {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--cyan); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
  .card { animation: none; }
}

.file-meta { margin-top: 10px; overflow-wrap: anywhere; font-size: .86rem; color: var(--faint); }
.best-badge {
  display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #2b8fe0, var(--violet)); color: #fff; font-size: .8rem; font-weight: 700;
}
.reasons { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.reasons li { padding-inline-start: 14px; border-inline-start: 2px solid var(--tone); }
.reasons strong { display: block; }
.reason-tip { display: block; color: var(--muted); font-size: .93rem; margin-top: 2px; }
.body > .reason-tip { margin-top: 14px; }
.body > .btn { margin-top: 12px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 18px 0 0; }
.metrics div { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; }
.metrics dt { color: var(--faint); font-size: .76rem; font-weight: 600; }
.metrics dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.picker { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 18px; }
.picker .muted { flex-basis: 100%; font-size: .86rem; }
.thumb {
  position: relative; width: 62px; height: 62px; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 12px; border: 2px solid var(--line-strong); background: var(--tile); color: var(--text); font-weight: 700;
  transition: border-color .15s, box-shadow .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: rgba(255, 255, 255, .5); }
.thumb.selected { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(92, 200, 255, .28); }
.thumb-icon {
  position: absolute; inset-block-end: 3px; inset-inline-end: 3px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem; font-weight: 800; line-height: 1;
  color: var(--navy-950); background: var(--err);
}
.thumb[data-verdict="approved"] .thumb-icon { background: var(--ok); }
.thumb[data-verdict="borderline"] .thumb-icon { background: var(--warn); }
.thumb[data-verdict="rejected"] .thumb-icon { background: var(--bad); }

.note { margin-top: 12px; font-size: .88rem; color: var(--faint); }
.dup {
  margin-top: 14px; font-size: .92rem; padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--warn-bg); border: 1px solid rgba(255, 201, 77, .3);
}
.remove {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: transparent; color: var(--faint);
  font-size: 1.35rem; line-height: 1; cursor: pointer; transition: background .15s, color .15s;
}
.remove:hover { background: rgba(255, 255, 255, .12); color: var(--text); }

/* ---------- guide + footer ---------- */
.guide { margin-top: 34px; padding: 18px 22px; }
.guide summary { cursor: pointer; font-weight: 700; font-size: 1.02rem; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.guide-col { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--tile); border: 1px solid var(--line); }
.guide-col h3 { font-size: .95rem; margin-bottom: 8px; }
.guide-col.do h3 { color: var(--ok); }
.guide-col.dont h3 { color: var(--bad); }
.guide ul { margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: .93rem; }
.guide li + li { margin-top: 3px; }
.footer { text-align: center; padding: 10px 16px 34px; color: var(--faint); font-size: .78rem; letter-spacing: .08em; }

@media (max-width: 720px) {
  .hero { padding: 34px 0 22px; }
  .brand-divider, .brand-tool { display: none; }
  .card { grid-template-columns: 1fr; padding: 44px 16px 18px; }
  .body { padding-inline-end: 0; }
  .frame img { max-height: 300px; }
  .dropzone { padding: 32px 16px 30px; }
}

/* ---------- demo banner ---------- */
.demo-banner {
  padding: 10px 20px; text-align: center; font-size: .92rem;
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid rgba(255, 201, 77, .35);
}
