:root{--navy:#071a3b;--navy2:#0c2857;--blue:#2ea8ff;--sky:#eaf7ff;--yellow:#ffc928;--bg:#f4f8fc;--surface:#fff;--text:#15233b;--muted:#6b7a90;--line:#dce6f1;--code:#0b1426;--codeText:#dce8ff;--shadow:0 12px 35px rgba(10,35,76,.09);color-scheme:light}html[data-theme=dark]{--bg:#07111f;--surface:#101d30;--text:#e9f2ff;--muted:#9fb0c7;--line:#263750;--sky:#122b46;--code:#050b14;--shadow:0 14px 38px rgba(0,0,0,.28);color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}.topbar{height:70px;background:var(--navy);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,70px);color:#fff}.brand,.side-brand,.login-brand{display:flex;align-items:center;gap:12px}.brand img{width:42px;height:42px;object-fit:contain}.brand span{font-size:18px}.brand b{color:var(--yellow)}.btn-logout{border:1px solid rgba(255,255,255,.35);border-radius:10px;padding:9px 16px}.page-shell{padding:30px max(5vw,20px)}.app-body{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:linear-gradient(180deg,var(--navy),#06142d);padding:24px 18px;color:#dbe9ff;z-index:30;display:flex;flex-direction:column}.side-brand{padding:0 10px 28px;border-bottom:1px solid rgba(255,255,255,.1)}.side-brand img{width:48px;height:48px;object-fit:contain}.side-brand span{line-height:1.15;font-size:16px}.side-brand b{color:var(--yellow);font-size:20px}.sidebar nav{display:grid;gap:7px;margin-top:25px}.sidebar nav a,.side-logout{display:flex;align-items:center;gap:13px;padding:12px 14px;border-radius:12px;color:#c7d6ee;transition:.18s}.sidebar nav a:hover,.sidebar nav a:focus,.side-logout:hover{background:rgba(46,168,255,.16);color:#fff}.mi{display:grid;place-items:center;width:25px;height:25px;color:var(--yellow);font-size:20px}.side-logout{margin-top:auto}.app-main{margin-left:250px;min-height:100vh;padding:28px clamp(20px,4vw,55px)}.content-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.content-head h1{margin:2px 0 0;font-size:clamp(24px,3vw,36px)}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.18em;color:var(--blue);margin:0}.theme-toggle{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:12px;padding:10px 15px}.mobile-header{display:none}.notice{padding:12px 15px;border-radius:12px;margin:0 0 18px}.notice.success{background:#dff7e9;color:#11633a}.notice.error{background:#ffe8e8;color:#a32626}.status-strip{display:flex;gap:22px;align-items:center;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);padding:11px 16px;border-radius:14px 14px 0 0;color:var(--muted);font-size:13px}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px}.online{background:#28c56f}.editor-card{background:var(--surface);border:1px solid var(--line);border-top:0;border-radius:0 0 16px 16px;overflow:hidden;box-shadow:var(--shadow)}.editor-toolbar{min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--line)}.editor-toolbar b{display:block}.editor-toolbar small{color:var(--muted)}.editor-actions{display:flex;gap:8px}.editor-actions button{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:9px;padding:8px 12px}.editor-actions .run-btn{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:700}.editor-actions .danger-ghost{color:#d33b4a}.editor-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr);min-height:540px}.editor-grid>textarea,#code{resize:none;border:0;outline:0;background:var(--code);color:var(--codeText);padding:20px;font:15px/1.65 Consolas,"SFMono-Regular",monospace;tab-size:4}.output-panel{display:flex;flex-direction:column;background:var(--surface);border-left:1px solid var(--line)}.panel-title{font-size:11px;letter-spacing:.15em;font-weight:800;color:var(--muted);padding:13px 16px;border-bottom:1px solid var(--line)}#stdin{height:115px;resize:vertical;border:0;border-bottom:1px solid var(--line);padding:13px;background:var(--surface);color:var(--text);outline:0}#output{flex:1;margin:0;padding:18px;overflow:auto;white-space:pre-wrap;color:var(--text);font:14px/1.6 Consolas,monospace}.monitor-note{margin-top:15px;display:flex;gap:15px;align-items:center;background:var(--sky);border:1px solid color-mix(in srgb,var(--blue) 25%,var(--line));padding:13px 16px;border-radius:13px;font-size:13px}.monitor-note b{white-space:nowrap}.monitor-note span{color:var(--muted);flex:1}.monitor-note strong{color:#d28b00;white-space:nowrap}.activity-list{display:grid;gap:13px}.activity-card{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;background:var(--surface);border:1px solid var(--line);padding:18px;border-radius:15px;box-shadow:var(--shadow)}.activity-icon{width:46px;height:46px;border-radius:13px;background:var(--sky);color:var(--blue);display:grid;place-items:center;font-size:24px}.activity-card h2{font-size:18px;margin:3px 0}.activity-card small,.activity-card p{color:var(--muted);margin:0}.activity-card>a,.primary-btn{background:var(--blue);color:#fff;border:0;border-radius:10px;padding:10px 17px;font-weight:700}.activity-card>a.disabled{background:var(--line);color:var(--muted);pointer-events:none}.empty-state{text-align:center;background:var(--surface);border:1px dashed var(--line);border-radius:16px;padding:60px 20px}.empty-state>span{font-size:45px;color:var(--blue)}.empty-state p{color:var(--muted)}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.form-card,.activity-detail{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow)}.form-card h2{margin-top:0}.form-card form,.login-card form{display:grid;gap:15px}.form-card label,.login-card label{display:grid;gap:6px;font-weight:650;font-size:14px}.form-card input,.login-card input{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface);color:var(--text);outline:none}.form-card input:focus,.login-card input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(46,168,255,.12)}.activity-meta{display:flex;gap:8px;flex-wrap:wrap}.activity-meta span{background:var(--sky);color:var(--navy2);padding:7px 10px;border-radius:8px;font-size:12px;font-weight:700}.instructions{padding:25px 0;line-height:1.7}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 20% 10%,#dff4ff,transparent 35%),linear-gradient(145deg,#f8fbff,#e9f3ff)}.login-card{width:min(430px,100%);padding:34px;background:#fff;border-radius:22px;box-shadow:0 25px 70px rgba(7,26,59,.16);color:#15233b}.login-brand img{width:64px;height:64px;object-fit:contain}.login-brand p{margin:0;color:#5c6d82;font-size:11px;letter-spacing:.2em}.login-brand h1{margin:0;color:var(--navy);font-size:26px}.login-card h2{margin:28px 0 3px}.muted,.login-card small{color:#6b7a90}.login-card .primary-btn{margin-top:4px;padding:13px}.sidebar-backdrop{display:none}
@media(max-width:900px){.sidebar{transform:translateX(-105%);transition:.22s}.sidebar.open{transform:none}.sidebar-backdrop{position:fixed;inset:0;background:rgba(4,14,33,.55);z-index:20}.sidebar-backdrop.show{display:block}.mobile-header{display:flex;position:sticky;top:0;z-index:15;height:58px;background:var(--navy);color:#fff;align-items:center;justify-content:space-between;padding:0 15px}.mobile-header button{border:0;background:transparent;color:#fff;font-size:21px}.app-main{margin-left:0;padding:22px 15px}.content-head{margin-bottom:18px}.theme-toggle{display:none}.editor-grid{grid-template-columns:1fr;min-height:0}.editor-grid>textarea{height:430px}.output-panel{border-left:0;border-top:1px solid var(--line);min-height:320px}.profile-grid{grid-template-columns:1fr}.monitor-note{align-items:flex-start;flex-wrap:wrap}.monitor-note span{flex-basis:75%}}
@media(max-width:560px){.content-head h1{font-size:25px}.editor-toolbar{align-items:flex-start;gap:12px;flex-direction:column}.editor-actions{width:100%;overflow-x:auto}.editor-actions button{white-space:nowrap}.editor-grid>textarea{height:380px;font-size:13px}.activity-card{grid-template-columns:auto 1fr}.activity-card>a{grid-column:1/-1;text-align:center}.form-card{padding:18px}.login-card{padding:25px}}

/* Kontras konsisten untuk seluruh halaman ketika tema gelap aktif. */
html[data-theme=dark] body,
html[data-theme=dark] .app-main,
html[data-theme=dark] .management-card,
html[data-theme=dark] .form-card,
html[data-theme=dark] .activity-detail,
html[data-theme=dark] .activity-card,
html[data-theme=dark] .editor-card,
html[data-theme=dark] .output-panel,
html[data-theme=dark] .status-strip,
html[data-theme=dark] .profile-badge-card,
html[data-theme=dark] .grade-card,
html[data-theme=dark] .submission-student,
html[data-theme=dark] .code-review,
html[data-theme=dark] .indicator-history-dialog,
html[data-theme=dark] .card,
html[data-theme=dark] .table,
html[data-theme=dark] .table > :not(caption) > * > * {color:#fff}
html[data-theme=dark] .card{--bs-card-bg:var(--surface);--bs-card-color:#fff;background-color:var(--surface);border-color:var(--line)}
html[data-theme=dark] .table{--bs-table-color:#fff;--bs-table-bg:transparent;--bs-table-border-color:var(--line);--bs-table-striped-color:#fff;--bs-table-hover-color:#fff}
html[data-theme=dark] .form-control,
html[data-theme=dark] .form-select,
html[data-theme=dark] input,
html[data-theme=dark] textarea,
html[data-theme=dark] select{background-color:var(--surface);border-color:var(--line);color:#fff}
html[data-theme=dark] input::placeholder,
html[data-theme=dark] textarea::placeholder{color:#d5dfec;opacity:.72}
html[data-theme=dark] .muted,
html[data-theme=dark] .text-muted,
html[data-theme=dark] small,
html[data-theme=dark] .activity-card small,
html[data-theme=dark] .activity-card p,
html[data-theme=dark] .activity-admin-item p,
html[data-theme=dark] .editor-toolbar small,
html[data-theme=dark] .panel-title,
html[data-theme=dark] .monitor-note span,
html[data-theme=dark] .indicator-details span{color:#fff!important}
html[data-theme=dark] .activity-meta span,
html[data-theme=dark] .status-chip,
html[data-theme=dark] .indicator-strip > button{color:#fff}
html[data-theme=dark] .modern-btn.secondary{background:var(--surface);color:#fff!important}
html[data-theme=dark] .notice.success{background:#123d2a;color:#fff}
html[data-theme=dark] .notice.error,
html[data-theme=dark] .expired-message{background:#4a1e28;color:#fff}
html[data-theme=dark] option{background:#101d30;color:#fff}
