/* ═══════════════════════════════════════════
   AP CSA Practice — style.css
   Theme: Clean academic / code-forward
═══════════════════════════════════════════ */

:root {
  --bg:        #f7f6f2;
  --surface:   #ffffff;
  --border:    #e2e0d8;
  --text:      #1a1a18;
  --muted:     #6b6a63;
  --accent:    #1d4ed8;
  --accent-h:  #1e3a8a;
  --green:     #16a34a;
  --yellow:    #ca8a04;
  --red:       #dc2626;
  --ring-track:#e5e7eb;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius:  10px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ─────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 58px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text) !important;
  text-decoration: none !important;
  display: flex; align-items: center; gap: .4rem;
}
.brand-icon { font-size: 1.4rem; }

.nav-links { display: flex; align-items: center; gap: 1.25rem; font-size: .9rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.admin-link { font-weight: 600; color: var(--accent) !important; }
.btn-logout {
  background: var(--bg); border: 1px solid var(--border);
  padding: .35rem .8rem; border-radius: 6px; color: var(--text) !important;
  font-size: .85rem;
}
.btn-logout:hover { background: var(--border); }

/* ── Container ─────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── Alerts ─────────────────────────────── */
.alert {
  padding: .75rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .9rem;
  border: 1px solid transparent;
}
.alert-success { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.alert-danger  { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: #fef9c3; border-color: #fde68a; color: #78350f; }
.alert-info    { background: #dbeafe; border-color: #bfdbfe; color: #1e3a8a; }

/* ── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: .6rem 1.4rem; border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem; font-weight: 500;
  border: none; cursor: pointer; transition: background .15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-h); text-decoration: none; color: #fff; }
.btn-full { width: 100%; text-align: center; }

.btn-secondary {
  display: inline-block;
  background: transparent; color: var(--text);
  padding: .6rem 1.4rem; border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem; font-weight: 500;
  border: 1.5px solid var(--border); cursor: pointer; transition: background .15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--bg); text-decoration: none; }

.btn-sm {
  display: inline-block;
  background: var(--bg); color: var(--text);
  padding: .3rem .7rem; border-radius: 6px;
  font-size: .8rem; font-weight: 500; border: 1px solid var(--border);
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn-sm:hover { background: var(--border); text-decoration: none; color: var(--text); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); border-color: #fecaca; background: #fff0f0; }
.btn-danger:hover { background: #fee2e2; }

/* ── Forms ─────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .4rem; }
.form-group label small { font-weight: 400; color: var(--muted); margin-left: .3rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem;
  background: var(--surface); color: var(--text);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:600px){ .form-row { grid-template-columns: 1fr; } }

/* ── Auth pages ─────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 58px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: var(--surface); border-radius: 16px;
  padding: 2.5rem 2rem; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.auth-header h1 { font-family: var(--font-display); font-size: 1.8rem; }
.auth-header p  { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--muted); }

/* ── Page header ─────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-family: var(--font-display); font-size: 2rem; }
.subtitle { color: var(--muted); margin-top: .4rem; }
.back-link { display: inline-block; color: var(--muted); font-size: .88rem; margin-bottom: .75rem; }
.back-link:hover { color: var(--text); }

/* ── Test list (home) ────────────────────── */
.test-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}

.test-list-header {
  display: grid;
  grid-template-columns: 1fr 120px 200px 130px;
  gap: 1rem;
  padding: .6rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}

.test-row {
  display: grid;
  grid-template-columns: 1fr 120px 200px 130px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.test-row:last-child { border-bottom: none; }
.test-row:hover { background: #fafaf8; }
.test-row--inprogress { border-left: 3px solid var(--yellow); }
.test-row--attempted  { border-left: 3px solid var(--accent); }

.test-row-title { font-weight: 600; font-size: .97rem; margin-bottom: .15rem; }
.test-row-desc  { font-size: .82rem; color: var(--muted); margin-bottom: .35rem; line-height: 1.4; }
.test-row-meta  { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }

.test-chip {
  font-size: .72rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
  padding: .15rem .5rem; border-radius: 20px; color: var(--muted);
}
.test-chip--progress { background: #fef9c3; border-color: #fde68a; color: #78350f; }
.test-chip--muted    { color: var(--muted); }

/* Status column */
.col-status { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot--new      { background: var(--border); }
.status-dot--done     { background: var(--accent); }
.status-dot--progress { background: var(--yellow); }
.status-label         { white-space: nowrap; }

/* Score column */
.score-bar-wrap { display: flex; flex-direction: column; gap: .3rem; }
.score-bar {
  height: 5px; background: var(--ring-track);
  border-radius: 99px; overflow: hidden;
}
.score-bar-fill { height: 100%; border-radius: 99px; }
.score-bar-fill--green  { background: var(--green); }
.score-bar-fill--yellow { background: var(--yellow); }
.score-bar-fill--red    { background: var(--red); }
.score-pct   { font-size: .78rem; color: var(--muted); }
.score-empty { color: var(--border); font-size: .9rem; }

/* Action column */
.col-action { display: flex; justify-content: flex-end; }
.btn-row {
  display: inline-block; text-align: center;
  padding: .45rem 1.1rem; border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: opacity .15s;
  min-width: 80px;
}
.btn-row:hover { opacity: .85; text-decoration: none; }
.btn-row--start  { background: var(--accent);  color: #fff; }
.btn-row--retake { background: #eff6ff; color: var(--accent); border: 1.5px solid #bfdbfe; }
.btn-row--resume { background: #fef9c3; color: #78350f;       border: 1.5px solid #fde68a; }

/* Responsive: stack on small screens */
@media (max-width: 640px) {
  .test-list-header { display: none; }
  .test-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: .5rem;
  }
  .col-test   { grid-column: 1; }
  .col-action { grid-column: 2; grid-row: 1; align-self: start; padding-top: .1rem; }
  .col-status { grid-column: 1; grid-row: 2; }
  .col-score  { display: none; }
}

/* ── Test page ─────────────────────────── */
.test-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}
.test-header h1 { font-family: var(--font-display); font-size: 1.6rem; }
.test-progress-wrap { min-width: 200px; }
.progress-bar--lg { height: 8px; margin-top: .5rem; }
.progress-label { font-size: .85rem; color: var(--muted); text-align: right; }

.questions-list { display: flex; flex-direction: column; gap: 1.25rem; }
.question-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem;
  box-shadow: var(--shadow); transition: border-color .2s;
}
.question-card.answered { border-color: #bfdbfe; }
.question-num { font-size: .78rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.question-text { font-size: 1rem; line-height: 1.55; margin-bottom: 1rem; font-weight: 500; }

.code-block {
  background: #1e1e2e; color: #cdd6f4;
  font-family: var(--font-mono); font-size: .87rem;
  padding: 1rem 1.25rem; border-radius: 8px;
  overflow-x: auto; margin-bottom: 1rem; line-height: 1.6;
}

.choices { display: flex; flex-direction: column; gap: .5rem; }
.choice-label {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .65rem 1rem; border-radius: 8px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: background .12s, border-color .12s;
  user-select: none;
}
.choice-label:hover { background: #f0f4ff; border-color: #93c5fd; }
.choice-label.selected { background: #eff6ff; border-color: var(--accent); }
.choice-radio { display: none; }
.choice-letter {
  font-family: var(--font-mono); font-size: .85rem; font-weight: 600;
  color: var(--accent); min-width: 18px;
}
.choice-text { font-size: .95rem; line-height: 1.45; }

/* ── Submit bar ─────────────────────────── */
.submit-bar {
  margin-top: 2rem; display: flex;
  justify-content: flex-end; align-items: center; gap: 1rem;
  position: sticky; bottom: 1.5rem;
}
.btn-submit { padding: .75rem 2rem; font-size: 1rem; box-shadow: var(--shadow-lg); }
.unanswered-warning {
  font-size: .88rem; color: var(--yellow);
  background: #fefce8; border: 1px solid #fde68a;
  padding: .5rem .9rem; border-radius: 8px;
}
.hidden { display: none !important; }

/* ── Test-page submit modal ─────────────── */
.test-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 999;
}
.test-modal-box {
  background: var(--surface); border-radius: 16px; padding: 2rem;
  max-width: 380px; width: 90%; box-shadow: var(--shadow-lg);
  text-align: center;
}
.test-modal-box h2 { font-family: var(--font-display); margin-bottom: .5rem; }
.test-modal-box p  { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.modal-btns        { display: flex; gap: .75rem; justify-content: center; }

/* ── Results ─────────────────────────────── */
.results-hero { text-align: center; margin-bottom: 2.5rem; }
.results-hero h1 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: .4rem; }
.results-owner { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.results-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.results-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.25rem; }

.score-ring-wrap { display: inline-block; margin: 1rem 0; }
.score-ring { width: 140px; height: 140px; }
.ring-pct   { font-family: var(--font-display); font-size: 22px; fill: var(--text); }
.ring-score { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.score-label { font-size: 1rem; margin-top: .5rem; font-weight: 500; }

.review-section h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1rem; }
.review-filter { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-btn {
  padding: .35rem .85rem; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: .85rem; cursor: pointer; transition: all .15s;
}
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.review-card {
  background: var(--surface); border-radius: 14px; padding: 1.5rem;
  border-left: 4px solid transparent; margin-bottom: 1rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.review-card--correct { border-left-color: var(--green); }
.review-card--wrong   { border-left-color: var(--red); }

.review-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .6rem;
}
.review-status { font-size: .85rem; font-weight: 600; }
.review-card--correct .review-status { color: var(--green); }
.review-card--wrong   .review-status { color: var(--red); }

.review-choices { margin-top: .75rem; }
.choice-row {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .5rem .85rem; border-radius: 7px; margin-bottom: .3rem;
  border: 1px solid transparent;
}
.choice-correct { background: #dcfce7; border-color: #bbf7d0; }
.choice-wrong   { background: #fee2e2; border-color: #fecaca; }

.tag {
  font-size: .72rem; font-weight: 600; padding: .15rem .5rem;
  border-radius: 20px; margin-left: auto; white-space: nowrap;
}
.tag-correct { background: #bbf7d0; color: #14532d; }
.tag-wrong   { background: #fecaca; color: #7f1d1d; }

.explanation {
  margin-top: .75rem; padding: .75rem 1rem;
  background: #fffbeb; border-radius: 8px; border: 1px solid #fde68a;
  font-size: .9rem; color: #78350f;
}

/* ── History table ─────────────────────── */
.history-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.history-table th {
  text-align: left; padding: .75rem 1rem;
  background: var(--bg); font-size: .82rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); border-bottom: 1px solid var(--border);
}
.history-table td {
  padding: .7rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .9rem; vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }

.mini-bar {
  display: inline-block; width: 60px; height: 5px;
  background: var(--ring-track); border-radius: 99px; overflow: hidden;
  margin-right: .4rem; vertical-align: middle;
}
.mini-fill { height: 100%; border-radius: 99px; }
.mini-fill--green  { background: var(--green); }
.mini-fill--yellow { background: var(--yellow); }
.mini-fill--red    { background: var(--red); }

/* ── Admin ─────────────────────────────── */
.admin-page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }

.admin-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.75rem; margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.admin-section h2 {
  font-family: var(--font-display); font-size: 1.25rem;
}
.admin-section--collapsible .section-head { cursor: pointer; user-select: none; }

.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.section-head--toggle { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.section-head--toggle:hover h2 { color: var(--accent); }
.collapse-icon { font-size: 1.1rem; color: var(--muted); transition: transform .2s; }

.collapsible-body { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.collapsible-body.collapsed { display: none; }

.btn-sm-wide { padding: .4rem 1rem; font-size: .88rem; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.admin-table th {
  text-align: left; padding: .6rem .85rem;
  background: var(--bg); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: .75rem .85rem; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafaf8; }

/* Test title cell */
.test-title-cell { display: flex; flex-direction: column; gap: .2rem; }
.test-title-text { font-weight: 600; font-size: .95rem; }
.test-slug-code {
  font-family: var(--font-mono); font-size: .78rem;
  background: var(--bg); padding: .1rem .4rem; border-radius: 4px;
  color: var(--muted); width: fit-content;
}
.test-desc-text { font-size: .8rem; color: var(--muted); }

/* Status select */
.status-select {
  padding: .3rem .6rem; border-radius: 20px; font-size: .8rem;
  font-weight: 600; border: 1.5px solid; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  padding-right: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6a63'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center;
}
.status-select--draft     { background-color: #f5f5f4; border-color: var(--border); color: var(--muted); }
.status-select--published { background-color: #dcfce7; border-color: #bbf7d0; color: #14532d; }

/* JSON info cell */
.json-info { display: flex; flex-direction: column; gap: .25rem; }
.json-meta { font-size: .75rem; color: var(--muted); }
.json-badge {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 20px; width: fit-content;
}
.json-badge--ok      { background: #dcfce7; color: #14532d; }
.json-badge--warn    { background: #fef9c3; color: #78350f; }
.json-badge--missing { background: #fee2e2; color: #7f1d1d; }

/* Action group */
.action-group { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ── Admin modals (amodal) ──────────────── */
/* Toggled via style.display = 'flex'/'none' directly in JS — no CSS class conflicts */
.amodal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
}
.amodal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.48); backdrop-filter: blur(2px);
  z-index: 0; pointer-events: none;
}
.amodal[style*="flex"] .amodal-overlay {
  pointer-events: all;
}
.amodal-box {
  position: relative; z-index: 1;
  background: var(--surface); border-radius: 16px;
  padding: 2rem; width: 90%; max-width: 560px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
  animation: amodal-in .18s ease;
}
@keyframes amodal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.amodal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.amodal-header h2 { font-family: var(--font-display); font-size: 1.25rem; }
.amodal-close {
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--muted); padding: .2rem .5rem; border-radius: 4px; line-height: 1;
  flex-shrink: 0;
}
.amodal-close:hover { background: var(--bg); color: var(--text); }
.amodal-footer {
  display: flex; justify-content: flex-end; gap: .75rem;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
}

.field-hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.field-hint code {
  font-family: var(--font-mono); background: var(--bg);
  padding: .1rem .35rem; border-radius: 4px;
}

/* ── Upload drop zone ─────────────────────── */
.upload-drop-zone {
  position: relative; border: 2px dashed var(--border);
  border-radius: 12px; padding: 2rem 1.5rem;
  text-align: center; background: var(--bg);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.upload-drop-zone:hover,
.upload-drop-zone.drop-zone--over {
  border-color: var(--accent); background: #eff6ff;
}
.upload-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.upload-drop-zone p { font-size: .9rem; margin: .2rem 0; }
.file-chosen {
  margin-top: .75rem; font-size: .85rem; font-weight: 600;
  color: var(--accent); background: #eff6ff;
  padding: .4rem .8rem; border-radius: 6px;
  border: 1px solid #bfdbfe; display: inline-block;
}

/* ── Empty state (small variant) ─────────── */
.empty-state--sm {
  text-align: center; padding: 1.5rem;
  color: var(--muted); font-size: .9rem;
}

/* ── Empty state ─────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-family: var(--font-display); color: var(--text); margin-bottom: .5rem; }

/* ── Resume banner ───────────────────────── */
.resume-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: .75rem 1.1rem;
  margin-bottom: 1.25rem; font-size: .9rem; color: #78350f;
}
.btn-discard {
  background: #fff; border: 1px solid #fbbf24; color: #92400e;
  padding: .3rem .8rem; border-radius: 6px; font-size: .82rem;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn-discard:hover { background: #fef3c7; }

/* ── Save button ─────────────────────────── */
.btn-save {
  padding: .6rem 1.2rem; font-size: .92rem;
}
.btn-save:disabled { opacity: .6; cursor: not-allowed; }

/* ── Save toast ──────────────────────────── */
.save-toast {
  position: fixed; bottom: 1.75rem; left: 50%; transform: translateX(-50%);
  background: #1a1a18; color: #fff;
  padding: .6rem 1.4rem; border-radius: 99px;
  font-size: .88rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 500; transition: opacity .3s;
  pointer-events: none;
}
.save-toast--error { background: var(--red); }
.save-toast.hidden { display: none; }

/* ── In-progress test card ───────────────── */
.test-card--inprogress { border-color: #fde68a; }
.test-badge--progress {
  background: #fef9c3; border-color: #fde68a; color: #78350f;
}

/* ── Public homepage ─────────────────────── */
.btn-register {
  background: var(--accent); color: #fff !important;
  padding: .35rem .9rem; border-radius: 8px; font-size: .88rem; font-weight: 500;
}
.btn-register:hover { background: var(--accent-h); text-decoration: none; }

.home-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.home-eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}
.home-title {
  font-family: var(--font-display); font-size: 2.6rem;
  line-height: 1.15; margin-bottom: 1rem; max-width: 640px;
}
.home-subtitle {
  font-size: 1.05rem; color: var(--muted); max-width: 560px;
  line-height: 1.65; margin-bottom: 1.75rem;
}
.home-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }

.home-hero-features { display: flex; gap: .6rem; flex-wrap: wrap; }
.feature-chip {
  font-size: .82rem; font-weight: 500;
  background: #eff6ff; border: 1px solid #bfdbfe;
  color: var(--accent); padding: .3rem .8rem; border-radius: 20px;
}

.home-section { margin-bottom: 3rem; }
.home-section-header { margin-bottom: 1.25rem; }
.home-section-header h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .3rem; }
.home-section-sub { font-size: .9rem; color: var(--muted); }
.test-chip--free { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }

/* News list */
.news-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.news-item {
  display: flex; gap: .75rem; align-items: center;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.news-item:last-child { border-bottom: none; }
.news-item--latest {
  background: #eff6ff; border-bottom-color: #bfdbfe;
}
.news-item--latest .news-date { color: #2563eb; }
.news-item--latest .news-text { color: #1e3a8a; font-weight: 500; }
.news-new-badge {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; background: #2563eb; color: #fff;
  padding: .15rem .5rem; border-radius: 20px;
  flex-shrink: 0; align-self: center;
}
.news-date {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--muted); white-space: nowrap; min-width: 90px;
}
.news-text { color: var(--text); line-height: 1.5; }

/* ── Admin free toggle ───────────────────── */
.free-toggle {
  display: inline-flex; align-items: center; cursor: pointer;
  position: relative; width: 38px; height: 22px;
}
.free-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.free-toggle-track {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 99px; transition: background .2s;
}
.free-toggle-track::after {
  content: ""; position: absolute;
  left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.free-toggle input:checked + .free-toggle-track { background: var(--green); }
.free-toggle input:checked + .free-toggle-track::after { transform: translateX(16px); }

/* Admin news rows */
.news-row {
  display: grid; grid-template-columns: 150px 1fr auto;
  gap: .5rem; margin-bottom: .5rem; align-items: center;
}
.news-date-input { font-family: var(--font-mono); font-size: .85rem; }
.news-text-input  { font-size: .88rem; }

/* ── Guest banners ───────────────────────── */
.guest-banner {
  background: #fef9c3; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: .7rem 1.1rem;
  font-size: .88rem; color: #78350f;
  margin-bottom: 1.25rem;
}
.guest-signup-prompt {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 1rem 1.25rem;
  font-size: .92rem; color: #1e3a8a; text-align: center;
  margin-top: 1rem;
}
.guest-signup-prompt a { font-weight: 600; }

/* ── Locked test rows ────────────────────── */
.test-row--locked { opacity: .82; }
.test-row--locked:hover { background: #fafaf8; }
.locked-title { color: var(--muted); }
.lock-icon { font-size: .9rem; margin-right: .25rem; }
.test-chip--locked { background: #f3f4f6; border-color: var(--border); color: var(--muted); }
.status-dot--locked { background: var(--border); }

/* Unlock button */
.btn-row--unlock {
  background: #f5f3ff; color: #6d28d9;
  border: 1.5px solid #ddd6fe; min-width: 80px;
}
.btn-row--unlock:hover { opacity: .85; text-decoration: none; }

/* Pills (free / members count) */
.pill {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: .2rem .65rem; border-radius: 20px;
}
.pill--green  { background: #dcfce7; color: #14532d; }
.pill--lock   { background: #f3f4f6; color: var(--muted); }

/* Unlock banner */
.unlock-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #bfdbfe; border-radius: 12px;
  padding: 1.25rem 1.5rem; margin-top: 1.25rem;
}
.unlock-banner-text {
  display: flex; flex-direction: column; gap: .2rem;
}
.unlock-banner-text strong { font-size: 1rem; color: var(--text); }
.unlock-banner-text span   { font-size: .88rem; color: var(--muted); }

/* ── Auth form validation ────────────────── */
.input-error {
  border-color: var(--red) !important;
  background: #fff8f8 !important;
}
.field-error {
  display: block; font-size: .78rem;
  color: var(--red); margin-top: .3rem;
}
.auth-error {
  background: #fee2e2; border: 1px solid #fecaca;
  color: #7f1d1d; border-radius: 8px;
  padding: .65rem .9rem; font-size: .9rem;
  margin-bottom: 1rem; text-align: center;
}

/* Show/hide password button */
.input-wrap {
  position: relative; display: flex; align-items: center;
}
.input-wrap input { flex: 1; padding-right: 2.5rem !important; }
.btn-eye {
  position: absolute; right: .5rem;
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: .2rem; line-height: 1;
  color: var(--muted);
}
.btn-eye:hover { color: var(--text); }

/* Password strength rules */
.pwd-rules {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: .4rem;
}
.rule {
  font-size: .74rem; padding: .15rem .5rem;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted);
  transition: all .2s;
}
.rule--pass { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.rule--fail { background: #fee2e2; border-color: #fecaca; color: var(--red); }

/* Match hint */
.hint--ok  { color: var(--green) !important; font-size: .82rem; }
.hint--err { color: var(--red)   !important; font-size: .82rem; }

/* ── Profile page ────────────────────────── */
.btn-profile {
  background: var(--bg); border: 1px solid var(--border);
  padding: .3rem .55rem; border-radius: 6px;
  font-size: 1rem; color: var(--muted) !important;
  text-decoration: none !important; line-height: 1;
  transition: background .15s;
}
.btn-profile:hover { background: var(--border); color: var(--text) !important; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 680px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.75rem;
  box-shadow: var(--shadow);
}
.profile-card h2 {
  font-family: var(--font-display); font-size: 1.2rem;
  margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.profile-meta { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.4rem;
  flex-shrink: 0;
}
.profile-name  { font-weight: 600; font-size: 1rem; }
.profile-email { color: var(--muted); font-size: .88rem; margin: .15rem 0 .4rem; }
.profile-badges { display: flex; gap: .4rem; flex-wrap: wrap; }

.badge {
  font-size: .72rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 20px;
}
.badge--admin   { background: #ede9fe; color: #5b21b6; }
.badge--student { background: #dbeafe; color: #1e3a8a; }
.badge--muted   { background: var(--bg); border: 1px solid var(--border); color: var(--muted); }

.profile-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.input-disabled  { background: var(--bg) !important; color: var(--muted); cursor: not-allowed; }
.field-success   { display: block; font-size: .78rem; color: var(--green); margin-top: .3rem; }

.profile-success-banner {
  background: #dcfce7; border: 1px solid #bbf7d0;
  color: #14532d; border-radius: 8px;
  padding: .65rem .9rem; font-size: .9rem;
  margin-bottom: 1.25rem;
}

/* ── Forgot password link ────────────────── */
.forgot-link {
  display: block; text-align: right;
  font-size: .78rem; color: var(--muted);
  margin-top: .35rem;
}
.forgot-link:hover { color: var(--accent); }

/* ── Email center ────────────────────────── */
.email-panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.email-panel-title {
  font-family: var(--font-display); font-size: 1rem;
  margin-bottom: .75rem; color: var(--text);
}
.email-log-preview { margin-top: 1.25rem; }
.form-group textarea {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem;
  background: var(--surface); color: var(--text);
  resize: vertical; min-height: 100px;
  transition: border-color .15s;
}
.form-group textarea:focus { outline: none; border-color: var(--accent); }

/* ── Email Center ────────────────────────── */
.recipient-toggle {
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.recipient-option { cursor: pointer; flex: 1; min-width: 180px; }
.recipient-option input { display: none; }
.recipient-label {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; border-radius: 10px;
  border: 2px solid var(--border); background: var(--bg);
  transition: all .15s; user-select: none;
}
.recipient-option input:checked + .recipient-label {
  border-color: var(--accent); background: #eff6ff;
}
.recipient-label:hover { border-color: #93c5fd; }
.recipient-icon { font-size: 1.4rem; }
.recipient-label strong { display: block; font-size: .92rem; }
.recipient-label small  { color: var(--muted); font-size: .78rem; }

textarea {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem;
  background: var(--surface); color: var(--text);
  transition: border-color .15s; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

.email-preview-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  margin-top: .5rem; flex-wrap: wrap; gap: .75rem;
}

/* Email log preview (inside dashboard) */
.email-log-preview  { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.email-log-header   { font-size: .75rem; font-weight: 600; text-transform: uppercase;
                      letter-spacing: .05em; color: var(--muted); margin-bottom: .5rem; }
.email-log-row {
  display: grid; grid-template-columns: 24px 1fr 2fr 130px;
  gap: .75rem; align-items: center;
  padding: .5rem .25rem; border-bottom: 1px solid var(--border);
  font-size: .83rem;
}
.email-log-row:last-child { border-bottom: none; }
.email-log-row--fail { opacity: .6; }
.log-status  { font-weight: 700; color: var(--green); }
.email-log-row--fail .log-status { color: var(--red); }
.log-recipient, .log-to { color: var(--muted); font-size: .8rem; white-space: nowrap;
                           overflow: hidden; text-overflow: ellipsis; }
.log-subject, .log-subj { font-weight: 500; white-space: nowrap;
                           overflow: hidden; text-overflow: ellipsis; }
.log-date, .log-ts { color: var(--muted); font-size: .78rem; white-space: nowrap; }

/* Email log full page */
.email-log-table-header {
  display: grid; grid-template-columns: 90px 1fr 2fr 130px;
  gap: 1rem; padding: .5rem 1rem;
  background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.email-log-table-row {
  display: grid; grid-template-columns: 90px 1fr 2fr 130px;
  gap: 1rem; padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .88rem; align-items: center;
}
.email-log-table-row:last-child { border-bottom: none; }
.email-log-table-row--fail { background: #fff8f8; }
.log-ok   { color: var(--green); font-weight: 600; font-size: .82rem; }
.log-fail { color: var(--red);   font-weight: 600; font-size: .82rem; }

/* Email student button */
.btn-email-student { color: var(--accent); border-color: #bfdbfe; background: #eff6ff; }
.btn-email-student:hover { background: #dbeafe; }

/* ═══════════════════════════════════════════
   Admin layout — sidebar + main
═══════════════════════════════════════════ */
body.admin-layout { background: #f0f0ec; }

.admin-shell {
  display: flex; min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────── */
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: #1a1a18; color: #e5e5e0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex; align-items: center; gap: .5rem;
  padding: 1.25rem 1.25rem 1rem;
  font-family: var(--font-display); font-size: 1.05rem;
  color: #fff !important; text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-nav {
  flex: 1; padding: .75rem 0;
}

.sidebar-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem 1.25rem; font-size: .88rem;
  color: #a8a89e !important; text-decoration: none !important;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff !important;
}
.sidebar-link.active {
  background: rgba(255,255,255,.08);
  color: #fff !important;
  border-left-color: var(--accent);
}
.sidebar-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .5rem 0;
}
.sidebar-link--logout { color: #a8a89e !important; }
.sidebar-link--logout:hover { color: #fca5a5 !important; }

/* ── Main content ────────────────────────── */
.admin-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.admin-content {
  padding: 2rem 2.5rem 4rem;
  max-width: 1100px;
}

/* ── Dashboard stat cards ────────────────── */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem;
  box-shadow: var(--shadow); text-align: center;
}
.stat-icon  { font-size: 2rem; margin-bottom: .5rem; }
.stat-value {
  font-family: var(--font-display); font-size: 2.5rem;
  color: var(--accent); line-height: 1;
}
.stat-label { color: var(--muted); font-size: .88rem; margin: .3rem 0 .75rem; }
.stat-link  { font-size: .82rem; font-weight: 600; color: var(--accent); }

.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; align-items: start;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-sidebar { width: 180px; }
  .admin-content { padding: 1.5rem; }
  .stat-grid     { grid-template-columns: 1fr 1fr; }
  .dash-grid     { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-shell   { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav   { display: flex; flex-wrap: wrap; padding: .25rem; flex: 1; }
  .sidebar-footer{ display: flex; }
  .sidebar-link  { padding: .5rem .75rem; border-left: none; border-bottom: 3px solid transparent; }
  .sidebar-link.active { border-bottom-color: var(--accent); border-left: none; }
  .stat-grid     { grid-template-columns: 1fr; }
}

/* ── Access level selectors & chips ─────── */
.access-select {
  padding: .3rem .6rem; border-radius: 20px; font-size: .8rem;
  font-weight: 600; border: 1.5px solid; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  padding-right: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6a63'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center;
}
.access-select--free    { background-color: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.access-select--member  { background-color: #dbeafe; border-color: #bfdbfe; color: #1e3a8a; }
.access-select--premium { background-color: #f3e8ff; border-color: #d8b4fe; color: #6b21a8; }

.test-chip--premium  { background: #f3e8ff; border-color: #d8b4fe; color: #6b21a8; }
.pill--premium       { background: #f3e8ff; color: #6b21a8; }

.btn-row--premium {
  background: #f3e8ff; color: #6b21a8;
  border: 1.5px solid #d8b4fe; min-width: 80px;
}
.btn-row--premium:hover { opacity: .85; text-decoration: none; }

.btn-row--locked-out {
  display: inline-block; text-align: center;
  padding: .45rem 1.1rem; border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  background: var(--bg); color: var(--muted);
  border: 1.5px solid var(--border);
  min-width: 80px; cursor: not-allowed;
}

/* ── Test groups (My Tests page) ─────────── */
.test-group { margin-bottom: 2.5rem; }

.test-group-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border-radius: 12px 12px 0 0;
  border: 1px solid var(--border); border-bottom: none;
  flex-wrap: wrap;
}
.test-group-header h2 {
  font-family: var(--font-display); font-size: 1.15rem; margin: 0;
}
.test-group-header p  { font-size: .82rem; color: var(--muted); margin: .1rem 0 0; }
.test-group-header > div { flex: 1; }

.test-group-header--free    { background: #f0fdf4; border-color: #bbf7d0; }
.test-group-header--member  { background: #eff6ff; border-color: #bfdbfe; }
.test-group-header--premium { background: #faf5ff; border-color: #e9d5ff; }

.tg-icon  { font-size: 1.5rem; }
.tg-count {
  font-size: .78rem; font-weight: 600;
  padding: .25rem .7rem; border-radius: 20px;
  background: rgba(0,0,0,.06); color: var(--muted);
}

.test-group .test-list {
  border-radius: 0 0 12px 12px;
  border-top: none;
}

/* Premium locked row */
.test-row--premium-locked { opacity: .85; }
.test-row--premium-locked:hover { background: #faf5ff; }

/* Chips */
.test-chip--paid    { background: #dcfce7; border-color: #bbf7d0; color: #14532d; font-weight: 700; }

/* Buy button */
.btn-row--buy {
  background: #7c3aed; color: #fff;
  min-width: 120px; font-weight: 600; white-space: nowrap;
}
.btn-row--buy:hover { opacity: .88; text-decoration: none; color: #fff; }

/* ── Payment page ────────────────────────── */
.payment-wrap {
  max-width: 540px; margin: 0 auto; padding: 1rem 0 3rem;
}
.payment-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.payment-badge {
  display: inline-block; font-size: .78rem; font-weight: 700;
  background: #f3e8ff; color: #6b21a8;
  padding: .25rem .75rem; border-radius: 20px;
  margin-bottom: .75rem; letter-spacing: .03em;
}
.payment-card h1 {
  font-family: var(--font-display); font-size: 1.75rem; margin-bottom: .4rem;
}
.payment-desc { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.payment-perks { display: flex; flex-direction: column; gap: .35rem; }
.perk { font-size: .88rem; color: var(--muted); }
.perk::before { content: ""; }

.payment-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.payment-price-block { text-align: center; margin-bottom: 1.5rem; }
.payment-price {
  font-family: var(--font-display); font-size: 2.25rem;
  color: #7c3aed; margin-bottom: .25rem;
}
.payment-note { font-size: .82rem; color: var(--muted); }

.payment-instructions h2 {
  font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem;
}
.payment-steps {
  list-style: none; display: flex; flex-direction: column; gap: 1rem;
}
.payment-steps li {
  display: flex; gap: .85rem; align-items: flex-start;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: #7c3aed; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; flex-shrink: 0;
}
.payment-steps li > div strong { display: block; font-size: .92rem; margin-bottom: .2rem; }
.payment-steps li > div p { font-size: .85rem; color: var(--muted); margin: 0; }

.chip-inline {
  display: inline-block; font-size: .75rem; font-weight: 700;
  padding: .1rem .5rem; border-radius: 20px;
}
.chip-inline--paid { background: #dcfce7; color: #14532d; }

.payment-contact {
  display: flex; gap: .85rem; align-items: flex-start;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 1rem; margin-top: 1.5rem;
}
.payment-contact-icon { font-size: 1.5rem; }
.payment-contact strong { display: block; font-size: .92rem; margin-bottom: .2rem; }
.payment-contact p { font-size: .85rem; color: var(--muted); margin: 0; }


/* ── Stripe payment button ───────────────── */
.btn-stripe {
  display: block; width: 100%; text-align: center;
  background: #635bff; color: #fff;
  padding: .85rem 1.5rem; border-radius: 8px;
  font-size: 1.05rem; font-weight: 600; border: none;
  cursor: pointer; transition: background .15s;
  margin-bottom: .75rem;
}
.btn-stripe:hover { background: #4f46e5; }
.stripe-icon { margin-right: .4rem; }
.payment-secure {
  text-align: center; font-size: .78rem;
  color: var(--muted); margin-bottom: .5rem;
}
.payment-divider-or {
  display: flex; align-items: center; gap: .75rem;
  color: var(--muted); font-size: .82rem;
  margin: 1rem 0;
}
.payment-divider-or::before,
.payment-divider-or::after {
  content: ""; flex: 1;
  border-top: 1px solid var(--border);
}

/* Payment method badges */
.badge--stripe { background: #ede9fe; color: #4f46e5; }
.badge--admin  { background: #dbeafe; color: #1e3a8a; }

/* ── Logo ────────────────────────────────── */
.nav-logo {
  height: 26px; width: auto;
  object-fit: contain; vertical-align: middle;
}
.sidebar-logo {
  height: 26px; width: auto;
  object-fit: contain; vertical-align: middle;
}
.logo-preview {
  height: 60px; width: auto;
  object-fit: contain; display: block;
  margin-bottom: .5rem;
}
.logo-upload-wrap { max-width: 480px; }
.upload-logo-row {
  display: flex; gap: .75rem; align-items: center;
  flex-wrap: wrap;
}
.upload-logo-row input[type=file] { font-size: .85rem; }
