/* E-Learning SMK Negeri 8 Surabaya — token desain mengikuti smkn8-sby.sch.id */
:root {
  --ink: #0d1a2e; --ink-2: #13243e; --ink-3: #1b3152;
  --blue: #235ba4; --blue-2: #3a78c9; --sky: #84b2df;
  --orange: #f26836; --orange-2: #ff8a57;
  --steel: #9a9a9a; --charcoal: #24282e;
  --paper: #f3f4f6; --paper-2: #e9ecf1; --white: #fff;
  --line: #d9dee6; --text: #17202c; --muted: #5a6474;
  --green: #1f9d6b; --red: #d64545; --amber: #d99a1e;
  --radius: 6px;
  --display: 'Archivo', 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(13, 26, 46, .06), 0 8px 24px rgba(13, 26, 46, .07);
  --side: 256px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); background: var(--paper); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 800; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 4px; font-weight: 700; font-size: .92rem; border: 2px solid transparent; transition: .18s ease; cursor: pointer; background: var(--paper-2); color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #e2551f; color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--blue); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-width: 1.5px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 4px; color: var(--muted); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- eyebrow (label mono khas web SMKN 8) ---------- */
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 500; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--orange); flex: none; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-hero { background: radial-gradient(1200px 500px at 0% 100%, rgba(35, 91, 164, .45), transparent 60%), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 60%, var(--ink-3) 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); pointer-events: none; }
.login-hero > * { position: relative; z-index: 1; }
.login-hero .brand { color: #fff; }
.login-hero h1 { font-size: clamp(2.3rem, 4.6vw, 4.1rem); font-weight: 900; text-transform: uppercase; font-stretch: 85%; margin: auto 0 18px; letter-spacing: -.02em; }
.login-hero h1 span { color: var(--orange); display: block; }
.login-hero p { color: rgba(255, 255, 255, .78); max-width: 560px; font-size: 1.02rem; }
.login-hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.login-hero .chip { border: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .85); padding: 6px 12px; border-radius: 999px; font-size: .8rem; }
.login-hero .foot { margin-top: 36px; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: rgba(255, 255, 255, .5); text-transform: uppercase; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--white); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 2rem; font-weight: 900; text-transform: uppercase; font-stretch: 85%; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.brand small { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.tag-el { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; background: var(--orange); color: #fff; padding: 3px 7px; border-radius: 3px; text-transform: uppercase; }

/* ---------- shell ---------- */
.ver { display: block; width: calc(100% - 12px); margin: 18px 6px 0; text-align: left; background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .22); border-radius: 5px; color: var(--orange-2); font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; padding: 9px 12px; cursor: pointer; }
.ver span { display: block; color: rgba(255, 255, 255, .5); font-size: .68rem; margin-top: 2px; }
.ver:hover { border-color: var(--orange); }
.topbar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); isolation: isolate; }
.topbar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.topbar .in { display: flex; align-items: center; gap: 16px; min-height: 66px; padding: 0 22px; }
.topbar .spacer { flex: 1; }
.topbar .who { text-align: right; line-height: 1.2; }
.topbar .who b { display: block; font-size: .9rem; }
.topbar .who span { font-size: .74rem; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.nav-toggle { display: none; }
.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100vh - 67px); }
.side { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 18px 12px 40px; position: sticky; top: 67px; height: calc(100vh - 67px); overflow-y: auto; }
.side h6 { font-family: var(--mono); font-weight: 500; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .42); margin: 18px 12px 6px; }
.side a { display: flex; align-items: center; gap: 11px; color: rgba(255, 255, 255, .8); padding: 9px 12px; border-radius: 5px; font-weight: 600; font-size: .9rem; border-left: 3px solid transparent; }
.side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.on { background: var(--ink-3); color: #fff; border-left-color: var(--orange); }
.side svg, .ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 900; text-transform: uppercase; font-stretch: 85%; margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- kartu & grid ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .02em; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gauto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stat { padding: 18px 20px; border-left: 4px solid var(--orange); }
.stat b { display: block; font-family: var(--display); font-size: 2.2rem; font-weight: 900; line-height: 1; color: var(--ink); }
.stat span { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat.blue { border-left-color: var(--blue); }
.stat.dark { border-left-color: var(--ink); }
.stat.green { border-left-color: var(--green); }

.course { display: flex; flex-direction: column; overflow: hidden; transition: .2s ease; color: var(--text); }
.course:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.course .band { background: linear-gradient(135deg, var(--ink), var(--ink-3)); color: #fff; padding: 16px 18px 14px; position: relative; min-height: 96px; }
.course .band::after { content: ''; position: absolute; right: -20px; top: -20px; width: 110px; height: 110px; border-radius: 50%; border: 18px solid rgba(242, 104, 54, .22); }
.course .band .k { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--orange-2); text-transform: uppercase; }
.course .band h4 { font-size: 1.12rem; font-weight: 800; margin: 6px 0 0; color: #fff; position: relative; z-index: 1; }
.course .bd { padding: 12px 18px 16px; font-size: .86rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course .meta { display: flex; gap: 12px; margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.course.Kejuruan .band { background: linear-gradient(135deg, var(--blue), var(--ink-3)); }
.course.Pilihan .band, .course.Muatan .band { background: linear-gradient(135deg, var(--charcoal), var(--ink)); }

/* ---------- list ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--text); }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--paper); color: var(--text); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 700; }
.li .s { font-size: .82rem; color: var(--muted); }
.slot { font-family: var(--mono); font-size: .76rem; background: var(--paper-2); padding: 6px 8px; border-radius: 4px; text-align: center; min-width: 74px; line-height: 1.25; }
.slot b { display: block; font-size: .9rem; color: var(--ink); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------- badge ---------- */
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink); white-space: nowrap; letter-spacing: .02em; }
.b-orange { background: #fde5db; color: #b2401a; }
.b-blue { background: #dce8f7; color: var(--blue); }
.b-green { background: #d9f2e7; color: #137450; }
.b-red { background: #fadcdc; color: #a52c2c; }
.b-amber { background: #fbefd2; color: #8a5f07; }
.b-dark { background: var(--ink); color: #fff; }

/* ---------- tab ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; font-size: .9rem; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--orange); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); background: var(--paper); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #fafbfc; }
td.c, th.c { text-align: center; }
td.act { white-space: nowrap; text-align: right; }
.sched { table-layout: fixed; min-width: 760px; }
.sched th:first-child { width: 78px; }
.sched td, .sched th { text-align: center; vertical-align: middle; }
.sched td.cell { min-width: 120px; font-size: .78rem; line-height: 1.3; }
.sched .blk { background: var(--paper-2); border-left: 3px solid var(--orange); padding: 6px 8px; border-radius: 4px; text-align: left; }
.sched .blk b { display: block; color: var(--ink); }
.sched .blk.kej { border-left-color: var(--blue); }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .84rem; }
.field .hint { font-size: .76rem; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 4px; background: #fff; transition: .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35, 91, 164, .14); }
textarea { min-height: 110px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 140px; }
.field.check { flex-direction: row; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .88rem; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters > * { width: auto; min-width: 180px; }
.filters > input, .filters > select { width: auto; flex: 0 1 280px; }
.alert { padding: 12px 14px; border-radius: 4px; font-size: .88rem; margin-bottom: 14px; border-left: 4px solid var(--blue); background: #e8f0fa; }
.alert.warn { border-color: var(--amber); background: #fdf4e1; }
.alert.err { border-color: var(--red); background: #fbe7e7; }
.alert.ok { border-color: var(--green); background: #e1f5ec; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(13, 26, 46, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; text-transform: uppercase; }
.modal-b { padding: 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--paper); border-radius: 0 0 8px 8px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 5px; font-weight: 600; font-size: .88rem; box-shadow: var(--shadow); border-left: 4px solid var(--orange); animation: up .2s; }
.toast.err { border-left-color: var(--red); }
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { opacity: 0; transform: translateY(8px) } }

/* ---------- materi & kuis ---------- */
.embed { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 6px; overflow: hidden; margin: 10px 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { white-space: pre-wrap; word-wrap: break-word; }
.q-card { padding: 18px 20px; margin-bottom: 14px; }
.q-card .no { font-family: var(--mono); font-size: .72rem; color: var(--orange); letter-spacing: .1em; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 5px; margin-top: 8px; cursor: pointer; }
.opt:hover { border-color: var(--sky); }
.opt.sel { border-color: var(--orange); background: #fff4ef; }
.opt .l { font-family: var(--mono); font-weight: 500; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-size: .75rem; flex: none; }
.opt.sel .l { background: var(--orange); color: #fff; }
.timer { position: sticky; top: 76px; z-index: 5; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.timer b { font-family: var(--mono); font-size: 1.2rem; color: var(--orange-2); }
.soal-ed { border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 12px; background: var(--paper); }
.code-big { font-family: var(--mono); font-size: 2.6rem; letter-spacing: .25em; color: var(--ink); background: var(--paper-2); padding: 12px 20px; border-radius: 6px; display: inline-block; border: 2px dashed var(--orange); }
.st-btn { display: inline-flex; gap: 4px; }
.st-btn button { width: 32px; height: 30px; border: 1.5px solid var(--line); background: #fff; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: .8rem; }
.st-btn button.on.H { background: var(--green); color: #fff; border-color: var(--green); }
.st-btn button.on.S { background: var(--amber); color: #fff; border-color: var(--amber); }
.st-btn button.on.I { background: var(--blue); color: #fff; border-color: var(--blue); }
.st-btn button.on.A { background: var(--red); color: #fff; border-color: var(--red); }
.loading { padding: 50px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 24px; min-height: 52vh; }
  .layout { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .side { position: fixed; left: 0; top: 67px; bottom: 0; width: 270px; z-index: 39; transform: translateX(-100%); transition: .2s; height: auto; }
  .side.open { transform: none; box-shadow: 20px 0 40px rgba(0, 0, 0, .25); }
  .main { padding: 20px 16px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .topbar .who span { display: none; }
  .brand small { display: none; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; } .topbar .who, .tag-el, #btnOut .lbl { display: none; } .topbar .in { gap: 10px; padding: 0 12px; } .brand b { white-space: nowrap; font-size: .95rem; } .brand img { width: 38px; height: 38px; } }
@media print { .side, .topbar, .page-head .actions, .tabs, .no-print { display: none !important; } .layout { display: block; } .main { padding: 0; } }
