/* base.css — Reset, variables, typography, and layout primitives */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #222222;
  --surface: #1a1a1a;
  --surface2: #2d2d2d;
  --accent: #6f42c1;
  --accent-hover: #5a32a3;
  --green: #198754;
  --danger: #dc3545;
  --text: #dddddd;
  --muted: #8c96a0;
  --border: rgba(255,255,255,0.09);
  --link: #6ea8fe;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 21px; min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--surface); padding: 8px 16px; position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.back-link { color: var(--accent); text-decoration: none; font-size: 13px; }
.back-link:hover { text-decoration: underline; }
.page-title { font-weight: 700; font-size: 16px; }
.set-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.set-title img { width: 22px; height: 22px; filter: brightness(0) saturate(100%) invert(45%) sepia(95%) saturate(1500%) hue-rotate(6deg) brightness(96%) contrast(93%); }

/* ── Progress ── */
.progress-summary {
  margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.progress-text { color: var(--muted); }
.progress-text b { color: var(--text); }
.progress-bar-wrap {
  width: 120px; height: 10px; background: rgba(255,255,255,.1); border-radius: 5px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}
.progress-bar-fill {
  display: block; height: 100%; min-width: 2px;
  background: linear-gradient(90deg, var(--accent), #9b59b6); border-radius: 5px; transition: width .3s;
}
.progress-bar-sm { width: 80px; height: 8px; }

/* ── States ── */
#loading { padding: 60px; text-align: center; color: var(--muted); }
#error { display: none; padding: 40px; text-align: center; color: var(--danger); }

/* ── Buttons (kept here for backwards compat — canonical source is components.css) ── */
.btn-sm-accent {
  background: var(--accent); color: #fff; border: none; border-radius: 4px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.btn-sm-accent:hover { background: var(--accent-hover); }
.btn-sm-accent:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm-cancel {
  background: var(--surface); color: var(--muted); border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  transition: color .15s;
}
.btn-sm-cancel:hover { color: var(--text); }
.act-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 2px 6px; border-radius: 3px; transition: all .12s;
  line-height: 1;
}
.act-btn:hover { color: var(--text); background: rgba(255,255,255,.08); }
.act-btn.danger:hover { color: var(--danger); }

/* ── Section labels ── */
.section-label {
  padding: 16px 12px 4px; max-width: 1600px; margin: 0 auto;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.section-label:first-child { border-top: none; }

/* ── Below-threshold notice ── */
.below-threshold-msg {
  padding: 12px 16px; color: var(--muted); font-size: 12px;
  max-width: 1600px; margin: 0 auto; font-style: italic;
}
