/* =========================================================
   JadwalKu (terang & playful)
   Tema default: terang. Varian gelap: [data-theme="dark"]
   ========================================================= */

:root {
    color-scheme: light;

    /* Permukaan */
    --bg: #fff8f0;
    --bg-2: #f4f0ff;
    --card: #ffffff;
    --card-2: #fffdfa;
    --panel: rgba(255, 255, 255, .82);
    --panel-2: #ffffff;
    --line: rgba(31, 20, 48, .085);
    --line-strong: rgba(31, 20, 48, .16);

    /* Teks */
    --ink: #1d1433;
    --ink-2: #4b3f68;
    --muted: #6b6183;

    /* Warna aksen */
    --brand: #ff6a2b;
    --brand-2: #ffa14a;
    --violet: #7c5cff;
    --teal: #0ea5a4;
    --pink: #ff5d9e;
    --sky: #38bdf8;
    --sun: #ffc53d;
    --ok: #10b981;
    --danger: #f43f5e;

    /* Bayangan */
    --shadow-1: 0 1px 2px rgba(31, 20, 48, .05), 0 10px 26px -16px rgba(31, 20, 48, .28);
    --shadow-2: 0 22px 55px -28px rgba(31, 20, 48, .45);
    --shadow-pop: 0 18px 40px -22px rgba(255, 106, 43, .55);

    /* Radius */
    --r-xs: 10px;
    --r-sm: 14px;
    --r: 20px;
    --r-lg: 28px;
    --r-xl: 36px;

    /* Gerak */
    --ease: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --dur: .3s;

    --sidebar-w: 268px;
    --blob-opacity: .55;
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0c0916;
    --bg-2: #130e20;
    --card: #171024;
    --card-2: #1c1429;
    --panel: rgba(255, 255, 255, .055);
    --panel-2: rgba(255, 255, 255, .075);
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(255, 255, 255, .18);

    --ink: #f5f0ff;
    --ink-2: #cec6e4;
    --muted: #9a90b6;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -20px rgba(0, 0, 0, .9);
    --shadow-2: 0 26px 60px -30px rgba(0, 0, 0, .95);
    --shadow-pop: 0 20px 46px -24px rgba(255, 106, 43, .6);

    --blob-opacity: .4;
}

/* ---------- Dasar ---------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    background-image:
        radial-gradient(1100px 620px at 8% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%),
        radial-gradient(900px 560px at 96% 4%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 60%),
        radial-gradient(800px 520px at 60% 108%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 62%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    transition: background-color .35s var(--ease), color .35s var(--ease);
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.022em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: .92em;
    padding: 1px 6px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--violet) 12%, var(--card));
    color: color-mix(in srgb, var(--violet) 70%, var(--ink));
}

/* ---------- Blob latar ---------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: var(--blob-opacity);
}

.aurora span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}

.aurora .b1 {
    width: 460px; height: 460px;
    left: -120px; top: -140px;
    background: radial-gradient(circle at 30% 30%, var(--brand-2), transparent 70%);
    animation: float1 18s var(--ease) infinite alternate;
}

.aurora .b2 {
    width: 380px; height: 380px;
    right: -80px; top: 80px;
    background: radial-gradient(circle at 60% 40%, var(--violet), transparent 70%);
    animation: float2 22s var(--ease) infinite alternate;
}

.aurora .b3 {
    width: 420px; height: 420px;
    left: 45%; bottom: -200px;
    background: radial-gradient(circle at 50% 50%, var(--teal), transparent 70%);
    animation: float3 26s var(--ease) infinite alternate;
}

@keyframes float1 { to { transform: translate3d(60px, 50px, 0) scale(1.1); } }
@keyframes float2 { to { transform: translate3d(-50px, 70px, 0) scale(1.14); } }
@keyframes float3 { to { transform: translate3d(-70px, -60px, 0) scale(1.08); } }

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .5;
    background-image: radial-gradient(rgba(31, 20, 48, .045) 1px, transparent 1px);
    background-size: 4px 4px;
}

[data-theme="dark"] .grain { background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    inset: 14px auto 14px 14px;
    width: var(--sidebar-w);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 14px;
    border-radius: var(--r-lg);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 6px 8px 16px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 13px;
    font-size: 19px;
    color: #2b1405;
    background: linear-gradient(140deg, var(--brand-2), var(--brand) 55%, var(--pink));
    box-shadow: 0 10px 22px -12px rgba(255, 106, 43, .9);
    transition: transform .4s var(--spring);
}

.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.06); }
.brand-icon img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 14.5px; letter-spacing: -.02em; }
.brand-text small { font-size: 11px; color: var(--muted); }

.menu-label {
    padding: 10px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
}

.app-nav { display: flex; flex-direction: column; gap: 3px; }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    transition: background .22s var(--ease), color .22s, transform .22s var(--spring);
}

.nav-link i { font-size: 16px; opacity: .8; transition: transform .3s var(--spring), opacity .2s; }
.nav-link:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); transform: translateX(2px); }
.nav-link:hover i { opacity: 1; transform: scale(1.12); }

.nav-link.active {
    color: #2b1405;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow-pop);
}

.nav-link.active i { opacity: 1; }

.nav-link.logout { color: var(--muted); }
.nav-link.logout:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 9px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(140deg, var(--violet), var(--sky));
}

/* ---------- Nav mobile ---------- */
.nav-toggle { display: none; }
.mobile-nav { display: none; }
.nav-scrim { display: none; }

/* ---------- Kerangka utama ---------- */
.main-wrap {
    position: relative;
    z-index: 2;
    margin-left: calc(var(--sidebar-w) + 28px);
    padding: 0 26px 30px 0;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 66px;
    padding: 0 4px;
    margin-bottom: 8px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}

.topbar-title { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.topbar-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    white-space: nowrap;
}

.chip i { font-size: 13px; opacity: .75; }
.chip-live { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); border-color: color-mix(in srgb, var(--brand) 26%, transparent); }
.chip-live i { opacity: 1; }

/* Toggle tema */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 62px;
    height: 32px;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--panel-2);
    cursor: pointer;
    transition: background .3s var(--ease), border-color .3s;
}

.theme-toggle .knob {
    position: absolute;
    top: 3px; left: 3px;
    display: grid;
    place-items: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(140deg, var(--sun), var(--brand));
    box-shadow: 0 6px 14px -6px rgba(255, 106, 43, .9);
    transition: transform .42s var(--spring), background .3s;
}

[data-theme="dark"] .theme-toggle .knob {
    transform: translateX(30px);
    background: linear-gradient(140deg, var(--violet), var(--sky));
    box-shadow: 0 6px 16px -6px rgba(124, 92, 255, .9);
}

.theme-toggle:hover .knob { transform: scale(1.08); }
[data-theme="dark"] .theme-toggle:hover .knob { transform: translateX(30px) scale(1.08); }

/* ---------- Kepala halaman ---------- */
.app-main { display: flex; flex-direction: column; gap: 18px; padding-top: 14px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--brand) 62%, var(--ink));
}

.page-head h1 {
    font-size: clamp(23px, 2.5vw, 31px);
    margin-top: 6px;
}

.page-head .sub { margin-top: 7px; font-size: 13.5px; color: var(--muted); }
.page-head .sub strong { color: var(--ink-2); font-weight: 700; }

/* Segmented control */
.seg {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
}

.seg a, .seg button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: color .2s, background .25s var(--ease), transform .2s var(--spring);
}

.seg a i, .seg button i { font-size: 14px; }
.seg a:hover, .seg button:hover { color: var(--ink); transform: translateY(-1px); }

.seg .on {
    color: #2b1405;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow-pop);
}

/* ---------- Pemilih anak ---------- */
.kids {
    display: flex;
    align-items: center;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
}

.kids::-webkit-scrollbar { display: none; }

.kid {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 15px 8px 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    white-space: nowrap;
    transition: transform .26s var(--spring), box-shadow .26s, border-color .26s, background .26s;
}

.kid small { font-weight: 600; color: var(--muted); font-size: 11px; }

.kid:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.kid.on {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--c, var(--brand)) 55%, transparent);
    background: color-mix(in srgb, var(--c, var(--brand)) 13%, var(--card));
    box-shadow: 0 14px 30px -20px color-mix(in srgb, var(--c, var(--brand)) 90%, transparent);
}

.avatar {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 11px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .02em;
    flex: 0 0 auto;
}

.avatar.sm { width: 26px; height: 26px; border-radius: 9px; font-size: 10.5px; }

/* ---------- Statistik ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-radius: var(--r);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: transform .3s var(--spring), box-shadow .3s;
}

.stat::after {
    content: "";
    position: absolute;
    right: -34px; top: -34px;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%);
    pointer-events: none;
}

.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.stat:hover .stat-icon { transform: rotate(-9deg) scale(1.08); }

.stat-icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 13px;
    font-size: 18px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 15%, var(--card));
    transition: transform .4s var(--spring);
    flex: 0 0 auto;
}

.stat-value {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.stat-label { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }

/* ---------- Kartu live ---------- */
.live {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 55%),
        var(--card);
    border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.live::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 40%, var(--violet)));
}

.live-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.live-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--c) 42%, var(--ink));
    background: color-mix(in srgb, var(--c) 16%, var(--card));
    border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
}

.live-flag .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c);
    animation: pulse 1.7s var(--ease) infinite;
}

.live-flag.idle .dot { animation: none; opacity: .55; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); }
    50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 0%, transparent); }
}

.live h2 { font-size: clamp(19px, 2vw, 25px); }

.live .meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.live .meta i { font-size: 13px; opacity: .8; margin-right: 3px; }
.live .meta .sep { opacity: .45; }

.live-count { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.live-count b {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--c) 50%, var(--ink));
}
.live-count span { font-size: 12px; color: var(--muted); font-weight: 600; }

.bar {
    position: relative;
    height: 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 9%, transparent);
    overflow: hidden;
    margin-top: 4px;
    max-width: 420px;
}

.bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--p, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 45%, var(--sun)));
    transition: width 1s linear;
}

.ring { position: relative; display: grid; place-items: center; width: 92px; height: 92px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: color-mix(in srgb, var(--ink) 10%, transparent); stroke-width: 8; }
.ring .val {
    fill: none;
    stroke: var(--c);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--c) 45%, transparent));
}
.ring b {
    position: absolute;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--c) 45%, var(--ink));
}

/* ---------- Tabel jadwal (jam × hari) ---------- */
.tt-card {
    padding: 8px;
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.tt-card + .tt-card { margin-top: 16px; }

.tt-head-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
}

.tt-head-bar .tt-name { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.tt-head-bar .tt-class { font-size: 12px; color: var(--muted); font-weight: 600; }
.tt-head-bar .spacer { margin-left: auto; }

.tt-scroll { overflow-x: auto; border-radius: var(--r); }

.tt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
}

.tt thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 8px 12px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.tt thead th .dname { display: block; }
.tt thead th .ddot {
    display: block;
    width: 7px; height: 7px;
    margin: 0 auto 5px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent);
}

.tt thead th.is-today { color: color-mix(in srgb, var(--brand) 55%, var(--ink)); }

.tt thead th.is-today .dname {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 16%, var(--card));
}

.tt tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    padding: 10px 12px 10px 10px;
    text-align: left;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    white-space: nowrap;
    vertical-align: top;
}

.tt tbody th b {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.tt tbody th span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.tt td {
    padding: 6px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    min-width: 108px;
}

.tt tr:last-child th, .tt tr:last-child td { border-bottom: 0; }

.tt-chip {
    display: block;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: color-mix(in srgb, var(--c) 42%, var(--ink));
    background: color-mix(in srgb, var(--c) 13%, var(--card));
    border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
    border-left: 3px solid var(--c);
    transition: transform .24s var(--spring), box-shadow .24s, background .24s;
}

.tt-chip + .tt-chip { margin-top: 5px; }

.tt-chip small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: color-mix(in srgb, var(--c) 30%, var(--ink-2));
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-chip:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--c) 90%, transparent);
    background: color-mix(in srgb, var(--c) 20%, var(--card));
}

.tt-chip.is-live {
    border-color: color-mix(in srgb, var(--c) 70%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent);
}

.tt-chip .who {
    display: inline-block;
    margin-right: 5px;
    padding: 0 5px;
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
    background: var(--c);
}

.tt-empty {
    display: grid;
    place-items: center;
    min-height: 40px;
    border-radius: var(--r-sm);
    color: color-mix(in srgb, var(--muted) 55%, transparent);
    font-size: 15px;
    font-weight: 700;
}

/* ---------- Papan mingguan (kartu) ---------- */
.week {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.day {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: var(--r);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    min-height: 190px;
}

.day.today {
    border-color: color-mix(in srgb, var(--brand) 42%, transparent);
    box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--brand) 85%, transparent);
}

.day-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px 9px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--ink) 2.5%, var(--card));
}

.day-name { font-size: 12.5px; font-weight: 800; letter-spacing: -.01em; }

.day-count {
    margin-left: auto;
    display: grid;
    place-items: center;
    min-width: 21px; height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--muted);
    background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.day.today .day-count { color: #2b1405; background: linear-gradient(120deg, var(--brand), var(--brand-2)); }

.day-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; }

.empty-line {
    display: grid;
    place-items: center;
    padding: 18px 0;
    font-size: 11.5px;
    font-weight: 600;
    color: color-mix(in srgb, var(--muted) 70%, transparent);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-sm);
}

.slot {
    position: relative;
    padding: 9px 10px 10px 13px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--c) 11%, var(--card));
    border: 1px solid color-mix(in srgb, var(--c) 24%, var(--line));
    transition: transform .26s var(--spring), border-color .24s, box-shadow .24s, background .24s;
}

.slot::before {
    content: "";
    position: absolute;
    left: 0; top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--c);
}

.slot:hover {
    transform: translateY(-3px);
    background: color-mix(in srgb, var(--c) 17%, var(--card));
    border-color: color-mix(in srgb, var(--c) 48%, transparent);
    box-shadow: 0 14px 28px -20px color-mix(in srgb, var(--c) 90%, transparent);
}

.slot-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .01em;
    color: color-mix(in srgb, var(--c) 42%, var(--ink));
    font-variant-numeric: tabular-nums;
}

.slot-title { margin-top: 3px; font-size: 12.5px; font-weight: 800; line-height: 1.25; color: var(--ink); }

.slot-meta,
.slot-note {
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-note {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed color-mix(in srgb, var(--ink) 12%, transparent);
    color: var(--ink-2);
}

.slot.is-done { opacity: .58; }

.slot.is-live {
    border-color: color-mix(in srgb, var(--c) 65%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 26%, transparent);
    animation: glow 2.6s var(--ease) infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 22%, transparent); }
    50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 38%, transparent); }
}

.slot-live-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    vertical-align: 2px;
    color: var(--bg);
    background: var(--ink);
}

/* ---------- Timeline hari ini ---------- */
.tl { position: relative; display: flex; flex-direction: column; gap: 10px; }

.tl-row {
    display: grid;
    grid-template-columns: 76px 26px 1fr;
    align-items: stretch;
    gap: 0;
}

.tl-time {
    padding-top: 10px;
    text-align: right;
    padding-right: 12px;
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.tl-time span { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }

.tl-rail { position: relative; display: grid; place-items: center; }
.tl-rail::before {
    content: "";
    position: absolute;
    top: 0; bottom: -10px;
    width: 2px;
    background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.tl-row:last-child .tl-rail::before { bottom: 40%; }

.tl-rail i {
    position: relative;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}

.tl-card {
    padding: 12px 15px;
    border-radius: var(--r);
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--c);
    box-shadow: var(--shadow-1);
    transition: transform .26s var(--spring), box-shadow .26s;
}

.tl-card:hover { transform: translateX(3px); box-shadow: var(--shadow-2); }
.tl-card h3 { font-size: 14.5px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.row-meta i { margin-right: 4px; opacity: .8; }
.tl-card .note { margin-top: 7px; font-size: 11.5px; color: var(--ink-2); }

.tl-now {
    display: grid;
    grid-template-columns: 76px 26px 1fr;
    align-items: center;
}

.tl-now .lbl {
    text-align: right;
    padding-right: 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.tl-now .rail { display: grid; place-items: center; }
.tl-now .rail::after {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

.tl-now .line {
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 0%, transparent));
}

/* ---------- Panel & tabel data ---------- */
.panel {
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.panel-pad { padding: 18px 20px; }

.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 { font-size: 14.5px; }
.spacer { flex: 1; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
    flex: 1 1 240px;
    max-width: 380px;
}

.search i {
    position: absolute;
    left: 13px;
    font-size: 14px;
    color: var(--muted);
    pointer-events: none;
}

.search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--panel-2);
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: border-color .22s, box-shadow .22s, background .22s;
}

.search input::placeholder { color: var(--muted); }

.search input:focus {
    border-color: color-mix(in srgb, var(--brand) 60%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-2);
    background: color-mix(in srgb, var(--ink) 5%, transparent);
    border: 1px solid var(--line);
    white-space: nowrap;
}

.pill i { font-size: 12px; opacity: .7; }

.table-scroll { overflow-x: auto; }

.dtable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.dtable th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    background: color-mix(in srgb, var(--ink) 2.5%, var(--card));
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.dtable th.sortable { cursor: pointer; user-select: none; transition: color .2s; }
.dtable th.sortable:hover { color: var(--ink); }
.dtable th .arrow { font-size: 10px; opacity: .35; margin-left: 4px; }
.dtable th.sorted .arrow { opacity: 1; color: var(--brand); }

.dtable td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    vertical-align: middle;
}

.dtable tbody tr { transition: background .2s; }
.dtable tbody tr:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.dtable tbody tr:last-child td { border-bottom: 0; }

.cell-flex { display: inline-flex; align-items: center; gap: 9px; }
.strong { font-weight: 700; color: var(--ink); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }

.dotc {
    width: 11px; height: 11px;
    border-radius: 4px;
    background: var(--c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent);
    flex: 0 0 auto;
}

.actions { text-align: right; white-space: nowrap; }
.actions .btn + .btn { margin-left: 5px; }

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.pager .pages { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.pager .pages button {
    min-width: 31px;
    height: 31px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s var(--spring), background .2s, color .2s, border-color .2s;
}

.pager .pages button:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }

.pager .pages button.on {
    color: #fff;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    border-color: transparent;
}

.pager .pages button:disabled { opacity: .38; cursor: not-allowed; }
.pager .pages .dots { padding: 0 2px; color: var(--muted); }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 22px;
    text-align: center;
}

.empty .ico {
    display: grid;
    place-items: center;
    width: 58px; height: 58px;
    border-radius: 20px;
    font-size: 25px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, var(--card));
    margin-bottom: 4px;
}

.empty h2 { font-size: 17px; }
.empty p { font-size: 13px; color: var(--muted); max-width: 380px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .22s var(--spring), box-shadow .22s, background .22s, border-color .22s, color .22s;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn:active { transform: translateY(0) scale(.985); }
.btn i { font-size: 14px; }

.btn-primary {
    border-color: transparent;
    color: #2b1405;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow-pop);
}

.btn-primary:hover { color: #2b1405; box-shadow: 0 22px 44px -20px rgba(255, 106, 43, .75); }

.btn-sm { padding: 7px 9px; border-radius: 11px; font-size: 12px; }
.btn-sm i { font-size: 13px; }

.btn-icon {
    width: 40px; height: 40px;
    padding: 0;
    border-radius: 13px;
    font-size: 17px;
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.field label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-weight: 600; color: var(--muted); font-size: 11px; }

.input, .select {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    background: var(--panel-2);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input::placeholder { color: var(--muted); }

.input:focus, .select:focus {
    border-color: color-mix(in srgb, var(--brand) 60%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}

.input[type="color"] { height: 44px; padding: 4px; cursor: pointer; }
.input[type="time"] { font-variant-numeric: tabular-nums; }

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Dialog ---------- */
.sheet {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--card);
    color: var(--ink);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}

.sheet::backdrop {
    background: color-mix(in srgb, var(--ink) 45%, transparent);
    backdrop-filter: blur(6px);
}

.sheet[open] { animation: sheetIn .34s var(--spring); }

@keyframes sheetIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
}

.sheet form { display: flex; flex-direction: column; max-height: calc(100vh - 64px); }

.sheet-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.sheet-head h2 { font-size: 16px; }

.sheet-head .close {
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 10px;
    border: 0;
    background: color-mix(in srgb, var(--ink) 6%, transparent);
    color: var(--muted);
    cursor: pointer;
    transition: background .2s, color .2s, transform .3s var(--spring);
}

.sheet-head .close:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); transform: rotate(90deg); }

.sheet-body { padding: 18px; overflow-y: auto; }
.sheet-body .field:last-child { margin-bottom: 0; }

.sheet-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--ink) 2%, transparent);
}

/* ---------- Toast ---------- */
.toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 9px;
    align-items: flex-end;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 330px;
    padding: 12px 15px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-2);
    animation: toastIn .4s var(--spring);
}

.toast.out { animation: toastOut .28s var(--ease) forwards; }
.toast i { font-size: 15px; margin-top: 1px; }
.toast.success i { color: var(--ok); }
.toast.danger i { color: var(--danger); }
.toast.warning i { color: var(--brand); }
.toast.info i { color: var(--sky); }

@keyframes toastIn { from { opacity: 0; transform: translateX(26px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(26px) scale(.94); } }

/* ---------- Konfeti ---------- */
.confetti-layer {
    position: fixed;
    inset: 0;
    z-index: 95;
    pointer-events: none;
    overflow: hidden;
}

.confetti-layer i {
    position: absolute;
    width: 8px; height: 12px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 1.5s var(--ease) forwards;
}

@keyframes confettiFall {
    0%   { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    70%  { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--dx, 0), 62vh, 0) rotate(var(--rot, 540deg)) scale(.85); }
}

/* ---------- Halaman auth ---------- */
.auth-body { display: block; }

.auth-theme {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 50;
}

.auth-split {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 100vh;
}

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 40px 46px;
    background:
        radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
        radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, var(--violet) 20%, transparent), transparent 62%),
        var(--card);
    border-right: 1px solid var(--line);
}

.auth-hero h1 { font-size: clamp(28px, 3.4vw, 42px); margin-top: 14px; max-width: 15ch; }
.auth-hero h1 em { font-style: normal; color: var(--brand); }
.auth-hero p { margin-top: 12px; font-size: 14px; color: var(--ink-2); max-width: 42ch; }

.feature-list { display: flex; flex-direction: column; gap: 11px; margin-top: 26px; }

.feature-list div {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.feature-list i {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 11px;
    font-size: 15px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, var(--card));
    flex: 0 0 auto;
}

.auth-form-side {
    display: grid;
    place-items: center;
    padding: 32px 24px;
}

.auth-card {
    width: min(400px, 100%);
    padding: 30px 28px;
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
}

.auth-card .logo {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 15px;
    font-size: 20px;
    color: #2b1405;
    background: linear-gradient(140deg, var(--brand-2), var(--brand) 60%, var(--pink));
    box-shadow: var(--shadow-pop);
    margin-bottom: 16px;
}

.auth-card h2 { font-size: 22px; }
.auth-card .sub { margin: 6px 0 20px; font-size: 13px; color: var(--muted); }
.auth-card .btn-primary { width: 100%; margin-top: 6px; padding: 12px; }
.auth-card .foot { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- Footer aplikasi ---------- */
.app-foot {
    padding: 22px 4px 6px;
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------- Animasi masuk ---------- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise .62s var(--ease) forwards;
    animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Utilitas ---------- */
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 10px; }

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .sidebar { display: none; }
    .main-wrap { margin-left: 0; padding: 0 16px 26px; }
    .nav-toggle { display: inline-flex; }
    .chip-date { display: none; }

    .mobile-nav {
        display: flex;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        flex-direction: column;
        gap: 4px;
        width: min(300px, 86vw);
        padding: 18px 14px;
        background: var(--card);
        border-right: 1px solid var(--line-strong);
        box-shadow: var(--shadow-2);
        transform: translateX(-103%);
        transition: transform .36s var(--ease);
        overflow-y: auto;
    }

    .mobile-nav.open { transform: none; }

    .nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: color-mix(in srgb, var(--ink) 42%, transparent);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }

    .nav-scrim.show { opacity: 1; pointer-events: auto; }

    .week { grid-auto-columns: minmax(166px, 1fr); }
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { display: none; } /* layar kecil: langsung form, tepat di tengah layar */
    .auth-form-side { min-height: 100vh; }
}

@media (max-width: 720px) {
    .page-head { flex-direction: column; align-items: flex-start; }
    .seg { width: 100%; justify-content: space-between; }
    .seg a, .seg button { flex: 1; justify-content: center; padding: 8px 6px; font-size: 11.5px; }
    .stat-grid { gap: 9px; }
    .stat { padding: 12px; }
    .stat-value { font-size: 21px; }
    .stat-icon { width: 34px; height: 34px; font-size: 15px; }
    .topbar-title { font-size: 13px; }
    .chip { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 560px) {
    .live { grid-template-columns: 1fr; }
    .ring { display: none; }
    .tl-row, .tl-now { grid-template-columns: 56px 20px 1fr; }
    .tl-time { font-size: 11.5px; padding-right: 8px; }
    .tl-now .lbl { padding-right: 8px; }
    .grid-2 { grid-template-columns: 1fr; }
    .toasts { left: 12px; right: 12px; align-items: stretch; }
    .toast { max-width: none; }
}

/* ---------- Hormati reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Cetak ---------- */
@media print {
    .aurora, .grain, .sidebar, .topbar, .mobile-nav, .nav-scrim,
    .seg, .kids, .toasts, .theme-toggle, .actions, .pager, .toolbar,
    .app-foot, .no-print { display: none !important; }

    body { background: #fff !important; color: #000; }
    .main-wrap { margin: 0 !important; padding: 0 !important; }
    .app-main { gap: 10px; padding-top: 0; }
    .panel, .day, .tt-card, .live, .stat, .tl-card {
        box-shadow: none !important;
        border-color: #d8d8e0 !important;
        background: #fff !important;
        break-inside: avoid;
    }
    .week { overflow: visible !important; grid-auto-columns: 1fr; }
    .slot { background: #fff !important; border-color: #ddd !important; }
    .slot-title, .slot-time, .page-head h1, .live h2 { color: #000 !important; }
    .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
    .stat-value { color: #000 !important; }
}

/* ---------- Kalender akademik (tab Kalender) — grid klasik ---------- */
.kwrap { display: flex; flex-direction: column; gap: 14px; }
.kcard { background: var(--card); border-radius: 18px; padding: 18px 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.khead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.knav { display: flex; gap: 6px; }
.knav .kbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f4efe7; color: var(--muted); font-size: 15px; text-decoration: none; }
.knav .kbtn:hover { background: var(--brand); color: #fff; }
.kgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kdow { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0 8px; letter-spacing: .06em; text-transform: uppercase; }
.kdow.wknd { color: var(--brand); }
.kday { min-height: 96px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); padding: 7px 8px; display: flex; flex-direction: column; gap: 5px; }
.kday.off { background: transparent; border-color: transparent; }
.kday.wknd { background: rgba(255, 106, 43, .05); }
.kday.today { border-color: var(--brand); border-width: 2px; box-shadow: 0 0 0 3px rgba(255, 106, 43, .12); }
.knum { font-size: 13px; font-weight: 800; color: var(--muted); line-height: 1; }
.kday.today .knum { display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--brand); color: #fff; border-radius: 50%; }
.kevs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kev { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--ev, #64748b); border-radius: 7px; padding: 3px 8px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kev i { font-size: 10px; flex-shrink: 0; }
.kev.more { background: rgba(127, 127, 127, .18); color: var(--muted); }
.klegend { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--border); }
.klegend span { font-size: 11.5px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.klegend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.kitem { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kitem:last-child { border-bottom: none; }
.kdate { width: 46px; text-align: center; background: #f7f3ec; border-radius: 10px; padding: 5px 0; flex-shrink: 0; }
.kdate b { display: block; font-size: 16px; line-height: 1.1; }
.kdate span { font-size: 10px; font-weight: 800; color: var(--muted); }
.kdate.today { background: var(--brand); }
.kdate.today b, .kdate.today span { color: #fff; }
.kbadge { font-size: 10px; font-weight: 800; color: #fff; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 991px) {
    .kday { min-height: 60px; padding: 5px 6px; gap: 4px; }
    .knum { font-size: 11.5px; }
    .kev { font-size: 8.5px; padding: 2px 5px; }
    .kev i { display: none; }
    .kdow { font-size: 9.5px; padding: 2px 0 5px; }
}
