/* MySeminar — tema korporat hitam · kuning · putih */
:root {
  --black: #0B0B0B;
  --surface: #161616;
  --surface-2: #1F1F1F;
  --line: #2A2A2A;
  --line-2: #3A3A3A;
  --white: #FFFFFF;
  --muted: #A3A3A3;
  --soft: #D4D4D4;
  --yellow: #F5C400;
  --yellow-hi: #FFE066;
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Archivo', 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--black); color: var(--white); font-family: var(--font); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--yellow); }
a:hover { color: var(--yellow-hi); }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
img, video, iframe { max-width: 100%; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Topbar ── */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand:hover { color: var(--white); }
.brand-mark { width: 36px; height: 36px; background: var(--yellow); color: var(--black); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 18px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 0.04em; }
.brand-name span { color: var(--yellow); }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; }
.mainnav a { padding: 10px 16px; color: var(--white); text-decoration: none; font-weight: 500; }
.mainnav a:hover { background: var(--surface-2); color: var(--white); }
.mainnav a.active { background: var(--yellow); color: var(--black); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; }
.userbox-text { display: flex; flex-direction: column; line-height: 1.2; }
.userbox-text small { color: var(--muted); font-size: 13px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--black); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }

/* ── Layout ── */
main { flex: 1; }
.container { max-width: 1376px; margin: 0 auto; padding: 32px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 620px; min-width: 0; }
.col-side { flex: 1 1 320px; min-width: 0; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); font-weight: 600; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.sitefoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 20px 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sitefoot span:first-child { color: var(--soft); font-weight: 500; }
.sitefoot-compact { padding: 8px 24px; font-size: 12px; }

/* ── Kad ── */
.card { background: var(--surface); border: 1px solid var(--line); }
.card-pad { padding: 24px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-yellow { background: var(--yellow); color: var(--black); border: none; }
.card-yellow a { color: var(--black); }
.card-white { background: var(--white); color: var(--black); border: none; }
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { flex: 1 1 220px; background: var(--surface); border: 1px solid var(--line); padding: 20px 22px; }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-value { font-family: var(--display); font-size: 38px; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.stat-note { color: var(--yellow); font-size: 13px; margin-top: 4px; }
.section-num { color: var(--yellow); margin-right: 6px; }

/* ── Butang ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--surface-2); color: var(--white); border-color: var(--line-2); }
.btn:hover { color: var(--white); border-color: var(--muted); }
.btn-primary { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.btn-primary:hover { background: var(--yellow-hi); color: var(--black); border-color: var(--yellow-hi); }
.btn-light { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-light:hover { color: var(--black); background: #eaeaea; }
.btn-dark { background: var(--black); color: var(--yellow); border-color: var(--black); }
.btn-dark:hover { color: var(--yellow-hi); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-2); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; padding: 0; color: var(--yellow); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-link.white { color: var(--white); }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Borang ── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 500; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field-row > .field { flex: 1 1 200px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; background: var(--black); border: 1px solid var(--line-2); color: var(--white); font: inherit; border-radius: 0; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--yellow); outline: none; }
.card-yellow .input, .card-white .input { background: var(--white); color: var(--black); border: 2px solid var(--black); }
.hint { font-size: 13px; color: var(--muted); }
.card-yellow .hint, .card-white .hint { color: #333; }
.form-grid { display: flex; flex-direction: column; gap: 18px; }

/* Kad pilihan (radio) */
.choices { display: flex; flex-wrap: wrap; gap: 16px; }
.choice { flex: 1 1 260px; position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; flex-direction: column; gap: 6px; min-height: 130px; padding: 20px; border: 2px solid var(--line-2); background: var(--black); }
.choice strong { font-family: var(--display); font-size: 18px; }
.choice small { opacity: 0.85; font-size: 14px; }
.choice input:checked + span { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.choice input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 2px; }

/* Togol (checkbox) */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; background: var(--black); border: 1px solid var(--line); cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text small { color: var(--muted); font-size: 13px; }
.toggle input { appearance: none; -webkit-appearance: none; flex: 0 0 52px; width: 52px; height: 30px; background: var(--line-2); position: relative; cursor: pointer; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); transition: left .15s; }
.toggle input:checked { background: var(--yellow); }
.toggle input:checked::after { left: 25px; background: var(--black); }

/* ── Jadual ── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th { text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 12px; }
.table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table .right { text-align: right; }
.table .sub { display: block; font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }
.empty { padding: 32px 22px; color: var(--muted); text-align: center; }

/* ── Lencana ── */
.badge { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; letter-spacing: 0.02em; }
.badge-live { background: var(--yellow); color: var(--black); }
.badge-outline { border: 1px solid var(--white); color: var(--white); padding: 3px 9px; }
.badge-white { background: var(--white); color: var(--black); }
.badge-dim { background: var(--line); color: var(--muted); }
.status { font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-on { color: var(--yellow); }
.status-off { color: var(--muted); }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 14px; background: none; border: none; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font: inherit; cursor: pointer; white-space: nowrap; }
.tabs .active { color: var(--white); font-weight: 700; border-bottom-color: var(--yellow); }

/* ── Mesej ── */
.flash { padding: 14px 0; font-weight: 600; }
.flash .container { padding-top: 0; padding-bottom: 0; }
.flash-ok { background: var(--yellow); color: var(--black); }
.flash-err { background: var(--white); color: var(--black); }
.alert { border: 2px solid var(--white); padding: 14px 16px; }
.alert-ok { border-color: var(--yellow); }

/* ── Hero lobi ── */
.hero { background: var(--yellow); color: var(--black); }
.hero .container { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 14px 0 8px; }
.pill-dark { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--black); color: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-meta strong { display: block; font-family: var(--display); font-size: 20px; }

.room-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.room-card { flex: 1 1 340px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.room-visual { height: 160px; background: var(--surface-2); position: relative; display: flex; align-items: center; justify-content: center; }
.room-letter { font-family: var(--display); font-size: 96px; font-weight: 800; color: #2E2E2E; }
.room-visual .badge { position: absolute; left: 14px; top: 14px; }
.room-count { position: absolute; right: 14px; top: 14px; background: var(--black); padding: 4px 10px; font-size: 13px; font-weight: 600; }
.room-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.room-body .btn { margin-top: auto; }

/* ── Token ── */
.token-page { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.token-input { min-height: 72px; text-align: center; font-family: var(--mono); font-size: clamp(22px, 4vw, 32px); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; border-width: 2px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps b { flex: 0 0 32px; height: 32px; background: var(--yellow); color: var(--black); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; }
.steps span { padding-top: 5px; }
.verified { background: var(--yellow); color: var(--black); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.verified dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; font-size: 14px; }
.verified dd { margin: 0; font-weight: 700; }

/* ── Bilik ── */
body.room-body-page { height: 100vh; }
.roombar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--line); }
.roombar-title { display: flex; align-items: center; gap: 14px; }
.roombar-title small { display: block; color: var(--muted); font-size: 13px; }
.jitsi-wrap { flex: 1; min-height: 520px; display: flex; }
#jitsi { flex: 1; min-height: 520px; background: var(--surface-2); }
.player { background: var(--surface); border: 1px solid var(--line); }
.player-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-frame > video, .player-frame > iframe, .player-frame > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: 14px; }
.qa { display: flex; flex-direction: column; }
.qa-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.stamp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--yellow); color: var(--yellow); font-size: 13px; font-weight: 600; }
.qa-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; max-height: 70vh; overflow-y: auto; }
.q-item { padding: 14px; background: var(--black); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.q-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.q-answer { margin-top: 4px; padding: 12px; background: var(--surface-2); font-size: 14px; }
.q-answer b { display: block; font-size: 13px; color: var(--yellow); margin-bottom: 4px; }

/* Konsol soalan admin */
.q-row { display: block; width: 100%; text-align: left; padding: 16px 18px; border: none; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: transparent; color: var(--white); text-decoration: none; }
.q-row:hover { background: var(--surface-2); color: var(--white); }
.q-row.active { border-left-color: var(--yellow); background: #232323; }
.q-row .q-meta { margin-bottom: 6px; }

/* ── Pemasang / log masuk ── */
.auth { max-width: 460px; margin: 60px auto; padding: 0 16px; width: 100%; }

@media (max-width: 720px) {
  .topbar, .roombar { padding: 12px 16px; }
  .container { padding: 20px 16px; }
  .userbox-text { display: none; }
  .verified dl { grid-template-columns: 1fr; }
}
