/* ==========================================================================
   Fisella — sistem presensi mentor
   Palet: krem hangat + cobalt #004aad untuk aksi utama
   ========================================================================== */

:root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #fbfaf7;
    --surface-3: #f2f0ea;
    --line: #e8e5de;
    --line-soft: #f0ede7;
    --ink: #1c1a16;
    --ink-2: #44413a;
    --muted: #6f6a61;
    --muted-2: #999488;
    --brand: #004aad;
    --brand-dark: #00387f;
    --brand-soft: #e9f0fb;
    --brand-mid: #0059c9;
    --ok: #0f766e;
    --ok-soft: #e4f3ef;
    --warn: #b4530a;
    --warn-soft: #fdf1e0;
    --danger: #c62d20;
    --danger-soft: #fdecea;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(28, 26, 22, 0.05);
    --shadow-md: 0 1px 2px rgba(28, 26, 22, 0.04), 0 12px 28px -18px rgba(28, 26, 22, 0.28);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Atribut `hidden` harus selalu menang: banyak komponen (.field, .hint, .grid) punya
   `display` sendiri di CSS yang kalau tidak dipaksa akan menimpa display:none bawaan
   browser — akibatnya panel yang "disembunyikan" JS tetap terlihat. */
[hidden] { display: none !important; }

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
svg.ico { flex: 0 0 auto; display: block; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }

/* ---------- Layout: admin ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 264px;
    flex: 0 0 264px;
    background: #fcfbf9;
    border-right: 1px solid var(--line);
    padding: 16px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 2px; }
/* Logo aplikasi: gambar bulat (assets/logo.png) menggantikan kotak centang lama. */
.brand-mark {
    width: 30px; height: 30px; border-radius: 50%;
    flex: 0 0 auto;
    display: block; object-fit: cover;
    background: transparent; color: #fff;
    box-shadow: 0 2px 6px rgba(0, 74, 173, 0.24);
}
/* Di atas header/side berwarna cobalt: beri cincin putih agar logo tetap kontras. */
.brand-mark-light { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 2px 8px rgba(0, 0, 0, 0.22); }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }

.org-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 11px 12px;
    box-shadow: var(--shadow-sm);
}
.org-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.org-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.org-name sup { font-size: 8px; color: var(--muted-2); }
.org-sub { font-size: 12px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
    font-size: 12px; color: var(--muted-2);
    padding: 16px 10px 5px;
}
.nav-label:first-child { padding-top: 6px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--ink-2);
    transition: background 0.14s ease, color 0.14s ease;
}
.nav-item svg { color: var(--muted-2); }
.nav-item:hover { background: var(--surface-3); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.is-active svg { color: var(--brand); }
.nav-badge {
    margin-left: auto;
    background: var(--warn-soft); color: var(--warn);
    border-radius: 999px; font-size: 11px; font-weight: 600;
    padding: 1px 7px;
}

.sidebar-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.me-card { display: flex; align-items: center; gap: 9px; padding: 8px 6px; }
.me-text { min-width: 0; }
.me-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; color: var(--muted); }
.icon-btn {
    margin-left: auto;
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    color: var(--muted); border: 1px solid transparent; background: transparent;
    cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.main { flex: 1; min-width: 0; }
.page { padding: 26px 30px 56px; max-width: 1320px; }

.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 28px; line-height: 1.15; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 5px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Cards & typography ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.pad { padding: 16px 18px; }
.pad-lg { padding: 22px 24px; }
.card-title { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.h3 { font-size: 18px; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; }
.section-title h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.section-title .count { font-size: 12.5px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--brand); color: #fff;
    border: 1px solid var(--brand); border-radius: 10px;
    padding: 9px 15px; font-size: 13.5px; font-weight: 600;
    font-family: inherit; cursor: pointer; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 74, 173, 0.24);
    transition: background 0.14s ease, transform 0.05s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 14.5px; }
.btn-ghost {
    background: var(--surface); color: var(--ink-2);
    border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line); color: var(--ink); }
.btn-ok { background: #14805a; border-color: #14805a; box-shadow: none; }
.btn-ok:hover { background: #106b4b; border-color: #106b4b; }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 1px solid #f0d5d1; box-shadow: none; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
.btn-wa { background: #1aa06a; border-color: #1aa06a; box-shadow: none; }
.btn-wa:hover { background: #158a5b; border-color: #158a5b; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

/* ---------- Chips & badges ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600;
    padding: 3px 8px; border-radius: 999px;
    background: var(--surface-3); color: var(--muted);
    white-space: nowrap;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-muted { background: var(--surface-3); color: var(--muted); }
.chip-outline { background: #fff; border: 1px solid var(--line); color: var(--muted); }
/* Chip berisi kalimat panjang: boleh membungkus agar tidak menembus kartu di layar HP */
.chip-block {
    white-space: normal; align-items: flex-start; text-align: left;
    border-radius: 12px; padding: 8px 10px; line-height: 1.45; font-weight: 500;
}
.chip-block svg { flex: 0 0 auto; margin-top: 2px; }

.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center;
    font-size: 13px; font-weight: 650; flex: 0 0 auto;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-neutral { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Flash ---------- */
.flash {
    display: flex; align-items: center; gap: 9px;
    border-radius: 11px; padding: 11px 14px;
    font-size: 13px; margin-bottom: 16px;
    border: 1px solid transparent;
}
.flash-ok { background: var(--ok-soft); color: #0b5e57; border-color: #cfe9e2; }
.flash-error { background: var(--danger-soft); color: #8f2018; border-color: #f3d3cf; }

/* ---------- Stat strip ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.stat { padding: 15px 20px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: none; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; margin-top: 3px; line-height: 1.15; }
.stat-value .of { color: var(--muted-2); font-weight: 600; }
.stat-note { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.stat-value.is-warn { color: #c2410c; }
.stat-value.is-ok { color: var(--ok); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 16px; flex-wrap: wrap; }
.date-nav {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; padding: 4px; box-shadow: var(--shadow-sm);
}
.date-nav .icon-link {
    width: 28px; height: 28px; border-radius: 7px;
    display: grid; place-items: center; color: var(--muted);
}
.date-nav .icon-link:hover { background: var(--surface-3); color: var(--ink); }
.date-nav input[type="date"] {
    border: none; background: transparent; font-family: inherit;
    font-size: 13px; font-weight: 600; color: var(--ink);
    padding: 4px 2px; cursor: pointer;
}
.date-nav input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.45; cursor: pointer; }
.date-nav input[type="month"] {
    border: none; background: transparent; font-family: inherit;
    font-size: 13px; font-weight: 600; color: var(--ink);
    padding: 4px 2px; cursor: pointer; width: auto;
}
.date-nav input[type="month"]::-webkit-calendar-picker-indicator { opacity: 0.45; cursor: pointer; }
.seg {
    display: inline-flex; align-items: center; gap: 2px;
    background: var(--surface-3); border-radius: 10px; padding: 3px;
}
.seg a, .seg button {
    border: none; background: transparent; font-family: inherit;
    font-size: 12.5px; font-weight: 600; color: var(--muted);
    padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.seg a.is-active, .seg button.is-active {
    background: var(--surface); color: var(--ink);
    box-shadow: 0 1px 2px rgba(28, 26, 22, 0.12);
}
.seg-right { margin-left: auto; }
.toolbar-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Dua kolom ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 20px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 16px; }
.rail .card + .card { margin-top: 0; }

/* ---------- Daftar sesi per mentor ---------- */
.mentor-group { display: flex; align-items: center; gap: 11px; padding: 13px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.mentor-group .mg-text { min-width: 0; }
.mg-name { font-size: 14.5px; font-weight: 650; }
.mg-sub { font-size: 12.5px; color: var(--muted); }
.mg-actions { margin-left: auto; display: flex; gap: 7px; }

.sesi-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid var(--line-soft);
    align-items: start;
}
.sesi-row:first-child { border-top: none; }
.sesi-time { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.sesi-time .end { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.sesi-time .meta { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.sesi-main { min-width: 0; }
.sesi-murid { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.sesi-prog { font-size: 13px; color: var(--muted); margin-top: 1px; }
.sesi-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sesi-mode svg { color: var(--muted-2); }
.sesi-action { display: flex; align-items: center; gap: 8px; padding-top: 2px; flex-wrap: wrap; }
.sesi-action form { margin: 0; }
.sesi-note { font-size: 12px; color: var(--muted-2); margin-top: 5px; font-style: italic; }

/* ---------- Kartu perhatian / aksi cepat ---------- */
.attention { overflow: hidden; }
.attention-head { padding: 13px 16px 8px; display: flex; align-items: baseline; gap: 6px; }
.attention-head .count { font-size: 12px; color: var(--muted-2); }
.att-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-top: 1px solid var(--line-soft);
    color: var(--ink);
}
.att-item:hover { background: var(--surface-2); }
.att-item .att-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: 0 0 auto; margin-top: 1px; }
.att-title { font-size: 13px; font-weight: 600; line-height: 1.35; }
.att-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.att-item .att-chevron { margin-left: auto; color: var(--muted-2); align-self: center; }
.att-item.is-overdue { box-shadow: inset 3px 0 0 var(--danger); background: #fffbfa; }
.att-item.is-overdue .att-ico { background: var(--danger-soft); color: var(--danger); }
.att-item.is-warn .att-ico { background: var(--warn-soft); color: var(--warn); }
.att-item.is-brand .att-ico { background: var(--brand-soft); color: var(--brand); }
.att-badge { margin-left: 8px; }

.quick-link {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-top: 1px solid var(--line-soft);
    font-size: 13px; color: var(--ink);
}
.quick-link:first-of-type { border-top: none; }
.quick-link:hover { background: var(--surface-2); }
.quick-link .ql-ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.quick-link .att-chevron { margin-left: auto; color: var(--muted-2); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
    text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted-2);
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
    white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #fcfbf9; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.strong { font-weight: 600; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
/* Dua field yang harus berdampingan (mis. Program + Cabang) dalam satu baris grid penuh. */
.form-pair {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.form-pair.is-solo { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="number"], input[type="search"], select, textarea {
    font-family: inherit; font-size: 13.5px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.12); }
textarea { resize: vertical; min-height: 76px; }
/* input[type=search] punya tampilan bawaan browser (tinggi & sudut beda) — samakan. */
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Field filter di toolbar (kotak cari & select): ukuran seragam seperti field lain.
   Selektor memakai [type] agar menang dari aturan global input[type="search"] { width: 100% }. */
input.toolbar-field, select.toolbar-field { height: 38px; width: 250px; max-width: 100%; }
select.toolbar-field { width: 170px; padding-right: 28px; }
@media (max-width: 620px) {
    input.toolbar-field, select.toolbar-field { width: 100%; }
}
/* Judul kelompok field di dalam form (mis. Identitas, Kontak) */
.form-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.form-section:first-child { margin-top: 0; }
.form-section span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.form-section::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }

.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.inline-form { display: inline; }
.form-note { font-size: 12.5px; color: var(--muted); }

/* ---------- Panel dll ---------- */
.split-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.split-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }

.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.metric-label { font-size: 12.5px; color: var(--muted); }
.metric-value { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; }
.metric-note { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.metric-value.is-brand { color: var(--brand); }
.metric-value.is-warn { color: #c2410c; }
.metric-value.is-ok { color: var(--ok); }

.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .empty-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); color: var(--muted-2); display: grid; place-items: center; margin: 0 auto 10px; }

/* ---------- Grafik batang ---------- */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 168px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; max-width: 46px; height: 100%; display: flex; align-items: flex-end; }
.bar {
    width: 100%; border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #dce7f9, #c6d8f4);
    min-height: 4px; position: relative;
    transition: background 0.15s ease;
}
.bar-col.is-active .bar { background: linear-gradient(180deg, #0060d6, var(--brand)); }
.bar-col:hover .bar { background: linear-gradient(180deg, #0060d6, var(--brand)); }
.bar-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bar-value { font-size: 11px; color: var(--muted-2); }

/* ---------- Login ---------- */
.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 32px 20px;
    background:
        radial-gradient(900px 480px at 12% -10%, #e6eefc 0%, rgba(230, 238, 252, 0) 62%),
        radial-gradient(800px 460px at 92% 6%, #fdf0e6 0%, rgba(253, 240, 230, 0) 60%),
        var(--bg);
}
.login-card { width: 100%; max-width: 880px; display: grid; grid-template-columns: 1.02fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px -32px rgba(28, 26, 22, 0.4); }
.login-side { background: linear-gradient(160deg, #004aad 0%, #0060d6 58%, #0a7ae0 100%); color: #fff; padding: 34px 32px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.login-side::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); right: -110px; bottom: -110px; }
.login-side .brand-name { color: #fff; }
.login-side h2 { font-size: 24px; line-height: 1.25; margin-top: 6px; }
.login-side .login-title-wrap { margin: auto 0; position: relative; z-index: 1; }
.login-side .login-title {
    font-size: clamp(26px, 3.4vw, 34px);
    line-height: 1.15; letter-spacing: -0.03em; font-weight: 700;
}
.login-side .login-tagline {
    font-size: 14px; line-height: 1.45; margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
}
.login-side .login-tagline sup { font-size: 9px; opacity: 0.8; vertical-align: super; }
.login-side .login-pt { font-size: 12px; line-height: 1.4; margin-top: 7px; color: rgba(255, 255, 255, 0.74); letter-spacing: .01em; }
/* Desktop: blok judul sedikit dinaikkan (permintaan user) — padding bawah membuat
   teks bergeser ke atas di dalam kotak yang tetap terpusat. */
@media (min-width: 621px) {
    .login-side .login-title-wrap { padding-bottom: 64px; }
}
.login-form { padding: 34px 32px; }
.login-form h1 { font-size: 22px; margin-bottom: 18px; }
.demo-creds { margin-top: 18px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: var(--muted); }
.demo-creds b { color: var(--ink-2); font-weight: 600; }
.demo-creds .cred-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }

/* ---------- Layout: mentor (mobile-first) ---------- */
.layout-mentor { background: #f4f3ef; }
.mentor-wrap { max-width: 720px; margin: 0 auto; min-height: 100vh; }
.mentor-head {
    background: linear-gradient(155deg, #004aad 0%, #0055c4 55%, #0a6ad6 100%);
    color: #fff; padding: 20px 18px 20px;
}
.mh-top { display: flex; align-items: center; gap: 10px; }
.mh-brand { display: flex; align-items: center; gap: 9px; }
.mh-name { font-size: 14px; font-weight: 650; line-height: 1.2; }
.mh-name sup { font-size: 8px; opacity: 0.7; }
.mh-tag { font-size: 11px; color: rgba(255, 255, 255, 0.72); }
.mh-logout { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.14); }
.mh-logout:hover { background: rgba(255, 255, 255, 0.24); }
.mh-halo { font-size: 22px; color: #fff; margin-top: 18px; letter-spacing: -0.02em; }
.mentor-nav { display: flex; gap: 7px; margin-top: 16px; overflow-x: auto; padding-bottom: 2px; }
.mnav-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600;
    padding: 7px 13px; border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}
.mnav-item:hover { background: rgba(255, 255, 255, 0.2); }
.mnav-item.is-active { background: #fff; color: var(--brand); }
.mnav-badge { background: var(--warn-soft); color: var(--warn); border-radius: 999px; font-size: 10.5px; padding: 0 6px; }
.mentor-body { padding: 16px 14px 40px; }
.mentor-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
.mentor-card + .mentor-card { margin-top: 12px; }

.m-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.m-date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.m-date-nav .nav-round { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.m-date-nav .nav-round:hover { background: var(--surface-3); }
.m-date-mid { text-align: center; }
.m-date-mid .dow { font-size: 14px; font-weight: 650; }
.m-date-mid .full { font-size: 12.5px; color: var(--muted); }

.msesi { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px 14px; }
.msesi-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--surface-3); color: var(--muted);
    font-size: 11.5px; font-weight: 650;
    display: grid; place-items: center;
}
.msesi-time { margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.msesi-time .end { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.msesi-time .dur { display: block; font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.msesi-name { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.msesi-prog { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.msesi-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 7px; flex-wrap: wrap; }
.msesi-mode .sesi-alamat { color: var(--ink-2); }
.link-meet { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-meet:hover { text-decoration: underline; }
.msesi .btn-block { grid-column: 1 / -1; margin-top: 4px; }
.msesi-done {
    grid-column: 1 / -1; margin-top: 4px;
    display: flex; align-items: center; gap: 8px; justify-content: center;
    background: var(--ok-soft); color: var(--ok);
    border-radius: 12px; padding: 11px; font-size: 13.5px; font-weight: 600;
}
.m-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.m-summary .pill { flex: 1; min-width: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.m-summary .pill .l { font-size: 11.5px; color: var(--muted); }
.m-summary .pill .v { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.m-day-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 8px; }
.m-day-head .t { font-size: 13px; font-weight: 650; }
.m-day-head .s { font-size: 12px; color: var(--muted); }
.m-empty { background: #fff; border: 1px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
    .cols { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1040px) {
    .cols { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: none; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}
/* ---------- Sidebar off-canvas (mobile & tablet) ---------- */
.nav-burger, .nav-scrim { display: none; }

@media (max-width: 1024px) {
    .shell { display: block; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
        width: 268px; height: 100dvh; flex: none;
        border-right: 1px solid var(--line);
        padding: 16px 14px 18px;
        transform: translateX(-102%);
        transition: transform .22s ease;
        box-shadow: 0 20px 50px -24px rgba(28, 26, 22, .45);
        overflow-y: auto;
    }
    .nav-toggle:checked ~ .shell .sidebar { transform: translateX(0); }
    .nav-burger {
        display: grid; place-items: center;
        position: fixed; top: 12px; left: 12px; z-index: 70;
        width: 42px; height: 42px; border-radius: 12px;
        background: var(--surface); border: 1px solid var(--line);
        color: var(--ink); box-shadow: var(--shadow-md); cursor: pointer;
    }
    .nav-toggle:checked ~ .shell .nav-burger { opacity: 0; pointer-events: none; }
    .nav-scrim {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(24, 20, 40, .42);
        opacity: 0; pointer-events: none; transition: opacity .2s ease;
    }
    .nav-toggle:checked ~ .shell .nav-scrim { opacity: 1; pointer-events: auto; }
    .page { padding: 66px 16px 40px; }
    .page-title { font-size: 23px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-pair { grid-template-columns: minmax(0, 1fr); }
    .split-2, .split-3, .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .page-actions { margin-left: 0; width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }
    .toolbar .seg-right { margin-left: 0; }
    .cols { grid-template-columns: minmax(0, 1fr); }
    .rail { gap: 14px; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.tbl { min-width: 640px; }
    .card.pad-lg, .pad-lg { padding: 18px 16px; }
    .atur-ulang-grid .field, .edit-jadwal-grid .field { min-width: 110px; flex: 1 1 110px; }
}
@media (max-width: 620px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .stat { border-left: none; border-top: 1px solid var(--line-soft); padding: 13px 16px; }
    .stat:first-child { border-top: none; }
    .sesi-row { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 13px 15px; }
    .sesi-action { grid-column: 1 / -1; }
    .sesi-action .btn { width: 100%; }
    .mentor-group { padding: 12px 15px; flex-wrap: wrap; }
    .mg-actions { margin-left: 0; width: 100%; }
    .page-head { gap: 12px; }
    .login-card { grid-template-columns: minmax(0, 1fr); }
    .login-side { padding: 24px; }
    /* Identitas di panel login: lebih kecil di HP (permintaan user). */
    .login-side .login-tagline { font-size: 11.5px; line-height: 1.4; margin-top: 6px; }
    .login-side .login-tagline sup { font-size: 7px; }
    .login-side .login-pt { font-size: 10px; line-height: 1.35; margin-top: 4px; }
}

/* ---------- Grid tambahan ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1040px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-4, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Grafik & laporan ---------- */
.bar-col { text-decoration: none; color: inherit; }
.bar-col .bar-label { font-weight: 600; }
.bar-col.is-active .bar-label { color: var(--brand); }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.dot-brand { background: var(--brand); }
.dot-soft { background: #cddcf5; }
.report-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow-sm); }
.month-nav .icon-link { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.month-nav .icon-link:hover { background: var(--surface-3); color: var(--ink); }
.month-nav input[type="month"] { border: none; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); padding: 3px 2px; }
.money-pos { color: var(--ok); font-weight: 600; }
.money-neg { color: #c2410c; font-weight: 600; }
.tbl .sub { display: block; font-size: 11.5px; color: var(--muted-2); font-weight: 400; }

/* ---------- Pilihan status presensi ---------- */
.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-opt {
    display: flex; align-items: flex-start; gap: 10px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); padding: 11px 12px;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.status-opt:hover { border-color: #cdd9ee; background: var(--surface-2); }
.status-opt input[type="radio"] {
    width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto;
    accent-color: var(--brand); cursor: pointer;
}
.status-opt .so-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.status-opt .so-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.status-opt .so-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.status-opt .so-tag {
    margin-left: auto; flex: 0 0 auto;
    font-size: 10.5px; font-weight: 600; padding: 2px 7px;
    border-radius: 999px; white-space: nowrap; align-self: center;
}
.so-tag-bill { background: var(--warn-soft); color: var(--warn); }
.so-tag-free { background: var(--surface-3); color: var(--muted); }
.status-opt.is-checked {
    border-color: var(--brand); background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}
.status-opt.is-checked .so-title { color: var(--brand-dark); }

/* ---------- Checkbox sebaris ---------- */
.cek-inline {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.cek-inline.full { grid-column: 1 / -1; }
.cek-inline input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: 0 0 auto;
}

/* ---------- Tombol presensi (anti-terpotong) ---------- */
.btn-presensi {
    min-height: 42px; padding: 11px 16px; font-size: 14px;
    line-height: 1.2; white-space: nowrap; overflow: visible;
    letter-spacing: 0;
}
.msesi .btn-presensi { grid-column: 1 / -1; width: 100%; }

/* ---------- Edit jadwal pengajuan (admin) ---------- */
.edit-jadwal {
    margin-top: 12px; padding: 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.edit-jadwal-head { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 9px; }
.edit-jadwal-grid {
    display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
}
.edit-jadwal-grid .field { min-width: 132px; }
.edit-jadwal-grid .field label { font-size: 11.5px; }
.edit-jadwal-grid .btn { margin-bottom: 1px; }

/* ---------- Form sharing revenue ---------- */
.sharing-form { display: flex; align-items: center; gap: 6px; }
.sharing-form input[type="number"] { width: 66px; padding: 6px 8px; font-size: 13px; text-align: right; }
.sharing-form .pct { font-size: 12.5px; color: var(--muted); }
.sharing-form select { padding: 6px 8px; font-size: 12.5px; }

input:disabled, select:disabled { background: var(--surface-3); color: var(--muted-2); cursor: not-allowed; }

/* Nada warna kartu status di sisi mentor */
.msesi-done-warn { background: var(--warn-soft); color: var(--warn); }
.msesi-done-danger { background: var(--danger-soft); color: var(--danger); }
.msesi-done-brand { background: var(--brand-soft); color: var(--brand); }

.login-alt { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }
.login-alt a { font-weight: 600; }

/* ---------- Halaman pendaftaran mentor ---------- */
.daftar-wrap {
    width: 100%; max-width: 720px;
    display: flex; flex-direction: column; gap: 16px;
}
.daftar-head {
    background: linear-gradient(160deg, #004aad 0%, #0060d6 58%, #0a7ae0 100%);
    color: #fff; border-radius: 18px; padding: 26px 26px 24px;
    box-shadow: 0 20px 44px -30px rgba(0, 74, 173, 0.7);
}
.daftar-head .brand { padding: 0 0 14px; }
.daftar-head .brand-name { color: #fff; }
.daftar-head h1 { font-size: 22px; letter-spacing: -0.02em; }
.daftar-head p { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin-top: 6px; line-height: 1.5; }
.daftar-wrap .card { box-shadow: var(--shadow-md); }
.daftar-foot { font-size: 12px; color: var(--muted-2); text-align: center; line-height: 1.5; padding: 0 6px; }

/* ---------- Halaman cek progres murid (publik) ---------- */
.progres-info { display: flex; align-items: center; gap: 12px; }
.progres-avatar {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 16px; font-weight: 700;
}
.progres-nama { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; overflow-wrap: anywhere; }
.progres-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.progres-bulan { margin-top: 18px; }
.progres-bulan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.progres-bulan-head h3 { font-size: 13.5px; font-weight: 650; }
.progres-kosong { font-size: 12.5px; color: var(--muted-2); line-height: 1.5; }
.progres-list { display: flex; flex-direction: column; gap: 10px; }
.progres-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.progres-tgl {
    display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 12px; font-weight: 600; color: var(--brand);
}
.progres-lab {
    font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
    color: var(--muted-2); margin: 9px 0 2px;
}
.progres-teks { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }

/* ---------- Detail setujui pendaftar ---------- */
.detail-setuju { margin-top: 10px; }
.detail-setuju summary {
    font-size: 12.5px; font-weight: 600; color: var(--brand);
    cursor: pointer; padding: 5px 0; list-style: none;
}
.detail-setuju summary::-webkit-details-marker { display: none; }
.detail-setuju summary::before { content: "+ "; font-weight: 700; }
.detail-setuju[open] summary::before { content: "– "; }
.detail-setuju form { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }

/* Tautan Google Meet kecil di kartu sesi */
.chip-meet { margin-left: 8px; padding: 2px 7px; font-size: 10.5px; }
.chip-meet svg { width: 11px; height: 11px; }

.login-alt .dot-sep { margin: 0 6px; color: var(--line); }

/* ---------- Daftar program & cabang (tambah/hapus) ---------- */
.master-list {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.master-item {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface-2);
    border-radius: 999px; padding: 4px 5px 4px 11px;
    font-size: 12.5px; color: var(--ink-2); font-weight: 500;
}
.master-del { display: inline-flex; }
.master-del button {
    width: 20px; height: 20px; border-radius: 50%;
    border: none; background: transparent; color: var(--muted-2);
    display: grid; place-items: center; cursor: pointer; padding: 0;
}
.master-del button:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Form rekening BCA (2 kolom) di tabel mentor ---------- */
.rekening-form { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rekening-form input { padding: 6px 8px; font-size: 12.5px; }
.rekening-form input[name="rekening_bca_no"] { width: 118px; }
.rekening-form input[name="rekening_bca_nama"] { width: 140px; }

/* ---------- Kartu sejajar tinggi ---------- */
.split-2.equal { align-items: stretch; }
.split-2.equal > .card { display: flex; flex-direction: column; }
.split-2.equal > .card .form-actions { margin-top: auto; padding-top: 24px; }

/* ---------- Tautan pendaftaran di Pengaturan ---------- */
.tautan-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.tautan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tautan-row .tautan-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 104px; }
.tautan-row input {
    flex: 1; min-width: 180px; font-size: 12.5px; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px;
}
/* Grup tombol Salin / Buka / Edit — berjejer sejajar di semua ukuran layar */
.tautan-aksi { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tautan-aksi .btn { white-space: nowrap; min-height: 34px; }
/*
 * HP & tablet: label di atas, tautan di bawahnya, lalu tombol Salin/Buka/Edit
 * berjejer selebar kartu. Ditempatkan SETELAH aturan dasar di atas supaya
 * menang urutan sumber (bukan tertimpa display:flex).
 */
@media (max-width: 1024px) {
    .tautan-list { gap: 16px; }
    .tautan-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tautan-row .tautan-label { min-width: 0; }
    .tautan-row input { min-width: 0; width: 100%; flex: none; }
    .tautan-aksi { display: flex; width: 100%; gap: 8px; }
    .tautan-aksi > .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding-left: 8px; padding-right: 8px; }
}

/* ---------- Ketersediaan mengajar ---------- */
.ketersediaan-time {
    flex: 0 0 auto; min-width: 88px;
    background: var(--brand-soft); color: var(--brand);
    border-radius: 12px; padding: 9px 10px; text-align: center;
}
.ketersediaan-time .kt-jam { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.ketersediaan-time .kt-sep { font-size: 11px; opacity: 0.75; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.pagination .pg-info { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.pagination a, .pagination span.pg-now {
    min-width: 32px; height: 32px; padding: 0 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--line);
    font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface);
}
.pagination a:hover { background: var(--surface-3); }
.pagination span.pg-now { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination span.pg-off { opacity: 0.45; pointer-events: none; min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--muted); }

/* ---------- Modal (popup) ---------- */
.modal {
    border: none; padding: 0; border-radius: 18px;
    width: min(560px, calc(100vw - 28px));
    max-height: calc(100vh - 40px);
    background: var(--surface); color: var(--ink);
    box-shadow: 0 30px 70px -30px rgba(28, 26, 22, 0.55);
    overflow: hidden;
}
.modal::backdrop { background: rgba(24, 20, 40, 0.45); backdrop-filter: blur(2px); }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal-head {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft);
}
.modal-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-close {
    margin-left: auto; width: 30px; height: 30px; border-radius: 9px;
    border: 1px solid transparent; background: transparent; color: var(--muted);
    display: grid; place-items: center; cursor: pointer;
}
.modal-close:hover { background: var(--surface-3); color: var(--ink); }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--surface-2);
}
@media (max-width: 620px) {
    .modal { width: calc(100vw - 20px); border-radius: 16px; }
    .modal-head, .modal-body, .modal-foot { padding-left: 15px; padding-right: 15px; }
    .modal-foot .btn { flex: 1; }
}

/* ---------- Kartu pendapatan mentor ---------- */
.income-card { margin-bottom: 14px; }
.income-head { display: flex; align-items: flex-start; gap: 12px; }
.income-label { font-size: 12.5px; color: var(--muted); }
.income-value { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; color: var(--brand); margin-top: 2px; }
.income-note { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.income-head .btn { margin-left: auto; }
.income-split { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }

/* Jangan tambah margin atas pada kartu yang berdampingan di dalam grid */
.split-2 > .card + .card,
.split-2 > * > .card + .card,
.grid-2 > .card + .card,
.grid-4 > .card + .card { margin-top: 0; }

/* Tautan kembali di halaman pendaftaran publik (muncul bila sedang login) */
.daftar-head .daftar-kembali {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 2px; padding: 6px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.16); color: #fff;
    font-size: 12.5px; font-weight: 600; width: fit-content;
}
.daftar-head .daftar-kembali:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------- Ketersediaan: label hari di kartu ---------- */
.ketersediaan-time { min-width: 108px; }
.ketersediaan-time .kt-hari {
    font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
    text-transform: uppercase; opacity: 0.75;
}
.ketersediaan-time .kt-jam { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin-top: 1px; }

/* ---------- Admin: form atur ulang sesi tidak terlaksana ---------- */
.pu-body { min-width: 0; flex: 1; }
@media (max-width: 620px) { .pu-body { flex: 1 1 100%; } }
.atur-ulang-form {
    margin-top: 12px; padding: 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.atur-ulang-grid { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.atur-ulang-grid .field { min-width: 128px; }
.atur-ulang-grid .field label { font-size: 11.5px; }
.atur-ulang-grid .cek-inline { padding-bottom: 9px; }
.atur-ulang-grid .btn { margin-bottom: 1px; }
.kembali-belum-form { margin-top: 10px; }
.kembali-belum-form .btn { width: auto; }
@media (max-width: 560px) {
    .atur-ulang-form .btn, .kembali-belum-form .btn { width: 100%; }
}

/* ---------- Login: ingat saya & lupa sandi ---------- */
.login-opsi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.login-opsi .login-lupa { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.login-card-sempit { max-width: 760px; }

/* ---------- Pilihan ganda berbentuk chip (request jadwal) ---------- */
.pilih-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pilih-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface);
    border-radius: 999px; padding: 6px 12px 6px 10px;
    font-size: 12.5px; font-weight: 500; color: var(--ink-2);
    cursor: pointer; transition: all .14s ease;
}
.pilih-chip input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.pilih-chip:hover { border-color: #cdd9ee; background: var(--surface-2); }
.pilih-chip:has(input:checked) {
    border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}

/* ---------- Baris permintaan reset sandi ---------- */
/* Struktur: nama → email → status (chip) di kiri, tombol aksi di kanan.
   Chip berada DI DALAM .reset-body sehingga tidak pernah menutupi email walau
   kolom konten sempit (HP, tablet, atau desktop dengan rail kanan). */
.reset-row {
    display: flex; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap;
    padding: 12px 0; border-top: 1px dashed var(--line);
}
.reset-row:first-of-type { border-top: none; }
.reset-body {
    flex: 1 1 240px; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
}
.reset-nama { font-size: 13px; font-weight: 600; line-height: 1.35; }
.reset-email {
    font-size: 12px; color: var(--muted); line-height: 1.4; min-width: 0; max-width: 100%;
    overflow-wrap: anywhere;
}
.reset-note { font-size: 12px; color: var(--muted); }
.reset-body .chip { margin-top: 3px; flex: 0 0 auto; }
.reset-aksi {
    display: flex; align-items: center; gap: 8px; flex: 0 0 auto; flex-wrap: nowrap;
}
.reset-aksi .inline-form { display: flex; }
.reset-aksi .btn { white-space: nowrap; }
/* HP & tablet: tombol turun ke baris sendiri, berjejer dua sama lebar. */
@media (max-width: 1024px) {
    .reset-row { align-items: stretch; }
    .reset-body { flex-basis: 100%; }
    .reset-aksi { width: 100%; }
    .reset-aksi .inline-form { flex: 1 1 0; min-width: 0; }
    .reset-aksi .btn { width: 100%; justify-content: center; }
}
/*
 * Kasus nyata yang dilaporkan user: di layar lebar pun kolom konten bisa sempit
 * (sidebar 264px + rail 336px), sehingga chip "Menunggu" dulu menimpa email.
 * Container query memakai lebar KARTU sebagai patokan, jadi hasilnya benar
 * berapa pun lebar viewport-nya. Media query di atas tetap dipertahankan
 * sebagai fallback untuk browser lama tanpa container query.
 */
.reset-list { container-type: inline-size; container-name: resetlist; }
@container resetlist (max-width: 520px) {
    .reset-row { align-items: stretch; }
    .reset-body { flex-basis: 100%; }
    .reset-aksi { width: 100%; }
    .reset-aksi .inline-form { flex: 1 1 0; min-width: 0; }
    .reset-aksi .btn { width: 100%; justify-content: center; }
}

/* ---------- Zona berbahaya (hapus semua data) ---------- */
/* ---------- Checklist hapus data (Pengaturan) ---------- */
.hapus-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hapus-list { display: flex; flex-direction: column; gap: 12px; }
.hapus-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.hapus-item:hover { border-color: #f0c9c3; }
.hapus-item input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: #b3261e; flex: 0 0 auto; }
.hapus-item .hapus-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.hapus-item .hapus-label { font-weight: 650; font-size: 13.5px; }
.hapus-item .hapus-ket { font-size: 12px; color: var(--muted); line-height: 1.45; }
.hapus-item .chip { flex: 0 0 auto; }
.hapus-item.is-kosong .hapus-label { color: var(--muted); }
.hapus-item:has(input:checked) { border-color: #e0a29a; background: #fff6f4; }

.danger-zone { border-color: #f3d3cf; background: #fffbfa; }
.danger-zone .card-title { color: #a5261b; }
.btn-danger {
    background: #c62d20; border-color: #c62d20; color: #fff; box-shadow: none;
}
.btn-danger:hover { background: #a5261b; border-color: #a5261b; }

/* ---------- Slot jadwal reguler (multi slot) ---------- */
.slot-jadwal { transition: opacity .12s ease; }
.slot-jadwal[hidden] { display: none; }

/* ---------- Tablet (768–1024) ---------- */
@media (max-width: 1024px) and (min-width: 720px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-value { font-size: 22px; }
}

/* ---------- Mobile kecil ---------- */
@media (max-width: 480px) {
    .page { padding: 62px 12px 36px; }
    .nav-burger { top: 10px; left: 10px; width: 40px; height: 40px; }
    .btn { padding: 9px 13px; }
    .metric-value { font-size: 20px; }
    .ketersediaan-time { min-width: 0; flex-basis: 100%; text-align: left; display: flex; align-items: baseline; gap: 8px; }
    .ketersediaan-time .kt-hari { font-size: 11px; }
    .modal { width: calc(100vw - 16px); }
    .pilih-chips { gap: 6px; }
    .pilih-chip { font-size: 12px; padding: 5px 10px 5px 8px; }
}

/* Stats mengikuti jumlah kartu (responsif) */
@media (max-width: 1024px) {
    .stats[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 620px) {
    .stats[style] { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Region AJAX (pencarian & filter tanpa reload) */
[data-ajax-region] { transition: opacity .15s ease; }
[data-ajax-region].is-loading { opacity: .55; pointer-events: none; }
