/* =========================================================
   EXAM PORTAL - Design tokens
   Konsep: "sertifikasi resmi" - navy tegas + aksen teal (segel),
   tipografi serif untuk judul (kesan otoritatif/formal ujian),
   sans-serif sistem untuk body (jelas dibaca, tanpa perlu internet).
   ========================================================= */
:root {
    --navy-900: #101a30;
    --navy-800: #1b2a4a;
    --navy-700: #2a3d63;
    --teal-600: #2f8f82;
    --teal-500: #3aa899;
    --amber-500: #c98a3b;
    --danger-500: #b3432b;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text-900: #1a1f2b;
    --text-600: #5a6272;
    --text-400: #8a90a0;

    --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --radius: 10px;
    --shadow: 0 1px 3px rgba(16, 26, 48, 0.08), 0 1px 2px rgba(16, 26, 48, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-900);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--navy-900);
    margin: 0 0 8px;
}

a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout shells ---------- */
.topbar {
    background: var(--navy-900);
    color: #fff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .brand {
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: 0.3px;
}
.topbar .brand small {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    color: #9fb0c9;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.topbar nav a {
    color: #dbe2ee;
    margin-left: 18px;
    font-size: 14px;
}
.topbar nav a:hover { color: #fff; }

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--teal-600) 130%);
}
.auth-card {
    background: var(--surface);
    width: 380px;
    padding: 36px 32px;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(16,26,48,0.35);
}
.auth-card .seal {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--teal-600);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 14px;
}
.auth-card h1 { font-size: 20px; margin-bottom: 2px; }
.auth-card p.sub { color: var(--text-600); font-size: 13px; margin-bottom: 20px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tabs a {
    flex: 1; text-align: center; padding: 8px 0;
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-600); font-size: 13px;
}
.auth-tabs a.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--text-600); margin-bottom: 5px; font-weight: 600; }
input[type=text], input[type=password], input[type=email], input[type=number],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    margin-bottom: 16px;
    background: #fff;
    color: var(--text-900);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--teal-500);
    outline-offset: 1px;
    border-color: var(--teal-500);
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: var(--navy-900);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
}
.btn:hover { background: var(--navy-700); text-decoration: none; }
.btn.block { width: 100%; text-align: center; }
.btn.teal { background: var(--teal-600); }
.btn.teal:hover { background: var(--teal-500); }
.btn.danger { background: var(--danger-500); }
.btn.ghost { background: transparent; color: var(--navy-900); border: 1px solid var(--border); }

.error-box {
    background: #fdece8;
    border: 1px solid #f3c3b6;
    color: var(--danger-500);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.success-box {
    background: #e7f5f2;
    border: 1px solid #b9ddd5;
    color: var(--teal-600);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---------- Cards / tables ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) {
    .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--teal-600);
    border-radius: 8px;
    padding: 16px 18px;
}
.stat .num { font-family: var(--font-display); font-size: 26px; color: var(--navy-900); }
.stat .label { font-size: 12px; color: var(--text-600); text-transform: uppercase; letter-spacing: 0.4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-600); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
tr:hover td { background: #fafbfc; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge.gray { background: #eef0f3; color: var(--text-600); }
.badge.teal { background: #e2f3f0; color: var(--teal-600); }
.badge.amber { background: #f8ecd9; color: var(--amber-500); }
.badge.danger { background: #fdece8; color: var(--danger-500); }

/* ---------- Test taking screen ---------- */
.test-header {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--navy-900); color: #fff;
    padding: 14px 24px; border-radius: var(--radius);
    margin-bottom: 20px;
}
.timer {
    font-family: var(--font-mono);
    font-size: 20px;
    background: rgba(255,255,255,0.12);
    padding: 6px 14px;
    border-radius: 8px;
}
.timer.low { background: var(--danger-500); }

.question-step {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--teal-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.question-text { font-size: 17px; margin-bottom: 18px; color: var(--text-900); }

.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 14px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.option-item:hover { border-color: var(--teal-500); background: #f7fbfa; }
.option-item input { margin: 0; }
.option-item.selected { border-color: var(--teal-600); background: #eef8f6; }

.progress-track {
    height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 22px;
}
.progress-fill { height: 100%; background: var(--teal-600); }

/* ---------- Score seal (hasil tes) ---------- */
.score-seal {
    width: 120px; height: 120px; border-radius: 50%;
    border: 6px solid var(--teal-600);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-family: var(--font-display);
}
.score-seal .val { font-size: 30px; color: var(--navy-900); line-height: 1; }
.score-seal .max { font-size: 11px; color: var(--text-600); }

.dim-bar { margin-bottom: 12px; }
.dim-bar .dim-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.dim-bar .track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.dim-bar .fill { height: 100%; background: var(--amber-500); }

.text-muted { color: var(--text-600); font-size: 13px; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
