/* Verified Learning demo: hand-written design system (light theme). */
:root {
  --bg: #F7F7F5; --surface: #FFFFFF; --subtle: #F3F3F0; --hover: #F0EFEB;
  --ink: #121826; --ink-2: #2B3442; --muted: #667085; --faint: #98A2B3;
  --border: #E6E4DE; --border-strong: #D5D2CA;
  --accent: #1F7A5C; --accent-600: #186349; --accent-soft: #E9F3EE; --ring: rgba(31,122,92,.28);
  --success: #157347; --success-soft: #E7F4EC;
  --warning: #9A5B07; --warning-soft: #FDF4E3;
  --danger: #B42318; --danger-soft: #FDEDEC;
  --info: #2F5B8F; --info-soft: #EAF0F8;
  --chart-1: #2F4A6E; --chart-2: #3E9C7A; --chart-3: #C08A3E;
  --r-sm: 7px; --r: 10px; --r-lg: 14px;
  --sh-sm: 0 1px 2px rgba(18,24,38,.05);
  --sh-md: 0 1px 3px rgba(18,24,38,.06), 0 6px 16px -6px rgba(18,24,38,.10);
  --sh-lg: 0 24px 56px -16px rgba(18,24,38,.28), 0 2px 6px rgba(18,24,38,.06);
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.011em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.show-sm { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex-shrink: 0; }

/* utils */
.muted { color: var(--muted); } .strong { font-weight: 600; } .small { font-size: 13px; } .tiny { font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); font-size: .92em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; } .wrap { flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-end { display: flex; align-items: center; justify-content: flex-end; }
.jc-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.grow { flex: 1; min-width: 0; } .minw0 { min-width: 0; }
.w-full { width: 100%; }
.mb-4 { margin-bottom: 16px; } .mt-4 { margin-top: 16px; }
.stack-2 > * + * { margin-top: 8px; } .stack-3 > * + * { margin-top: 12px; } .stack-4 > * + * { margin-top: 16px; } .stack-5 > * + * { margin-top: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.text-accent { color: var(--accent); } .text-warning { color: var(--warning); font-weight: 600; }
.h2 { font-size: 18px; font-weight: 650; }
.prose { color: var(--ink-2); line-height: 1.65; max-width: 68ch; }

/* boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite var(--ease); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover:not(:disabled) { background: #232B3A; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #9B1D14; color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--sh-sm); }
.btn-outline:hover:not(:disabled) { background: var(--subtle); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #F1F1EE; color: var(--ink); }
.btn-ghost-inv { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-ghost-inv:hover { background: rgba(255,255,255,.16); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.raise { position: relative; z-index: 2; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; border: 1px solid transparent; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--subtle); color: var(--ink-2); border-color: var(--border); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 600; flex-shrink: 0; letter-spacing: .02em; }
.avatar-ink { background: var(--ink); color: #fff; }

/* progress */
.progress { height: 6px; border-radius: 99px; background: var(--subtle); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(18,24,38,.04); }
.progress > span { display: block; height: 100%; border-radius: inherit; transition: width .5s var(--ease); }
.progress-accent > span { background: var(--accent); } .progress-success > span { background: var(--success); }
.progress-ink > span { background: var(--ink); } .progress-danger > span { background: var(--danger); }
.mini-progress { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.mini-progress .progress { flex: 1; min-width: 60px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head-text { min-width: 0; flex: 1 1 220px; }
.card-title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 20px 20px; }
.card-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 20px 16px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); }
.card-note .icon { margin-top: 2px; }
.card-head-tabs { padding: 12px 16px; align-items: center; border-bottom: 1px solid var(--border); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12.5px; color: var(--danger); }
.field-narrow { max-width: 320px; }
.input { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.input:disabled { background: var(--subtle); color: var(--muted); }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input-num { max-width: 100%; }
.select-sm { width: auto; min-width: 150px; height: 34px; }
.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input, .opt-radio input { accent-color: var(--accent); width: 16px; height: 16px; }
.search { position: relative; display: flex; align-items: center; min-width: 0; flex: 1 1 220px; max-width: 320px; }
.search .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 32px; height: 34px; }
.range { width: 100%; accent-color: var(--accent); }
.file-btn { position: relative; overflow: hidden; align-self: flex-start; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hint-line { display: flex; gap: 8px; color: var(--muted); font-size: 12.5px; }
.hint-line .icon { margin-top: 2px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 550; font-size: 13px; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 34px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; }
.switch-track span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track span { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--ring); }

/* segmented & tabs */
.seg { display: inline-flex; padding: 3px; background: var(--subtle); border: 1px solid var(--border); border-radius: 9px; gap: 2px; }
.seg-full { display: flex; } .seg-full .seg-btn { flex: 1; justify-content: center; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm), 0 0 0 1px var(--border); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); background: var(--hover); }
.tab.is-active { background: var(--subtle); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.tab-count { font-size: 11.5px; padding: 0 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-variant-numeric: tabular-nums; }

/* menus / popovers */
.menu-wrap { position: relative; display: inline-flex; }
.menu, .popover { position: absolute; top: calc(100% + 6px); z-index: 40; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--sh-lg); padding: 5px; animation: pop .14s var(--ease); transform-origin: top right; }
.menu-end { right: 0; } .menu-start { left: 0; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--hover); color: var(--ink); outline: none; }
.menu-item:disabled { color: var(--faint); cursor: default; }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger:hover { background: var(--danger-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.popover { width: 290px; padding: 12px; }
.presenter-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; cursor: pointer; }
.presenter-btn:hover { color: var(--ink); border-color: var(--faint); }
.presenter-pop .presenter-title { display: flex; align-items: center; justify-content: space-between; font-weight: 650; font-size: 13.5px; }
.presenter-desc { color: var(--muted); font-size: 12.5px; margin: 6px 0 8px; }
.presenter-pop .menu-item { border: 1px solid var(--border); margin-top: 6px; }

/* toasts */
.toaster { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px 12px 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-lg); animation: toast-in .28s var(--ease); }
.toast.is-leaving { animation: toast-out .24s var(--ease) forwards; }
.toast-icon { margin-top: 1px; color: var(--muted); }
.toast-success .toast-icon { color: var(--success); } .toast-error .toast-icon { color: var(--danger); } .toast-warning .toast-icon { color: var(--warning); }
.toast-title { font-weight: 600; font-size: 13.5px; }
.toast-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.toast-x { border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 5px; }
.toast-x:hover { color: var(--ink); }

/* dialogs */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(18,24,38,.42); display: grid; place-items: center; padding: 16px; animation: fade .16s ease; overflow-y: auto; }
.overlay.is-leaving { animation: fade-out .16s ease forwards; }
.dialog { width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--sh-lg); animation: dialog-in .2s var(--ease); overflow: hidden; }
.overlay.is-leaving .dialog { animation: dialog-out .16s ease forwards; }
.dialog-sm { width: min(420px, 100%); } .dialog-lg { width: min(680px, 100%); } .dialog-xl { width: min(980px, 100%); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 18px 6px 20px; }
.dialog-title { font-size: 16px; font-weight: 650; }
.dialog-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dialog-body { padding: 10px 20px 18px; overflow-y: auto; }
.dialog-text { color: var(--ink-2); line-height: 1.6; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: #FBFBFA; flex-wrap: wrap; }
.problem-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.problem-list li { display: flex; gap: 9px; color: var(--ink-2); line-height: 1.5; }
.problem-list .icon { color: var(--warning); margin-top: 3px; }

/* empty / callouts / notes */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; gap: 6px; }
.empty-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--subtle); color: var(--muted); border: 1px solid var(--border); margin-bottom: 6px; }
.empty-title { font-weight: 650; font-size: 15px; }
.empty-desc { color: var(--muted); max-width: 42ch; font-size: 13.5px; }
.empty .btn { margin-top: 10px; }
.empty-page { min-height: 50vh; justify-content: center; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.callout .icon { margin-top: 2px; }
.callout a { text-decoration: underline; text-underline-offset: 2px; }
.callout-warning { background: var(--warning-soft); border-color: #F3DDB4; color: #6B3F05; }
.callout-danger { background: var(--danger-soft); border-color: #F6CFCB; color: #8A1A12; }
.callout-info { background: var(--info-soft); border-color: #D3DFEE; color: #22446B; }
.note { display: flex; gap: 9px; padding: 12px 14px; border-radius: 12px; background: var(--subtle); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.note .icon { margin-top: 2px; color: var(--accent); }

/* demo bar */
.demobar { position: sticky; top: 0; z-index: 50; background: #FBFBFA; border-bottom: 1px solid var(--border); }
.demobar-in { max-width: 1440px; margin: 0 auto; height: 42px; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--warning); background: var(--warning-soft); border: 1px solid #F3DDB4; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.demo-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.demo-badge .sep { opacity: .5; }
.demobar-right { margin-left: auto; display: flex; gap: 4px; }
.demobar-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 550; cursor: pointer; }
.demobar-btn:hover { background: var(--hover); color: var(--ink); }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.015em; }
.brand-sub { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); padding: 0 6px; border-radius: 5px; }
.brand-link:hover { color: inherit; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.login .demo-badge .db-extra { display: inline; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; position: relative; }
.login-card { width: 100%; max-width: 400px; animation: rise .4s var(--ease); }
.login-title { font-size: 26px; font-weight: 700; margin-top: 36px; letter-spacing: -.02em; }
.login-sub { color: var(--muted); margin-top: 4px; }
.login-demo { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.demo-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; box-shadow: var(--sh-sm); transition: border-color .15s, box-shadow .2s, transform .15s; }
.demo-choice:hover { border-color: var(--ink); box-shadow: var(--sh-md); transform: translateY(-1px); }
.demo-choice-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.demo-choice-text strong { font-size: 15px; font-weight: 650; }
.demo-choice-text span { color: var(--muted); font-size: 13px; }
.demo-choice-arrow { color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.demo-choice:hover .demo-choice-arrow { transform: translateX(3px); color: var(--ink); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 24px 0 16px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-badge { position: absolute; top: 16px; right: 16px; }
.login-aside { background: #EEEDE8; border-left: 1px solid var(--border); display: flex; align-items: center; justify-content: center; padding: 48px; overflow: hidden; }
.login-aside-in { width: 100%; max-width: 560px; }
.la-cert { box-shadow: 0 30px 60px -20px rgba(18,24,38,.35); border-radius: 4px; transform: rotate(-1.2deg); animation: rise .6s var(--ease) .05s both; }
.la-points { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 18px; }
.la-points li { display: flex; gap: 14px; }
.la-points div { display: flex; flex-direction: column; }
.la-points strong { font-weight: 650; }
.la-points span { color: var(--muted); font-size: 13.5px; }
.la-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: grid !important; place-items: center; color: var(--accent) !important; flex-shrink: 0; }

/* trainee shell */
.t-header { position: sticky; top: 42px; z-index: 30; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.t-header-in { max-width: 1200px; margin: 0 auto; height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.t-nav { display: flex; gap: 4px; flex: 1; }
.t-nav-link { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 550; }
.t-nav-link:hover { background: var(--hover); color: var(--ink); }
.t-nav-link.is-active { color: var(--ink); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--border); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 0; border-radius: 99px; background: transparent; cursor: pointer; }
.user-btn:hover { background: var(--hover); }
.user-name { font-weight: 550; font-size: 13.5px; }
.t-main, .a-main { animation: page-in .3s var(--ease); }

/* admin shell */
.a-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 42px); }
.a-side { position: sticky; top: 42px; height: calc(100vh - 42px); display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; border-right: 1px solid var(--border); background: #FBFBFA; }
.a-side > .brand-link { padding: 0 8px; }
.a-nav { display: flex; flex-direction: column; gap: 2px; }
.a-nav-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 550; }
.a-nav-link:hover { background: var(--hover); color: var(--ink); }
.a-nav-link.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--border); }
.a-nav-link.is-active .icon { color: var(--accent); }
.a-side-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.a-side-user { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.a-side-user span { color: var(--muted); font-size: 12px; }

/* page */
.page { max-width: 1200px; margin: 0 auto; padding: 28px 32px 64px; }
.a-main .page { max-width: 1240px; }
.page-narrow { max-width: 780px; }
.page-wide { max-width: 1320px; }
.page-head { margin-bottom: 22px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-row > div:first-child { min-width: 0; flex: 1 1 320px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 550; margin-bottom: 14px; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.eyebrow-sm { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -.022em; line-height: 1.2; }
.page-desc { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* my courses */
.summary-row { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 22px; overflow: hidden; box-shadow: var(--sh-sm); }
.summary-item { flex: 1; padding: 14px 18px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.summary-item:last-child { border-right: 0; }
.summary-item span { font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.summary-link { flex-direction: column; position: relative; }
.summary-link .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.summary-link:hover { background: var(--subtle); color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.course-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-sm); transition: box-shadow .2s, transform .2s var(--ease), border-color .2s; }
.course-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--border-strong); }
.course-card-link { position: absolute; inset: 0; z-index: 1; }
.course-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card-title { font-size: 16.5px; font-weight: 650; letter-spacing: -.012em; }
.course-card-sum { color: var(--muted); font-size: 13.5px; }
.meta-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.meta-list li { display: inline-flex; align-items: center; gap: 5px; }
.course-card-foot { display: flex; align-items: flex-end; gap: 14px; margin-top: auto; padding-top: 12px; }
.course-card-foot .row-between { margin-bottom: 6px; }
.cover { position: relative; height: 112px; overflow: hidden; display: flex; align-items: flex-end; padding: 16px 18px; }
.cover-sm { height: 64px; }
.cover-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-lines path { stroke: currentColor; stroke-width: 22; opacity: .06; fill: none; }
.cover-icon { position: relative; width: 44px; height: 44px; border-radius: 11px; background: rgba(255,255,255,.75); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cover-slate { background: #E7ECF3; color: #2F4A6E; }
.cover-jade { background: #E4F0EA; color: #1F5E47; }
.cover-amber { background: #F5EDDF; color: #7A4A12; }

/* course page */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky-side { position: sticky; top: 120px; }
.a-main .sticky-side { top: 62px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 0; }
.facts > div { padding: 12px 14px; background: var(--subtle); border-radius: 10px; border: 1px solid var(--border); min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.facts-row { margin-top: 0; }
.facts-row > div { background: var(--surface); }
.steps { list-style: none; margin: 12px 0 0; padding: 0 8px 8px; }
.step { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; transition: background .15s; }
a.step:hover { background: var(--subtle); color: inherit; }
.step.is-locked { color: var(--muted); }
.step-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 12.5px; font-weight: 650; background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.step-ic.sm { width: 22px; height: 22px; font-size: 11px; border-width: 1.25px; }
.step-ic.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-ic.is-locked { background: var(--subtle); border-style: dashed; color: var(--faint); }
.step-ic.is-bad { background: var(--danger-soft); border-color: #F1B8B2; color: var(--danger); }
.step-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.step-title { font-weight: 600; }
.step-meta { font-size: 12.5px; color: var(--muted); }
.step-end { flex-shrink: 0; }
.progress-panel .pp-big { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.pp-big > span:first-child { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.checklist { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.checklist li > span { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.checklist li .icon { color: var(--faint); }
.checklist li.is-done .icon { color: var(--success); }
.checklist li.is-bad .icon, .checklist li.is-warn .icon { color: var(--warning); }
.callout-danger.callout { margin: 0; }

/* player */
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.player { position: relative; background: #0D121B; border-radius: 14px; overflow: hidden; box-shadow: var(--sh-md); }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0D121B; cursor: pointer; }
.player:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.player:fullscreen video { flex: 1; aspect-ratio: auto; max-height: calc(100vh - 70px); }
.player-big { position: absolute; left: 50%; top: calc(50% - 30px); transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(18,24,38,.82); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.25); transition: transform .2s var(--ease), background .2s; animation: fade .2s ease; }
.player-big:hover { transform: translate(-50%, -50%) scale(1.05); background: var(--ink); }
.player-big .icon { margin-left: 3px; }
.player-done { position: absolute; inset: 0 0 64px 0; background: rgba(13,18,27,.84); backdrop-filter: blur(3px); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; animation: fade .25s ease; }
.pd-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; animation: pop-in .35s var(--ease); }
.pd-title { font-size: 18px; font-weight: 650; }
.pd-sub { color: rgba(255,255,255,.72); font-size: 13.5px; margin-bottom: 8px; }
.player-bar { background: #121826; padding: 10px 12px 8px; }
.track { position: relative; height: 18px; cursor: pointer; display: flex; align-items: center; }
.track:focus-visible { outline: 2px solid #5FC79F; outline-offset: 2px; }
.track > span { position: absolute; left: 0; height: 6px; border-radius: 99px; top: 6px; }
.track-remaining { right: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 4px, rgba(255,255,255,.05) 4px 8px); }
.track-watched { background: rgba(95,199,159,.42); }
.track-played { background: #5FC79F; }
.track-head { width: 14px; height: 14px !important; top: 2px !important; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .15s; }
.track:hover .track-head { transform: scale(1.15); }
.controls { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #fff; }
.ctl { color: rgba(255,255,255,.85); }
.ctl:hover:not(:disabled) { background: rgba(255,255,255,.1); color: #fff; }
.ctl-time { font-size: 12.5px; color: rgba(255,255,255,.8); margin-left: 4px; }
.ctl-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255,255,255,.6); margin-right: 8px; }
.ctl-legend i { width: 14px; height: 6px; border-radius: 99px; display: inline-block; margin-left: 6px; }
.lg-watched { background: #5FC79F; }
.lg-remaining { background: repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 3px, rgba(255,255,255,.1) 3px 6px); }
.verify { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-sm); flex-wrap: wrap; }
.verify-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex-shrink: 0; position: relative; }
.verify.is-live .verify-dot { background: var(--accent); }
.verify.is-live .verify-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); animation: ping .9s var(--ease) both; }
.verify.is-done .verify-dot { background: var(--success); }
.verify-main { display: flex; flex-direction: column; font-size: 13px; flex: 1 1 220px; min-width: 0; }
.verify-main strong { font-weight: 600; font-size: 13.5px; }
.verify-credit { font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.lesson-list { padding: 8px; }
.lesson-list .pad { padding: 8px 8px 6px; }
.lesson { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 8px; font-size: 13.5px; }
a.lesson:hover { background: var(--subtle); color: inherit; }
.lesson.is-current { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.lesson.is-locked { color: var(--faint); }
.lesson-text { display: flex; flex-direction: column; min-width: 0; font-weight: 550; }
.lesson-text .muted { font-weight: 400; }

/* quiz */
.quiz-card { overflow: hidden; animation: rise .3s var(--ease); }
.quiz-top { padding: 16px 20px; border-bottom: 1px solid var(--border); background: #FBFBFA; display: flex; flex-direction: column; gap: 10px; }
.quiz-body { padding: 24px 20px; animation: slide-in .28s var(--ease); }
.quiz-q { font-size: 19px; font-weight: 650; line-height: 1.4; letter-spacing: -.012em; margin-bottom: 18px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; background: var(--surface); border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, opacity .2s; }
.option:hover:not(.is-locked) { border-color: var(--border-strong); background: #FCFCFB; }
.option.is-selected { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,24,38,.08); }
.option-key { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--subtle); border: 1px solid var(--border); flex-shrink: 0; color: var(--ink-2); }
.option.is-selected .option-key { background: var(--ink); color: #fff; border-color: var(--ink); }
.option-text { flex: 1; }
.option.is-locked { cursor: default; }
.option:disabled { opacity: .5; }
.option.is-correct { border-color: var(--success); background: var(--success-soft); box-shadow: none; animation: pop-in .3s var(--ease); }
.option.is-correct .option-key { background: var(--success); border-color: var(--success); }
.option.is-wrong { border-color: var(--danger); background: var(--danger-soft); box-shadow: none; animation: shake .35s var(--ease); }
.option.is-wrong .option-key { background: var(--danger); border-color: var(--danger); }
.option-verdict { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; flex-shrink: 0; }
.is-correct .option-verdict { color: var(--success); } .is-wrong .option-verdict { color: var(--danger); }
.quiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); background: #FBFBFA; flex-wrap: wrap; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.rules li .icon { color: var(--accent); margin-top: 2px; }
.rules div { display: flex; flex-direction: column; }
.rules span { color: var(--muted); font-size: 13px; }
.result-hero { display: flex; gap: 14px; align-items: center; }
.result-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; animation: pop-in .4s var(--ease); }
.is-pass .result-ic { background: var(--success-soft); color: var(--success); }
.is-fail .result-ic { background: var(--warning-soft); color: var(--warning); }
.score-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.score-num { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.score-bar { position: relative; height: 10px; border-radius: 99px; background: var(--subtle); box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 26px; }
.score-bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; animation: grow .8s var(--ease); transform-origin: left; }
.score-bar > span.is-pass { background: var(--success); } .score-bar > span.is-fail { background: var(--warning); }
.score-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }
.score-bar i b { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; font-style: normal; color: var(--ink-2); }
.answer-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.answer-dots span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.answer-dots .ok { background: var(--success-soft); color: var(--success); }
.answer-dots .bad { background: var(--danger-soft); color: var(--danger); }

/* certificates (pages) */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cert-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); transition: box-shadow .2s, transform .2s var(--ease); }
.cert-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.cert-thumb { display: block; padding: 18px; background: #EEEDE8; border-bottom: 1px solid var(--border); }
.cert-thumb .cert { box-shadow: 0 8px 20px -8px rgba(18,24,38,.3); }
.cert-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.cert-view { display: flex; flex-direction: column; gap: 18px; }
.cert-stage { background: #EEEDE8; border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(14px, 4vw, 44px); }
.cert-stage .cert { box-shadow: 0 30px 60px -24px rgba(18,24,38,.4); max-width: 1000px; margin: 0 auto; animation: rise .45s var(--ease); }
.cert-chip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-size: 13px; }
.cert-chip span { flex: 1; min-width: 0; }

/* admin: stats, chart, tables */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-sm); min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 550; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat-accent { background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)); border-color: #CFE5D9; }
.stat-accent .stat-value { color: var(--accent-600); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .axis-strong { fill: var(--ink); font-weight: 600; }
.chart .val { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
.chart rect { transition: opacity .15s; animation: bar-in .7s var(--ease) both; transform-box: fill-box; transform-origin: bottom; }
.chart rect:hover { opacity: .85; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bycourse { display: flex; flex-direction: column; gap: 7px; }
.table-wrap { overflow-x: auto; }
.table-wrap.bordered { border: 1px solid var(--border); border-radius: 10px; max-height: 340px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 550; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #FBFBFA; position: sticky; top: 0; z-index: 1; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-sm td { padding: 8px 12px; } .table-sm th { padding: 8px 12px; }
.table-plain th { background: transparent; padding-left: 0; } .table-plain td { padding-left: 0; }
.row-link { cursor: pointer; transition: background .12s; }
.row-link:hover { background: #FBFBFA; }
tr.is-muted td { color: var(--muted); }
tr.is-muted .avatar { opacity: .6; }
tr.is-voided td { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--faint); }
tr.is-voided td .badge { text-decoration: none; }
.td-end { text-align: right; width: 1%; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.course-cell { display: flex; gap: 10px; align-items: center; }
.course-dot { width: 30px; height: 30px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar-count { margin-left: auto; }
.seat { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 16px; box-shadow: var(--sh-sm); }
.seat-text { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.seat-num { font-size: 20px; color: var(--muted); }
.seat-num strong { color: var(--ink); font-weight: 700; }
.import-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.import-status.is-ready { color: var(--success); } .import-status.is-skip { color: var(--muted); } .import-status.is-error { color: var(--danger); }
.td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lesson-row { display: flex; align-items: center; gap: 10px; }
.lesson-row .mini-progress { min-width: 120px; }

/* audit */
.audit { list-style: none; margin: 0; padding: 4px 0; }
.audit-day { padding: 14px 18px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.audit-row { display: grid; grid-template-columns: 48px 100px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .badge { justify-self: start; }
.audit-time { color: var(--muted); font-size: 12.5px; }
.audit-text strong { font-weight: 600; }
.audit-text span { color: var(--ink-2); }
.audit-code { color: var(--faint); font-size: 11.5px; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.vlist { list-style: none; margin: 12px 0 0; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); animation: rise .25s var(--ease); }
.vrow.is-busy { background: #FBFBFA; }
.vrow-move { display: flex; flex-direction: column; }
.vrow-move .icon-btn { width: 24px; height: 22px; }
.vthumb { position: relative; width: 104px; aspect-ratio: 16/9; border-radius: 7px; overflow: hidden; background: var(--subtle); flex-shrink: 0; border: 1px solid var(--border); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb-dur { position: absolute; right: 4px; bottom: 4px; font-size: 10.5px; font-weight: 600; background: rgba(18,24,38,.8); color: #fff; padding: 0 4px; border-radius: 4px; }
.vrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vrow-actions { display: flex; align-items: center; gap: 2px; }
.upl { display: flex; align-items: center; gap: 10px; }
.upl .progress { flex: 1; max-width: 220px; }
.processing { display: inline-flex; align-items: center; gap: 7px; color: var(--info); font-weight: 550; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone span { display: flex; flex-direction: column; color: var(--ink); }
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tpl:hover { border-color: var(--border-strong); }
.tpl.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.tpl-prev { display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 8px rgba(18,24,38,.12); pointer-events: none; }
.tpl-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.readiness { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.readiness.is-ok { background: var(--success-soft); color: #0F5C38; }
.readiness.is-warn { background: var(--warning-soft); color: #6B3F05; }
.qbank-head { padding: 0 16px 8px; border-bottom: 1px solid var(--border); }
.qbank { list-style: none; margin: 0; padding: 4px 0; }
.qrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.qrow:last-child { border-bottom: 0; }
.qrow-n { width: 24px; color: var(--faint); font-size: 12.5px; padding-top: 2px; }
.qrow-main { flex: 1; min-width: 0; }
.qrow-text { font-weight: 550; margin-bottom: 2px; }
.qrow.is-retired .qrow-text { color: var(--muted); text-decoration: line-through; }
.qrow-actions { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.opt-edit { display: flex; gap: 8px; align-items: center; padding: 4px; border-radius: 10px; transition: background .15s; }
.opt-edit.is-correct { background: var(--success-soft); }
.opt-radio { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12px; color: var(--muted); cursor: pointer; padding-left: 4px; }

/* designer */
.designer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.canvas-wrap { background: #E9E8E3; border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(12px, 3vw, 32px); background-image: radial-gradient(rgba(18,24,38,.09) 1px, transparent 1px); background-size: 16px 16px; }
.canvas-wrap .cert { box-shadow: 0 20px 40px -20px rgba(18,24,38,.4); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--border-strong); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.unsaved { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--warning); }
.unsaved i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- certificate artwork ---------- */
.cert { position: relative; width: 100%; aspect-ratio: 297 / 210; overflow: hidden; container-type: inline-size; color: #1A2230; font-family: var(--font); user-select: none; -webkit-user-select: none; }
.cert-deco, .cert-deco i { position: absolute; display: block; }
.cert-deco { inset: 0; pointer-events: none; }
.cbox { position: absolute; display: flex; align-items: center; line-height: 1.18; }
.cbox-in { min-width: 0; max-width: 100%; }
.cb-name .cbox-in { white-space: nowrap; }
.cb-date .cbox-in, .cb-signature .cbox-in { width: 100%; display: block; }
.cb-rule { display: block; width: 100%; height: 1px; background: currentColor; opacity: .3; }
.cb-siglabel { font-size: .82em; opacity: .7; }
.cb-sigval { font-weight: 600; display: block; margin-bottom: .6em; }
.cb-script { font-family: var(--serif); font-style: italic; font-size: 1.55em; font-weight: 600; line-height: 1; }
.cb-org { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.cb-org svg { flex-shrink: 0; }
.cb-heading, .cb-serial { color: #4A5363; }
.cb-serial { letter-spacing: .04em; }
.cb-intro, .cb-body, .cb-duration { color: #4A5363; }
/* classic */
.cert-classic { background: #FBF8F0; background-image: radial-gradient(ellipse at 50% 40%, #FFFDF8 0%, #F7F2E5 100%); }
.cert-classic .cd-frame { inset: 3.4%; border: 1.5px solid #A68A4E; }
.cert-classic .cd-frame2 { inset: 4.6%; border: .5px solid #C9B587; }
.cert-classic .cd-seal { left: 45.25%; top: 75.5%; width: 9.5%; height: 13.44%; border: 1.4px solid #A68A4E; border-radius: 50%; }
.cert-classic .cd-seal::before { content: ''; position: absolute; inset: 9%; border: 1px dashed #BFA772; border-radius: 50%; }
.cert-classic .cd-seal b { position: absolute; left: 36%; top: 22%; width: 24%; height: 42%; border-right: 3px solid #A68A4E; border-bottom: 3px solid #A68A4E; transform: rotate(40deg); }
.cert-classic .cb-title, .cert-classic .cb-name, .cert-classic .cb-course { font-family: var(--serif); font-weight: 600; }
.cert-classic .cb-title { letter-spacing: .02em; color: #1A2230; }
.cert-classic .cb-name { color: #7D6430; font-style: italic; }
.cert-classic .cb-heading { color: #7D6430; }
/* modern */
.cert-modern { background: #fff; }
.cert-modern .cd-band { left: 0; top: 0; bottom: 0; width: 27%; background: #121826; }
.cert-modern .cd-band-mark { position: absolute; left: 18%; top: 11%; width: 24%; display: block; }
.cert-modern .cd-band-mark svg { width: 100%; height: auto; display: block; }
.cert-modern .cd-band-text { position: absolute; left: 18%; bottom: 10%; color: rgba(255,255,255,.62); font-size: 1.05cqw; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.cert-modern .cd-stripe { left: 27%; top: 0; bottom: 0; width: .7%; background: #2E9B76; }
.cert-modern .cb-title { font-weight: 700; letter-spacing: -.02em; }
.cert-modern .cb-name { font-family: var(--serif); font-weight: 600; color: #121826; }
.cert-modern .cb-course { font-weight: 650; color: #1F7A5C; letter-spacing: -.01em; }
.cert-modern .cb-heading { color: #1F7A5C; }
/* minimal */
.cert-minimal { background: #fff; }
.cert-minimal .cd-hair { inset: 4%; border: 1px solid #D9D7D0; }
.cert-minimal .cd-accent { left: 44%; right: 44%; top: 4%; height: .6%; background: #1F7A5C; }
.cert-minimal .cb-title { font-weight: 300; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.cert-minimal .cb-name { font-weight: 650; letter-spacing: -.02em; }
.cert-minimal .cb-course { font-weight: 550; color: #1F7A5C; }
/* editable */
.cbox.is-edit { cursor: move; touch-action: none; outline: 1px dashed rgba(31,122,92,.35); outline-offset: -1px; transition: outline-color .15s, background .15s; }
.cbox.is-edit:hover { outline-color: rgba(31,122,92,.8); background: rgba(31,122,92,.04); }
.cbox.is-selected { outline: 1.5px solid #1F7A5C; background: rgba(31,122,92,.06); z-index: 2; }
.cbox.is-edit:focus-visible { outline: 2px solid #1F7A5C; border-radius: 0; }
.cbox-tag { position: absolute; left: -1px; top: -18px; font: 600 10px/16px var(--font); letter-spacing: .02em; text-transform: none; font-style: normal; color: #fff; background: #1F7A5C; padding: 0 5px; border-radius: 3px 3px 0 0; opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .15s; }
.cbox.is-edit:hover .cbox-tag, .cbox.is-selected .cbox-tag { opacity: 1; }
.cbox-handle { position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: #fff; border: 1.5px solid #1F7A5C; border-radius: 2px; cursor: nwse-resize; opacity: 0; }
.cbox.is-selected .cbox-handle, .cbox.is-edit:hover .cbox-handle { opacity: 1; }

/* motion */
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(10px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes ping { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.6); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes bar-in { from { transform: scaleY(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* responsive */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 1000px) {
  .split, .player-layout, .editor, .designer, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .login { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .a-shell { grid-template-columns: minmax(0, 1fr); }
  .a-side { position: sticky; top: 42px; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
  .a-side::-webkit-scrollbar { display: none; }
  .a-side > .brand-link { display: none; }
  .a-nav { flex-direction: row; }
  .a-nav-link { white-space: nowrap; height: 32px; }
  .a-side-foot { display: none; }
  .a-main .sticky-side { top: auto; }
  .tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .page { padding: 18px 16px 48px; }
  .page-title { font-size: 22px; }
  .hide-sm { display: none !important; }
  .demobar-in { padding: 0 10px; gap: 8px; }
  .demo-badge { padding: 2px 7px; font-size: 11px; }
  .db-extra { display: none; }
  .show-sm { display: inline !important; }
  .seg-btn .icon { display: none; }
  .seg-btn { padding: 0 8px; }
  .t-header-in { padding: 0 16px; gap: 10px; height: 56px; }
  .t-header .brand-name { display: none; }
  .t-nav-link { padding: 0 9px; font-size: 13px; }
  .t-nav-link .icon { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .stat { padding: 14px; }
  .stat-value { font-size: 24px; }
  .course-grid, .cert-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-row { flex-wrap: wrap; }
  .summary-item { flex: 1 1 50%; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .summary-item:nth-child(2n) { border-right: 0; }
  .grid-2, .grid-3, .td-grid { grid-template-columns: minmax(0, 1fr); }
  .tpl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .seat { grid-template-columns: 1fr; gap: 8px; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar .select-sm { flex: 1; min-width: 0; }
  .toolbar-count { display: none; }
  .audit-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 4px; }
  .audit-row .badge { grid-column: 2; grid-row: 1; }
  .audit-text { grid-column: 2; }
  .quiz-q { font-size: 17px; }
  .vrow { flex-wrap: wrap; }
  .vthumb { width: 84px; }
  .vrow-actions { width: 100%; justify-content: flex-end; }
  .step { gap: 10px; padding: 10px 6px; }
  .step-end .badge, .step-end .btn { font-size: 11.5px; }
  .ctl-time { font-size: 12px; }
  .toaster { right: 16px; left: 16px; width: auto; }
  .dialog-foot .btn { flex: 1 1 auto; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .player { border-radius: 10px; }
}

.brand-name { white-space: nowrap; }
.a-side .brand-name { font-size: 14px; }
.a-side .brand { gap: 8px; }
/* PDF-safe signature rules and seal sizing (html2canvas) */
.cb-rule { display: none; }
.cb-siglabel { display: block; width: 100%; border-top: 1px solid rgba(26,34,48,.28); padding-top: .45em; }
