/* ==========================================================================
   Online Assessment Portal — stylesheet
   Clean, trust-focused banking look. Tweak the brand tokens below to restyle.
   ========================================================================== */
:root {
  --brand-900: #00052f;
  --brand-800: #000a52;
  --brand-700: #00086a;
  --brand-600: #0b1f9e;
  --brand-500: #00b3fc;
  --brand-200: #b3e4fd;
  --brand-100: #e0f3fe;
  --brand-50: #f0f9ff;
  --accent: #fcb200;
  --accent-600: #dc9b00;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #0f1a3a;
  --muted: #6a7a92;
  --line: #e2e8f1;
  --success: #138a4b;
  --success-bg: #e6f6ed;
  --danger: #d12f2f;
  --danger-bg: #fdecec;
  --warn: #a86a00;
  --warn-bg: #fff4dc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10, 30, 70, .05), 0 8px 24px rgba(10, 30, 70, .07);
  --shadow-lg: 0 20px 50px rgba(6, 26, 61, .22);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
.only-mobile, .icon-btn.only-mobile { display: none; }
[hidden] { display: none !important; }

.ico { flex: none; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 13.5px/1.2 var(--font); cursor: pointer; text-decoration: none !important;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 16px rgba(11, 31, 158, .28); }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--accent); color: #2a1f00; box-shadow: 0 6px 16px rgba(252, 178, 0, .35); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: #fff; color: var(--brand-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-200); background: var(--brand-50); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f2c4c4; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }
.icon-btn.danger:hover { color: var(--danger); border-color: #f2c4c4; background: var(--danger-bg); }

/* ---------- Forms ---------- */
label.lbl { display: block; font-weight: 500; font-size: 13px; margin: 0 0 6px; color: #2a3a57; }
.field { margin-bottom: 16px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font: 400 14px var(--font); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(0, 179, 252, .22); }
.input::placeholder { color: #a3afc2; }
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
input[type=file].input { padding: 9px 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13.5px; }
.check input { margin-top: 3px; accent-color: var(--brand-600); width: 17px; height: 17px; }

/* ---------- Cards, alerts, badges ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.alert { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; }
.alert-success { background: var(--success-bg); color: #0b6b39; }
.alert-error { background: var(--danger-bg); color: #a32020; }
.alert-info { background: var(--brand-100); color: var(--brand-800); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-x { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.badge-draft { background: #eef1f6; color: #5b6b83; }
.badge-published { background: var(--success-bg); color: var(--success); }
.badge-closed { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--brand-100); color: var(--brand-700); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 600; padding: 10px 14px; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .actions form { display: inline; }
.empty { text-align: center; color: var(--muted); padding: 38px 10px; }
.sig-thumb { height: 38px; max-width: 150px; object-fit: contain; display: block; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar .search { position: relative; }
.toolbar .search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 38px; min-width: 240px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pg { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 13px; }
a.pg:hover { background: var(--brand-50); text-decoration: none; }
.pg.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pg.disabled, .pg.gap { color: #b3bdcc; background: transparent; border-color: transparent; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1.5px solid var(--line); }
.tab { padding: 10px 16px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; font-size: 13.5px; }
.tab:hover { color: var(--brand-700); text-decoration: none; }
.tab.active { color: var(--brand-700); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- Admin shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px; flex: none; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.side-brand { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); min-height: 88px; }
.side-brand img { max-height: 58px; width: 100%; max-width: 100%; object-fit: contain; object-position: left center; }
.nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #9aa7bb; font-weight: 600; padding: 8px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 11px;
  color: #3a4b69; font: 500 14px var(--font); border: 0; background: none; cursor: pointer; text-align: left;
  text-decoration: none !important; position: relative; margin-bottom: 2px;
}
.nav-item:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-item.active { background: var(--brand-100); color: var(--brand-700); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; background: var(--accent); border-radius: 0 4px 4px 0; }
.nav-toggle span { flex: 1; }
.nav-toggle .ico:last-child { transition: transform .2s; }
.nav-group.open .nav-toggle .ico:last-child { transform: rotate(180deg); }
.nav-sub { display: none; margin: 2px 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.nav-group.open .nav-sub { display: block; }
.nav-sub .nav-item { font-size: 13.5px; padding: 8px 10px; }
.nav-sub .nav-item.active::before { display: none; }
.side-foot { border-top: 1px solid var(--line); padding: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.who strong { display: block; font-size: 13.5px; line-height: 1.2; }
.who small { color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--brand-800)); color: #fff; display: grid; place-items: center; font-weight: 600; }
.logout:hover { background: var(--danger-bg); color: var(--danger); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px 34px 6px; }
.page-title .eyebrow { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--brand-500); font-weight: 600; margin-bottom: 2px; }
.page-title h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.content { padding: 16px 34px 40px; flex: 1; }
.foot { padding: 18px 34px; color: var(--muted); font-size: 12.5px; }
.scrim { display: none; }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; padding: 20px 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat .s-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-600); margin-bottom: 12px; }
.stat .s-num { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat .s-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat.s-success .s-ico { background: var(--success-bg); color: var(--success); }
.stat.s-warn .s-ico { background: var(--warn-bg); color: var(--warn); }
.stat.s-dark { background: linear-gradient(135deg, var(--brand-700), var(--brand-900)); color: #fff; }
.stat.s-dark .s-ico { background: rgba(255,255,255,.14); color: #fff; }
.stat.s-dark .s-lbl { color: rgba(255,255,255,.72); }

.progress { height: 9px; background: #e9eef6; border-radius: 99px; overflow: hidden; display: flex; min-width: 140px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-600)); border-radius: 99px; }
.pct { font-size: 12px; font-weight: 600; color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.quick a { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--text); font-weight: 600; }
.quick a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(10,30,70,.12); }
.quick a .s-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #2a1f00; display: grid; place-items: center; }

/* ---------- Dialogs ---------- */
dialog.modal {
  border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 28px));
  box-shadow: var(--shadow-lg); color: var(--text); font-family: var(--font);
}
dialog.modal.wide { width: min(720px, calc(100vw - 28px)); }
dialog.modal::backdrop { background: rgba(6, 26, 61, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 22px 24px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fafcff; border-radius: 0 0 18px 18px; }
.qr-box { text-align: center; }
.qr-box img { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; image-rendering: pixelated; }
.copy-row { display: flex; gap: 8px; }

/* ---------- Login ---------- */
body.login { background: #fff; }
.login-shell { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(1200px 600px at 10% 110%, rgba(252, 178, 0, .28), transparent 60%),
              linear-gradient(145deg, var(--brand-600), var(--brand-900));
}
.login-hero::before, .login-hero::after { content: ''; position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); }
.login-hero::before { width: 520px; height: 520px; right: -160px; top: -140px; }
.login-hero::after { width: 340px; height: 340px; left: -90px; bottom: -110px; background: rgba(255,255,255,.04); }
.login-hero .kicker { text-transform: uppercase; letter-spacing: .3em; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.login-hero h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.login-hero p { max-width: 460px; color: rgba(255,255,255,.82); font-size: 16px; }
.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 1; }
.hero-pills span { padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 500; backdrop-filter: blur(4px); }
.login-panel { display: grid; place-items: center; padding: 40px 28px; }
.login-card { width: min(420px, 100%); }
.login-card .logo { width: 100%; max-width: 380px; max-height: 110px; object-fit: contain; object-position: left center; margin-bottom: 28px; display: block; }
.login-card h1 { font-size: 26px; margin-bottom: 6px; }
.pw-wrap { position: relative; }
.pw-wrap .pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; }

/* ---------- Assessment builder ---------- */
.builder { max-width: 860px; margin: 0 auto; }
.b-top { border-top: 8px solid var(--brand-600); }
.b-title { font-size: 24px !important; font-weight: 600 !important; border: 0 !important; border-bottom: 2px solid var(--line) !important; border-radius: 0 !important; padding-left: 0 !important; }
.b-title:focus { border-bottom-color: var(--brand-500) !important; box-shadow: none !important; }
.q-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 18px; margin-top: 16px; border-left: 6px solid transparent; transition: border-color .15s; }
.q-card:focus-within { border-left-color: var(--accent); }
.q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.q-num { background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: 12px; padding: 4px 12px; border-radius: 99px; letter-spacing: .06em; }
.q-tools { display: flex; gap: 6px; }
.q-row { display: grid; grid-template-columns: 1fr 250px; gap: 14px; margin-bottom: 14px; }
.opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.opt-row input[type=radio], .opt-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--success); flex: none; cursor: pointer; }
.opt-row .input { padding: 9px 12px; }
.opt-row.correct .input { border-color: #9dd9b8; background: #f4fbf7; }
.b-actions { position: sticky; bottom: 0; background: rgba(244,247,251,.92); backdrop-filter: blur(6px); padding: 14px 0; margin-top: 22px; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); }
.add-q { width: 100%; border: 2px dashed var(--brand-200); background: var(--brand-50); color: var(--brand-700); padding: 16px; border-radius: var(--radius); font: 600 14px var(--font); cursor: pointer; margin-top: 16px; }
.add-q:hover { background: var(--brand-100); }
.errors { margin: 0 0 18px; padding: 14px 18px 14px 34px; background: var(--danger-bg); color: #9b1c1c; border-radius: var(--radius-sm); }

/* ---------- Participant (take) flow ---------- */
body.public { background: linear-gradient(180deg, var(--brand-50), #fff 420px); min-height: 100vh; }
.take-top { display: flex; align-items: center; justify-content: center; padding: 22px 16px 6px; }
.take-top img { max-height: 84px; max-width: min(380px, 88vw); object-fit: contain; }
.take-wrap { max-width: 760px; margin: 0 auto; padding: 14px 16px 60px; }
.take-wrap.narrow { max-width: 520px; }
.take-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 34px; }
.take-card h1 { font-size: 24px; }
.eyebrow-c { text-transform: uppercase; letter-spacing: .2em; font-size: 11.5px; color: var(--brand-500); font-weight: 600; margin-bottom: 8px; display: block; }
.message-card { text-align: center; padding: 44px 32px; border-radius: 20px; }
.msg-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; margin: 0 auto 18px; }
.take-progress .meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.take-progress .bar { height: 10px; background: #e2e9f5; border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.take-progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffcf3a); border-radius: 99px; transition: width .4s; }
.q-title { font-size: 21px; line-height: 1.4; margin-bottom: 6px; white-space: pre-line; }
.q-hint { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.choices { display: grid; gap: 11px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, transform .08s; }
.choice:hover { border-color: var(--brand-200); background: var(--brand-50); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .mark { width: 24px; height: 24px; border: 2px solid #b6c3d8; border-radius: 50%; flex: none; display: grid; place-items: center; transition: all .15s; background: #fff; }
.choice.is-multi .mark { border-radius: 7px; }
.choice .mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.choice.is-multi .mark::after { width: 6px; height: 11px; border-radius: 0; background: none; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); margin-top: -2px; }
.choice input:checked ~ .mark { background: var(--brand-600); border-color: var(--brand-600); }
.choice input:checked ~ .mark::after { transform: scale(1); }
.choice.is-multi input:checked ~ .mark::after { transform: rotate(45deg) scale(1); }
.choice:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(11, 31, 158, .1); }
.choice input:focus-visible ~ .mark { outline: 3px solid rgba(0, 179, 252, .45); outline-offset: 2px; }
.choice .ctext { font-weight: 500; }
.take-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

.loading-card { text-align: center; padding: 64px 28px; }
.spinner { width: 72px; height: 72px; border-radius: 50%; border: 7px solid var(--brand-100); border-top-color: var(--brand-600); margin: 0 auto 26px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-bar { height: 8px; background: #e2e9f5; border-radius: 99px; overflow: hidden; max-width: 320px; margin: 22px auto 0; }
.load-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-500), var(--accent)); animation: fill 5s linear forwards; }
@keyframes fill { to { width: 100%; } }

.result-card { text-align: center; position: relative; overflow: hidden; padding: 44px 34px; }
.ring { width: 190px; height: 190px; margin: 6px auto 20px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .trk { stroke: #e7edf7; }
.ring .val { stroke: var(--brand-600); stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.ring.pass .val { stroke: var(--success); }
.ring.fail .val { stroke: var(--accent); }
.ring .in { position: absolute; inset: 0; display: grid; place-content: center; }
.ring .in strong { font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.ring .in span { color: var(--muted); font-weight: 500; font-size: 14px; margin-top: 6px; }
.result-pill { display: inline-block; padding: 6px 18px; border-radius: 99px; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.result-pill.pass { background: var(--success-bg); color: var(--success); }
.result-pill.fail { background: var(--warn-bg); color: var(--warn); }
.result-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }
.result-actions form { margin: 0; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 16px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }

.ack-statement { background: var(--brand-50); border-left: 5px solid var(--accent); padding: 18px 20px; border-radius: 0 12px 12px 0; margin: 18px 0; }
.topic-list { margin: 8px 0 0; padding-left: 22px; }
.topic-list li { margin-bottom: 4px; }
.sig-pad-wrap { border: 2px dashed var(--brand-200); border-radius: 14px; background: #fff; position: relative; touch-action: none; }
.sig-pad-wrap canvas { width: 100%; height: auto; aspect-ratio: 3 / 1; display: block; border-radius: 12px; cursor: crosshair; touch-action: none; }
.sig-pad-wrap .sig-hint { position: absolute; left: 0; right: 0; bottom: 38px; text-align: center; color: #b3bfd1; pointer-events: none; font-size: 13px; }
.sig-pad-wrap .sig-line { position: absolute; left: 24px; right: 24px; bottom: 34px; border-top: 1.5px solid #c9d3e3; pointer-events: none; }
.sig-pad-wrap .sig-tools { position: absolute; right: 8px; top: 8px; }

/* ---------- Acknowledgement form (screen + print) ---------- */
.ack-sheet { background: #fff; color: #111; padding: 38px 46px; border: 1px solid var(--line); border-radius: 6px; max-width: 800px; margin: 0 auto; font-family: 'Poppins', Arial, sans-serif; font-size: 13.5px; }
.ack-head { display: flex; align-items: center; gap: 18px; border-bottom: 3px solid var(--brand-700); padding-bottom: 14px; margin-bottom: 18px; }
.ack-head img { max-height: 64px; max-width: 240px; object-fit: contain; }
.ack-head h2 { margin: 0; font-size: 21px; letter-spacing: .08em; color: var(--brand-800); }
.ack-head p { margin: 2px 0 0; color: #555; font-size: 12.5px; }
.ack-meta { width: 100%; border-collapse: collapse; margin-bottom: 16px; table-layout: fixed; }
.ack-meta td { word-wrap: break-word; overflow-wrap: anywhere; }
.ack-meta td { padding: 6px 10px; border: 1px solid #d5dbe6; font-size: 13px; }
.ack-meta td.k { width: 150px; background: #f3f6fb; font-weight: 600; color: #333; }
.ack-sheet h4 { text-transform: uppercase; letter-spacing: .1em; font-size: 12.5px; color: var(--brand-700); margin: 18px 0 6px; }
.ack-sheet ol { margin: 0 0 8px; padding-left: 22px; }
.ack-sheet li { margin-bottom: 3px; }
.ack-text { text-align: justify; margin: 14px 0 26px; line-height: 1.7; }
.ack-sign { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-top: 18px; }
.ack-sign .sigbox { width: 300px; text-align: center; }
.ack-sign .sigbox .imgwrap { height: 90px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1.5px solid #111; }
.ack-sign .sigbox img { max-height: 84px; max-width: 100%; }
.ack-sign .sigbox strong { display: block; margin-top: 6px; text-transform: uppercase; }
.ack-sign .sigbox small { color: #666; }
.ack-sign .datebox { width: 200px; text-align: center; }
.ack-sign .datebox .d { border-bottom: 1.5px solid #111; padding: 0 0 4px; height: 90px; display: flex; align-items: flex-end; justify-content: center; font-weight: 600; }
.ack-sign .datebox small { color: #666; }
.ack-esign { margin-top: 22px; border: 2px solid var(--brand-700); border-radius: 10px; padding: 14px 16px 12px; background: #f6f9ff; }
.ack-esign .stamp { display: inline-block; font-weight: 700; letter-spacing: .08em; font-size: 12.5px; color: #0b6b39; background: #e6f6ed; border: 1px solid #9dd9b8; padding: 5px 12px; border-radius: 99px; margin-bottom: 10px; }
.ack-esign .ack-meta { margin-bottom: 8px; background: #fff; }
.ack-notice { margin: 0; font-size: 12px; color: #444; font-style: italic; }
.ack-note { margin: 22px 0 0; padding-top: 10px; border-top: 1px dashed #c9d3e3; font-size: 12px; color: #555; }
.done-banner { text-align: center; margin-bottom: 22px; }
.done-banner .msg-ico { background: var(--success-bg); color: var(--success); }

/* ---------- Install / misc ---------- */
.install-wrap { max-width: 640px; margin: 40px auto; padding: 0 16px; }
.req { list-style: none; padding: 0; margin: 0 0 16px; }
.req li { display: flex; gap: 8px; padding: 5px 0; align-items: center; }
.req .ok { color: var(--success); } .req .bad { color: var(--danger); } .req .warn { color: var(--warn); }
pre.code { background: #0e1b33; color: #cfe0ff; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; }
.preview-img { max-height: 70px; max-width: 220px; object-fit: contain; border: 1px dashed var(--line); border-radius: 10px; padding: 8px; background: #fff; display: block; margin-bottom: 10px; }
.preview-fav { width: 40px; height: 40px; }
.brand-card { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.brand-card:last-of-type { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .only-mobile, .icon-btn.only-mobile { display: inline-grid; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(6,26,61,.45); z-index: 30; }
  .topbar { padding: 16px 16px 4px; }
  .content { padding: 12px 16px 32px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .q-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .brand-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; } .stat .s-num { font-size: 26px; }
  .take-card { padding: 22px 18px; }
  .q-title { font-size: 18px; }
  .ack-sheet { padding: 22px 16px; }
  .ack-head { flex-wrap: wrap; gap: 10px; }
  .ack-head h2 { font-size: 17px; letter-spacing: .04em; }
  .ack-meta, .ack-meta tbody, .ack-meta tr, .ack-meta td { display: block; width: 100% !important; }
  .ack-meta tr { margin-bottom: 8px; }
  .ack-meta td { font-size: 13px; padding: 6px 10px; border-bottom: 0; }
  .ack-meta td.k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; background: #f3f6fb; padding-bottom: 2px; }
  .ack-meta td:not(.k) { border-top: 0; border-bottom: 1px solid #d5dbe6; padding-top: 2px; }
  .ack-sign { flex-direction: column; align-items: stretch; }
  .ack-sign .sigbox, .ack-sign .datebox { width: 100%; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  body.print-ack * { visibility: hidden; }
  body.print-ack .ack-sheet, body.print-ack .ack-sheet * { visibility: visible; }
  body.print-ack .ack-sheet { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; max-width: none; }
  .no-print { display: none !important; }
}
