:root {
  color-scheme: light;
  --brand: #3a1257;
  --brand-2: #521a7a;
  --brand-ink: #ffffff;
  --accent: #ffc93c;
  --pink: #e8336f;
  --bg: #f6f4f8;
  --surface: #ffffff;
  --surface-2: #faf9fc;
  --ink: #17121c;
  --ink-2: #544e5c;
  --muted: #8a8492;
  --line: #e7e3ec;
  --line-2: #d6d0de;
  --focus: #7c3aed;
  --good: #0f8a3c;
  --bad: #c62f3a;
  /* attendance categories — ordered best → worst, validated for colour-blind separation */
  --t-early: #2a78d6;
  --t-lateperm: #86b6ef;
  --t-late: #eda100;
  --t-absentperm: #a8a69e;
  --t-absent: #e34948;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 18, 28, 0.05), 0 4px 16px rgba(23, 18, 28, 0.04);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

/* ── Layout ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: var(--brand-ink); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em; }
.brand-logo { width: 42px; height: 42px; flex: none; }
.brand-logo.lg { width: 64px; height: 64px; }
.brand-name { font-weight: 800; line-height: 1.1; }
.brand-sub { font-size: 0.75rem; opacity: 0.7; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, 0.78); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, 0.13); color: #fff; }
.nav a.active svg { color: var(--accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; font-size: 0.82rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.side-foot .who { font-weight: 700; }
.side-foot .role { opacity: 0.65; }
.side-foot button { margin-top: 8px; background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.topbar .mobile-brand { display: none; font-weight: 800; color: var(--brand); align-items: center; gap: 8px; }
.topbar .mobile-brand img { width: 30px; height: 30px; }
.content { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.bottom-nav { display: none; }

.demo-bar { background: #fff6d6; border-bottom: 1px solid #f1dc8f; color: #5a4300; font-size: 0.86rem; padding: 8px 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-bar select { padding: 3px 8px; border-radius: 8px; border: 1px solid #e5cf7a; background: #fff; }
.demo-bar button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }

/* ── Controls ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 0.83rem; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 0.86rem; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--brand); color: #fff; }
.month-picker { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; }
.month-picker button { border: 0; background: none; padding: 7px 10px; cursor: pointer; color: var(--ink-2); font-size: 1rem; }
.month-picker span { min-width: 132px; text-align: center; font-weight: 700; font-size: 0.92rem; }

/* ── Cards & stats ──────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .v { font-size: 1.9rem; font-weight: 800; margin-top: 4px; line-height: 1.1; }
.stat .d { font-size: 0.82rem; color: var(--ink-2); margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid > .card { margin: 0; min-width: 0; }
.dash-grid .wide { grid-column: 1 / -1; }
.chart-box { position: relative; height: 290px; }
.chart-box.short { height: 230px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.mini-bar { flex: 1; height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: #e6f6ec; border-color: #bfe6cc; color: var(--good); }
.pill.warn { background: #fff4d9; border-color: #f4dc9c; color: #8a5a00; }
.pill.bad { background: #fdeaec; border-color: #f6c5ca; color: var(--bad); }
.pill.brand { background: #efe6f7; border-color: #dccbeb; color: var(--brand-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.83rem; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: #efe6f7; color: var(--brand-2); display: grid; place-items: center; font-weight: 800; font-size: 0.78rem; flex: none; }
.person { display: flex; align-items: center; gap: 10px; }
.person .n { font-weight: 600; }

/* ── Report type picker ─────────────────────────────────── */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.type-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.type-card:hover { border-color: var(--brand-2); }
.type-card.on { border-color: var(--brand); outline: 2px solid var(--brand); }
.type-card .t { font-weight: 700; }
.type-card .s { font-size: 0.82rem; color: var(--muted); }

/* ── Report editor ──────────────────────────────────────── */
.editor-head { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.section-head h3 { display: flex; align-items: center; gap: 10px; }
.section-head .sn { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.75rem; display: grid; place-items: center; }
.section-body { padding: 16px 18px; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cat-tab { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.cat-tab .c { background: var(--surface-2); border-radius: 999px; padding: 0 8px; font-size: 0.78rem; border: 1px solid var(--line); }
.cat-tab.on { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, white); }
.cat-tab.on .c { background: var(--tone); border-color: var(--tone); color: #fff; }
.pool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pool-head .hint { font-size: 0.84rem; color: var(--ink-2); }
.pool-head .hint b { color: var(--ink); }
.pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 42px; padding: 10px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); }
.pool .done { color: var(--good); font-weight: 600; font-size: 0.88rem; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 0.87rem; font-weight: 600; cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--brand-2); background: #f7f1fc; }
.chip .x { color: var(--muted); font-weight: 400; }
.search-mini { border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 10px; font-size: 0.85rem; width: 180px; background: var(--surface); }
.assigned { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.bucket { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; border-top: 4px solid var(--tone); }
.bucket-h { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.84rem; margin-bottom: 6px; }
.bucket-h .c { color: var(--muted); }
.bucket ol { margin: 0; padding-left: 22px; font-size: 0.9rem; }
.bucket li { padding: 3px 0; }
.bucket li .line { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.bucket li button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 1rem; line-height: 1; }
.bucket li button:hover { color: var(--bad); }
/* Free-text note on a name-based section (WhatsApp / social media posts). */
.note-box { display: block; margin-top: 12px; }
.note-box > span { display: block; margin-bottom: 4px; }
.note-box textarea { min-height: 54px; }
.doc-note { margin-top: 6px; font-style: italic; }

.bucket .remark { width: 100%; border: 0; border-bottom: 1px dashed var(--line-2); font-size: 0.82rem; padding: 2px 0; color: var(--ink-2); background: transparent; }
.bucket .none { color: var(--muted); font-size: 0.85rem; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 0.9rem; }
.count-row.has { border-color: var(--brand-2); background: #f7f1fc; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.stepper button { border: 0; background: none; width: 28px; height: 28px; cursor: pointer; font-size: 1.05rem; color: var(--ink-2); }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.save-bar { position: sticky; bottom: 0; margin: 20px -28px -28px; padding: 14px 28px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; z-index: 10; }
.save-bar .spacer { flex: 1; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--ink-2); }
.progress .mini-bar { width: 120px; }

/* ── Finished report document ───────────────────────── */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; max-width: 860px; }
.doc-head { display: flex; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 3px solid var(--brand); margin-bottom: 8px; }
.doc-head img { width: 64px; height: 64px; flex: none; }
.doc-head h2 { color: var(--brand); font-size: 1.15rem; letter-spacing: 0.01em; }
.doc-meta { color: var(--ink-2); font-size: 0.9rem; margin-top: 2px; }
.doc-sec { padding: 16px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.doc-sec h3 { display: flex; align-items: center; gap: 10px; text-transform: uppercase; font-size: 0.86rem; letter-spacing: 0.04em; color: var(--brand); margin-bottom: 10px; }
.doc-sec .sn { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.72rem; display: grid; place-items: center; flex: none; }
.doc-block { margin: 0 0 10px 32px; }
.doc-label { font-weight: 700; font-size: 0.86rem; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.doc-block ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 28px; font-size: 0.92rem; }
.doc-block li { break-inside: avoid; padding: 1px 0; }
.doc-none, .doc-text { color: var(--muted); font-size: 0.9rem; margin: 0 0 0 32px; white-space: pre-wrap; }
.doc-block .doc-none { margin: 0; }
.doc-text { color: var(--ink); }
.doc-total { margin-left: 32px; font-weight: 700; font-size: 0.88rem; }
.doc-end { text-align: center; font-weight: 800; color: var(--brand); letter-spacing: 0.08em; padding-top: 18px; font-size: 0.85rem; }
.plain-list { margin: 0 0 10px; padding-left: 22px; font-size: 0.92rem; }

/* ── Member report ──────────────────────────────────── */
.stackbar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.stackbar i { display: block; min-width: 4px; }

/* ── Task submissions ───────────────────────────────── */
.submit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.chip-yes { background: #e9f2fc; border-color: #b9d4f3; }
@media (max-width: 820px) { .submit-cols { grid-template-columns: 1fr; } }

/* ── Modal & toast ──────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(23, 18, 28, 0.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-h button { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-b { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; z-index: 200; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.toast.err { background: var(--bad); }
.member-pick { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }

/* ── Auth ───────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--brand); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { position: relative; z-index: 2; }
.auth-art::after { content: ''; position: absolute; right: -150px; top: -170px; width: 340px; height: 340px; border-radius: 50%; background: var(--accent); opacity: 0.9; }
.auth-art::before { content: ''; position: absolute; left: -60px; bottom: 80px; width: 260px; height: 14px; background: var(--pink); transform: rotate(-24deg); }
.auth-art h1 { font-size: 2.4rem; max-width: 420px; position: relative; z-index: 1; }
.auth-art p { opacity: 0.8; max-width: 400px; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-form .err { color: var(--bad); font-size: 0.88rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye svg { width: 20px; height: 20px; }
.linkish { background: none; border: 0; color: var(--brand-2); cursor: pointer; padding: 0; font-weight: 600; }

/* ── Scorecard (mirrors the monthly member scorecard) ──── */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sc-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; box-shadow: var(--shadow); text-align: left; }
.sc-tile:hover { border-color: var(--brand-2); }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--c, var(--brand-2)) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 0.8rem; }

.scorecard { --sc-purple: #3a1257; --sc-yellow: #ffc93c; --sc-pink: #e8336f; background: #fdf9ef; width: 794px; max-width: 100%; margin: 0 auto; font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif; color: #2a1a33; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12); }
.sc-top { background: var(--sc-purple); color: #fff; padding: 30px 40px 34px; position: relative; overflow: hidden; }
.sc-top::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; background: var(--sc-yellow); border-radius: 50%; }
.sc-top::before { content: ''; position: absolute; right: 130px; top: -20px; width: 18px; height: 260px; background: var(--sc-pink); transform: rotate(-52deg); }
.sc-top .eyebrow { color: var(--sc-yellow); font-weight: 600; letter-spacing: 0.06em; font-size: 0.9rem; }
.sc-top h2 { font-size: 2.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; margin: 2px 0 10px; position: relative; z-index: 1; }
.sc-top .meta { font-size: 0.92rem; opacity: 0.9; position: relative; z-index: 1; }
.sc-top .logo { position: absolute; right: 34px; top: 26px; z-index: 2; width: 78px; height: 78px; }
.sc-strip { height: 10px; background: linear-gradient(90deg, var(--sc-pink) 65%, var(--sc-purple) 65%); }
.sc-body { padding: 30px 36px 20px; display: grid; grid-template-columns: 1fr 210px 1fr; gap: 22px 18px; align-items: center; }
.sc-pillar { background: #fff; border: 2px solid #2a1a33; border-radius: 14px; padding: 30px 16px 14px; position: relative; }
.sc-pillar .tag { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: var(--pc); color: #2a1a33; font-weight: 600; padding: 6px 22px; border-radius: 8px; white-space: nowrap; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }
.sc-pillar .score { display: flex; justify-content: space-between; align-items: flex-start; }
.sc-pillar .big { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.sc-pillar .of { font-size: 0.85rem; font-weight: 500; }
.sc-pillar .ach { text-align: right; font-size: 0.86rem; line-height: 1.2; }
.sc-pillar ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.88rem; }
.sc-pillar li::before { content: '●'; color: var(--pc); margin-right: 8px; font-size: 0.7rem; vertical-align: 2px; }
.sc-center { grid-row: span 2; display: grid; place-items: center; position: relative; }
.sc-center svg { width: 210px; height: 210px; }
.sc-center .face { position: absolute; width: 112px; height: 112px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; color: var(--sc-purple); }
.sc-center .overall { position: absolute; right: 6px; bottom: 10px; width: 74px; height: 74px; border-radius: 50%; background: var(--sc-purple); color: #fff; display: grid; place-items: center; text-align: center; line-height: 1; font-weight: 700; font-size: 1.3rem; border: 3px solid #fdf9ef; }
.sc-center .overall small { display: block; font-size: 0.55rem; color: var(--sc-yellow); margin-top: 3px; letter-spacing: 0.05em; }
.sc-wide { grid-column: 1 / -1; background: #e9f3fc; }
.sc-wide .inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sc-wide ul { display: flex; gap: 26px; margin: 0; flex-wrap: wrap; }
.sc-summary-tag { grid-column: 1 / -1; justify-self: center; background: var(--sc-purple); color: #fff; border-radius: 999px; padding: 8px 34px; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.sc-foot { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.sc-box { background: #fff; border: 2px solid #e6d9ee; border-left: 6px solid var(--sc-pink); border-radius: 10px; padding: 12px 16px; }
.sc-box h4 { font-size: 1rem; margin-bottom: 6px; }
.sc-box dl { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 3px 12px; margin: 0; font-size: 0.82rem; }
.sc-box dd { margin: 0; font-weight: 700; text-align: right; }
.sc-sign { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; }
.sc-sign .line { width: 80%; border-top: 1.5px solid #2a1a33; margin-top: 46px; padding-top: 6px; font-weight: 600; }
.sc-sign .line small { display: block; font-weight: 400; font-size: 0.78rem; }
.sc-note { grid-column: 1 / -1; font-size: 0.7rem; color: #6b5d74; padding-top: 6px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar .mobile-brand { display: flex; font-size: 0; gap: 0; }
  .topbar .mobile-brand img { width: 36px; height: 36px; }
  .topbar { gap: 8px; }
  #scopeSel { max-width: 180px; padding: 8px 10px; }
  .content { padding: 18px 16px 96px; }
  .demo-bar { padding: 8px 16px; }
  .save-bar { margin: 20px -16px 0; padding: 12px 16px; bottom: 64px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--brand); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.68rem; font-weight: 600; padding: 4px 0; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav svg { width: 21px; height: 21px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 32px 24px; min-height: 220px; }
  .brand-logo.lg { width: 52px; height: 52px; }
  .auth-art h1 { font-size: 1.7rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .member-pick { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  .search-mini { width: 100%; }
  .cat-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px; scrollbar-width: none; }
  .cat-tab { flex: none; }
  .pool-head .row { width: 100%; }
  .pool-head .btn { white-space: normal; text-align: left; }
  .section-body { min-width: 0; }
  .save-bar .progress .mini-bar { display: none; }
  .save-bar .progress { width: 100%; font-size: 0.8rem; }
  .mobile-only { display: inline-flex !important; }
  .sc-body { grid-template-columns: 1fr; padding: 24px 18px; }
  .sc-center { grid-row: auto; }
  .sc-foot { grid-template-columns: 1fr; }
  .doc { padding: 18px 16px; }
  .page-head > .row { width: 100%; }
  .page-head > .row > .btn { flex: 1 1 auto; padding: 9px 12px; }
  .doc-block, .doc-text, .doc-none, .doc-total { margin-left: 0; }
  .doc-block ol { columns: 1; }
  .doc-head img { width: 48px; height: 48px; }
  .sc-top { padding: 24px 20px; }
  .sc-top h2 { font-size: 1.6rem; padding-right: 70px; }
}

/* ── Print: just the report or scorecard ────────────────── */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .bottom-nav, .demo-bar, .save-bar, .no-print { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .scorecard { box-shadow: none; width: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .section, .stat { box-shadow: none; break-inside: avoid; }
  .print-page { break-after: page; }
}
