/* SI Law Exam Admin — module styles (extends ../css/style.css) */
.badge { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; border-radius: 999px; padding: 3px 11px; }
.badge-green { background: #f6e8eb; color: #571824; border: 1px solid #e3c9cf; }
.badge-gray { background: #eef1f4; color: #5b6472; border: 1px solid #dfe3e8; }
.badge-amber { background: #fef3e2; color: #92580a; border: 1px solid #f3ddae; }
.badge-red { background: #fdecec; color: #a02a2a; border: 1px solid #f3c1c1; }
.badge-blue { background: #e6ecf5; color: #1c2b4a; border: 1px solid #c3cede; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-card .num { font-family: Georgia, serif; font-size: 30px; color: var(--head); line-height: 1.1; }
.stat-card .lbl { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; }
.stat-card .sub { font-size: 13px; color: var(--muted); }

.dist-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 12px 0 4px; }
.dist-bars .bar { flex: 1; background: var(--burgundy); border-radius: 3px 3px 0 0; min-height: 3px; position: relative; }
.dist-bars .bar:hover { background: var(--burgundy-dark); }
.dist-labels { display: flex; gap: 4px; font-size: 11px; color: var(--muted); }
.dist-labels span { flex: 1; text-align: center; }

.flag { border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: 14.5px; }
.flag-review { background: #fdecec; border: 1px solid #f3c1c1; color: #7c2424; }
.flag-warn { background: #fef6e7; border: 1px solid #f0dcae; color: #7a5410; }
.flag-info { background: #eef3fa; border: 1px solid #cfd9ea; color: #2c3d5e; }
.flag strong { display: block; margin-bottom: 2px; }

.item-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.item-card .qmeta { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.item-card .qstem { font-weight: 600; color: var(--head); margin-bottom: 10px; }

.passage-panel { background: var(--passage-bg); border: 1px solid var(--passage-border); border-left: 4px solid var(--burgundy-dark); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; color: var(--ink); line-height: 1.65; }
.passage-panel[hidden] { display: none; }
.passage-panel .qmeta { font-size: 12.5px; color: var(--burgundy-dark); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; font-weight: 700; }
.passage-panel .passage-text { white-space: pre-wrap; font-size: 16px; color: var(--ink); }
.item-card .passage-panel { margin: 0 0 12px; }
.opt-list { list-style: upper-alpha; margin: 0 0 6px; padding-left: 26px; }
.opt-list li { margin-bottom: 5px; padding: 6px 10px; border-radius: 6px; }
.opt-list li.key { background: var(--burgundy-light); font-weight: 600; }
.opt-list li.picked { outline: 2px solid var(--head); }
.opt-list li.wrong-pick { outline: 2px solid #c0392b; background: #fdecec; }
.opt-pct { font-size: 12.5px; color: var(--muted); margin-left: 8px; }

.exam-timer { position: sticky; top: 0; z-index: 50; background: var(--navy-dark); color: #fff; padding: 10px 0; font-size: 17px; }
.exam-timer .wrap { display: flex; justify-content: space-between; align-items: center; }
.exam-timer .time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; }
.exam-timer .time.low { color: #ffb4b4; }
.progress { height: 8px; background: rgba(255,255,255,0.15); border-radius: 99px; overflow: hidden; margin: 10px 0 20px; }
.progress > div { height: 100%; background: var(--burgundy); width: 0%; transition: width 0.2s; }

.form-grid { display: grid; gap: 14px; max-width: 720px; }
.form-grid label { font-weight: 600; font-size: 15px; color: var(--head); display: block; margin-bottom: 4px; }
.form-grid input[type="text"], .form-grid input[type="number"], .form-grid textarea, .form-grid select {
  width: 100%; padding: 10px 12px; font-size: 15.5px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit;
  background: var(--card); color: var(--ink);
}
.form-grid textarea { min-height: 90px; }
.check-list { display: grid; gap: 8px; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--card); }
.check-list label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14.5px; color: var(--ink); cursor: pointer; padding: 6px; border-radius: 6px; }
.check-list label:hover { background: var(--card-hover); }
.check-list input { margin-top: 4px; flex: none; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-danger { background: var(--card); color: #a02a2a; border: 1px solid #e3b6b6; }
.btn-danger:hover { background: #fdecec; }
/* Button-visibility audit (2026-10-02): dark card needs a lightened danger red. */
html[data-theme="dark"] .btn-danger { color: #f0a8a8; border-color: #5a2b2b; background: #2a1a1e; }
html[data-theme="dark"] .btn-danger:hover { background: #3a2228; }
.muted { color: var(--muted); font-size: 14px; }
.code-note { font-size: 13px; color: var(--muted); background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.sortable th { cursor: pointer; user-select: none; }
.sortable th:hover { background: #16263f; }


/* ---------- Auth (login / signup / tiers) ---------- */
.nav-auth { display: flex; gap: 8px; align-items: center; }
.btn-ghost-nav, .btn-gold-nav {
  padding: 8px 16px; font-size: 14.5px; border-radius: 7px;
}
.btn-ghost-nav {
  border: 1px solid rgba(255,255,255,0.45); color: #eef4f5; background: transparent;
}
.btn-ghost-nav:hover { border-color: #fff; color: #fff; }
.btn-gold-nav { background: var(--gold); color: var(--navy-dark); border: 1px solid var(--gold); }
.btn-gold-nav:hover { background: #c9973a; color: var(--navy-dark); }
.si-role-chip {
  font-size: 13px; font-weight: 700; text-transform: capitalize;
  background: rgba(255,255,255,0.14); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 5px 12px;
}
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; }
  .nav-auth { margin-top: 8px; }
}

.si-auth-backdrop {
  position: fixed; inset: 0; background: rgba(8,49,57,0.62);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 18px;
}
.si-auth-backdrop[hidden] { display: none; }
.si-auth-modal {
  background: var(--card); color: var(--ink); border-radius: 14px;
  max-width: 420px; width: 100%; padding: 28px 28px 22px;
  position: relative; box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  max-height: 92vh; overflow-y: auto;
}
.si-auth-close {
  position: absolute; top: 10px; right: 14px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer;
}
.si-auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.si-auth-tab {
  flex: 1; padding: 10px; font-size: 16px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--tab-bg); color: var(--muted);
}
.si-auth-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.si-auth-context {
  font-size: 14px; color: var(--info-ink); background: var(--info-bg);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 14px;
}
.si-auth-roles { border: 0; padding: 0; margin: 0 0 14px; }
.si-auth-roles legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.si-auth-roles label {
  display: inline-flex; align-items: center; gap: 7px; margin-right: 18px;
  font-size: 15.5px; font-weight: 600; cursor: pointer;
}
.si-auth-field { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.si-auth-field input {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
  font-size: 16px; border: 1px solid var(--input-border); border-radius: 8px;
  font-family: inherit; background: var(--card); color: var(--ink);
}
.si-auth-submit { width: 100%; margin-top: 4px; }
.si-auth-err {
  font-size: 14px; color: #a33; background: #fbeeee;
  border-radius: 8px; padding: 9px 12px; margin: 12px 0 0;
}
.si-auth-err[hidden] { display: none; }
.si-auth-demo { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.si-auth-demo-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.7px; margin: 0 0 10px; text-align: center; }
.si-auth-demo-btns { display: flex; gap: 10px; }
.si-auth-demo-btn {
  flex: 1; border: 1px solid var(--head); color: var(--head); background: var(--card);
  padding: 10px 12px; font-size: 15px;
}
.si-auth-demo-btn:hover { background: var(--info-bg); }
.si-auth-demo-note {
  font-size: 12.5px; color: var(--muted); text-align: center; margin: 8px 0 0;
  font-weight: 700; letter-spacing: 0.3px;
}
.si-auth-fineprint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.si-auth-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 12px; background: #fff; border: 1px solid #c9d2e0;
  border-radius: 8px; font-size: 15px; font-weight: 700; color: #1a2333;
  cursor: pointer; font-family: inherit; margin: 2px 0 0;
}
.si-auth-google:hover { background: #f4f6fa; border-color: #aeb9cc; }
.si-auth-google-g { flex: none; }
.si-auth-or { display: flex; align-items: center; gap: 10px; color: var(--or-text); font-size: 12.5px; margin: 12px 0; }
.si-auth-or::before, .si-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--or-line); }
.si-auth-note {
  font-size: 13.5px; color: var(--note-ink); background: var(--note-bg); border: 1px solid var(--note-border);
  border-radius: 8px; padding: 9px 12px; margin: 12px 0 0;
}
.si-auth-note[hidden] { display: none; }
.si-upgrade-title { margin: 0 0 8px; font-size: 24px; color: var(--head); font-family: Georgia, serif; }
.si-upgrade-label {
  font-size: 14.5px; color: var(--navy); background: var(--gold-light);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 12px;
}
.si-auth-modal p { font-size: 15px; line-height: 1.55; }
.si-auth-modal .btn-gold { display: inline-block; margin-top: 6px; }

/* Elsie widget daily-sample framing */
.elsie-sample {
  font-size: 12px; color: #9ab8c0; padding: 6px 14px 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.elsie-sample a { color: #f4ead2; font-weight: 700; }
.elsie-limit-msg { text-align: center; padding: 14px 10px; }
.elsie-limit-msg p { margin: 0 0 10px; font-size: 14.5px; }

/* ---------- Auth: trial + passcode additions ---------- */
.si-auth-optional {
  font-weight: 400; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-left: 6px;
}
.si-chip-upgrade {
  font-size: 13px; font-weight: 700; color: #f4ead2; white-space: nowrap;
}
.si-chip-upgrade:hover { color: #fff; }
.si-role-chip.si-chip-ended { border-color: rgba(185,138,47,0.7); color: #f4ead2; }
.si-role-chip.si-chip-trial { border-color: rgba(185,138,47,0.9); color: #ffe9b0; }
.si-upgrade-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.si-upgrade-trial {
  border: 1px solid var(--head); color: var(--head); background: var(--card);
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.si-upgrade-trial:hover { background: var(--info-bg); }

/* Pricing fine print */
.pr-fineprint { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }


/* SI Law auth overrides: the shared modal is light-themed while the site's
 * .btn-outline is styled for dark backgrounds — keep modal buttons legible. */
.si-auth-modal .btn-outline {
  border-color: #14294a; color: #14294a; background: #fff;
}
.si-auth-modal .btn-outline:hover {
  border-color: #14294a; color: #14294a; background: #e8eef6;
}
.si-auth-modal .si-auth-demo-btns .btn-gold { color: #0c1a31; }
