/* ===== Pelatihan Keamanan Siber - Kardia Group ===== */
:root {
  --bg: #0e1726;
  --bg-soft: #16213a;
  --card: #ffffff;
  --ink: #1b2436;
  --ink-soft: #5b6678;
  --line: #e6e9f0;
  --brand: #0f7b6c;       /* teal hijau */
  --brand-dark: #0b5c50;
  --accent: #e63946;      /* merah jantung/peringatan */
  --accent-soft: #fdecee;
  --gold: #f2a900;
  --good: #1f9d57;
  --good-soft: #e7f7ee;
  --bad: #d62839;
  --bad-soft: #fdecee;
  --warn: #b9770a;
  --warn-soft: #fff6e5;
  --info: #1d6fb8;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(8, 16, 33, .12);
  --shadow-sm: 0 2px 10px rgba(8, 16, 33, .08);
  --maxw: 920px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #0e1726 0%, #122244 55%, #0e1726 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 80px; }

/* ===== Top bar ===== */
.topbar {
  display: flex; align-items: center; gap: 14px;
  color: #eaf1ff; padding: 6px 4px 18px;
}
.logo {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.logo svg { width: 26px; height: 26px; }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .2px; }
.brand-text span { font-size: 12.5px; color: #9fb2d6; }

/* ===== Card ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 32px; margin-bottom: 20px;
}
@media (max-width: 560px) { .card { padding: 22px 18px; } .wrap { padding: 16px 12px 70px; } }

h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.3px; }
h2 { font-size: 21px; margin: 4px 0 12px; letter-spacing: -.2px; }
h3 { font-size: 16.5px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
.lead { color: var(--ink-soft); font-size: 15.5px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
ul, ol { margin: 6px 0 14px; padding-left: 22px; }
li { margin: 5px 0; }
a { color: var(--brand-dark); }

/* ===== Progress bar ===== */
.progress-head { display: flex; justify-content: space-between; align-items: center; color: #dbe6ff; font-size: 13px; margin-bottom: 6px; }
.progress { height: 9px; background: rgba(255,255,255,.16); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #2dd4bf); transition: width .4s ease; }

/* ===== Pills / tags ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: #eef2f9; color: var(--ink-soft); }
.pill.brand { background: #e3f5f1; color: var(--brand-dark); }
.pill.time { background: var(--warn-soft); color: var(--warn); }

/* ===== Buttons ===== */
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 600; padding: 13px 24px; border-radius: 12px;
  background: var(--brand); color: #fff; transition: transform .05s, background .2s, box-shadow .2s;
  box-shadow: 0 6px 16px rgba(15,123,108,.28);
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: #eef2f9; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: #e2e8f4; }
.btn.danger { background: var(--bad); box-shadow: 0 6px 16px rgba(214,40,57,.25); }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 28px; font-size: 16px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.btn-row.spread { justify-content: space-between; }

/* ===== Form ===== */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }
input[type=text], input[type=password], select {
  width: 100%; font-family: inherit; font-size: 15px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fbfcfe; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(15,123,108,.12); }
.req { color: var(--accent); }

/* ===== Info boxes ===== */
.box { border-radius: 12px; padding: 14px 16px; margin: 14px 0; border: 1px solid transparent; font-size: 14.5px; }
.box .box-t { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.box.tip   { background: var(--good-soft); border-color: #bfe6cf; }
.box.warn  { background: var(--warn-soft); border-color: #f3dca6; }
.box.danger{ background: var(--bad-soft); border-color: #f3c2c7; }
.box.info  { background: #e9f2fb; border-color: #bfdaf0; }

/* ===== Flip / reveal cards ===== */
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 620px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.reveal {
  border: 1.5px solid var(--line); border-radius: 13px; padding: 16px; cursor: pointer;
  background: #fbfcfe; transition: border-color .2s, box-shadow .2s; position: relative;
}
.reveal:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.reveal .r-q { font-weight: 700; display: flex; align-items: center; gap: 9px; }
.reveal .r-ico { width: 30px; height: 30px; border-radius: 9px; background: #e3f5f1; color: var(--brand-dark); display: grid; place-items: center; font-size: 17px; flex: none; }
.reveal .r-a { max-height: 0; overflow: hidden; transition: max-height .35s ease, margin .35s; color: var(--ink-soft); font-size: 14px; }
.reveal.open .r-a { max-height: 320px; margin-top: 10px; }
.reveal .r-more { color: var(--brand); font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.reveal.open .r-more { display: none; }

/* ===== Phishing simulation ===== */
.sim-card { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.sim-screen { background: #f5f7fb; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.mail-head { font-size: 13.5px; color: var(--ink-soft); }
.mail-head .row { display: flex; gap: 8px; padding: 3px 0; }
.mail-head .k { width: 64px; color: #8a94a6; flex: none; }
.mail-head .v { color: var(--ink); word-break: break-word; }
.mail-subject { font-weight: 700; font-size: 15.5px; color: var(--ink); margin: 8px 0 2px; }
.mail-body { background: #fff; padding: 16px 18px; font-size: 14.5px; }
.chat-bubble { background: #dcf8c6; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; max-width: 90%; }
.sms-bubble { background: #e9eef6; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; max-width: 90%; }
.sim-actions { padding: 14px 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sim-fb { padding: 0 18px 16px; }
.sim-fb .box { margin: 0; }
.choice { flex: 1; min-width: 130px; }
.choice.safe { background: var(--good-soft); color: #0c5a32; border: 1.5px solid #bfe6cf; }
.choice.phish { background: var(--bad-soft); color: #8c1822; border: 1.5px solid #f3c2c7; }
.choice:hover { filter: brightness(.97); }
.choice.sel-correct { outline: 3px solid var(--good); }
.choice.sel-wrong { outline: 3px solid var(--bad); }
.choice:disabled { cursor: default; opacity: 1; }

/* ===== Password meter ===== */
.meter { height: 10px; border-radius: 99px; background: #eef2f9; overflow: hidden; margin: 8px 0; }
.meter > i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }

/* ===== Exam ===== */
.exam-bar {
  position: sticky; top: 8px; z-index: 20; background: rgba(14,23,38,.96); backdrop-filter: blur(6px);
  color: #eaf1ff; border-radius: 12px; padding: 12px 18px; margin: 0 0 18px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  box-shadow: var(--shadow);
}
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; letter-spacing: 1px; }
.timer.danger { color: #ff8a93; }
.q { border-bottom: 1px solid var(--line); padding: 18px 0; }
.q:last-child { border-bottom: 0; }
.q .q-n { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; }
.q .q-t { font-weight: 600; margin: 4px 0 12px; font-size: 15.5px; }
.opt { display: flex; gap: 11px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 14px; margin: 8px 0; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--brand); background: #f7fbfa; }
.opt input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.opt.checked { border-color: var(--brand); background: #eef9f6; }
.opt .ltr { font-weight: 700; color: var(--ink-soft); }

/* review */
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q .explain { font-size: 13.5px; color: var(--ink-soft); background: #f5f7fb; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }

/* ===== Result ===== */
.score-ring { display: grid; place-items: center; width: 168px; height: 168px; border-radius: 50%; margin: 6px auto 10px; }
.score-ring .inner { width: 132px; height: 132px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.score-ring .pct { font-size: 38px; font-weight: 800; line-height: 1; }
.score-ring .lbl { font-size: 12px; color: var(--ink-soft); }
.badge-result { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; padding: 9px 20px; border-radius: 99px; }
.badge-result.pass { background: var(--good-soft); color: #0c6a3a; }
.badge-result.fail { background: var(--bad-soft); color: #a11722; }

/* ===== Stepper hidden sections ===== */
.step { display: none; }
.step.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== Stat cards (dashboard) ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .k { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.stat.green .v { color: var(--good); }
.stat.red .v { color: var(--bad); }
.stat.brand .v { color: var(--brand); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
tbody tr:hover { background: #f7fbfa; }
.tag-pass { color: #0c6a3a; background: var(--good-soft); padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.tag-fail { color: #a11722; background: var(--bad-soft); padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: 12px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; flex: 1; min-width: 150px; }

.footer-note { color: #93a3c4; font-size: 12px; text-align: center; margin-top: 26px; }
.footer-note a { color: #b9c8e8; }

.chart-wrap { position: relative; height: 280px; }
.hidden { display: none !important; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.kbd { font-family: ui-monospace, monospace; background: #eef2f9; border-radius: 6px; padding: 1px 7px; font-size: 13px; }
