/* ============================================================
   Platform Tryout TKA Kutai Timur — Stylesheet
   ============================================================ */

:root {
  --navy: #14345f;
  --blue: #2f80ed;
  --orange: #ff7a1a;
  --teal: #14b8a6;
  --ink: #172a44;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f9fd;
  --white: #fff;
  --green: #0f9d6c;
  --red: #e5484d;
  --shadow: 0 12px 32px rgba(20, 52, 95, .08);
  --shadow-lg: 0 24px 60px rgba(20, 52, 95, .14);
  --grad-brand: linear-gradient(135deg, #14345f 0%, #2f80ed 100%);
  --grad-warm: linear-gradient(135deg, #ff7a1a 0%, #ffb35c 100%);
  --grad-teal: linear-gradient(135deg, #0f9d6c 0%, #14b8a6 100%);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(47, 128, 237, .10), transparent 60%),
    radial-gradient(700px 360px at -10% 30%, rgba(255, 122, 26, .07), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font-size: 13px; background: #fff; color: var(--navy); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 237, .14); }
textarea.input { resize: vertical; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid rgba(226, 232, 240, .8);
  background: rgba(255, 255, 255, .9);
  padding: 11px 30px;
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(226, 232, 240, .5);
}
.brand, .user { display: flex; align-items: center; gap: 11px; }
.mark {
  display: grid; width: 43px; height: 43px; place-items: center;
  border-radius: 13px; background: var(--grad-brand); color: #fff; font-size: 22px;
  box-shadow: 0 8px 20px rgba(20, 52, 95, .25);
}
.brand strong { display: block; color: var(--navy); font-size: 14px; letter-spacing: .08em; }
.brand small, .user small { display: block; color: #76869a; font-size: 11px; }
.topmeta { display: flex; align-items: center; gap: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #f2b88e; border-radius: 999px; background: #fff4eb;
  padding: 5px 10px; color: #ac5119; font-size: 11px; font-weight: 700;
}
.avatar {
  display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%;
  background: #e7f0f8; color: var(--navy); font-size: 12px; font-weight: 800;
}
.user strong { display: block; font-size: 12px; }
.btn-logout {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 700;
}
.btn-logout:hover { background: #fef1f1; border-color: #f2c9c9; color: var(--red); }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 74px); }
.sidebar {
  position: sticky; top: 74px; display: flex; height: calc(100vh - 74px);
  flex-direction: column; border-right: 1px solid var(--line); background: #fff; padding: 26px 16px;
}
.side-label { padding: 0 12px 10px; color: #8a98aa; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.nav { display: grid; gap: 6px; }
.nav button {
  display: flex; align-items: center; gap: 10px; border: 0; border-radius: 12px;
  background: transparent; padding: 11px 12px; color: #627187; text-align: left;
  font-size: 13px; font-weight: 650; transition: background .15s, color .15s;
}
.nav button span { width: 22px; text-align: center; }
.nav button:hover { background: #edf3f8; }
.nav button.active { background: var(--grad-brand); color: #fff; box-shadow: 0 9px 22px rgba(20, 52, 95, .25); }
.side-note {
  margin-top: auto; border: 1px solid var(--line); border-radius: 13px;
  background: #f7fafc; padding: 13px; color: #64758a; font-size: 11px; line-height: 1.5;
}
.side-note strong { display: block; margin-bottom: 4px; color: #29425e; }
.mobile-nav { display: none; position: sticky; top: 74px; z-index: 15; overflow: auto; border-bottom: 1px solid var(--line); background: #fff; padding: 8px; }
.mobile-nav .nav { display: flex; width: max-content; }
.mobile-nav .nav button { white-space: nowrap; }

.main { min-width: 0; padding: clamp(22px, 3vw, 44px); }
.view { display: none; width: min(1280px, 100%); margin: auto; }
.view.active { display: block; }
.stack { display: grid; gap: 22px; }

/* ---------- Heading & tombol ---------- */
.eyebrow { margin: 0 0 7px; color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.heading h1, .hero h1, .page-title { margin: 0; color: var(--navy); font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 10px 15px; color: var(--navy); font-size: 12px; font-weight: 700;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
}
.btn:hover { background: #f3f7fb; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { border-color: transparent; background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(20, 52, 95, .22); }
.btn.primary:hover { background: linear-gradient(135deg, #0f2b50 0%, #256fd6 100%); }
.btn.success { border-color: transparent; background: var(--grad-teal); color: #fff; box-shadow: 0 8px 18px rgba(15, 157, 108, .2); }
.btn.success:hover { background: linear-gradient(135deg, #0b8459 0%, #0fa392 100%); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 11px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; min-height: 315px; grid-template-columns: minmax(0, 1fr) 270px;
  align-items: center; overflow: hidden; border-radius: 24px;
  background:
    radial-gradient(600px 300px at 95% -20%, rgba(47, 128, 237, .16), transparent 60%),
    linear-gradient(130deg, #fff 0%, #eef6ff 100%);
  padding: clamp(28px, 5vw, 55px); box-shadow: var(--shadow-lg);
}
.hero:after {
  position: absolute; right: -100px; bottom: -140px; width: 390px; height: 390px;
  border: 1px solid rgba(47, 128, 237, .22); border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(47, 128, 237, .06), 0 0 0 82px rgba(255, 122, 26, .05); content: "";
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy > p { max-width: 650px; margin: 15px 0 26px; color: #607087; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.orbit { position: relative; z-index: 2; display: grid; width: 210px; height: 210px; margin-left: auto; place-items: center; border-radius: 50%; background: #ffffffc9; box-shadow: 0 20px 45px rgba(23, 55, 95, .14); }
.ring { display: grid; width: 160px; height: 160px; place-items: center; border: 14px solid #dcebf6; border-top-color: var(--orange); border-right-color: var(--blue); border-radius: 50%; transform: rotate(18deg); }
.ring b { color: var(--navy); font-size: 30px; transform: rotate(-18deg); }
.orbit small { position: absolute; bottom: 23px; border-radius: 999px; background: var(--navy); padding: 7px 12px; color: #fff; }

/* ---------- Grid & kartu ---------- */
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric, .card { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.metric { position: relative; overflow: hidden; padding: 20px; transition: transform .15s, box-shadow .15s; }
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.metric:before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--blue); content: ""; }
.metric.orange:before { background: var(--orange); }
.metric.teal:before { background: var(--teal); }
.metric.navy:before { background: var(--navy); }
.metric.green:before { background: var(--green); }
.metric.red:before { background: var(--red); }
.metric small { display: block; color: #6c7b90; font-size: 11px; font-weight: 600; }
.metric b { display: block; margin: 8px 0 3px; color: #172b45; font-size: 30px; letter-spacing: -.02em; }
.metric span { color: #8793a3; font-size: 10px; }
.card { padding: 22px; }
.card h2 { margin: 0; color: #1c3a60; font-size: 17px; letter-spacing: -.01em; }
.card h3 { margin: 0 0 10px; color: #1c3a60; font-size: 15px; }
.card > .sub { margin: 7px 0 18px; color: #758397; font-size: 12px; }

.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e1eaf2; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .25s; }
.progress i.orange { background: var(--orange); }
.progress i.green { background: var(--green); }

.timeline { display: grid; gap: 20px; }
.timeline-row { display: grid; gap: 7px; }
.timeline-row > div { display: flex; justify-content: space-between; gap: 15px; }
.timeline-row strong { font-size: 13px; }
.timeline-row small { display: block; margin-top: 3px; color: #8190a2; }

/* ---------- Tryout ---------- */
.exam-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.timer { border-radius: 999px; background: var(--navy); padding: 9px 14px; color: #fff; font-size: 13px; font-weight: 800; }
.timer.warning { background: var(--orange); }
.timer.danger { background: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .75; } }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 20px; }
.question-card { padding: 0; overflow: hidden; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; padding: 20px; }
.tag { display: inline-block; margin-right: 6px; border-radius: 999px; background: #e8f2fa; padding: 5px 10px; color: #24649a; font-size: 10px; font-weight: 800; }
.question-body { padding: 24px; }
.stimulus { border-left: 3px solid var(--blue); background: #f5f9fd; border-radius: 9px; padding: 13px 15px; margin-bottom: 20px; color: #3c4d63; font-size: 14px; line-height: 1.7; }
.question-body > p { margin: 0 0 22px; color: #22344d; font-size: 19px; font-weight: 650; line-height: 1.6; }
.options { display: grid; gap: 11px; }
.option { display: flex; align-items: flex-start; gap: 13px; border: 1px solid #d7e2ed; border-radius: 14px; background: #fff; padding: 13px 15px; color: #3c4d63; text-align: left; transition: border-color .12s, background .12s, transform .12s; }
.option:hover { border-color: #84aecd; background: #f7fbff; transform: translateX(2px); }
.option.selected { border-color: var(--blue); background: #edf6fd; box-shadow: 0 0 0 3px rgba(47, 128, 237, .08); }
.option b:first-child { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #eef3f8; font-size: 11px; }
.option.selected b:first-child { background: var(--blue); color: #fff; }
.option .opt-text { flex: 1; }
.question-foot { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1f5; padding: 18px 22px; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.palette button { height: 38px; border: 1px solid #d8e2ec; border-radius: 8px; background: #fff; color: #617186; font-weight: 800; }
.palette button.done { border-color: #97c7b9; background: #eaf7f3; color: #23745c; }
.palette button.ragu { border-color: #f0c48a; background: #fff6e8; color: #9a611d; }
.palette button.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.nav-card { position: sticky; top: 95px; }
.pick-card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.pick-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(23, 55, 95, .12); }
.pick-card.card-disabled {
  cursor: not-allowed; opacity: .62; filter: grayscale(.8); background: #f2f5f8;
}
.pick-card.card-disabled:hover { transform: none; box-shadow: var(--shadow); }
.tag-muted { background: #edf0f3; color: #7a8794; }
.status-pill.muted { background: #e8edf2; color: #6d7a88; }
.pick-card .status-pill { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 800; }
.pick-card .status-pill.done { background: #e1f3ec; color: var(--green); }
.pick-card .status-pill.ready { background: #fff4eb; color: #ac5119; }

/* ---------- Admin layout ---------- */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 22px; }
.admin-subnav {
  position: sticky; top: 95px; display: grid; gap: 6px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  padding: 16px; box-shadow: var(--shadow);
}
.admin-content { min-width: 0; display: grid; gap: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar .searchbar { flex: 1 1 320px; }
.toolbar-dropdowns { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar-dropdowns .input { width: auto; min-width: 160px; }
.searchbar { display: flex; gap: 10px; }
.searchbar .input { max-width: 420px; }
.admin-subnav button {
  display: flex; align-items: center; gap: 10px; border: 0; border-radius: 11px;
  background: transparent; padding: 10px 12px; color: #627187; text-align: left;
  font-size: 13px; font-weight: 650; transition: background .15s, color .15s;
}
.admin-subnav button:hover { background: #edf3f8; }
.admin-subnav button.active { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(20, 52, 95, .22); }
.search-select { position: relative; }
.search-select-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: 0 14px 34px rgba(23, 55, 95, .15);
}
.search-select-item { padding: 10px 12px; cursor: pointer; color: var(--ink); font-size: 13px; }
.search-select-item:hover, .search-select-item.active { background: #edf3f8; }
.opsi-list { display: grid; gap: 8px; }
.opsi-row { display: flex; align-items: center; gap: 10px; }
.opsi-row .opsi-label { width: 22px; flex: 0 0 auto; color: var(--navy); font-weight: 800; }
.opsi-row .opsi-kunci { width: 18px; height: 18px; cursor: pointer; accent-color: var(--green); }
.opsi-row .opsi-text { flex: 1; }
.isian-form { display: grid; gap: 10px; }
.isian-form .opsi-row { align-items: center; }
.isian-alt { background: #f7fafc; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.isian-alt .opsi-label { width: 24px; text-align: center; color: #7a8ba0; }
.isian-alt .small { color: #7a8ba0; }
.btn.danger { color: var(--red); border-color: #f2c9c9; }
.btn.danger:hover { background: #fef1f1; }

/* ---------- Webcam monitoring ---------- */
.webcam-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #f9fbfd; }
.webcam-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.webcam-head b { color: #29425e; font-size: 12px; }
.webcam-status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; }
.webcam-status.on { background: #e1f3ec; color: var(--green); }
.webcam-status.warn { background: #fff4eb; color: #ac5119; }
.webcam-status.off { background: #eef2f6; color: #6c7b90; }
#webcam-video, #webcam-canvas { display: block; width: 100%; border-radius: 8px; margin-bottom: 8px; background: #0f1a26; }

/* ---------- Popup konfirmasi webcam ---------- */
.webcam-confirm-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(15, 27, 48, .5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadein .18s ease-out;
}
.webcam-confirm-card {
  width: min(420px, calc(100vw - 28px)); border-radius: 18px; background: #fff;
  padding: 30px; text-align: center; box-shadow: 0 24px 60px rgba(23,55,95,.3);
  animation: popin .22s cubic-bezier(.16, 1, .3, 1);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes popin { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.webcam-confirm-icon { font-size: 42px; }
.webcam-confirm-card h2 { margin: 12px 0 8px; color: var(--navy); }
.webcam-confirm-card p { margin: 0 0 20px; color: #607087; font-size: 14px; line-height: 1.6; }
.paginasi { display: flex; align-items: center; gap: 12px; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.paginasi span { font-weight: 700; color: #55677c; }

/* ---------- Modal (pop up form) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(15, 27, 48, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  animation: fadein .18s ease-out;
}
.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 18px; background: #fff;
  padding: 26px; box-shadow: 0 24px 60px rgba(23, 55, 95, .28);
  animation: popin .22s cubic-bezier(.16, 1, .3, 1);
}
.modal-card-wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { margin: 0; color: var(--navy); font-size: 18px; }

/* ---------- Bar chart ---------- */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 125px minmax(0, 1fr) 42px; align-items: center; gap: 11px; }
.bar-row span { color: #56677b; font-size: 11px; }
.bar-track { height: 12px; overflow: hidden; border-radius: 999px; background: #e7eef5; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #70aedb); }
.bar-track i.orange { background: linear-gradient(90deg, var(--orange), #f2b88e); }
.bar-row b { color: var(--navy); font-size: 12px; text-align: right; }

.grouped { display: flex; height: 230px; align-items: flex-end; justify-content: space-around; gap: 25px; border-bottom: 1px solid var(--line); padding: 10px 25px 0; }
.group { display: flex; height: 100%; align-items: flex-end; gap: 8px; }
.col { position: relative; width: 42px; border-radius: 7px 7px 0 0; background: #78add3; }
.col.dark { background: var(--navy); }
.col.orange { background: var(--orange); }
.col:before { position: absolute; top: -22px; left: 50%; color: #526277; font-size: 10px; font-weight: 800; content: attr(data-value); transform: translateX(-50%); }
.group-labels { display: flex; justify-content: space-around; padding: 9px 25px; color: #718095; font-size: 10px; }
.legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; color: #718095; font-size: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: #78add3; }
.legend i.dark { background: var(--navy); }
.legend i.orange { background: var(--orange); }

/* ---------- Certificate ---------- */
.certificate { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: linear-gradient(115deg, #fff, #edf6fd); }
.seal { display: grid; width: 59px; height: 59px; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 25px; box-shadow: 0 0 0 7px #dcebf6; }
.certificate p { margin: 5px 0 0; color: #697a8e; font-size: 12px; }
.available { border-radius: 999px; background: #e1f3ec; padding: 6px 10px; color: #26765c; font-size: 11px; font-weight: 800; }
.not-available { border-radius: 999px; background: #fdecec; padding: 6px 10px; color: #a33; font-size: 11px; font-weight: 800; }

/* ---------- Filter & tabel ---------- */
.filters { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 11px; }
.filters label { display: block; margin-bottom: 5px; color: #788699; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.filters select { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfd; padding: 0 9px; color: #465a72; font-size: 11px; }

.priority { border-left: 4px solid var(--orange); }
.priority-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.priority-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.priority-item span { color: var(--orange); font-size: 10px; font-weight: 900; }
.priority-item strong { color: #40536a; font-size: 11px; }
.priority-item b { color: var(--navy); font-size: 12px; }

.rank-list { display: grid; gap: 9px; }
.rank-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-radius: 9px; background: #f6f9fc; padding: 10px; }
.rank-row span { color: #718096; font-size: 11px; font-weight: 800; }
.rank-row strong { font-size: 12px; }
.rank-row b { color: var(--navy); font-size: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { background: #f2f6fa; color: #52667e; text-align: left; font-weight: 800; letter-spacing: .02em; }
th, td { border-bottom: 1px solid #e4ebf2; padding: 11px 10px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fbfe; }
td:last-child, th:last-child { text-align: right; }
.table-scroll { overflow: auto; }
.note { border: 1px solid #f2c19d; border-radius: 12px; background: #fff7f0; padding: 13px; color: #8e4b22; font-size: 11px; line-height: 1.6; }

/* ---------- Login ---------- */
.login-view {
  display: none; min-height: 100vh; place-items: center;
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(47, 128, 237, .18), transparent 60%),
    radial-gradient(600px 420px at -10% 100%, rgba(20, 184, 166, .12), transparent 55%),
    linear-gradient(180deg, #f8fbfe 0%, #eef4fb 100%);
}
.login-view.active { display: grid; }
.login-card {
  width: min(440px, calc(100vw - 28px));
  border: 1px solid rgba(226, 232, 240, .9); border-radius: 24px; background: #fff;
  padding: 36px 34px; box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .mark { width: 50px; height: 50px; font-size: 26px; border-radius: 15px; }
.login-brand strong { color: var(--navy); font-size: 15px; letter-spacing: .06em; }
.login-brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.login-card h1 { margin: 0 0 6px; color: var(--navy); font-size: 26px; letter-spacing: -.02em; }
.login-card .sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 7px; color: #55677c; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.field select, .field input {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #f9fbfd; padding: 0 13px; color: #22344d; font-size: 13px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field select:focus, .field input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 237, .15); }
.login-note { border-radius: 12px; background: #f5f9fd; padding: 11px 13px; color: #607087; font-size: 11px; line-height: 1.6; }
.login-note b { color: var(--navy); }

/* ---------- Alert / toast ---------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; }
.toast { min-width: 260px; max-width: 360px; border-radius: 11px; background: var(--navy); color: #fff; padding: 13px 16px; font-size: 13px; box-shadow: 0 16px 40px rgba(23,55,95,.3); animation: slidein .25s; }
.toast.success { background: var(--green); }
.toast.warning { background: var(--orange); }
.toast.error { background: var(--red); }
@keyframes slidein { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.empty-state { border: 1px dashed var(--line); border-radius: 14px; padding: 34px; text-align: center; color: var(--muted); font-size: 13px; background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .three { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-subnav { position: static; display: flex; flex-wrap: wrap; }
  .admin-subnav button { white-space: nowrap; }
}
@media (max-width: 700px) {
  .topbar { min-height: 66px; padding: 9px 14px; }
  .brand small, .user div, .pill { display: none; }
  .mobile-nav { top: 66px; }
  .main { padding: 20px 14px; }
  .hero { grid-template-columns: 1fr; padding: 28px 21px; }
  .orbit { width: 170px; height: 170px; margin: 28px auto 0; }
  .ring { width: 130px; height: 130px; border-width: 11px; }
  .two, .exam-layout, .three { grid-template-columns: 1fr; }
  .nav-card { position: static; }
  .filters { grid-template-columns: 1fr 1fr; }
  .priority-list { grid-template-columns: 1fr; }
  .heading { align-items: flex-start; flex-direction: column; }
  .certificate { grid-template-columns: auto 1fr; }
  .certificate .available, .certificate .not-available { grid-column: 1/-1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 24px; }
}
@media (max-width: 440px) {
  .metrics, .filters { grid-template-columns: 1fr; }
  .nav button { font-size: 0; }
  .nav button span { font-size: 16px; }
  .question-foot { flex-direction: column-reverse; }
  .question-foot .btn { width: 100%; }
}
