/* ==========================================================
   SPMB Al Falah — design system
   Palet: hijau tua (brand) + aksen emas, netral hangat
   ========================================================== */
:root {
    --brand: #0e6a51;
    --brand-600: #0a5742;
    --brand-700: #08402f;
    --brand-900: #06281f;
    --brand-soft: #e8f3ee;
    --gold: #c1913a;
    --gold-soft: #fbf3e3;
    --ink: #132620;
    --body: #43554e;
    --muted: #6f8079;
    --line: #e1e8e4;
    --line-soft: #eef3f0;
    --bg: #f4f7f5;
    --card: #ffffff;
    --red: #b3261e;
    --red-soft: #fbeceb;
    --amber: #96650f;
    --amber-soft: #fdf4e0;
    --blue: #1d5b7a;
    --blue-soft: #e8f1f7;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(12, 34, 27, .05);
    --shadow-md: 0 6px 20px -8px rgba(12, 34, 27, .18);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.warn-text { color: var(--red); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout dasar: halaman tengah ---------- */
.page-center {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    background:
        radial-gradient(900px 500px at 12% -10%, #e7f2ed 0%, rgba(231, 242, 237, 0) 60%),
        radial-gradient(700px 400px at 100% 0%, #fbf3e3 0%, rgba(251, 243, 227, 0) 55%),
        var(--bg);
}
.box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 28px;
    width: 100%;
    max-width: 430px;
}
.box-lg { max-width: 720px; }
.box-xl { max-width: 940px; }

/* ---------- tombol ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%);
    color: #fff;
    border: 1px solid var(--brand-600);
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.35;
    transition: filter .15s ease, box-shadow .15s ease;
    box-shadow: var(--shadow-sm);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
.btn:active { filter: brightness(.96); }
.btn:disabled {
    background: linear-gradient(180deg, #a9c6b9 0%, #9bbcaf 100%);
    border-color: #93b3a7;
    color: #fff;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}
.btn-sec { background: #fff; color: var(--brand-700); border-color: #cfdad4; }
.btn-sec:hover { background: var(--brand-soft); color: var(--brand-700); }
.btn-danger { background: var(--red); border-color: #961d17; }
.btn-danger:hover { background: #961d17; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }

/* ---------- form ---------- */
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=email], input[type=file], select, textarea {
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d3ddd7;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    line-height: 1.45;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(14, 106, 81, .13);
}
input[type=file] { padding: 7px 10px; background: #fafcfb; }
textarea { min-height: 84px; resize: vertical; }
label { display: block; margin: 0 0 5px; font-size: 12.5px; font-weight: 600; color: #3d4f48; }
.field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.check input { margin: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .col { flex: 1 1 220px; min-width: 0; }
.form-actions { margin-top: 16px; display: flex; gap: 9px; flex-wrap: wrap; }
.form-hint { margin: 9px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.logo-upload { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed #cfdad4; border-radius: 12px; background: #fafcfb; }
.logo-upload img { height: 64px; width: auto; max-width: 130px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
.logo-empty { display: inline-flex; align-items: center; justify-content: center; height: 64px; width: 100px; border-radius: 10px; background: #f2f6f4; color: var(--muted); font-size: 11.5px; text-align: center; border: 1px solid var(--line); flex-shrink: 0; }
.logo-pick { flex: 1; min-width: 0; }
.logo-pick input[type=file] { margin-bottom: 6px; }

/* ---------- alert ---------- */
.alert { padding: 11px 14px; border-radius: 11px; margin-bottom: 14px; font-size: 13px; border: 1px solid transparent; }
.alert-ok { background: #e7f5ec; border-color: #b6ddc3; color: #1c5533; }
.alert-err { background: var(--red-soft); border-color: #efc0bc; color: #8a1a15; }
.alert-warn { background: var(--amber-soft); border-color: #eed9a8; color: #6d4a09; }
.alert-info { background: var(--blue-soft); border-color: #b9d5e5; color: #174a63; }

.list-plain { margin: 0 0 14px; padding-left: 18px; }
.list-plain li { margin-bottom: 5px; }

/* ---------- tabel ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; text-align: left; font-size: 13.2px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
th {
    background: #f5f8f6;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5b6d65;
    border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f9fbfa; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-wrap table { border: 0; }
.table-wrap th, .table-wrap td { border-left: 0; border-right: 0; }
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 16px; }
.table-wrap th:last-child, .table-wrap td:last-child { padding-right: 16px; }

/* ---------- badge / tag ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid #d3ddd7;
    background: #f3f6f4;
    color: #4a5c55;
    white-space: nowrap;
}
.tag-ok { background: #e7f5ec; border-color: #b6ddc3; color: #1c5533; }
.tag-run { background: var(--blue-soft); border-color: #b9d5e5; color: #174a63; }
.tag-off { background: #f2f5f3; color: #5f716a; }
.tag-bad { background: var(--red-soft); border-color: #efc0bc; color: #8a1a15; }

/* ==========================================================
   HELAIAN LOGIN (panel panitia)
   ========================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background:
        radial-gradient(1000px 600px at 0% 0%, #0b4437 0%, #06281f 55%, #041d16 100%);
}
.login-card {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .65);
}
.login-hero {
    position: relative;
    padding: 42px 40px;
    color: #eaf4ef;
    background:
        radial-gradient(420px 320px at 100% 0%, rgba(193, 145, 58, .28) 0%, rgba(193, 145, 58, 0) 60%),
        linear-gradient(160deg, #0d5a45 0%, #083b2c 55%, #062b21 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
}
.login-hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -90px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 34px rgba(255, 255, 255, .04), 0 0 0 68px rgba(255, 255, 255, .03);
}
.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e6c07a, #b8862f);
    color: #3a2606;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .02em;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
}
.login-hero h1 { color: #fff; font-size: 26px; line-height: 1.25; margin: 18px 0 8px; }
.login-hero .lead { color: rgba(234, 244, 239, .78); font-size: 13.5px; margin: 0; }
.login-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.login-hero li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(234, 244, 239, .86); }
.login-hero li svg { flex-shrink: 0; margin-top: 2px; color: #e6c07a; }
.login-form { padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.login-form h2 { font-size: 22px; margin: 6px 0 4px; }
.login-form .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.login-form .btn { padding: 11px 16px; font-size: 14px; margin-top: 6px; }
.login-foot { margin: 22px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.login-foot a { font-weight: 600; }

/* ==========================================================
   PANEL ADMIN
   ========================================================== */
.admin-wrap { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
    width: 254px;
    flex: 0 0 254px;
    background: linear-gradient(180deg, #0a4a39 0%, #073527 60%, #052a1f 100%);
    color: #d9e8e1;
    padding: 18px 14px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar .brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 12px; }
.sidebar .brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
.sidebar .brand strong { display: block; color: #fff; font-size: 14px; line-height: 1.3; }
.sidebar .brand span { display: block; font-size: 11px; color: rgba(217, 232, 225, .62); line-height: 1.35; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(226, 238, 232, .82);
    padding: 8px 11px;
    font-size: 13.2px;
    border-radius: 9px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.sidebar a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .72; }
.sidebar a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.sidebar a:hover svg { opacity: 1; }
.sidebar a.active {
    background: rgba(255, 255, 255, .13);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar a.active svg { opacity: 1; color: #e6c07a; }
.sidebar .sep {
    padding: 16px 11px 5px;
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(217, 232, 225, .45);
    font-weight: 700;
}
.sidebar .nav-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }

.main { flex: 1 1 auto; min-width: 0; padding: 0 28px 40px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -28px 20px;
    padding: 16px 28px;
    background: rgba(244, 247, 245, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 19px; margin: 0; }
.topbar .sub { font-size: 12.5px; color: var(--muted); margin: 1px 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-actions .link-plain { font-size: 13px; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 5px; box-shadow: var(--shadow-sm); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.user-chip .nm { font-size: 12.8px; font-weight: 600; line-height: 1.2; }
.user-chip .rl { font-size: 11px; color: var(--muted); line-height: 1.2; text-transform: capitalize; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--body); cursor: pointer; box-shadow: var(--shadow-sm); }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-700); text-decoration: none; }
.nav-toggle { display: none; }

/* ---------- kartu statistik ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.card .ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 11px; }
.card .num { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.card .lbl { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card.c-blue .ico { background: var(--blue-soft); color: var(--blue); }
.card.c-blue .num { color: var(--blue); }
.card.c-amber .ico { background: var(--amber-soft); color: var(--amber); }
.card.c-amber .num { color: var(--amber); }
.card.c-gold .ico { background: var(--gold-soft); color: #8a6417; }
.card.c-gold .num { color: #8a6417; }
.card.c-red .ico { background: var(--red-soft); color: var(--red); }
.card.c-red .num { color: var(--red); }

/* ---------- panel ---------- */
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.panel > h2 { font-size: 15px; border-bottom: 1px solid var(--line-soft); padding-bottom: 11px; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); padding-bottom: 11px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; border: 0; padding: 0; }
.panel-head .hint { font-size: 12px; color: var(--muted); }
.panel.panel-flush { padding: 0; overflow: hidden; }
.panel.panel-flush > h2, .panel.panel-flush > .panel-head { padding: 16px 20px 13px; margin-bottom: 0; }
.panel.panel-flush .table-wrap { border: 0; border-radius: 0; }

/* ---------- toolbar / filter ---------- */
.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.toolbar .field { margin-bottom: 0; }
.toolbar select, .toolbar input { min-width: 190px; }
.toolbar .spacer { flex: 1 1 auto; }

/* ---------- bar chart ---------- */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-row .bar-label { width: 152px; font-size: 12.8px; color: var(--body); flex-shrink: 0; }
.bar-row .bar-track { flex: 1; background: #edf2ef; height: 10px; border-radius: 999px; overflow: hidden; }
.bar-row .bar-fill { background: linear-gradient(90deg, var(--brand) 0%, #34a17f 100%); height: 100%; border-radius: 999px; min-width: 2px; }
.bar-row .bar-val { width: 54px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--body); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 26px 16px; color: var(--muted); font-size: 13px; }

/* ==========================================================
   HALAMAN PESERTA
   ========================================================== */
.peserta-page {
    min-height: 100vh;
    padding: 34px 18px 56px;
    background:
        radial-gradient(800px 420px at 50% -10%, #e7f2ed 0%, rgba(231, 242, 237, 0) 65%),
        var(--bg);
}
.peserta-head { max-width: 640px; margin: 0 auto 22px; display: flex; gap: 14px; align-items: center; justify-content: center; }
.peserta-head .brand-mark { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%); color: #fff; width: 50px; height: 50px; border-radius: 15px; font-size: 15px; }
.peserta-logo { height: 54px; width: auto; max-width: 160px; object-fit: contain; flex-shrink: 0; }
.login-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55); }
.login-logo img { height: 40px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.sidebar .brand img { height: 36px; width: auto; max-width: 74px; object-fit: contain; background: #fff; border-radius: 9px; padding: 4px 5px; flex-shrink: 0; }
.peserta-head h1 { font-size: 20px; margin: 0; }
.peserta-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.peserta-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md); padding: 28px; }
.peserta-card .card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.peserta-card .card-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.peserta-foot { max-width: 640px; margin: 18px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.form-links { display: grid; gap: 10px; }
.form-link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    text-decoration: none; color: var(--ink);
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.form-link:hover { border-color: #b9d3c7; background: #f7fbf9; text-decoration: none; transform: translateY(-1px); }
.fl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fl-label { font-weight: 700; font-size: 13.8px; }
.fl-desc { font-size: 12.3px; color: var(--muted); }
.fl-cta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--brand); white-space: nowrap; flex-shrink: 0; }
.done-head { text-align: center; margin-bottom: 20px; }
.done-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #e7f5ec; color: #1c7a4b; border: 1px solid #b6ddc3; margin-bottom: 10px; }
.done-head h2 { font-size: 20px; margin: 0 0 4px; }
.done-head p { margin: 0; }

/* ==========================================================
   HALAMAN UJIAN (peserta mengerjakan)
   ========================================================== */
.exam-header {
    background: linear-gradient(160deg, #0d5a45 0%, #073527 100%);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 4px 18px -12px rgba(0, 0, 0, .6);
}
.exam-header .ident strong { display: block; font-size: 14px; }
.exam-header .ident span { font-size: 12px; color: rgba(234, 244, 239, .7); }
.exam-header .small { color: rgba(234, 244, 239, .72); }
.eh-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.eh-logo { height: 40px; width: auto; max-width: 110px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px 6px; flex-shrink: 0; }
.timer-box { text-align: right; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 5px 16px; min-width: 154px; }
.timer { font-size: 23px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.timer.warning { color: #ffd166; }
.timer.danger { color: #ff9b9b; }
.exam-body { display: flex; gap: 16px; padding: 18px; align-items: flex-start; max-width: 1180px; margin: 0 auto; }
.exam-main { flex: 1; min-width: 0; }
.exam-side { width: 268px; flex-shrink: 0; position: sticky; top: 82px; }
.qbox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.qhead { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.qtext { font-size: 15px; margin-bottom: 16px; white-space: pre-wrap; line-height: 1.65; }
.qhead .qnum { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.qmeta { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.qimg { max-width: 100%; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; }
.opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #dbe3de;
    border-radius: 11px;
    padding: 11px 13px;
    margin-bottom: 9px;
    cursor: pointer;
    background: #fff;
    transition: border-color .12s ease, background .12s ease;
}
.opt:hover { background: #f6faf8; border-color: #bcd3c7; }
.opt.selected { border-color: var(--brand); background: var(--brand-soft); }
.opt input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; }
.opt .lbl { font-weight: 700; color: var(--brand-700); flex-shrink: 0; }
.bs-table td, .bs-table th { font-size: 13px; }
.match-row { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; }
.match-row .kiri { flex: 1; border: 1px solid var(--line); padding: 9px 12px; border-radius: 10px; background: #fbfdfc; }
.match-row select { width: 230px; }
.qnav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.qnav button {
    font-family: inherit;
    border: 1px solid #d3ddd7;
    background: #fff;
    padding: 8px 0;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--body);
}
.qnav button:hover { border-color: var(--brand); color: var(--brand-700); }
.qnav button.answered { background: var(--brand); border-color: var(--brand); color: #fff; }
.qnav button.current { outline: 2px solid var(--gold); outline-offset: 1px; }
.qnav button.ragu { background: #ffd166; border-color: #e0a800; color: #4a3400; }
.legend { font-size: 12px; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid #c3ccd3; }
.legend i.a { background: var(--brand); border-color: var(--brand); }
.legend i.r { background: #ffd166; border-color: #e0a800; }
.exam-foot { display: flex; justify-content: space-between; margin-top: 16px; gap: 8px; }
.section-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.section-tabs button {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border: 1px solid #d3ddd7;
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    color: var(--body);
}
.section-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- overlay peringatan ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 40, 31, .96);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.overlay .inner { max-width: 440px; text-align: center; }
.overlay h2 { color: #fff; }

/* ---------- cetak ---------- */
.print-only { display: none; }
@media print {
    body { background: #fff; }
    .no-print, .sidebar, .topbar { display: none !important; }
    .main { padding: 0; }
    .panel { border: 0; padding: 0; box-shadow: none; }
    .print-only { display: block; }
    table { font-size: 11px; }
    th, td { padding: 5px 7px; }
}

/* ---------- responsif ---------- */
@media (max-width: 900px) {
    .login-card { grid-template-columns: 1fr; max-width: 460px; }
    .login-hero { padding: 30px 26px; gap: 16px; }
    .login-hero h1 { font-size: 21px; margin-top: 12px; }
    .login-hero ul { display: none; }
    .login-form { padding: 28px 26px 32px; }

    .admin-wrap { flex-direction: column; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 264px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 60;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .nav-backdrop { position: fixed; inset: 0; background: rgba(6, 40, 31, .5); z-index: 55; display: none; }
    body.nav-open .nav-backdrop { display: block; }
    .nav-toggle { display: inline-flex; }
    .main { padding: 0 16px 32px; }
    .topbar { margin: 0 -16px 16px; padding: 12px 16px; }
    .topbar h1 { font-size: 17px; }
    .topbar .sub { display: none; }
    .topbar-actions .link-plain span { display: none; }
    .card .num { font-size: 24px; }
    .bar-row .bar-label { width: 120px; font-size: 12px; }
    .eh-logo { height: 32px; max-width: 74px; }
    .timer-box { min-width: 0; padding: 4px 12px; }
    .timer { font-size: 20px; }
    .exam-header { padding: 10px 14px; }
    .exam-body { flex-direction: column; padding: 12px; }
    .exam-side { width: 100%; position: static; }
    .peserta-card { padding: 22px; }
    .peserta-head { flex-direction: row; }
}
/* SPMB: rata tengah judul halaman peserta */
.peserta-head { text-align: center; }
.peserta-head > div { text-align: center; }
.peserta-head img { display: block; margin: 0 auto 10px; }

/* ---------- dashboard: kartu & angka bisa diklik ---------- */
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--brand); }
td a:not(.btn) { color: var(--brand); font-weight: 600; text-decoration: none; }
td a:not(.btn):hover { text-decoration: underline; }
/* ---------- dashboard ringkas ---------- */
.cards.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 980px) { .cards.cards-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- responsif: cegah halaman melebar ---------- */
.main, .panel, .row > .col, .cards > * { min-width: 0; }
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 1200px) {
    .cards, .cards.cards-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
@media (max-width: 900px) {
    .row { flex-direction: column; }
    .row > .col { flex: 1 1 auto; width: 100%; }
    .cards, .cards.cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toolbar select, .toolbar input { min-width: 0; }
    .toolbar .field { flex: 1 1 160px; min-width: 0; }
    .panel > h2 { font-size: 16px; }
}
@media (max-width: 560px) {
    .cards, .cards.cards-4 { grid-template-columns: 1fr; }
    .toolbar .field, .toolbar .btn, .toolbar a.btn { flex: 1 1 100%; }
    .toolbar select, .toolbar input { width: 100%; min-width: 0; }
    .panel { padding: 14px; }
    .topbar-actions { gap: 6px; }
    .main { padding: 0 12px 28px; }
}

@media (max-width: 560px) {
    .topbar { margin: 0 -12px 16px; }
}
/* tabel nilai: pas di layar tanpa zoom */
.tbl-kartu { table-layout: fixed; }
.tbl-kartu th { font-size: 11px; line-height: 1.15; white-space: normal; }
.tbl-kartu td { word-break: break-word; }
.tbl-kartu thead th.col-mapel { width: 62px; }
.tbl-kartu td[data-label="Aksi"] { white-space: nowrap; }
.tbl-kartu td[data-label="Aksi"] .btn-sm { padding: 4px 6px; font-size: 10.8px; }
@media (max-width: 1024px) {
    .tbl-kartu { table-layout: auto; }
    .tbl-kartu th { white-space: nowrap; }
}

@media (min-width: 1025px) {
    .tbl-kartu td[data-label="Aksi"] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
    .tbl-kartu td[data-label="Aksi"] .btn-sm { padding: 4px 7px; font-size: 11px; }
}

/* kartu nilai di layar kecil: angka lebih tegas */
@media (max-width: 1024px) {
    .tbl-kartu td { font-weight: 600; color: #0f172a; }
    .tbl-kartu td::before { font-weight: 500; color: var(--muted); }
    .tbl-kartu td[data-label="Nama"] { font-weight: 700; }
}
@media (max-width: 1024px) { .tbl-kartu td.col-waktu { white-space: normal; } }
