/* =========================================================
   SiHADIR — tema terang profesional (di atas AdminLTE 4 / Bootstrap 5)
   Palet: kanvas abu-biru muda, permukaan putih, tinta biru tua,
   warna utama hijau-teal. Warna status dipakai konsisten di semua layar.
   ========================================================= */
:root {
    /* Warna dasar */
    --canvas: #f5f7fa;
    --surface: #ffffff;
    --line: #e3e8ef;
    --line-soft: #eef2f6;
    --ink: #15233c;
    --ink-2: #3b4a63;
    --muted: #64748b;

    --brand: #0e7f71;
    --brand-rgb: 14, 127, 113;
    --brand-line: #b9ded7;
    --brand-top: #edf7f5;
    --grad-a: #1bb8a4;
    --grad-b: #0d8a7c;
    --grad-c: #22c3ae;
    --grad-d: #0f9484;
    --brand-600: #0b7266;
    --brand-700: #08635a;
    --brand-soft: #def5f0;
    --brand-tint: #f0faf8;
    --accent: #d97706;

    /* Warna status (H/T/S/I/D/A + izin keluar) */
    --st-h: #15803d;  --st-h-bg: #e7f6ec;
    --st-t: #b45309;  --st-t-bg: #fdf3e1;
    --st-s: #0369a1;  --st-s-bg: #e4f2fb;
    --st-i: #4338ca;  --st-i-bg: #ebeefe;
    --st-d: #475569;  --st-d-bg: #eef1f5;
    --st-a: #c0262d;  --st-a-bg: #fdecec;
    --st-k: #7c3aed;  --st-k-bg: #f2ecfe;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-1: 0 1px 2px rgba(21, 35, 60, .04), 0 1px 1px rgba(21, 35, 60, .03);
    --shadow-2: 0 4px 14px -6px rgba(21, 35, 60, .12);

    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-700);
    --bs-link-hover-color-rgb: 8, 99, 90;
    --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-body-line-height: 1.55;
    --bs-body-color: #15233c;
    --bs-body-color-rgb: 21, 35, 60;
    --bs-emphasis-color: #0d1a2f;
    --bs-secondary-color: #64748b;
    --bs-tertiary-bg: #f5f7fa;
    --bs-tertiary-bg-rgb: 245, 247, 250;
    --bs-border-color: #e3e8ef;
    --bs-border-color-translucent: rgba(21, 35, 60, .08);
    --bs-border-radius: 8px;
    --bs-border-radius-lg: 12px;
    --bs-success: #15803d; --bs-success-rgb: 21, 128, 61;
    --bs-warning: #d97706; --bs-warning-rgb: 217, 119, 6;
    --bs-danger: #c0262d;  --bs-danger-rgb: 192, 38, 45;
    --bs-info: #0284c7;    --bs-info-rgb: 2, 132, 199;
}
/* ---------- Tema warna (Pengaturan → Identitas Sekolah → Tema warna) ---------- */
[data-tema="biru"] {
    --brand: #1d6ad6; --brand-rgb: 29, 106, 214; --brand-600: #185dc0; --brand-700: #144ea3;
    --brand-soft: #e2edfc; --brand-tint: #f1f6fe; --brand-line: #bcd3f5; --brand-top: #e9f1fd;
    --grad-a: #3a8bf2; --grad-b: #1856bd; --grad-c: #4a98f6; --grad-d: #1d63cf; --brand-d: #5c9ef2; --brand-d-rgb: 92, 158, 242;
}
[data-tema="indigo"] {
    --brand: #4f46e5; --brand-rgb: 79, 70, 229; --brand-600: #4338ca; --brand-700: #3730a3;
    --brand-soft: #eceafd; --brand-tint: #f6f5ff; --brand-line: #cbc7f8; --brand-top: #efeefe;
    --grad-a: #6f67f1; --grad-b: #4036c4; --grad-c: #7e78f6; --grad-d: #4f46e5; --brand-d: #8d87f6; --brand-d-rgb: 141, 135, 246;
}
[data-tema="navy"] {
    --brand: #1f3b8c; --brand-rgb: 31, 59, 140; --brand-600: #1b337b; --brand-700: #162a64;
    --brand-soft: #e5eaf6; --brand-tint: #f3f5fb; --brand-line: #c2cce7; --brand-top: #eaeef8;
    --grad-a: #2d52b3; --grad-b: #182f70; --grad-c: #3a5fc0; --grad-d: #1f3b8c; --brand-d: #7d98e2; --brand-d-rgb: 125, 152, 226;
}
[data-tema="ungu"] {
    --brand: #7c3aed; --brand-rgb: 124, 58, 237; --brand-600: #6d28d9; --brand-700: #5b21b6;
    --brand-soft: #f0e8fe; --brand-tint: #f9f5ff; --brand-line: #dac8fb; --brand-top: #f4eefe;
    --grad-a: #9d6cf6; --grad-b: #6a27d6; --grad-c: #a87ef8; --grad-d: #7c3aed; --brand-d: #b18cf8; --brand-d-rgb: 177, 140, 248;
}
[data-tema="merah"] {
    --brand: #c0263a; --brand-rgb: 192, 38, 58; --brand-600: #a92033; --brand-700: #8d1b2b;
    --brand-soft: #fce7ea; --brand-tint: #fef4f5; --brand-line: #f3c2c9; --brand-top: #fdeef0;
    --grad-a: #e04459; --grad-b: #a81e31; --grad-c: #e95a6d; --grad-d: #c0263a; --brand-d: #f07c8b; --brand-d-rgb: 240, 124, 139;
}
[data-bs-theme="dark"] {
    --canvas: #0e1726;
    --surface: #152034;
    --line: #243149;
    --line-soft: #1c2840;
    --ink: #e6ecf5;
    --ink-2: #c3cddd;
    --muted: #93a1b8;
    --brand: var(--brand-d, #2bb8a3);
    --brand-rgb: var(--brand-d-rgb, 43, 184, 163);
    --brand-600: color-mix(in srgb, var(--brand) 88%, #000);
    --brand-700: color-mix(in srgb, var(--brand) 60%, #fff);
    --brand-soft: color-mix(in srgb, var(--brand) 20%, #152034);
    --brand-tint: color-mix(in srgb, var(--brand) 12%, #152034);
    --brand-line: color-mix(in srgb, var(--brand) 45%, #152034);
    --st-h-bg: rgba(34, 197, 94, .14); --st-h: #4ade80;
    --st-t-bg: rgba(245, 158, 11, .14); --st-t: #fbbf24;
    --st-s-bg: rgba(14, 165, 233, .14); --st-s: #38bdf8;
    --st-i-bg: rgba(99, 102, 241, .16); --st-i: #a5b4fc;
    --st-d-bg: rgba(148, 163, 184, .14); --st-d: #cbd5e1;
    --st-a-bg: rgba(239, 68, 68, .15); --st-a: #f87171;
    --st-k-bg: rgba(139, 92, 246, .16); --st-k: #c4b5fd;
    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-700);
    --bs-body-color: #e6ecf5;
    --bs-body-color-rgb: 230, 236, 245;
    --bs-emphasis-color: #fff;
    --bs-body-bg: #152034;
    --bs-body-bg-rgb: 21, 32, 52;
    --bs-secondary-color: #93a1b8;
    --bs-tertiary-bg: #0e1726;
    --bs-tertiary-bg-rgb: 14, 23, 38;
    --bs-border-color: #243149;
    --bs-border-color-translucent: rgba(255, 255, 255, .08);
}

/* ---------- Dasar ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    color: var(--ink);
    background: var(--canvas) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01" on;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--bs-emphasis-color); letter-spacing: -.01em; font-weight: 700; }
.fw-bold, b, strong { font-weight: 700; }
.small, small { font-size: .8125rem; }
.text-body-secondary { color: var(--muted) !important; }
.stat-value, .table td, .p-stat .v, .badge, [data-jam-live], .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft); }

/* ---------- Tombol ---------- */
.btn { font-weight: 600; border-radius: var(--radius-sm); --bs-btn-font-size: .875rem; --bs-btn-padding-y: .45rem; --bs-btn-padding-x: .9rem; letter-spacing: .005em; }
.btn-sm { --bs-btn-font-size: .8125rem; --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .65rem; border-radius: 7px; }
.btn-lg { --bs-btn-font-size: 1rem; --bs-btn-padding-y: .7rem; border-radius: 10px; }
.btn i.bi { vertical-align: -.08em; }
.btn-primary {
    --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
    --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    box-shadow: 0 1px 2px rgba(var(--brand-rgb), .25);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand-line); --bs-btn-bg: var(--surface);
    --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand-700);
    --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); --bs-btn-active-color: #fff;
}
.btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line); --bs-btn-bg: var(--surface); --bs-btn-hover-bg: var(--canvas); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #cfd7e2; --bs-btn-active-bg: var(--line-soft); --bs-btn-active-color: var(--ink); }
.btn-light, .btn-default { --bs-btn-bg: var(--canvas); --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink-2); --bs-btn-hover-bg: var(--line-soft); --bs-btn-hover-border-color: #cfd7e2; }
.btn-success { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; }
.btn-outline-success { --bs-btn-color: #15803d; --bs-btn-border-color: #bfe3cb; --bs-btn-hover-bg: #e7f6ec; --bs-btn-hover-color: #166534; --bs-btn-hover-border-color: #15803d; }
.btn-outline-danger { --bs-btn-color: #c0262d; --bs-btn-border-color: #f2c4c6; --bs-btn-hover-bg: #fdecec; --bs-btn-hover-color: #a11d24; --bs-btn-hover-border-color: #c0262d; }
.btn-outline-warning { --bs-btn-color: #b45309; --bs-btn-border-color: #f3d9a8; --bs-btn-hover-bg: #fdf3e1; --bs-btn-hover-color: #92400e; --bs-btn-hover-border-color: #d97706; }
.btn-check:checked + .btn-outline-primary, .btn-check:checked + .btn-outline-secondary { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-border-color: #2c6d64; }
.btn-link { font-weight: 600; text-decoration: none; }

/* ---------- Formulir ---------- */
.form-control, .form-select { border-color: var(--line); border-radius: var(--radius-sm); font-size: .9rem; padding: .5rem .75rem; background-color: var(--surface); color: var(--ink); }
.form-select { padding-right: 2.25rem; }
.form-control-sm, .form-select-sm { font-size: .8125rem; padding: .32rem .6rem; border-radius: 7px; }
.form-select-sm { padding-right: 2rem; }
.form-control::placeholder { color: #94a3b8; }
.form-control:hover, .form-select:hover { border-color: #cfd7e2; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14); }
.form-label { font-weight: 600; font-size: .8125rem; color: var(--ink-2); margin-bottom: .35rem; }
.form-text { color: var(--muted); font-size: .78rem; }
.form-check-input { border-color: #c5cfdb; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14); border-color: var(--brand); }
.input-group-text { background: var(--canvas); border-color: var(--line); color: var(--muted); }
.form-floating > .form-control, .form-floating > .form-select { padding-top: 1.625rem; padding-bottom: .625rem; height: calc(3.4rem + 2px); }
.form-floating > label { color: var(--muted); }

/* ---------- Navigasi kecil ---------- */
.nav-pills { gap: .35rem; }
.nav-pills .nav-link { color: var(--ink-2); font-weight: 600; font-size: .875rem; border-radius: 99px; padding: .4rem .9rem; background: var(--surface); border: 1px solid var(--line); }
.nav-pills .nav-link:hover { border-color: #cfd7e2; color: var(--ink); }
.nav-pills .nav-link.active { background-color: var(--brand); border-color: var(--brand); color: #fff; }
.nav-pills .nav-link.active .badge { background: rgba(255, 255, 255, .22) !important; color: #fff !important; }
.nav-tabs { border-bottom-color: var(--line); gap: .25rem; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; font-size: .875rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .6rem .85rem; }
.nav-tabs .nav-link:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav-tabs .nav-link.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }
.page-link { color: var(--brand); border-color: var(--line); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px -12px rgba(21, 35, 60, .25); font-size: .875rem; }
.dropdown-item { border-radius: 6px; }
.dropdown-menu { padding: .35rem; }

/* ---------- Badge: gaya lembut (latar tipis, teks berwarna) ---------- */
.badge { font-weight: 700; font-size: .72rem; letter-spacing: .01em; padding: .32em .6em; border-radius: 6px; }
.badge.rounded-pill { border-radius: 99px; }
.badge.text-bg-success   { background: var(--st-h-bg) !important; color: var(--st-h) !important; }
.badge.text-bg-warning   { background: var(--st-t-bg) !important; color: var(--st-t) !important; }
.badge.text-bg-info      { background: var(--st-s-bg) !important; color: var(--st-s) !important; }
.badge.text-bg-primary   { background: var(--st-i-bg) !important; color: var(--st-i) !important; }
.badge.text-bg-secondary { background: var(--st-d-bg) !important; color: var(--st-d) !important; }
.badge.text-bg-danger    { background: var(--st-a-bg) !important; color: var(--st-a) !important; }
.badge.text-bg-light     { background: var(--canvas) !important; color: var(--ink-2) !important; border: 1px solid var(--line); }
.badge.text-bg-dark      { background: var(--ink) !important; color: #fff !important; }
.badge.text-bg-orange    { background: #fff1e6 !important; color: #c2410c !important; }
/* Badge angka notifikasi tetap tegas */
.nav-link .badge.text-bg-danger, .badge.notif { background: #dc2626 !important; color: #fff !important; }
.text-bg-primary:not(.badge) { background-color: var(--brand) !important; color: #fff !important; }
.bg-primary { background-color: var(--brand) !important; }
.text-primary { color: var(--brand) !important; }
.text-success { color: var(--st-h) !important; }
.text-warning { color: #c26a05 !important; }
.text-danger { color: var(--st-a) !important; }
.text-info { color: var(--st-s) !important; }

/* ---------- Alert ---------- */
.alert { border-radius: 10px; border: 1px solid transparent; font-size: .875rem; }
.alert-success { background: #ecf8f0; border-color: #c9ebd4; color: #14532d; }
.alert-warning { background: #fdf6e7; border-color: #f4dfb1; color: #78350f; }
.alert-danger  { background: #fdf0f0; border-color: #f5c9cb; color: #7f1d1d; }
.alert-info    { background: #edf6fc; border-color: #c8e3f5; color: #0c4a6e; }
.alert-secondary, .alert-light { background: var(--surface); border-color: var(--line); color: var(--ink-2); }

/* ---------- Kerangka: header atas ---------- */
.app-header.navbar {
    background: rgba(255, 255, 255, .92) !important;
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
    min-height: 60px;
}
[data-bs-theme="dark"] .app-header.navbar { background: rgba(21, 32, 52, .92) !important; }
.app-header .nav-link { color: var(--ink-2); }
.app-header .nav-link:hover { color: var(--ink); }
.app-header .ikon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 0 !important; }
.app-header .ikon-btn:hover { background: var(--canvas); }
.app-header .tanggal-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--ink-2); background: var(--canvas); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; }
.app-header .brand-mini { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); }
.app-header .brand-mini img { width: 28px; height: 28px; border-radius: 7px; }
.app-header .user-menu .dropdown-toggle::after { display: none; }
.app-header .user-menu .nama-user { line-height: 1.15; text-align: left; }
.app-header .user-menu .nama-user small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }
.app-header .user-header { min-height: 0; padding: 1.25rem 1rem; border-radius: 8px; background: linear-gradient(140deg, var(--brand-tint), var(--brand-soft)) !important; color: var(--ink) !important; }
.app-header .user-header p { color: var(--ink); font-weight: 700; }
.app-header .user-header small { display: block; color: var(--muted); font-weight: 500; }
.app-header .user-footer { padding: .5rem .25rem .25rem; background: transparent !important; gap: .5rem; }
.app-header .user-footer .btn { flex: 1; }

/* ---------- Kerangka: sidebar berwarna (mengikuti tema) ---------- */
:root { --sb-a: #0c6f63; --sb-b: #0a3f3e; }
[data-tema="biru"] { --sb-a: #1a5dbc; --sb-b: #10316a; }
[data-tema="indigo"] { --sb-a: #4540c9; --sb-b: #2a2a78; }
[data-tema="navy"] { --sb-a: #1b347b; --sb-b: #111f45; }
[data-tema="ungu"] { --sb-a: #6d33d0; --sb-b: #3f2177; }
[data-tema="merah"] { --sb-a: #a92133; --sb-b: #5e1625; }
:root { --sb-ink: rgba(255, 255, 255, .84); --sb-muted: rgba(255, 255, 255, .55); }
[data-bs-theme="dark"] { --sb-a: #13213a; --sb-b: #0b1424; }
.sidebar-sihadir {
    background:
        radial-gradient(260px 220px at 0% 0%, rgba(255, 255, 255, .14), transparent 70%),
        radial-gradient(240px 260px at 100% 100%, rgba(253, 224, 71, .10), transparent 70%),
        linear-gradient(180deg, var(--sb-a) 0%, var(--sb-b) 100%) !important;
    border-right: 0; box-shadow: 4px 0 24px -12px rgba(15, 23, 42, .35) !important; --lte-sidebar-color: var(--sb-ink);
}
.sidebar-sihadir .sidebar-brand { border-bottom: 1px solid rgba(255, 255, 255, .1); height: 60px; }
.sidebar-sihadir .brand-link { color: #fff !important; display: flex; align-items: center; gap: .6rem; }
.sidebar-sihadir .brand-image { border-radius: 10px; background: #fff; padding: 2px; margin: 0 !important; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); width: 34px; height: 34px; max-height: none; float: none; }
.sidebar-sihadir .brand-text { color: #fff !important; font-size: 1.1rem; letter-spacing: -.01em; }
.sidebar-sihadir .brand-text small { display: block; font-size: .68rem; color: var(--sb-muted); font-weight: 500; letter-spacing: 0; margin-top: -2px; }
.sidebar-sihadir .nav-header { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-muted) !important; padding: 1.15rem 1.4rem .4rem !important; }
.sidebar-sihadir .sidebar-menu .nav-link { color: var(--sb-ink) !important; border-radius: 10px; margin: 1px 10px; width: auto; padding: .52rem .75rem; font-size: .875rem; font-weight: 500; position: relative; transition: background-color .15s, color .15s; }
.sidebar-sihadir .sidebar-menu .nav-link .nav-icon { color: rgba(255, 255, 255, .7); font-size: 1.05rem; }
.sidebar-sihadir .sidebar-menu .nav-link:hover:not(.active) { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }
.sidebar-sihadir .sidebar-menu .nav-link:hover:not(.active) .nav-icon { color: #fff; }
.sidebar-sihadir .sidebar-menu .nav-link.active { background: #fff !important; color: var(--brand-700) !important; font-weight: 700; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }
.sidebar-sihadir .sidebar-menu .nav-link.active .nav-icon { color: var(--brand) !important; }
.sidebar-sihadir .sidebar-menu .nav-link.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #fde047; }
.sidebar-sihadir .sidebar-menu .nav-link p { display: flex; align-items: center; gap: .35rem; width: 100%; }
.sidebar-sihadir .sidebar-menu .nav-link p .badge { margin-left: auto !important; }
.sidebar-sihadir .sidebar-menu .nav-link .badge.text-bg-danger { background: #fde047 !important; color: #713f12 !important; }
.sidebar-sihadir .sidebar-wrapper { padding-bottom: 1.5rem; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.sidebar-sihadir .sidebar-wrapper::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); background-clip: padding-box; }
.sidebar-sihadir .sidebar-foot { margin: 1rem 12px 0; padding: .75rem; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: .75rem; color: var(--sb-ink); }
[data-bs-theme="dark"] .sidebar-sihadir .sidebar-menu .nav-link.active { background: var(--brand) !important; color: #0b1220 !important; }
[data-bs-theme="dark"] .sidebar-sihadir .sidebar-menu .nav-link.active .nav-icon { color: #0b1220 !important; }
.app-sidebar { min-height: 100vh; }
.sidebar-overlay { background: rgba(15, 23, 42, .35) !important; }

/* ---------- Kerangka: judul halaman & konten ---------- */
.app-main { background: linear-gradient(180deg, var(--brand-top) 0, rgba(245, 247, 250, 0) 300px), var(--canvas); }
[data-bs-theme="dark"] .app-main { background: var(--canvas); }
/* Lebar konten dibatasi agar tetap nyaman di monitor lebar */
.app-content-header > .container-fluid, .app-content > .container-fluid { max-width: 1640px; margin-left: 0; }
.app-content-header .form-select { width: auto; }
.app-content-header { padding: 1.4rem 0 .9rem; }
.app-content-header h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.app-content-header .text-body-secondary { margin-top: .2rem; font-size: .875rem; max-width: 72ch; }
.app-content { padding-bottom: 1.5rem; }
.app-content .row { --bs-gutter-y: 1rem; }
.app-content .row.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.app-footer { background: transparent !important; border-top: 1px solid var(--line) !important; color: var(--muted); font-size: .78rem; padding: .9rem 1.25rem; }

/* ---------- Kartu ---------- */
.card { --bs-card-bg: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card > .card-header { background: transparent; border-bottom: 1px solid var(--line-soft); padding: .85rem 1.1rem; min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.card > .card-header > .card-title, .card > .card-header .card-title { font-weight: 700; font-size: .95rem; margin: 0; color: var(--bs-emphasis-color); display: flex; align-items: center; gap: .45rem; float: none; }
.card > .card-header .card-title > i.bi:first-child { color: var(--brand); }
.card-header .card-tools { margin-left: auto; float: none; display: flex; align-items: center; gap: .4rem; }
.card-header::after { display: none; }
.card > .card-body { padding: 1.1rem; }
.card > .card-footer { background: var(--brand-tint); border-top: 1px solid var(--line-soft); padding: .75rem 1.1rem; }
.card.border-top { border-top-width: 3px !important; }
.list-group { --bs-list-group-border-color: var(--line-soft); }
.list-group-item { padding: .7rem 1.1rem; }
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35); }
.modal-header { border-bottom-color: var(--line-soft); padding: 1rem 1.25rem; }
.modal-footer { border-top-color: var(--line-soft); }
.modal-title { font-weight: 700; font-size: 1.05rem; }

/* ---------- Kartu statistik (putih, ikon berwarna) ---------- */
.row > [class*="col"] > .stat-card { height: 100%; }
.stat-card {
    --c: var(--brand); --c-bg: var(--brand-soft);
    position: relative; overflow: hidden; border-radius: var(--radius);
    padding: 1rem 1.1rem 1rem; min-height: 112px;
    background: var(--surface) !important; color: var(--ink) !important;
    border: 1px solid var(--line); box-shadow: var(--shadow-1);
    display: flex; flex-direction: column;
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); opacity: .9; }
.stat-card .stat-label { font-weight: 600; color: var(--muted); font-size: .8125rem; line-height: 1.3; padding-right: 48px; order: 1; }
.stat-card .stat-value { font-size: 1.85rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: var(--bs-emphasis-color); margin-top: .35rem; order: 2; }
.stat-card .stat-sub { font-size: .75rem; color: var(--muted); margin-top: auto; padding-top: .3rem; order: 3; line-height: 1.35; }
.stat-card .stat-icon {
    position: absolute; right: 14px; top: 14px; transform: none;
    width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; opacity: 1; color: var(--c); background: var(--c-bg);
}
.stat-card a { color: inherit; }
.stat-card a.stretched-link::after { border-radius: var(--radius); }
.stat-card:has(a:hover) { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.bg-grad-teal   { --c: var(--brand); --c-bg: var(--brand-soft); }
.bg-grad-green  { --c: #16a34a; --c-bg: #e7f6ec; }
.bg-grad-amber  { --c: #d97706; --c-bg: #fdf3e1; }
.bg-grad-red    { --c: #dc2626; --c-bg: #fdecec; }
.bg-grad-blue   { --c: #2563eb; --c-bg: #e8effd; }
.bg-grad-purple { --c: #7c3aed; --c-bg: #f2ecfe; }
.bg-grad-slate  { --c: #64748b; --c-bg: #eef1f5; }
.bg-grad-orange { --c: #ea580c; --c-bg: #fff1e6; }
.bg-grad-gold   { --c: #ca8a04; --c-bg: #fdf6db; }
[data-bs-theme="dark"] .stat-card { --c-bg: rgba(255, 255, 255, .06); }
div.bg-grad-teal:not(.stat-card), div.bg-grad-green:not(.stat-card), div.bg-grad-amber:not(.stat-card), div.bg-grad-red:not(.stat-card),
div.bg-grad-blue:not(.stat-card), div.bg-grad-purple:not(.stat-card), div.bg-grad-slate:not(.stat-card), div.bg-grad-orange:not(.stat-card), div.bg-grad-gold:not(.stat-card) { background: var(--c); color: #fff; }

/* ---------- Avatar inisial ---------- */
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; letter-spacing: .02em; }

/* ---------- Tabel ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line-soft); margin-bottom: 0; font-size: .875rem; }
.table > :not(caption) > * > * { padding: .7rem .85rem; vertical-align: middle; }
.table thead th, .table > thead > tr > th {
    font-size: .75rem; text-transform: none; letter-spacing: .01em; color: var(--muted); font-weight: 700;
    white-space: nowrap; background: #f8fafc; border-bottom: 1px solid var(--line) !important;
}
[data-bs-theme="dark"] .table thead th { background: rgba(255, 255, 255, .03); }
.table thead th:first-child { border-top-left-radius: 0; }
.card > .table-responsive:first-child thead th, .card > .table:first-child thead th { border-top: 0; }
.table-hover tbody tr:hover { --bs-table-hover-bg: var(--brand-tint); --bs-table-bg-state: var(--brand-tint); }
.table-sm > :not(caption) > * > * { padding: .42rem .6rem; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table-light { --bs-table-bg: #f8fafc; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #fafbfd; }
.table a:not(.btn) { font-weight: 600; text-decoration: none; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* Rekap bulanan (matriks) */
.table-matrix { font-size: .78rem; }
.table-matrix th, .table-matrix td { text-align: center; padding: .3rem .32rem !important; white-space: nowrap; }
.table-matrix td.nama { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--line-soft); }
.table-matrix .libur { background: repeating-linear-gradient(135deg, #f1f4f8 0 4px, #e9edf3 4px 8px) !important; color: #94a3b8; }
.sel-H { color: var(--st-h); font-weight: 700; }
.sel-T { color: var(--st-t); font-weight: 700; background: var(--st-t-bg); }
.sel-S { color: var(--st-s); font-weight: 700; background: var(--st-s-bg); }
.sel-I { color: var(--st-i); font-weight: 700; background: var(--st-i-bg); }
.sel-D { color: var(--st-d); font-weight: 700; background: var(--st-d-bg); }
.sel-A { color: var(--st-a); font-weight: 700; background: var(--st-a-bg); }

/* Kalender kehadiran siswa */
.kalender { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.kalender .kh { font-size: .72rem; text-align: center; color: var(--muted); font-weight: 700; padding-bottom: 2px; }
.kalender .kd { aspect-ratio: 1; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .82rem; font-weight: 600; background: var(--canvas); position: relative; color: var(--ink-2); }
.kalender .kd small { font-size: .6rem; font-weight: 800; }
.kalender .kd.st-H { background: var(--st-h-bg); color: var(--st-h); } .kalender .kd.st-T { background: var(--st-t-bg); color: var(--st-t); }
.kalender .kd.st-S { background: var(--st-s-bg); color: var(--st-s); } .kalender .kd.st-I { background: var(--st-i-bg); color: var(--st-i); }
.kalender .kd.st-D { background: var(--st-d-bg); color: var(--st-d); } .kalender .kd.st-A { background: var(--st-a-bg); color: var(--st-a); }
.kalender .kd.libur { opacity: .5; } .kalender .kd.kosong { background: transparent; }
.kalender .kd.hari-ini { box-shadow: 0 0 0 2px var(--brand); }

/* Progress */
.progress, .progress-stacked { --bs-progress-bg: var(--line-soft); border-radius: 99px; }
.progress-stack { height: 8px; border-radius: 99px; }
.progress-bar.bg-success { background-color: #22a755 !important; }
.progress-bar.bg-warning { background-color: #f0a32a !important; }
.progress-bar.bg-info { background-color: #38a3d9 !important; }
.progress-bar.bg-danger { background-color: #e5484d !important; }

/* Kotak scan (halaman izin & pelanggaran) */
.scan-box { border: 1.5px dashed var(--brand-line); border-radius: var(--radius); background: var(--brand-tint); }
.scan-box input { font-size: 1.15rem; letter-spacing: .04em; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: pulse 1.8s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } * { scroll-behavior: auto !important; } }

/* List item siswa */
.list-siswa .item { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.list-siswa .item:last-child { border-bottom: 0; }
.list-siswa .item .meta { font-size: .78rem; color: var(--muted); }
.list-siswa .item .fw-semibold, .list-siswa .item .fw-bold { color: var(--bs-emphasis-color); }
.min-w-0 { min-width: 0; }

/* ---------- Navigasi bawah (HP) ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: flex;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
}
[data-bs-theme="dark"] .bottom-nav { background: rgba(21, 32, 52, .96); }
.bottom-nav a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .35rem 0 .3rem; font-size: .68rem; color: var(--muted); text-decoration: none; font-weight: 600; border-radius: 10px; }
.bottom-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bottom-nav a i { font-size: 1.2rem; line-height: 1.25; width: 46px; text-align: center; border-radius: 99px; transition: background-color .15s; }
.bottom-nav a.active { color: var(--brand-700); }
.bottom-nav a.active i { background: var(--brand-soft); color: var(--brand); }

/* ---------- Responsif ---------- */
@media (max-width: 991.98px) {
    .app-wrapper { padding-bottom: 70px; }
    .app-footer { display: none; }
}
@media (max-width: 767.98px) {
    /* Tabel lebar digeser ke samping, tidak dipadatkan */
    .table-responsive > .table:not(.table-matrix):not(.table-stack) > :not(caption) > * > * { white-space: nowrap; }
    .table-responsive > .table:not(.table-matrix) td.text-wrap, .table-responsive > .table td .text-wrap { white-space: normal !important; min-width: 220px; }
    .app-content-header { padding: 1.1rem 0 .75rem; }
    .app-content-header .d-flex.justify-content-between { flex-direction: column; align-items: stretch !important; }
    .app-content-header .d-flex.justify-content-between > .d-flex { margin-top: .25rem; }
}
@media (max-width: 575.98px) {
    :root { --bs-body-font-size: .9rem; }
    .app-content-header h3 { font-size: 1.3rem; }
    .stat-card { min-height: 100px; padding: .85rem .9rem; }
    .stat-card .stat-value { font-size: 1.55rem; }
    .stat-card .stat-icon { width: 32px; height: 32px; font-size: 1rem; right: 10px; top: 12px; border-radius: 9px; }
    .stat-card .stat-label { padding-right: 36px; font-size: .78rem; }
    .container-fluid { padding-left: 16px; padding-right: 16px; }
    .card > .card-header { padding: .75rem .95rem; min-height: 50px; }
    .card > .card-body { padding: .95rem; }
    .list-siswa .item { padding: .65rem .95rem; }
    .app-content-header .btn { flex: 1 1 auto; }
    .nav-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .nav-pills::-webkit-scrollbar { display: none; }
    .nav-pills .nav-link { white-space: nowrap; }
    .modal-dialog { margin: .75rem; }
}

/* ---------- Login ---------- */
.login-page-sihadir {
    min-height: 100vh; min-height: 100dvh;
    background:
        radial-gradient(900px 520px at 0% 0%, var(--brand-soft) 0%, transparent 60%),
        radial-gradient(800px 480px at 100% 100%, #e3ecfb 0%, transparent 55%),
        #f5f8fa;
}
.login-card { max-width: 420px; border-radius: 18px !important; border: 1px solid var(--line) !important; box-shadow: 0 24px 60px -28px rgba(21, 35, 60, .28) !important; }
.login-card .logo { width: 64px; height: 64px; object-fit: contain; }
.login-card h1 { letter-spacing: -.02em; }
.login-foot { color: var(--muted) !important; }

/* ---------- Cetak ---------- */
.kop { border-bottom: 3px double #000; padding-bottom: .5rem; margin-bottom: 1rem; }
.hanya-cetak { display: none; }
@media print {
    .app-sidebar, .app-header, .app-footer, .bottom-nav, .btn, .d-print-none, form.filter { display: none !important; }
    .app-main, .app-wrapper { margin: 0 !important; padding: 0 !important; }
    .app-wrapper { display: block !important; }
    .card { box-shadow: none !important; border: 0 !important; }
    .hanya-cetak { display: block !important; }
    body { background: #fff !important; font-size: 11px; }
    .table thead th { background: #f1f5f9 !important; }
    .table-matrix { font-size: 9px; }
    .table-matrix td.nama { position: static; }
    .stat-card::before { display: none; }
    a { text-decoration: none !important; color: #000 !important; }
    @page { margin: 12mm; }
}

/* ---------- Kesiswaan ---------- */
.text-bg-orange { background-color: #ea580c !important; color: #fff !important; }
.text-orange { color: #c2410c !important; }
.btn-outline-orange { --bs-btn-color: #c2410c; --bs-btn-border-color: #f6caa8; --bs-btn-bg: var(--surface); --bs-btn-hover-bg: #fff1e6; --bs-btn-hover-border-color: #ea580c; --bs-btn-hover-color: #9a3412; --bs-btn-active-bg: #ea580c; --bs-btn-active-color: #fff; --bs-btn-active-border-color: #ea580c; }
.poin-bar { height: 8px; border-radius: 99px; background: var(--line-soft); position: relative; overflow: visible; }
.poin-bar .isi { height: 100%; border-radius: 99px; }
.poin-bar .tanda { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--muted); opacity: .45; border-radius: 2px; }
.medali { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.medali.m1 { background: #fdf3c4; color: #a16207; } .medali.m2 { background: #eef1f5; color: #475569; }
.medali.m3 { background: #fdeadb; color: #b45309; } .medali.m0 { background: var(--brand-soft); color: var(--brand); }
.kartu-prestasi { border-radius: var(--radius); overflow: hidden; height: 100%; }
.kartu-prestasi .pita { height: 4px; }
.jenis-opsi .list-group-item { cursor: pointer; }
.jenis-opsi .list-group-item.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-700); }

/* ---------- SweetAlert2 ---------- */
.swal2-popup { border-radius: 16px !important; font-family: var(--bs-body-font-family) !important; }
.swal2-styled.swal2-confirm { background: var(--brand) !important; border-radius: 8px !important; }
.swal2-styled.swal2-cancel { border-radius: 8px !important; }
.sidebar-sihadir .sidebar-menu .nav-link p .nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-sihadir .sidebar-menu .nav-link p .badge, .sidebar-sihadir .sidebar-menu .nav-link p .bi { flex-shrink: 0; }

/* Login: dua kolom di layar lebar */
.login-shell { max-width: 960px; }
.login-card { max-width: 440px; }
@media (min-width: 992px) { .login-card { max-width: none; } }
.login-side { display: flex; flex-direction: column; padding: 2.5rem; background: linear-gradient(160deg, var(--brand-top) 0%, #f6f9fb 60%, #eef3fb 100%); border-right: 1px solid var(--line); min-height: 560px; }
.login-side .side-logo { width: 42px; height: 42px; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--line); }
.login-side .side-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; max-width: 18ch; margin-bottom: .75rem; }
.login-side .side-list li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid rgba(21, 35, 60, .07); font-size: .875rem; color: var(--ink-2); }
.login-side .side-list i { width: 32px; height: 32px; border-radius: 9px; background: #fff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line); }
.login-side .side-list b { color: var(--ink); }
.login-form { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.input-ikon { position: relative; }
.input-ikon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; z-index: 2; }
.input-ikon > .form-control { padding-left: 2.6rem; font-size: 1rem; }
.input-ikon > .lihat { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); z-index: 2; }
.login-hint { display: flex; gap: .5rem; font-size: .8rem; color: var(--ink-2); background: var(--brand-tint); border: 1px solid var(--brand-soft); border-radius: 10px; padding: .65rem .8rem; }
.login-hint i { color: var(--brand); }
[data-bs-theme="dark"] .login-side { background: var(--surface); }

/* ---------- v1.4: penyempurnaan ---------- */
/* Input berkas */
.form-control[type="file"] { padding: .35rem; font-size: .85rem; color: var(--muted); }
.form-control[type="file"]::file-selector-button { margin: -.35rem .75rem -.35rem -.35rem; padding: .5rem .9rem; border: 0; border-right: 1px solid var(--line); background: var(--brand-tint); color: var(--brand-700); font-weight: 600; font-family: inherit; }
.form-control[type="file"]:hover:not(:disabled):not([readonly])::file-selector-button { background: var(--brand-soft); }
.form-control-sm[type="file"]::file-selector-button { padding: .32rem .7rem; }
input[type="date"], input[type="month"], input[type="time"] { font-variant-numeric: tabular-nums; }

/* Bilah aksi massal (Data Siswa) */
.bar-massal { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem 1.1rem; border-bottom: 1px solid var(--line); background: #fafbfc; font-size: .8125rem; }
.bar-massal .bm-info { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 600; margin-right: .25rem; white-space: nowrap; }
.bar-massal .bm-info b { color: var(--ink); }
.bar-massal:not(.ada) .btn, .bar-massal:not(.ada) .form-select { opacity: .5; pointer-events: none; }
.bar-massal.ada { background: var(--brand-tint); border-bottom-color: var(--brand-soft); }
.bar-massal.ada .bm-info { color: var(--brand-700); }
.bar-massal .form-select { width: auto; }
[data-bs-theme="dark"] .bar-massal { background: rgba(255, 255, 255, .03); }

/* Gulir tipis */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Judul halaman: aksi sejajar rapi */
.app-content-header .d-flex.justify-content-between { row-gap: .75rem !important; }
.app-content-header h3 + .text-body-secondary { line-height: 1.5; }

/* Tabel: baris lebih tenang, sel angka rata */
.table td.text-end, .table th.text-end, .table td.text-center { font-variant-numeric: tabular-nums; }
.card > .table-responsive { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }

@media (max-width: 767.98px) {
    .scan-box input, .scan-box .input-group > .form-control { font-size: 1rem; letter-spacing: .01em; }
    .scan-box .input-group-text { padding-left: .8rem; padding-right: .8rem; }
    .bar-massal { flex-wrap: nowrap; overflow-x: auto; padding: .55rem .95rem; scrollbar-width: none; }
    .bar-massal::-webkit-scrollbar { display: none; }
    .bar-massal > * { flex-shrink: 0; }
    .app-content-header .form-select { width: 100%; }
}

/* Tabel bertumpuk di HP (baris menjadi kartu) */
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { padding: .8rem .95rem; border-bottom: 1px solid var(--line-soft); }
    .table-stack tr:last-child { border-bottom: 0; }
    .table-stack > :not(caption) > * > * { padding: 0 !important; border: 0 !important; white-space: normal !important; }
    .table-stack td + td { margin-top: .6rem; }
    .table-stack td.ts-hide { display: none; }
    .table-stack .status-pilih { display: flex; width: 100%; flex-wrap: nowrap; }
    .table-stack .status-pilih > .btn { flex: 1 1 0; padding-top: .45rem; padding-bottom: .45rem; }
}
/* Badge panjang boleh turun baris */
.badge.text-wrap, .badge-wrap .badge { white-space: normal; text-align: left; line-height: 1.35; }
@media (max-width: 575.98px) {
    .col-4 > .stat-card .stat-icon, .col-4 > a > .stat-card .stat-icon { display: none; }
    .col-4 > .stat-card .stat-label, .col-4 > a > .stat-card .stat-label { padding-right: 0; }
    .col-4 > .stat-card, .col-4 > a > .stat-card { padding: .8rem .75rem; }
}

/* Pilihan tema warna (Pengaturan) */
.pilih-tema { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tema-opsi { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: .85rem; position: relative; transition: border-color .15s, box-shadow .15s; }
.tema-opsi:hover { border-color: #cbd5e1; }
.tema-swatch { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tema-opsi .bi { margin-left: auto; color: var(--brand); opacity: 0; }
.btn-check:checked + .tema-opsi { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); }
.btn-check:checked + .tema-opsi .bi { opacity: 1; }

/* ---------- Periode (tahun pelajaran & semester) ---------- */
.periode-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; font-weight: 700; color: var(--brand-700); background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 99px; padding: .32rem .8rem; text-decoration: none; white-space: nowrap; }
.periode-chip:hover { background: var(--brand-soft); color: var(--brand-700); }
.periode-chip.arsip { color: #92400e; background: #fff7e6; border-color: #fcd9a0; }
.periode-menu { min-width: 250px; }
.periode-menu .periode-ta { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: .5rem .75rem .2rem; }
.periode-menu .dropdown-item.active { background: var(--brand-soft); color: var(--brand-700); font-weight: 700; }
.arsip-bar { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: linear-gradient(90deg, #fff7e6, #fffbeb); border: 1px solid #fcd9a0; color: #78350f; font-size: .875rem; }
.arsip-bar > .bi { font-size: 1.25rem; color: #d97706; }
.periode-kartu { transition: border-color .15s, box-shadow .15s; }
.periode-kartu.aktif { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12), var(--shadow-1); }
.periode-angka .v { font-weight: 800; font-size: 1.05rem; line-height: 1.2; color: var(--bs-emphasis-color); }
.periode-angka .l { font-size: .68rem; color: var(--muted); font-weight: 600; }
.ta-ikon { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.border-dashed { border-style: dashed !important; background: transparent; box-shadow: none; }
.langkah { padding-left: 1.1rem; }
.langkah li { margin-bottom: .45rem; }
.predikat { font-weight: 700; }
@media (max-width: 575.98px) {
    .arsip-bar { flex-wrap: wrap; align-items: flex-start; }
    .arsip-bar > div { flex: 1 1 220px; min-width: 0; }
    .arsip-bar .btn { width: 100%; }
    .periode-chip { padding: .3rem .6rem; gap: .3rem; font-size: .75rem; }
}

/* =====================================================================
   v1.6 — TAMPILAN MODERN (AdminLTE 4)  ·  SMK Negeri 1 Martapura
   Sidebar gelap elegan, kartu membulat lembut, hero dashboard,
   aksen jurusan berwarna. Semua tema warna tetap berlaku.
   ===================================================================== */
[data-tema="smk"] {
    --brand: #1e4fd8; --brand-rgb: 30, 79, 216; --brand-600: #1a45be; --brand-700: #163a9f;
    --brand-soft: #e3ebfd; --brand-tint: #f2f6ff; --brand-line: #bccdf7; --brand-top: #eaf0fe;
    --grad-a: #3b82f6; --grad-b: #1d3fb8; --grad-c: #60a5fa; --grad-d: #1e4fd8; --brand-d: #6b9bfa; --brand-d-rgb: 107, 155, 250;
    --accent: #f59e0b;
}
:root {
    --radius: 16px; --radius-sm: 10px;
    --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
    --shadow-2: 0 10px 30px -14px rgba(16, 24, 40, .22);
    --canvas: #f3f5f9;
    --sb-bg: color-mix(in srgb, var(--brand) 14%, #0a1122);
    --sb-bg-2: color-mix(in srgb, var(--brand) 6%, #070c18);
}
[data-bs-theme="dark"] { --canvas: #0b1120; --surface: #121a2b; --line: #1f2a40; --line-soft: #182236; }

/* ---------- Sidebar gelap modern ---------- */
.sidebar-sihadir {
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(var(--brand-rgb), .35), transparent 70%),
        radial-gradient(300px 300px at 100% 100%, rgba(245, 158, 11, .08), transparent 70%),
        linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%) !important;
    box-shadow: none !important; border-right: 1px solid rgba(255, 255, 255, .05);
}
.sidebar-sihadir .sidebar-brand { height: 64px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sidebar-sihadir .brand-image { width: 38px; height: 38px; border-radius: 12px; }
.sidebar-sihadir .brand-text { font-size: 1.12rem; font-weight: 800 !important; }
.sidebar-sihadir .brand-text small { color: rgba(255, 255, 255, .5); }
.sidebar-sihadir .sb-sekolah { margin: 14px 12px 4px; padding: .7rem .8rem; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); display: flex; gap: .65rem; align-items: center; color: #fff; }
.sidebar-sihadir .sb-sekolah .ik { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); box-shadow: 0 6px 14px -6px rgba(var(--brand-rgb), .8); }
.sidebar-sihadir .sb-sekolah b { display: block; font-size: .8rem; line-height: 1.2; }
.sidebar-sihadir .sb-sekolah small { display: block; font-size: .68rem; color: rgba(255, 255, 255, .5); }
.sidebar-sihadir .nav-header { color: rgba(255, 255, 255, .38) !important; font-size: .64rem; letter-spacing: .12em; padding: 1.2rem 1.5rem .45rem !important; }
.sidebar-sihadir .sidebar-menu .nav-link { color: rgba(255, 255, 255, .72) !important; margin: 2px 12px; padding: .5rem .7rem; border-radius: 11px; font-weight: 500; }
.sidebar-sihadir .sidebar-menu .nav-link .nav-icon { width: 30px; height: 30px; margin-right: .35rem; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .04); transition: background-color .15s, color .15s; }
.sidebar-sihadir .sidebar-menu .nav-link:hover:not(.active) { background: rgba(255, 255, 255, .06) !important; }
.sidebar-sihadir .sidebar-menu .nav-link:hover:not(.active) .nav-icon { background: rgba(255, 255, 255, .1); }
.sidebar-sihadir .sidebar-menu .nav-link.active { background: linear-gradient(135deg, rgba(var(--brand-rgb), .95), color-mix(in srgb, var(--brand) 70%, #000)) !important; color: #fff !important; box-shadow: 0 10px 22px -12px rgba(var(--brand-rgb), .9); }
.sidebar-sihadir .sidebar-menu .nav-link.active .nav-icon { background: rgba(255, 255, 255, .18); color: #fff !important; }
.sidebar-sihadir .sidebar-menu .nav-link.active::before { left: -12px; top: 10px; bottom: 10px; background: var(--accent, #f59e0b); }
[data-bs-theme="dark"] .sidebar-sihadir .sidebar-menu .nav-link.active, [data-bs-theme="dark"] .sidebar-sihadir .sidebar-menu .nav-link.active .nav-icon { color: #fff !important; }
.sidebar-sihadir .sidebar-menu .nav-link .badge.text-bg-danger { background: var(--accent, #f59e0b) !important; color: #3b2203 !important; }
.sidebar-sihadir .sb-kaki { margin: 1.25rem 12px .5rem; padding: .85rem; border-radius: 14px; background: linear-gradient(135deg, rgba(var(--brand-rgb), .28), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); font-size: .75rem; }
.sidebar-sihadir .sb-kaki b { color: #fff; }
.sidebar-sihadir .sb-kaki .btn { --bs-btn-bg: rgba(255, 255, 255, .12); --bs-btn-color: #fff; --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(255, 255, 255, .2); --bs-btn-hover-color: #fff; }

/* ---------- Header atas ---------- */
.app-header.navbar { min-height: 64px; background: rgba(255, 255, 255, .8) !important; border-bottom-color: rgba(16, 24, 40, .06) !important; }
.cari-global { position: relative; width: 300px; max-width: 32vw; }
.cari-global i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
.cari-global input { padding: .48rem .9rem .48rem 2.3rem; border-radius: 99px; background: var(--canvas); border-color: transparent; font-size: .85rem; }
.cari-global input:focus { background: var(--surface); }
.cari-global kbd { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); font-size: .65rem; background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: none; padding: .1rem .35rem; border-radius: 6px; }

/* ---------- Judul halaman ---------- */
.app-main { background: radial-gradient(1200px 380px at 30% -120px, rgba(var(--brand-rgb), .10), transparent 70%), var(--canvas); }
[data-bs-theme="dark"] .app-main { background: radial-gradient(1200px 380px at 30% -120px, rgba(var(--brand-rgb), .16), transparent 70%), var(--canvas); }
.app-content-header { padding: 1.5rem 0 1rem; }
.app-content-header .jejak { font-size: .74rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: .35rem; margin-bottom: .25rem; }
.app-content-header .jejak i { font-size: .65rem; opacity: .6; }
.app-content-header h3 { font-size: 1.6rem; letter-spacing: -.025em; }

/* ---------- Kartu ---------- */
.card { border-color: rgba(16, 24, 40, .06); box-shadow: var(--shadow-1); border-radius: var(--radius); }
[data-bs-theme="dark"] .card { border-color: var(--line); }
.card > .card-header { border-bottom-color: var(--line-soft); padding: .95rem 1.2rem; }
.card > .card-header .card-title > i.bi:first-child, .card-title > .bi:first-child { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand) !important; font-size: .95rem; margin-right: .15rem !important; }
.card > .card-header .card-title > i.bi.text-warning:first-child { background: var(--st-t-bg); color: var(--st-t) !important; }
.card > .card-footer { background: transparent; }
.table thead th, .table > thead > tr > th { text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; background: color-mix(in srgb, var(--canvas) 70%, var(--surface)); }
.btn { border-radius: 10px; }
.btn-primary { background-image: linear-gradient(135deg, var(--grad-a), var(--brand)); border: 0; box-shadow: 0 6px 16px -8px rgba(var(--brand-rgb), .7); }
.btn-primary:hover { background-image: linear-gradient(135deg, var(--brand), var(--brand-700)); }
.form-control, .form-select { border-radius: 10px; }

/* ---------- Kartu statistik ---------- */
.stat-card { border: 1px solid rgba(16, 24, 40, .06); border-radius: 18px; padding: 1.1rem 1.15rem; min-height: 124px; box-shadow: var(--shadow-1); transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat-card::before { display: none; }
.stat-card::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--c-bg); opacity: .55; }
.stat-card .stat-icon { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c)); color: #fff; box-shadow: 0 8px 18px -8px var(--c); z-index: 1; }
.stat-card .stat-value { font-size: 2rem; position: relative; z-index: 1; }
.stat-card .stat-sub { position: relative; z-index: 1; }
[data-bs-theme="dark"] .stat-card::after { opacity: .12; }

/* ---------- Hero dashboard ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 22px; padding: 1.6rem 1.75rem; color: #fff; margin-bottom: 1rem;
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, .18), transparent 60%),
        radial-gradient(380px 240px at 0% 120%, rgba(245, 158, 11, .35), transparent 60%),
        linear-gradient(120deg, var(--grad-b), var(--brand) 55%, var(--grad-a));
    box-shadow: 0 24px 48px -28px rgba(var(--brand-rgb), .85);
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero .salam { font-size: .85rem; opacity: .85; font-weight: 600; }
.hero h2 { color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: .15rem 0 .5rem; }
.hero .chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; padding: .35rem .75rem; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.hero .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.hero .btn-hero { --bs-btn-bg: #fff; --bs-btn-color: var(--brand-700); --bs-btn-border-color: #fff; --bs-btn-hover-bg: #f1f5ff; --bs-btn-hover-color: var(--brand-700); font-weight: 700; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .4); }
.hero .btn-hero-2 { --bs-btn-bg: rgba(255, 255, 255, .12); --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .35); --bs-btn-hover-bg: rgba(255, 255, 255, .22); --bs-btn-hover-color: #fff; }
.hero-ring { --p: 0; --sz: 118px; width: var(--sz); height: var(--sz); border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); position: relative; }
.hero-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 85%, #000); }
.hero-ring > div { position: relative; text-align: center; line-height: 1.05; }
.hero-ring b { font-size: 1.65rem; font-weight: 800; display: block; }
.hero-ring small { font-size: .66rem; opacity: .8; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hero-mini { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.hero-mini div { line-height: 1.15; } .hero-mini b { font-size: 1.15rem; font-weight: 800; display: block; } .hero-mini span { font-size: .72rem; opacity: .8; font-weight: 600; }

/* ---------- Jurusan ---------- */
.badge-jur { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: .22rem .5rem; border-radius: 7px; color: var(--j); background: color-mix(in srgb, var(--j) 12%, transparent); border: 1px solid color-mix(in srgb, var(--j) 28%, transparent); line-height: 1.1; }
.jur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .85rem; }
.jur-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid rgba(16, 24, 40, .06); border-radius: 16px; padding: .95rem 1rem .9rem; box-shadow: var(--shadow-1); text-align: left; transition: transform .15s, box-shadow .15s; }
.jur-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--j); }
.jur-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.jur-card .jur-kode { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 30px; padding: 0 .55rem; border-radius: 9px; font-weight: 800; font-size: .78rem; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--j) 70%, #fff), var(--j)); box-shadow: 0 6px 14px -8px var(--j); }
.jur-card .jur-nama { font-weight: 700; font-size: .85rem; line-height: 1.3; margin: .6rem 0 .5rem; color: var(--bs-emphasis-color); min-height: 2.2em; }
.jur-card .jur-angka { display: flex; gap: .9rem; font-size: .75rem; color: var(--muted); }
.jur-card .jur-angka b { color: var(--bs-emphasis-color); font-size: .9rem; }
.jur-card .jur-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; display: flex; margin-top: .6rem; }
.jur-card .jur-bar span { height: 100%; }
.jur-card .jur-persen { position: absolute; right: 1rem; top: .95rem; font-weight: 800; font-size: 1.15rem; color: var(--j); }
.jur-tambah { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; border: 1.5px dashed var(--line) !important; background: transparent; color: var(--muted); font-weight: 600; font-size: .85rem; box-shadow: none; min-height: 120px; }
.jur-tambah::before { display: none; }
.jur-tambah i { font-size: 1.4rem; }
.jur-tambah:hover { color: var(--brand); border-color: var(--brand) !important; }
.chip-filter { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip-filter button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; }
.chip-filter button:hover { border-color: var(--j, var(--brand)); color: var(--j, var(--brand)); }
.chip-filter button.active { background: var(--j, var(--brand)); border-color: var(--j, var(--brand)); color: #fff; }
.tingkat-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 .4rem; border-radius: 7px; font-size: .7rem; font-weight: 800; background: var(--canvas); border: 1px solid var(--line); color: var(--ink-2); }
.kode-bc { display: inline-flex; align-items: center; gap: .3rem; font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace; font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--canvas); border: 1px dashed var(--line); border-radius: 7px; padding: .15rem .45rem; letter-spacing: .03em; }
.kode-bc i { color: var(--brand); }

/* ---------- Login modern ---------- */
.login-page-sihadir { background: radial-gradient(900px 600px at 100% 0%, rgba(var(--brand-rgb), .12), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(245, 158, 11, .10), transparent 60%), var(--canvas); }
.login-card { border-radius: 24px !important; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(16, 24, 40, .35) !important; border: 1px solid rgba(16, 24, 40, .06) !important; }
.login-side { color: #fff; border-right: 0; position: relative; overflow: hidden;
    background: radial-gradient(420px 300px at 100% 0%, rgba(255, 255, 255, .16), transparent 60%), radial-gradient(360px 260px at 0% 100%, rgba(245, 158, 11, .35), transparent 60%), linear-gradient(150deg, var(--grad-b), var(--brand) 60%, var(--grad-a)); }
.login-side::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.login-side > * { position: relative; z-index: 1; }
.login-side .side-title { color: #fff; }
.login-side .text-body-secondary, .login-side .small { color: rgba(255, 255, 255, .8) !important; }
.login-side .side-list li { border-top-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .86); }
.login-side .side-list b { color: #fff; }
.login-side .side-list i { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.login-side .fw-bold, .login-side .fw-semibold { color: #fff; }
[data-bs-theme="dark"] .login-side { background: linear-gradient(150deg, var(--grad-b), var(--brand)); }

@media (max-width: 991.98px) { .cari-global { display: none; } }
@media (max-width: 575.98px) {
    .hero { padding: 1.2rem; border-radius: 18px; }
    .hero h2 { font-size: 1.3rem; }
    .hero-ring { --sz: 92px; } .hero-ring b { font-size: 1.3rem; }
    .jur-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    .jur-card { padding: .8rem .8rem .75rem; }
    .jur-card .jur-persen { font-size: 1rem; right: .75rem; }
}
@media print { .hero { color: #000; background: none !important; box-shadow: none; border: 1px solid #ccc; } .hero::after { display: none; } }
@media (max-width: 575.98px) {
    .hero .hero-ring { position: absolute; right: 1rem; top: 1rem; --sz: 74px; }
    .hero .hero-ring::before { inset: 7px; }
    .hero .hero-ring b { font-size: 1rem; } .hero .hero-ring small { font-size: .5rem; }
    .hero .salam, .hero h2 { padding-right: 84px; }
    .hero .chip-jam { display: none !important; }
    .hero-mini { gap: .9rem 1.2rem; }
    .hero .btn { flex: 1 1 auto; }
    .card-tools { width: 100%; }
    .card-tools .form-control { max-width: none !important; flex: 1; }
}

/* =====================================================================
   v1.6.1 — TEMA ADMINLTE "SiHADIR": animasi pemindai, sidebar mini,
   transisi halus, hitung naik angka
   ===================================================================== */
/* Ilustrasi pemindai (meja piket & login) */
.scan-anim { position: relative; width: 190px; height: 120px; margin: .4rem auto 1rem; }
.scan-anim .sudut { position: absolute; width: 24px; height: 24px; border: 3px solid var(--brand); animation: sudutNapas 2.4s ease-in-out infinite; }
.scan-anim .sudut:nth-child(1) { left: -10px; top: -10px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.scan-anim .sudut:nth-child(2) { right: -10px; top: -10px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.scan-anim .sudut:nth-child(3) { left: -10px; bottom: -10px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.scan-anim .sudut:nth-child(4) { right: -10px; bottom: -10px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
@keyframes sudutNapas { 50% { transform: scale(1.1); opacity: .6; } }
.scan-anim .kartu-mini { position: absolute; inset: 0; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 18px 30px -16px rgba(16,24,40,.45), 0 0 0 1px rgba(16,24,40,.06); animation: kartuAyun 5s ease-in-out infinite; }
@keyframes kartuAyun { 50% { transform: perspective(600px) rotateY(8deg) rotateX(4deg) translateY(-3px); } }
.scan-anim .kartu-mini::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 24%; background: linear-gradient(120deg, var(--brand), var(--grad-a)); }
.scan-anim .kartu-mini i { position: absolute; left: 10%; top: 32%; width: 22%; height: 30%; border-radius: 6px; background: #e2e8f0; }
.scan-anim .kartu-mini b { position: absolute; left: 38%; top: 34%; width: 48%; height: 7px; border-radius: 4px; background: #cbd5e1; box-shadow: 0 13px 0 -1px #e2e8f0; }
.scan-anim .kartu-mini .bc { position: absolute; left: 14%; right: 14%; bottom: 10%; height: 20%; background: repeating-linear-gradient(90deg, #0f172a 0 2px, transparent 2px 4px, #0f172a 4px 6px, transparent 6px 8px, #0f172a 8px 9px, transparent 9px 11px); }
.scan-anim .laser { position: absolute; left: -8%; right: -8%; height: 3px; border-radius: 3px; background: #ff2d55; box-shadow: 0 0 10px 3px rgba(255,45,85,.7), 0 0 30px 8px rgba(255,45,85,.3); animation: laserSapu 2.2s ease-in-out infinite; }
@keyframes laserSapu { 0%,100% { top: 6%; } 50% { top: 92%; } }
.scan-box { position: relative; overflow: hidden; border: 1.5px dashed var(--brand-line); background: radial-gradient(400px 200px at 50% 0%, rgba(var(--brand-rgb), .12), transparent 70%), var(--brand-tint); }
.scan-box:focus-within { border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.scan-box:focus-within .scan-anim .laser { animation-duration: 1.1s; }

/* Login: demo pemindai */
.login-demo { position: relative; display: flex; align-items: center; gap: 1.2rem; }
.login-demo .scan-anim.besar { width: 170px; height: 106px; margin: 10px 0 10px 10px; flex-shrink: 0; }
.login-demo .scan-anim .sudut { border-color: #fff; }
.login-toast { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem .7rem .7rem; border-radius: 16px; background: #fff; color: #0f172a; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); animation: toastLoop 4.4s ease-in-out infinite; }
.login-toast .ic { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #34d399, #16a34a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.login-toast b { display: block; font-size: .9rem; color: #0f172a !important; }
.login-toast small { display: block; font-size: .72rem; color: #64748b; }
@keyframes toastLoop { 0%, 30% { opacity: 0; transform: translateY(10px) scale(.95); } 40%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }

/* Sidebar mini (rel ikon) saat diciutkan di layar lebar */
@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .sidebar-sihadir .sb-sekolah { justify-content: center; padding: .55rem; margin: 14px 10px 4px; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sb-sekolah > .min-w-0,
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sb-kaki,
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .nav-header { display: none; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sidebar-menu .nav-link { margin: 3px 12px !important; padding: .4rem !important; width: auto !important; justify-content: center; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sidebar-menu .nav-link .nav-icon { margin-right: 0; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sidebar-menu .nav-link.active::before { left: -10px; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .brand-text { display: none; }
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sidebar-wrapper { padding-top: .25rem; }
}

/* Transisi masuk konten (bertahap) */
@keyframes naikHalus { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.app-content-header .container-fluid > * { animation: naikHalus .45s cubic-bezier(.2,.8,.2,1) both; }
.app-content > .container-fluid > * { animation: naikHalus .5s cubic-bezier(.2,.8,.2,1) both; }
.app-content > .container-fluid > *:nth-child(2) { animation-delay: .05s; }
.app-content > .container-fluid > *:nth-child(3) { animation-delay: .1s; }
.app-content > .container-fluid > *:nth-child(4) { animation-delay: .15s; }
.app-content > .container-fluid > *:nth-child(n+5) { animation-delay: .2s; }
.app-content > .container-fluid > .modal, .app-content > .container-fluid > form:has(.modal) { animation: none; }
.row > [class*="col"] > .stat-card { animation: naikHalus .5s cubic-bezier(.2,.8,.2,1) both; }
.row > [class*="col"]:nth-child(2) > .stat-card { animation-delay: .05s; }
.row > [class*="col"]:nth-child(3) > .stat-card { animation-delay: .1s; }
.row > [class*="col"]:nth-child(4) > .stat-card { animation-delay: .15s; }
.row > [class*="col"]:nth-child(5) > .stat-card { animation-delay: .2s; }
.row > [class*="col"]:nth-child(6) > .stat-card { animation-delay: .25s; }
.jur-grid > * { animation: naikHalus .5s cubic-bezier(.2,.8,.2,1) both; }
.jur-grid > *:nth-child(2) { animation-delay: .04s; } .jur-grid > *:nth-child(3) { animation-delay: .08s; } .jur-grid > *:nth-child(4) { animation-delay: .12s; }
.jur-grid > *:nth-child(5) { animation-delay: .16s; } .jur-grid > *:nth-child(6) { animation-delay: .2s; } .jur-grid > *:nth-child(n+7) { animation-delay: .24s; }
.hero-ring { animation: ringMasuk 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ringMasuk { from { --p: 0; transform: rotate(-90deg) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.sidebar-sihadir .sidebar-menu .nav-link.active { position: relative; overflow: hidden; }
.sidebar-sihadir .sidebar-menu .nav-link.active::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg); animation: kilauMenu 4.5s ease-in-out 1s infinite; }
@keyframes kilauMenu { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.jur-card .jur-bar span { animation: isiBar 1s cubic-bezier(.2,.8,.2,1) both .3s; transform-origin: left; }
@keyframes isiBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .app-content > .container-fluid > *, .app-content-header .container-fluid > *, .stat-card, .jur-grid > *, .hero-ring, .scan-anim *, .login-toast { animation: none !important; } }
.scan-box .scan-anim { margin-top: 1.1rem; }
.login-toast b { white-space: nowrap; }

/* ---------- v1.6.2: presisi tata letak di laptop, PC & HP ---------- */
:root { --lte-sidebar-width: 264px; }
.sidebar-sihadir .sidebar-menu .nav-link { font-size: .86rem; }
.app-header .tanggal-chip { white-space: nowrap; }
.cari-global { width: clamp(200px, 21vw, 340px); }
.app-header .navbar-nav { flex-wrap: nowrap; }
/* Kartu statistik: label selalu 2 baris tinggi agar angka sejajar di satu baris */
.stat-card .stat-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; line-height: 1.3; }
.stat-card .stat-value { margin-top: .2rem; }
.stat-card .stat-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Judul & teks halaman */
.app-content-header h3 { line-height: 1.15; }
.app-content-header .text-body-secondary { text-wrap: pretty; }
.card-title { line-height: 1.3; }
.table td, .table th { line-height: 1.35; }
/* Laptop 1200–1399: rapatkan sedikit */
@media (min-width: 992px) and (max-width: 1399.98px) {
    :root { --lte-sidebar-width: 248px; }
    .app-content-header h3 { font-size: 1.45rem; }
    .stat-card { padding: .95rem 1rem; min-height: 116px; }
    .stat-card .stat-value { font-size: 1.75rem; }
    .stat-card .stat-icon { width: 38px; height: 38px; right: 12px; top: 12px; font-size: 1.05rem; }
    .stat-card .stat-label { padding-right: 44px; font-size: .78rem; }
    .hero { padding: 1.35rem 1.5rem; } .hero h2 { font-size: 1.45rem; }

    .app-header .periode-chip { padding: .3rem .65rem; }
}
/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .stat-card .stat-value { font-size: 1.7rem; }
}
/* HP */
@media (max-width: 575.98px) {
    .stat-card { min-height: 0; }
    .stat-card .stat-label { font-size: .76rem; }
    .stat-card .stat-sub { font-size: .7rem; }
    .app-content-header .jejak { font-size: .7rem; }
    .card > .card-header .card-title { font-size: .9rem; }
    .card > .card-header .card-title > i.bi:first-child { width: 26px; height: 26px; font-size: .85rem; }
    .jur-card .jur-nama { font-size: .8rem; min-height: 2.5em; }
    .jur-card .jur-angka { flex-wrap: wrap; gap: .2rem .6rem; font-size: .7rem; }
    .hero .chip { font-size: .72rem; padding: .3rem .6rem; }
    .scan-box .input-group-lg > .form-control { font-size: 1rem; }
}
.scan-box input { font-size: 1.05rem; letter-spacing: .02em; }
.scan-box input::placeholder { letter-spacing: 0; font-weight: 500; }
.cari-global { width: clamp(180px, 18vw, 340px); }
@media (max-width: 1399.98px) { .cari-global kbd { display: none; } }
.app-header .navbar-nav.ms-auto { gap: .15rem; }
/* Grid jurusan rapi: 3×3 di laptop/tablet, 5+4 di layar lebar, 2 kolom di HP */
.card .jur-grid, .jur-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1400px) { .card .jur-grid, .jur-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .card .jur-grid, .jur-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- v1.6.6: sidebar lebih rapat, presisi & elegan ---------- */
.sidebar-sihadir .sidebar-brand { height: 60px; padding: 0 1rem; }
.sidebar-sihadir .brand-link { padding: 0 !important; gap: .65rem; }
.sidebar-sihadir .brand-image { width: 34px; height: 34px; border-radius: 10px; }
.sidebar-sihadir .brand-text { font-size: 1.05rem; line-height: 1.1; }
.sidebar-sihadir .brand-text small { font-size: .66rem; margin-top: 2px; }
.sidebar-sihadir .sidebar-wrapper { padding: .35rem 0 1rem; }
.sidebar-sihadir .sb-sekolah { margin: .55rem .75rem .35rem; padding: .55rem .65rem; gap: .6rem; border-radius: 12px; }
.sidebar-sihadir .sb-sekolah .ik { width: 30px; height: 30px; border-radius: 9px; font-size: .9rem; }
.sidebar-sihadir .sb-sekolah b { font-size: .76rem; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-sihadir .sb-sekolah small { font-size: .64rem; margin-top: 1px; }
.sidebar-sihadir .sidebar-menu { gap: 0; }
.sidebar-sihadir .sidebar-menu .nav-item { margin: 0; }
.sidebar-sihadir .nav-header { padding: .85rem 1.35rem .3rem !important; font-size: .6rem; letter-spacing: .14em; line-height: 1.2; }
.sidebar-sihadir .sidebar-menu .nav-link { display: flex; align-items: center; gap: .6rem; margin: 1px .75rem; padding: .36rem .55rem; border-radius: 9px; min-height: 36px; font-size: .835rem; line-height: 1.25; }
.sidebar-sihadir .sidebar-menu .nav-link .nav-icon { width: 26px; height: 26px; min-width: 26px; margin: 0 !important; border-radius: 7px; font-size: .9rem; line-height: 1; }
.sidebar-sihadir .sidebar-menu .nav-link p { margin: 0 !important; flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; letter-spacing: .005em; }
.sidebar-sihadir .sidebar-menu .nav-link p .bi-box-arrow-up-right { font-size: .7rem; }
.sidebar-sihadir .sidebar-menu .nav-link p .badge { font-size: .62rem; padding: .2em .5em; min-width: 18px; }
.sidebar-sihadir .sidebar-menu .nav-link.active { box-shadow: 0 6px 16px -8px rgba(var(--brand-rgb), .9); }
.sidebar-sihadir .sidebar-menu .nav-link.active::before { left: -.75rem; top: 8px; bottom: 8px; width: 3px; }
.sidebar-sihadir .sb-kaki { margin: 1rem .75rem .25rem; padding: .7rem; font-size: .72rem; }
@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .sidebar-sihadir:not(:hover) .sidebar-menu .nav-link { margin: 2px 10px !important; padding: .36rem !important; min-height: 36px; }
}
.sidebar-sihadir .sidebar-brand { justify-content: flex-start; padding: 0 .75rem 0 1.3rem; }
.sidebar-sihadir .brand-link { width: 100%; justify-content: flex-start; }

/* ==================================================================
 * v1.6.6 · Guru & Hak Akses
 * ================================================================== */
.peran-kartu { position: relative; display: flex; gap: .7rem; align-items: flex-start; height: 100%; padding: .85rem .95rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.peran-kartu .ik { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.peran-kartu b { display: block; font-size: .86rem; line-height: 1.25; }
.peran-kartu small { display: block; font-size: .72rem; line-height: 1.35; color: var(--ink-3, #64748b); margin-top: .15rem; }
.peran-kartu em { position: absolute; top: .65rem; right: .8rem; font-style: normal; font-weight: 800; font-size: 1.05rem; color: var(--c); }
.peran-kartu > div { padding-right: 1.3rem; min-width: 0; }
.badge.tg-piket { background: #fef3c7; color: #92400e; }
.badge.tg-wali  { background: #e0f2fe; color: #075985; }
.badge.tg-bk    { background: #ede9fe; color: #5b21b6; }
[data-bs-theme=dark] .badge.tg-piket { background: rgba(245,158,11,.18); color: #fcd34d; }
[data-bs-theme=dark] .badge.tg-wali  { background: rgba(14,165,233,.18); color: #7dd3fc; }
[data-bs-theme=dark] .badge.tg-bk    { background: rgba(139,92,246,.2); color: #c4b5fd; }
.tugas-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tugas-judul { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-weight: 700; font-size: .85rem; background: var(--brand-tint); border-bottom: 1px solid var(--line); }
.tugas-judul i { color: var(--brand); }
.tugas-judul small { font-weight: 500; color: var(--ink-3, #64748b); font-size: .72rem; margin-left: auto; }
.tugas-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.tugas-row .ik { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.tugas-row label { font-size: .86rem; }
.tugas-row .form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }
.binaan-box { padding: .75rem .9rem .85rem; background: color-mix(in srgb, #8b5cf6 4%, transparent); }
.binaan-grup { display: flex; gap: .5rem; align-items: flex-start; padding: .3rem 0; }
.binaan-grup + .binaan-grup { border-top: 1px dashed var(--line); }
.binaan-jur { flex: 0 0 58px; border: 0; border-radius: 7px; padding: .22rem .3rem; font-size: .68rem; font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--j); margin-top: .1rem; }
.binaan-jur:hover { filter: brightness(1.08); }
.binaan-kls { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .74rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; border-radius: 8px; }
.binaan-kls.lain { border-style: dashed; color: var(--ink-3, #94a3b8); }
.binaan-kls .bi-dot { margin: 0 -.3rem 0 -.1rem; color: #8b5cf6; }
.btn-check:checked + .binaan-kls { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.btn-check:checked + .binaan-kls .bi-dot { color: #fff; }
@media (max-width: 575.98px) {
    .tugas-row { flex-wrap: wrap; }
    .tugas-row select { max-width: none !important; width: 100%; }
    .tugas-judul small { display: none; }
    .binaan-grup { flex-direction: column; gap: .3rem; }
    .binaan-jur { flex: none; align-self: flex-start; padding: .18rem .55rem; }
    .binaan-hint { order: 9; flex-basis: 100%; margin: 0 !important; font-size: .74rem; }
}

/* ==================================================================
 * v1.7 · Portal Jurusan
 * ================================================================== */
.jur-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 1.5rem 1.75rem; color: #fff;
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(255, 255, 255, .2), transparent 60%),
        radial-gradient(420px 240px at 0% 130%, rgba(0, 0, 0, .25), transparent 60%),
        linear-gradient(120deg, color-mix(in srgb, var(--j) 70%, #0b1530), var(--j) 60%, color-mix(in srgb, var(--j) 70%, #fff));
    box-shadow: 0 24px 48px -28px var(--j); }
.jur-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.jur-hero-isi { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.25rem; }
.jur-hero-kode { flex: 0 0 auto; display: grid; place-items: center; min-width: 84px; height: 84px; padding: 0 .6rem; border-radius: 22px; font-weight: 800; font-size: 1.45rem; letter-spacing: .02em;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.jur-hero-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.jur-hero h2 { color: #fff; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: .1rem 0 0; line-height: 1.2; }
.jur-hero .chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; padding: .32rem .7rem; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); }
.jur-hero .hero-ring::before { background: color-mix(in srgb, var(--j) 80%, #000); }
.tbl-rombel th { white-space: nowrap; }
.tbl-rombel td { white-space: nowrap; }
.tbl-rombel td:first-child { white-space: normal; min-width: 170px; }
.tbl-rombel td:first-child .small { max-width: 230px !important; }
.tbl-rombel th, .tbl-rombel td { padding-left: .55rem; padding-right: .55rem; }
@media (max-width: 767.98px) {
    .jur-hero { padding: 1.1rem 1.1rem; border-radius: 18px; }
    .jur-hero-isi { flex-wrap: wrap; gap: .85rem; }
    .jur-hero-kode { min-width: 58px; height: 58px; font-size: 1.05rem; border-radius: 16px; }
    .jur-hero h2 { font-size: 1.15rem; }
    .jur-hero .hero-ring { position: absolute; right: 0; top: 0; --sz: 72px; }
    .jur-hero .hero-ring::before { inset: 7px; }
    .jur-hero .hero-ring b { font-size: .88rem; }
    .jur-hero .hero-ring small { display: none; }
    .jur-hero-isi > .min-w-0 { flex-basis: 100%; order: 2; }
}
.jur-card .jur-kajur { display: flex; align-items: center; gap: .35rem; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.jur-card .jur-kajur i { color: var(--j); }
.badge.tg-kajur { background: #dcfce7; color: #166534; }
[data-bs-theme=dark] .badge.tg-kajur { background: rgba(34,197,94,.18); color: #86efac; }

/* ==================================================================
 * v1.7.1 · Pemilih siswa satu kolom (pindai / nama / NISN)
 * ================================================================== */
.ps-box { position: relative; }
.ps-wrap { position: relative; display: flex; align-items: center; }
.ps-wrap > .bi-search { position: absolute; left: .85rem; color: var(--muted, #64748b); pointer-events: none; z-index: 2; }
.ps-wrap .form-control { height: 46px; padding-left: 2.35rem; padding-right: 2.6rem; border-radius: 12px; font-size: .95rem; font-weight: 600; letter-spacing: 0; border: 1.5px solid var(--line); background: var(--surface); }
.ps-wrap .form-control::placeholder { font-weight: 500; color: #94a3b8; }
.ps-wrap .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.ps-scan { position: absolute; right: .7rem; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: .9rem; pointer-events: none; }
.ps-wrap.ps-lg .form-control { height: 54px; font-size: 1.02rem; padding-right: 3.6rem; }
.ps-wrap .ps-go { position: absolute; right: 6px; height: 42px; width: 46px; border-radius: 9px; padding: 0; }
.ps-tip { margin-top: .4rem; font-size: .72rem; color: var(--muted, #64748b); }
.ps-tip kbd { font-size: .64rem; padding: .05rem .3rem; margin: 0 1px; background: var(--line-soft); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; }
.ps-hasil { display: none; margin-top: .4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .35); max-height: 320px; overflow-y: auto; }
.ps-hasil.buka { display: block; }
.ps-hasil.memuat { opacity: .6; }
.ps-item { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .75rem; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; color: inherit; }
.ps-item:last-of-type { border-bottom: 0; }
.ps-item:hover, .ps-item.aktif { background: var(--brand-tint); }
.ps-item.aktif { box-shadow: inset 3px 0 0 var(--brand); }
.ps-av { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.ps-av img, .ps-av span { width: 100%; height: 100%; display: grid; place-items: center; object-fit: cover; font-weight: 700; font-size: .8rem; }
.ps-teks { flex: 1; min-width: 0; line-height: 1.25; }
.ps-teks b { display: block; font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-teks small { display: block; font-size: .74rem; color: var(--muted, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-teks mark { padding: 0 1px; border-radius: 3px; background: #fde68a; color: inherit; }
.ps-enter { opacity: 0; color: var(--brand); font-size: .85rem; }
.ps-item.aktif .ps-enter { opacity: 1; }
.ps-kosong, .ps-info { padding: .7rem .85rem; font-size: .8rem; color: var(--muted, #64748b); }
.ps-kosong i { margin-right: .4rem; }
.ps-info { border-top: 1px dashed var(--line); font-size: .72rem; }
[data-bs-theme=dark] .ps-teks mark { background: rgba(250, 204, 21, .35); }
.scan-box .ps-hasil { text-align: left; }

/* ==================================================================
 * v1.7.2 · Kartu jurusan berwarna elegan (gradasi permata sesuai warna jurusan)
 * ================================================================== */
.jur-grid .jur-card, .jur-card {
    --j2: color-mix(in srgb, var(--j) 58%, #0b1226);
    color: #fff; border: 0;
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--j) 55%, #fff 10%) 0%, transparent 55%),
        linear-gradient(140deg, var(--j2) 0%, var(--j) 62%, color-mix(in srgb, var(--j) 78%, #fff) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 14px 28px -18px color-mix(in srgb, var(--j) 85%, #000);
}
.jur-card::before { /* kilau halus di sisi kiri */
    width: 100%; left: 0; top: 0; bottom: auto; height: 100%;
    background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 38%);
}
.jur-card::after { content: ""; position: absolute; right: -42px; bottom: -52px; width: 150px; height: 150px; border-radius: 50%; pointer-events: none;
    border: 22px solid rgba(255, 255, 255, .09); box-shadow: 0 0 0 26px rgba(255, 255, 255, .04); }
.jur-card > * { position: relative; z-index: 1; }
.jur-card .jur-persen { position: absolute; z-index: 1; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.jur-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 22px 36px -20px color-mix(in srgb, var(--j) 90%, #000); }
.jur-card .jur-kode { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .32); color: #fff; box-shadow: none; backdrop-filter: blur(4px); letter-spacing: .03em; }
.jur-card .jur-nama { color: #fff; }
.jur-card .jur-angka { color: rgba(255, 255, 255, .78); }
.jur-card .jur-angka b, .jur-card .jur-angka b.text-warning, .jur-card .jur-angka b.text-danger { color: #fff !important; }
.jur-card .jur-angka .text-warning { color: rgba(255, 255, 255, .78) !important; }
.jur-card .jur-bar { background: rgba(255, 255, 255, .2); height: 7px; }
.jur-card .jur-bar span:nth-child(1) { background: #fff !important; }
.jur-card .jur-bar span:nth-child(2) { background: #fde68a !important; }
.jur-card .jur-bar span:nth-child(3) { background: #bae6fd !important; }
.jur-card .jur-bar span:nth-child(4) { background: #fecaca !important; }
.jur-card .text-danger, .jur-card .text-body-secondary { color: rgba(255, 255, 255, .85) !important; }
.jur-card .jur-kajur { border-top-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .9); }
.jur-card .jur-kajur i { color: #fff; }
.jur-card .dropdown .btn-link { color: rgba(255, 255, 255, .85) !important; }
.jur-card .dropdown-menu { color: var(--bs-body-color); }
.jur-tambah { background: transparent !important; box-shadow: none !important; color: var(--muted) !important; border: 1.5px dashed var(--line) !important; }
.jur-tambah::after, .jur-tambah::before { display: none; }
.jur-tambah:hover { color: var(--brand) !important; border-color: var(--brand) !important; }
/* impor: langkah */
.impor-langkah { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.impor-langkah > div { position: relative; padding: .85rem .9rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-tint); }
.impor-langkah span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .78rem; margin-bottom: .4rem; }
.impor-langkah b { display: block; font-size: .86rem; }
.impor-langkah small { display: block; color: var(--muted, #64748b); font-size: .76rem; line-height: 1.4; margin-top: .15rem; }
@media (max-width: 767.98px) { .impor-langkah { grid-template-columns: 1fr; } }
.alpa-oto { padding: .8rem .95rem; border: 1px solid color-mix(in srgb, #dc2626 25%, var(--line)); border-left: 4px solid #dc2626; border-radius: 12px; background: color-mix(in srgb, #dc2626 4%, var(--surface)); }
.alpa-oto code { font-size: .74rem; word-break: break-all; }
/* Pengaturan: profil sekolah & kop */
.seksi-set { display: flex; gap: .7rem; align-items: center; margin-bottom: .85rem; padding-bottom: .55rem; border-bottom: 1px dashed var(--line); }
.seksi-set .ik { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.seksi-set b { display: block; font-size: .92rem; } .seksi-set small { display: block; color: var(--muted, #64748b); font-size: .76rem; }
.logo-box { display: flex; gap: .85rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); height: 100%; }
.logo-box > img, .logo-kosong { flex: 0 0 76px; width: 76px; height: 76px; object-fit: contain; border-radius: 12px; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0/14px 14px; border: 1px solid var(--line); padding: 6px; }
.logo-kosong { display: grid; place-items: center; font-size: 1.6rem; color: #94a3b8; }
.kop-pratinjau-wrap { position: sticky; top: 76px; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas, #f1f5f9); }
.kop-pratinjau { background: #fff; color: #0f172a; border-radius: 6px; padding: 14px 14px 18px; box-shadow: 0 10px 26px -18px rgba(15, 23, 42, .5); aspect-ratio: 1 / 1.05; overflow: hidden; }
.kp-baris { display: flex; align-items: center; gap: 8px; }
.kp-baris img { width: 42px; height: 42px; object-fit: contain; flex: 0 0 42px; }
.kp-teks { flex: 1; text-align: center; min-width: 0; }
.kp-1 { font-size: .58rem; font-weight: 600; letter-spacing: .03em; color: #334155; line-height: 1.25; min-height: .1em; }
.kp-2 { font-size: .86rem; font-weight: 800; letter-spacing: .02em; margin: 1px 0; line-height: 1.15; }
.kp-3 { font-size: .5rem; color: #475569; line-height: 1.3; }
.kp-garis { height: 2px; background: #0f172a; margin-top: 7px; box-shadow: 0 2.5px 0 -1.4px var(--brand); }
.kp-isi { margin-top: 16px; display: grid; gap: 7px; } .kp-isi span { display: block; height: 6px; border-radius: 3px; background: #e2e8f0; width: 100%; }
[data-bs-theme=dark] .kop-pratinjau-wrap { background: rgba(255,255,255,.03); }

/* ==================================================================
 * v1.9 · Halaman login — layar penuh, presisi 1 halaman, premium di HP
 * ================================================================== */
.lg-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--canvas, #f1f5f9); font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.lg { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
/* panel merek */
.lg-brand { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; padding: clamp(1.4rem, 4.2vh, 2.8rem) clamp(1.6rem, 4vw, 3.4rem);
    background: radial-gradient(560px 380px at 100% 0%, rgba(255, 255, 255, .17), transparent 60%), radial-gradient(520px 360px at 0% 100%, rgba(245, 158, 11, .32), transparent 60%), linear-gradient(150deg, var(--grad-b), var(--brand) 58%, var(--grad-a)); }
.lg-brand::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(120deg, transparent 30%, #000 90%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 90%); pointer-events: none; }
.lg-brand::after { content: ""; position: absolute; right: -140px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); pointer-events: none; }
.lg-brand > * { position: relative; z-index: 1; }
.lg-brand-top { display: flex; align-items: center; gap: .85rem; }
.lg-logo { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 15px; background: #fff; padding: 5px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); flex-shrink: 0; }
.lg-logo img { width: 100%; height: 100%; object-fit: contain; }
.lg-logo.kecil { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line), 0 10px 20px -14px rgba(16, 24, 40, .35); margin-bottom: 1rem; }
.lg-sekolah b { display: block; font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.lg-sekolah small { display: block; font-size: .78rem; opacity: .82; margin-top: .1rem; }
.lg-brand-mid { margin: auto 0; padding: clamp(1rem, 3vh, 2rem) 0; }
.lg-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .8rem; border-radius: 99px; font-size: .76rem; font-weight: 700; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(6px); }
.lg-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.lg-chip .dot-telat { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .3); }
.lg-chip .dot-tutup, .lg-chip .dot-libur, .lg-chip .dot-belum { background: #cbd5e1; box-shadow: 0 0 0 3px rgba(203, 213, 225, .3); }
.lg-judul { color: #fff; font-size: clamp(1.7rem, 4.4vh, 2.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; margin: clamp(.8rem, 2.2vh, 1.3rem) 0 clamp(.5rem, 1.4vh, .9rem); }
.lg-lead { font-size: clamp(.86rem, 1.9vh, 1rem); color: rgba(255, 255, 255, .84); max-width: 46ch; margin: 0; line-height: 1.55; }
.lg-demo { display: flex; align-items: center; gap: 1.3rem; margin-top: clamp(1rem, 3.5vh, 2.2rem); }
.lg-demo .scan-anim.besar { width: clamp(140px, 22vh, 180px); height: clamp(88px, 13.8vh, 112px); margin: 10px 0 10px 10px; flex-shrink: 0; }
.lg-demo .scan-anim .sudut { border-color: #fff; }
.lg-fitur { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.lg-fitur li { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .85rem; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.lg-fitur i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.lg-fitur b { display: block; font-size: .8rem; line-height: 1.25; }
.lg-fitur small { display: block; font-size: .7rem; opacity: .78; line-height: 1.3; margin-top: .1rem; }
/* panel formulir */
.lg-form-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(1.2rem, 4vh, 2.5rem) clamp(1.2rem, 4vw, 3rem); background: var(--surface, #fff); overflow-y: auto; }
.lg-form { width: 100%; max-width: 410px; }
.lg-grip { display: none; }
.lg-head h2 { font-size: clamp(1.45rem, 3.4vh, 1.85rem); font-weight: 800; letter-spacing: -.03em; margin: 0; color: var(--bs-emphasis-color); }
.lg-head p { margin: .35rem 0 0; color: var(--muted, #64748b); font-size: .9rem; }
.lg-head .wave { display: inline-block; animation: lambai 2.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes lambai { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.lg-peran { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: clamp(1rem, 2.8vh, 1.5rem) 0 1rem; border-radius: 13px; background: var(--canvas, #f1f5f9); border: 1px solid var(--line); }
.lg-peran::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--surface, #fff); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 14px -8px rgba(16, 24, 40, .25); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.lg-peran[data-aktif="siswa"]::before { transform: translateX(100%); }
.lg-peran button { position: relative; z-index: 1; border: 0; background: transparent; padding: .6rem .5rem; font-size: .86rem; font-weight: 700; color: var(--muted, #64748b); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 10px; transition: color .2s; }
.lg-peran button.aktif { color: var(--brand); }
.lg-alert { display: flex; gap: .55rem; align-items: center; padding: .7rem .85rem; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: .84rem; font-weight: 600; margin-bottom: 1rem; animation: goyang .4s ease; }
@keyframes goyang { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.lg-field { display: block; margin-bottom: .95rem; }
.lg-label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: .38rem; }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > i { position: absolute; left: 1rem; color: #94a3b8; font-size: 1.05rem; pointer-events: none; transition: color .2s; }
.lg-input input { width: 100%; height: 52px; padding: 0 3rem 0 2.75rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--canvas, #f8fafc); font-size: 1rem; font-weight: 600; color: var(--bs-emphasis-color); outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.lg-input input::placeholder { color: #a3adbb; font-weight: 500; }
.lg-input input:focus { border-color: var(--brand); background: var(--surface, #fff); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); }
.lg-input:focus-within > i { color: var(--brand); }
.lg-lihat { position: absolute; right: .45rem; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; }
.lg-lihat:hover { background: var(--line-soft); color: var(--ink-2); }
.lg-btn { width: 100%; height: 54px; margin-top: .4rem; border: 0; border-radius: 14px; color: #fff; font-size: 1.02rem; font-weight: 800; letter-spacing: .01em; display: flex; align-items: center; justify-content: center; gap: .6rem;
    background: linear-gradient(135deg, var(--grad-a), var(--brand) 55%, var(--grad-b)); box-shadow: 0 14px 28px -14px rgba(var(--brand-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .15s, box-shadow .2s, filter .2s; }
.lg-btn:hover { filter: brightness(1.06); box-shadow: 0 18px 32px -14px rgba(var(--brand-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.lg-btn:active { transform: translateY(1px) scale(.995); }
.lg-btn i { transition: transform .2s; } .lg-btn:hover i { transform: translateX(3px); }
.lg-btn.memuat { pointer-events: none; opacity: .85; }
.lg-btn.memuat i { animation: putar .8s linear infinite; } .lg-btn.memuat i::before { content: "\F130"; }
@keyframes putar { to { transform: rotate(360deg); } }
.lg-tip { display: flex; gap: .55rem; margin-top: 1rem; padding: .7rem .85rem; border-radius: 12px; background: var(--brand-tint); border: 1px solid var(--brand-soft); color: var(--ink-2); font-size: .78rem; line-height: 1.45; }
.lg-tip i { color: var(--brand); margin-top: 1px; }
.lg-foot { margin-top: clamp(1rem, 3.5vh, 2rem); text-align: center; font-size: .72rem; color: var(--muted, #94a3b8); }
[data-bs-theme=dark] .lg-alert { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .35); color: #fca5a5; }
/* layar laptop pendek */
@media (min-width: 992px) and (max-height: 760px) { .lg-demo { display: none; } .lg-fitur small { display: none; } }
@media (min-width: 992px) and (max-height: 620px) { .lg-fitur { display: none; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .lg-fitur { grid-template-columns: 1fr; gap: .45rem; } .lg-fitur li { padding: .55rem .7rem; } .lg-fitur small { display: none; } }

/* ---------- HP & tablet: kepala bergradasi + lembar formulir ---------- */
@media (max-width: 991.98px) {
    .lg-body { background: var(--brand); }
    .lg { display: flex; flex-direction: column; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
    .lg-brand { flex: 0 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 1.4rem) 1.35rem 3.6rem; }
    .lg-brand::after { width: 300px; height: 300px; right: -110px; bottom: -150px; border-width: 44px; }
    .lg-brand-top { flex-direction: column; text-align: center; gap: .7rem; }
    .lg-logo { width: 74px; height: 74px; border-radius: 22px; padding: 7px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 18px 34px -16px rgba(0, 0, 0, .55); }
    .lg-sekolah b { font-size: 1.12rem; }
    .lg-brand-mid { margin: .9rem 0 0; padding: 0; text-align: center; }
    .lg-judul, .lg-lead, .lg-demo, .lg-fitur { display: none; }
    .lg-chip { font-size: .72rem; }
    .lg-form-wrap { flex: 1 0 auto; align-items: flex-start; margin-top: -2.2rem; position: relative; z-index: 2; border-radius: 28px 28px 0 0; padding: .75rem 1.35rem calc(env(safe-area-inset-bottom, 0px) + 1.2rem); box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .45); overflow: visible; }
    .lg-grip { display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 1.1rem; }
    .lg-form { max-width: 460px; margin: 0 auto; }
    .lg-head { text-align: center; }
    .lg-head h2 { font-size: 1.5rem; }
    .lg-head p { font-size: .85rem; }
    .lg-peran { margin: 1.1rem 0 .9rem; }
    .lg-input input { height: 54px; font-size: 16px; } /* 16px: cegah zoom otomatis iOS */
    .lg-btn { height: 56px; border-radius: 16px; }
    .lg-tip { font-size: .76rem; }
    .lg-foot { margin-top: 1rem; }
}
@media (max-width: 991.98px) and (max-height: 700px) { .lg-brand { padding-top: calc(env(safe-area-inset-top, 0px) + .9rem); padding-bottom: 3rem; } .lg-logo { width: 60px; height: 60px; } .lg-tip { display: none; } }
@media (min-width: 576px) and (max-width: 991.98px) { .lg-form-wrap { padding-left: 2rem; padding-right: 2rem; } }
