/* Sirius — extension popup. Light (dagslys) + Dark (natt) themes via [data-sirius]. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root,
:root[data-sirius="light"] {
  --srs-bg: #F0F6FB;
  --srs-surface: #FFFFFF;
  --srs-surface-2: #FAFCFE;
  --srs-ink: #0B2440;
  --srs-ink-dim: #5B7393;
  --srs-ink-faint: #97AAC4;
  --srs-sky: #6FB6F2;
  --srs-sky-soft: #C9E4F8;
  --srs-sun: #FF8A5C;
  --srs-sun-deep: #FF6E3D;
  --srs-sand: #FFE9DC;
  --srs-sand-deep: #A04317;
  --srs-line: #D9E5F1;
  --srs-line-soft: #ECF2F8;
  --srs-good: #2D8059;
  --srs-good-soft: #E8F6EC;
  --srs-warn: #C77A2B;
  --srs-warn-soft: #FFEED4;
  --srs-err: #C24F3B;
  --srs-err-soft: #FCE4DE;
  --srs-shadow: 0 4px 16px rgba(11,36,64,0.08);
  --srs-popup-bg: linear-gradient(180deg, #FFFFFF 0%, #F0F6FB 100%);
}

:root[data-sirius="dark"] {
  --srs-bg: #050B1A;
  --srs-surface: #0D1A2E;
  --srs-surface-2: #131F35;
  --srs-ink: #F0F6FB;
  --srs-ink-dim: #8AA4C4;
  --srs-ink-faint: #5B7393;
  --srs-sky: #5BA2E0;
  --srs-sky-soft: #1B2A40;
  --srs-sun: #FF9C73;
  --srs-sun-deep: #FF7547;
  --srs-sand: #2A1A14;
  --srs-sand-deep: #FFB58A;
  --srs-line: #1B2A40;
  --srs-line-soft: #14213A;
  --srs-good: #3FA876;
  --srs-good-soft: #0F2A1F;
  --srs-warn: #E0A35A;
  --srs-warn-soft: #2A1F0F;
  --srs-err: #E07A66;
  --srs-err-soft: #2A1410;
  --srs-shadow: 0 4px 20px rgba(0,0,0,0.5);
  --srs-popup-bg: linear-gradient(180deg, #0D1A2E 0%, #050B1A 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 400px;
  height: 600px;
  background: var(--srs-bg);
  color: var(--srs-ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 13px;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

#root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--srs-popup-bg);
}

::selection { background: var(--srs-sun); color: #fff; }

.hidden { display: none !important; }

/* Header */
.hdr {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--srs-line);
  background: color-mix(in srgb, var(--srs-surface) 88%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; }
/* "Daggry" mark — sunrise + paper plane on navy disc (data-URI SVG). */
.logo-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><circle cx='48' cy='48' r='46' fill='%230B2440'/><circle cx='48' cy='64' r='20' fill='%23FF8A5C'/><rect x='14' y='62' width='68' height='4' rx='2' fill='%23FFE9DC'/><path d='M22 50 L74 30 L60 56 L52 48 L34 52 Z' fill='%23FFE9DC'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 4px 12px rgba(255,138,92,0.25);
  flex-shrink: 0;
}
:root[data-sirius="dark"] .logo-dot {
  box-shadow: 0 0 0 1px rgba(255,233,220,0.10), 0 4px 12px rgba(255,156,115,0.20);
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--srs-ink);
}
.hdr-actions { display: flex; align-items: center; gap: 6px; }

.ghost-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--srs-line);
  border-radius: 50%;
  color: var(--srs-ink-dim);
  cursor: pointer;
  transition: all .18s ease;
}
.ghost-btn:hover { color: var(--srs-sun); border-color: var(--srs-sun); }

/* Site row */
.site-row {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--srs-line);
}
.tiny-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--srs-ink-dim);
  font-weight: 600;
  text-transform: uppercase;
}
.site-host {
  margin-top: 4px;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--srs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Verified banner */
.amex-banner {
  border-bottom: 1px solid var(--srs-line);
  background: var(--srs-good-soft);
}
.amex-banner.indirect { background: var(--srs-warn-soft); }
.amex-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}
.verified-mark {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--srs-good);
  color: #fff;
}
.amex-banner.indirect .verified-mark { background: var(--srs-warn); }
.amex-text { flex: 1; min-width: 0; }
.amex-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--srs-good);
  text-transform: uppercase;
}
.amex-banner.indirect .amex-title { color: var(--srs-warn); }
.amex-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--srs-ink);
  font-weight: 500;
}
.amex-pill {
  padding: 5px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: #fff;
  background: var(--srs-good);
  border-radius: 999px;
  text-transform: uppercase;
}
.amex-banner.indirect .amex-pill { background: var(--srs-warn); }

/* States */
.state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

/* Scanner */
.scanner-wrap {
  position: relative;
  width: 200px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid var(--srs-line);
  background: var(--srs-surface);
  overflow: hidden;
  box-shadow: var(--srs-shadow);
}
.scanner-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--srs-sun);
  box-shadow: 0 0 10px var(--srs-sun), 0 0 22px color-mix(in srgb, var(--srs-sun) 50%, transparent);
  animation: sweep 1.6s ease-in-out infinite;
}
@keyframes sweep {
  0% { top: 0; opacity: .2; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: .2; }
}
.scan-text {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  font-weight: 600;
  color: var(--srs-ink);
}
.scan-sub {
  margin-top: 14px;
  color: var(--srs-ink-dim);
  font-size: 12px;
}

/* Error / Empty */
.state-error .err-title { font-family: 'IBM Plex Mono', monospace; font-weight: 600; letter-spacing: 0.22em; color: var(--srs-err); font-size: 11px; }
.err-body { margin-top: 12px; color: var(--srs-ink); font-size: 13px; line-height: 1.5; }
.err-hint { margin-top: 14px; color: var(--srs-ink-dim); font-size: 12px; line-height: 1.55; }

.empty-title { font-family: 'IBM Plex Mono', monospace; font-weight: 600; letter-spacing: 0.22em; color: var(--srs-warn); font-size: 11px; }
.empty-body { margin-top: 12px; color: var(--srs-ink-dim); font-size: 12px; line-height: 1.55; max-width: 280px; }

/* Results body */
.results {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 18px 12px;
}
.summary {
  font-size: 12px;
  color: var(--srs-ink-dim);
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--srs-sky-soft);
  margin-bottom: 14px;
}
.summary strong { color: var(--srs-ink); font-weight: 700; }
.list-label { margin-bottom: 10px; }

/* Bonus programs */
.programs {
  padding: 14px 18px 4px;
  border-bottom: 1px solid var(--srs-line);
}
.programs-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.program-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--srs-surface);
  border: 1px solid var(--srs-line);
}
.program-row[data-program="sas"] {
  background: var(--srs-sand);
  border-color: color-mix(in srgb, var(--srs-sun) 30%, transparent);
}
.program-row[data-program="trumf"] {
  background: var(--srs-sky-soft);
  border-color: color-mix(in srgb, var(--srs-sky) 30%, transparent);
}
.program-left { display: flex; flex-direction: column; min-width: 0; }
.program-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--srs-ink-dim);
  text-transform: uppercase;
}
.program-row[data-program="sas"] .program-name { color: var(--srs-sand-deep); }
.program-row[data-program="trumf"] .program-name { color: #1A5A8F; }
.program-reward {
  margin-top: 3px;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--srs-ink);
}
.program-deal {
  margin-top: 3px;
  font-size: 10px;
  color: var(--srs-warn);
  font-weight: 600;
}
.program-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--srs-ink-dim);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--srs-line);
  border-radius: 999px;
  background: var(--srs-surface);
  transition: all .18s ease;
  text-transform: uppercase;
}
.program-link:hover { color: var(--srs-sun); border-color: var(--srs-sun); }

/* Bonus calculator panel — Trumf→EB conversion vs SAS direct */
.bonus-calc {
  margin-top: 12px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--srs-sand) 80%, var(--srs-sky-soft)) 0%, var(--srs-sky-soft) 100%);
  border: 1px solid var(--srs-line);
  animation: rowIn .35s ease both;
}
:root[data-sirius="dark"] .bonus-calc {
  background: linear-gradient(135deg, var(--srs-sand) 0%, var(--srs-sky-soft) 100%);
}
.bonus-calc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.bonus-calc-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--srs-ink);
  text-transform: uppercase;
}
.bonus-calc-basis {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--srs-ink-dim);
  text-transform: uppercase;
}
.bonus-calc-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.bonus-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--srs-surface) 70%, transparent);
  font-size: 12px;
  color: var(--srs-ink-dim);
  border: 1px solid transparent;
}
.bonus-calc-row.winner {
  background: var(--srs-surface);
  color: var(--srs-ink);
  font-weight: 600;
  border-color: color-mix(in srgb, var(--srs-good) 40%, transparent);
}
.bonus-calc-label {
  font-size: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.bonus-calc-conv {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--srs-ink-faint);
  font-weight: 500;
}
.bonus-calc-value {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--srs-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bonus-calc-row.winner .bonus-calc-value { color: var(--srs-good); }
.bonus-calc-star { color: var(--srs-sun); font-size: 11px; }
.bonus-calc-flat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--srs-ink-faint);
  font-weight: 500;
  text-transform: uppercase;
}
.bonus-calc-rec {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--srs-ink);
  color: var(--srs-bg);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
}
.bonus-calc-rec.rec-info,
.bonus-calc-rec.rec-tie {
  background: var(--srs-surface);
  color: var(--srs-ink-dim);
  border: 1px solid var(--srs-line);
}
.bonus-calc-rec-icon {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}
.bonus-calc-rec-text { flex: 1; }
.bonus-calc-rec-text strong {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--srs-sun);
}
.bonus-calc-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--srs-ink-faint);
  text-align: center;
  padding-top: 4px;
}

/* Card list */
.card-list { list-style: none; }
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--srs-surface);
  border: 1px solid var(--srs-line);
  margin-bottom: 6px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  animation: rowIn .35s ease both;
}
.card-row.found { border-color: color-mix(in srgb, var(--srs-good) 30%, transparent); }
.card-row.found:hover { transform: translateY(-1px); border-color: var(--srs-good); }
.card-row.missing { opacity: .4; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.card-icon {
  width: 36px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--srs-line);
  background: var(--srs-surface-2);
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
}
.card-icon svg { display: block; }
.card-meta { display: flex; flex-direction: column; min-width: 0; }
.card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--srs-ink);
}
.card-evidence {
  font-size: 10px;
  color: var(--srs-ink-faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  font-style: italic;
}

.card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.conf-bar {
  width: 38px; height: 4px;
  background: var(--srs-line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.conf-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--srs-good);
  border-radius: 999px;
}
.conf-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--srs-ink-dim);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
  font-weight: 600;
}
.missing .conf-num { color: var(--srs-ink-faint); }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--srs-good);
  box-shadow: 0 0 8px var(--srs-good);
}
.missing .status-dot { background: var(--srs-line); box-shadow: none; }

/* Footer */
.foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--srs-ink-faint);
  border-top: 1px solid var(--srs-line);
}
.foot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--srs-sun); }

/* Report button */
.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--srs-line);
  background: transparent;
  color: var(--srs-ink-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.report-btn:hover {
  color: var(--srs-warn);
  border-color: var(--srs-warn);
}
.report-btn svg { display: block; }

/* Lang toggle pills */
.lang-switch {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--srs-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--srs-surface);
}
.lang-pill {
  padding: 4px 9px;
  background: transparent;
  border: none;
  color: var(--srs-ink-faint);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.lang-pill:hover { color: var(--srs-ink); }
.lang-pill.active {
  color: var(--srs-surface);
  background: var(--srs-ink);
}
.lang-switch + .report-btn { margin-left: 6px; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--srs-surface);
  border: 1px solid var(--srs-line);
  border-radius: 999px;
  padding: 2px;
  cursor: pointer;
}
.theme-pill {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--srs-ink-dim);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  padding: 0;
}
.theme-pill.active {
  background: var(--srs-ink);
  color: var(--srs-surface);
}

/* Report modal */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11,36,64,0.55);
  backdrop-filter: blur(6px);
}
:root[data-sirius="dark"] .report-modal { background: rgba(0,0,0,0.75); }
.report-card {
  width: 100%;
  max-width: 360px;
  background: var(--srs-surface);
  border: 1px solid var(--srs-line);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(11,36,64,0.30);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--srs-warn);
}
.report-x {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--srs-line);
  background: transparent;
  color: var(--srs-ink-dim);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.report-x:hover { color: var(--srs-ink); border-color: var(--srs-warn); }
.report-host-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--srs-surface-2);
  border: 1px solid var(--srs-line);
  border-radius: 12px;
}
.report-host-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--srs-ink-dim);
}
.report-host-val {
  font-size: 13px;
  color: var(--srs-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.report-field { display: flex; flex-direction: column; gap: 6px; }
.report-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--srs-ink-dim);
}
.report-field select,
.report-field textarea {
  width: 100%;
  background: var(--srs-surface-2);
  border: 1px solid var(--srs-line);
  border-radius: 10px;
  color: var(--srs-ink);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s ease;
}
.report-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.report-field select:focus,
.report-field textarea:focus { border-color: var(--srs-sun); }
.report-result {
  min-height: 14px;
  font-size: 12px;
  line-height: 1.5;
}
.report-result.ok { color: var(--srs-good); }
.report-result.err { color: var(--srs-err); }
.report-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.report-cancel,
.report-submit {
  padding: 10px 18px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  transition: all .18s ease;
  border: 1px solid var(--srs-line);
}
.report-cancel {
  background: transparent;
  color: var(--srs-ink-dim);
}
.report-cancel:hover { color: var(--srs-ink); border-color: var(--srs-ink-dim); }
.report-submit {
  background: var(--srs-sun);
  color: #fff;
  border-color: var(--srs-sun);
}
.report-submit:hover { background: var(--srs-sun-deep); border-color: var(--srs-sun-deep); }
.report-submit:disabled { background: var(--srs-line); color: var(--srs-ink-faint); border-color: var(--srs-line); cursor: not-allowed; }

/* Auth gate (signed-out / sub-expired states) */
.state-auth, .state-sub-gate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 22px;
}
.auth-gate-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.auth-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--srs-sand);
  color: var(--srs-sun);
  display: grid; place-items: center;
  font-size: 28px;
}
.auth-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  color: var(--srs-ink);
}
.auth-sub {
  font-size: 12px;
  color: var(--srs-ink-dim);
  text-align: center;
  line-height: 1.5;
  max-width: 280px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 8px;
}
.auth-form input {
  background: var(--srs-surface);
  border: 1px solid var(--srs-line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--srs-ink);
  font-family: inherit;
  outline: none;
  transition: border-color .18s ease;
}
.auth-form input:focus { border-color: var(--srs-sun); }
.auth-form input::placeholder { color: var(--srs-ink-faint); }
.auth-cta {
  background: var(--srs-sun);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.auth-cta:hover { background: var(--srs-sun-deep); transform: translateY(-1px); }
.auth-cta:disabled { background: var(--srs-line); color: var(--srs-ink-faint); cursor: not-allowed; transform: none; }
.auth-error {
  font-size: 11px;
  color: var(--srs-err);
  background: var(--srs-err-soft);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.45;
}
.auth-foot {
  margin-top: 10px;
  font-size: 11px;
  color: var(--srs-ink-dim);
}
.auth-foot a,
.auth-foot-link {
  color: var(--srs-sun);
  text-decoration: none;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.auth-foot a:hover, .auth-foot-link:hover { color: var(--srs-sun-deep); text-decoration: underline; }

/* When auth gate is showing, hide normal scan UI */
.auth-mode .site-row,
.auth-mode #amex-banner,
.auth-mode #programs-section,
.auth-mode #state-loading,
.auth-mode #state-error,
.auth-mode #state-empty,
.auth-mode #state-results,
.auth-mode #rescan {
  display: none !important;
}

/* Tiny user pill in header (shown when signed-in) */
.user-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--srs-ink-dim);
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--srs-line);
  border-radius: 999px;
  background: var(--srs-surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill:hover { color: var(--srs-warn); border-color: var(--srs-warn); }
.user-pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--srs-good);
  flex-shrink: 0;
}
.user-pill-dot.trial { background: var(--srs-sky); }
.user-pill-dot.granted { background: var(--srs-sun); }
.user-pill-dot.warn { background: var(--srs-warn); }
