:root {
    --bg: #f6f8fc;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: rgba(148, 163, 184, 0.22);
    --primary: #4f46e5;
    --primary-2: #7c3aed;
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 12px 32px -12px rgba(79, 70, 229, 0.14);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dekorasi latar lembut & ringan */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}
.orb-1 { width: 420px; height: 420px; background: #c7d2fe; top: -120px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: #fbcfe8; bottom: -100px; right: -80px; }

/* Animasi halus */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up {
    animation: fadeUp 0.5s var(--ease) both;
    animation-delay: var(--delay, 0s);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top, 0px);
}
.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--text);
}
.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px -6px rgba(79, 70, 229, 0.5);
}
.brand-title { display: block; font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.brand-sub { display: block; font-size: 0.72rem; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 13px;
    border-radius: 11px;
    transition: all 0.22s var(--ease);
}
.nav-link:hover { color: var(--primary); background: rgba(79, 70, 229, 0.07); }
.nav-link.active { color: var(--primary); background: rgba(79, 70, 229, 0.11); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}
.btn-install-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    padding: 7px 13px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px -6px rgba(79, 70, 229, 0.5);
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-install-pill:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(79, 70, 229, 0.65); }

.btn-icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(79, 70, 229, 0.22);
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
    padding: 7px 12px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s var(--ease);
}
.btn-icon-pill:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-icon-pill.is-registered {
    border-color: rgba(16, 185, 129, 0.35);
    background: #d1fae5;
    color: #047857;
}
.btn-icon-pill.is-registered:hover {
    border-color: var(--rose);
    background: var(--rose);
    color: #fff;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    padding: 4px 10px 4px 5px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s var(--ease);
}
.user-chip:hover,
.user-chip.active {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.22);
}
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff; font-weight: 700; font-size: 0.85rem;
    display: grid; place-items: center; flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 0.84rem; font-weight: 700; }
.role-badge {
    display: inline-block; width: fit-content;
    font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.badge-admin { background: #ede9fe; color: #6d28d9; }
.badge-user { background: #e0f2fe; color: #0369a1; }

.btn-logout {
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--rose);
    padding: 7px 12px;
    border-radius: 10px;
    transition: background 0.2s;
}
.btn-logout:hover { background: rgba(244, 63, 94, 0.1); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span { width: 22px; height: 2.5px; background: var(--text); border-radius: 4px; }

/* Konten Utama */
.main-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 20px 64px;
    flex: 1;
}

.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 3px;
}
.page-hero h1 { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.page-hero p { color: var(--muted); margin-top: 3px; font-size: 0.92rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tombol */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(79, 70, 229, 0.52);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(79, 70, 229, 0.65); }
.btn-soft { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.btn-soft:hover { background: rgba(79, 70, 229, 0.16); }
.btn-amber-soft { background: #fef3c7; color: #b45309; }
.btn-amber-soft:hover { background: #fde68a; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: #fff; color: var(--text); }
.btn-danger-soft { background: rgba(244, 63, 94, 0.1); color: var(--rose); }
.btn-danger-soft:hover { background: var(--rose); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; }
.btn-danger:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 0.82rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* Banner Install PWA & Panduan iOS */
.pwa-banner {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 50;
    width: min(460px, calc(100% - 28px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(79, 70, 229, 0.22);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 20px 44px -14px rgba(15, 23, 42, 0.28);
    animation: fadeUp 0.4s var(--ease);
}
.pwa-banner-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pwa-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.pwa-banner-text { min-width: 0; }
.pwa-banner-text strong { display: block; font-size: 0.86rem; color: var(--text); }
.pwa-banner-text small { display: block; font-size: 0.74rem; color: var(--muted); }
.pwa-banner-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pwa-banner-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.pwa-banner-close:hover { background: #f1f5f9; color: var(--text); }

.ios-install-steps {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text);
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.accent-indigo::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.accent-violet::before { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.accent-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.accent-rose::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.stat-label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--muted); }
.stat-value { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0; }
.stat-foot { font-size: 0.78rem; color: var(--muted); }

/* Panel & Form */
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.panel-title { font-size: 1.08rem; font-weight: 700; margin-bottom: 12px; }
.panel-header-flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.inline-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    align-items: end;
}
.form-group { margin-bottom: 14px; }
.inline-form-grid .form-group { margin-bottom: 0; }
.form-group label { display: block; font-size: 0.81rem; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.form-group select:disabled { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.form-footer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Halaman Profil & Keamanan */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}
.profile-summary-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.profile-avatar-lg {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.profile-summary-head h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.profile-meta-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.84rem; }

.bio-register-box {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.16);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
}
.bio-device-list { display: flex; flex-direction: column; gap: 10px; }
.bio-device-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bio-device-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.bio-device-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eef2ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.bio-device-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bio-device-title-row strong { font-size: 0.9rem; }
.empty-inline {
    text-align: center;
    padding: 20px 12px;
    color: var(--muted);
    font-size: 0.86rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* Section Head & Dashboard Tools */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.2rem; font-weight: 800; }
.section-head p, .muted { color: var(--muted); font-size: 0.86rem; }
.link-more { text-decoration: none; color: var(--primary); font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.dashboard-section-head { align-items: center; }
.dashboard-head-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Card Grid Sekolah & Pengguna */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}
.school-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.25s var(--ease), border-color 0.25s;
}
.school-card:hover { transform: translateY(-4px); border-color: rgba(79, 70, 229, 0.35); }
.school-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.school-card h3 { font-size: 1.08rem; font-weight: 700; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; align-items: center; }

/* Kelompok Sekolah per Pengajar di Dashboard & Sekolah (Admin) */
.teacher-section-stack { display: flex; flex-direction: column; gap: 22px; }
.admin-teacher-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.teacher-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.teacher-section-title { display: flex; align-items: center; gap: 11px; }
.teacher-section-title h2 { font-size: 1.06rem; font-weight: 800; line-height: 1.25; }

/* Pill Badges */
.pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 11px; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700;
}
.pill-xs { padding: 2px 8px; font-size: 0.72rem; }
.pill-indigo { background: #e0e7ff; color: #4338ca; }
.pill-soft { background: #f1f5f9; color: #475569; }
.pill-emerald { background: #d1fae5; color: #047857; }
.pill-rose { background: #ffe4e6; color: #be123c; }
.pill-amber { background: #fef3c7; color: #b45309; }

/* Pengelompokan Chip Sekolah per Pengajar (Halaman Murid Admin) */
.admin-school-groups { display: flex; flex-direction: column; gap: 8px; }
.admin-teacher-row {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-teacher-row.is-active-group {
    border-color: rgba(79, 70, 229, 0.38);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px -12px rgba(79, 70, 229, 0.22);
}
.admin-teacher-label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 155px;
    padding-right: 12px;
    border-right: 1px solid var(--border);
}
.admin-teacher-label strong { display: block; font-size: 0.86rem; line-height: 1.2; }
.admin-teacher-label small { display: block; font-size: 0.72rem; color: var(--muted); }
.teacher-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

/* Filter Chips & Pencarian Realtime */
.filter-bar { margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.chip-scroll { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-chip {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, 0.55);
}
.chip-sm { padding: 6px 12px; font-size: 0.8rem; }

.filter-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 210px;
    flex: 0 1 280px;
}
.search-icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-box input {
    width: 100%;
    padding: 8px 32px 8px 35px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: #fff;
    font: inherit;
    font-size: 0.84rem;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.search-clear {
    position: absolute;
    right: 9px;
    border: none;
    background: #e2e8f0;
    color: var(--text);
    width: 19px;
    height: 19px;
    border-radius: 50%;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
}

/* Tabel List Murid Ringkas per Kelas */
.table-wrap { overflow-x: auto; }
.compact-class-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
    align-items: start;
}
.compact-class-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.compact-class-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(to right, #f8fafc, #f5f3ff);
    border-bottom: 1px solid var(--border);
}
.compact-class-title { display: flex; align-items: center; gap: 8px; }
.compact-class-title h3 { font-size: 0.98rem; font-weight: 800; }
.compact-hint { font-size: 0.74rem; }

.compact-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compact-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 8px 12px;
    background: #fcfdff;
    border-bottom: 1px solid var(--border);
}
.compact-table td {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    vertical-align: middle;
}
.compact-table tbody tr:last-child td { border-bottom: none; }
.compact-table tbody tr { transition: background 0.16s ease; }
.compact-table tbody tr:hover { background: #f8fafc; }
.compact-table tbody tr.is-selected { background: #eef2ff; }

.col-check { width: 38px; text-align: center; }
.col-no { width: 42px; color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.col-act { width: 76px; text-align: right; }

.student-checkbox,
.student-checkbox-all {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    vertical-align: middle;
}
.row-student-name {
    display: block;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding: 2px 0;
}
.student-card-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }
.icon-edit {
    width: 28px; height: 28px; border-radius: 8px;
    border: none; background: transparent; color: #64748b;
    display: grid; place-items: center; cursor: pointer;
    transition: all 0.2s;
}
.icon-edit:hover { background: #e0e7ff; color: var(--primary); }
.icon-delete {
    width: 28px; height: 28px; border-radius: 8px;
    border: none; background: transparent; color: #94a3b8;
    font-size: 1.2rem; cursor: pointer; transition: all 0.2s;
}
.icon-delete:hover { background: #ffe4e6; color: var(--rose); }

/* Switch Mode di Modal Pindah Kelas */
.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.mode-tab {
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 9px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.mode-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 12px -4px rgba(79, 70, 229, 0.25);
}

/* Bar Melayang Aksi Massal (Halaman Murid) */
.bulk-floating-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translate(-50%, 120%);
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    width: min(700px, calc(100% - 32px));
    background: rgba(30, 41, 59, 0.94);
    backdrop-filter: blur(14px);
    color: #fff;
    padding: 13px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 20px 44px -12px rgba(15, 23, 42, 0.45);
    transition: transform 0.32s var(--ease), opacity 0.25s ease;
}
.bulk-floating-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.bulk-bar-info, .bulk-bar-btns { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; flex-wrap: wrap; }
.bulk-btn-cancel { color: #cbd5e1; border-color: rgba(255, 255, 255, 0.22); }
.bulk-btn-cancel:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* === HALAMAN ABSENSI: RINGKAS, LEGA & ELEGAN === */
.att-filter-panel { padding: 16px 18px; margin-bottom: 16px; }

.att-control-bar {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.att-progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.att-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}
.att-progress-head strong { color: var(--primary); font-weight: 800; }
.att-progress-track { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.att-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--emerald));
    border-radius: 999px;
    transition: width 0.35s var(--ease);
}

.att-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.att-status-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.att-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.att-pill-btn:hover { border-color: var(--primary); color: var(--primary); }
.att-pill-num {
    background: #f1f5f9;
    color: var(--text);
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}
.att-pill-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.att-pill-btn.active .att-pill-num { background: rgba(255, 255, 255, 0.22); color: #fff; }
.att-pill-btn.pill-f-kosong.active { background: var(--amber); border-color: var(--amber); }
.att-pill-btn.pill-f-masuk.active { background: var(--emerald); border-color: var(--emerald); }
.att-pill-btn.pill-f-tidak.active { background: var(--rose); border-color: var(--rose); }

.att-right-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.att-search { min-width: 190px; flex: 0 1 220px; }

.att-quick-set { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.att-quick-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-right: 2px; }
.att-mini-act {
    border: 1px solid var(--border);
    background: #fff;
    padding: 5px 9px;
    border-radius: 8px;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s ease;
}
.att-mini-act.act-masuk:hover { background: #d1fae5; color: #047857; border-color: #6ee7b7; }
.att-mini-act.act-tidak:hover { background: #ffe4e6; color: #be123c; border-color: #fda4af; }
.att-mini-act.act-kosong:hover { background: #fef3c7; color: #b45309; border-color: #fcd34d; }

.att-class-stack { display: flex; flex-direction: column; gap: 14px; }
.att-class-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.att-class-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(to right, #f8fafc, #f5f3ff);
    border-bottom: 1px solid var(--border);
}
.att-class-title { display: flex; align-items: center; gap: 8px; }
.att-class-title h3 { font-size: 0.94rem; font-weight: 800; }
.att-group-kosong { font-size: 0.76rem; font-weight: 600; color: #b45309; }
.att-group-kosong.is-complete { color: #047857; }

.att-list { display: flex; flex-direction: column; }
.att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px 9px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    border-left: 3px solid transparent;
    transition: background 0.18s ease, border-color 0.2s ease;
}
.att-row:last-child { border-bottom: none; }
.att-row:hover { background: #f8fafc; }
.att-row.is-kosong { border-left-color: var(--amber); background: rgba(254, 243, 199, 0.22); }
.att-row.is-masuk { border-left-color: var(--emerald); }
.att-row.is-tidak { border-left-color: var(--rose); background: rgba(255, 228, 230, 0.22); }

.att-row-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.att-row-no { width: 24px; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-align: center; flex-shrink: 0; }
.att-row-name { font-size: 0.9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.att-seg {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
    flex-shrink: 0;
}
.att-seg-opt { cursor: pointer; }
.att-seg-opt input { display: none; }
.att-seg-opt span {
    display: block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    text-align: center;
    transition: all 0.2s var(--ease);
}
.att-seg-opt:hover span { color: var(--text); }
.att-seg-opt.opt-kosong input:checked + span { background: #fff; color: #b45309; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08); }
.att-seg-opt.opt-masuk input:checked + span { background: var(--emerald); color: #fff; box-shadow: 0 3px 8px -2px rgba(16, 185, 129, 0.55); }
.att-seg-opt.opt-tidak input:checked + span { background: var(--rose); color: #fff; box-shadow: 0 3px 8px -2px rgba(244, 63, 94, 0.55); }

.att-submit-footer {
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.att-footer-summary { display: flex; flex-direction: column; gap: 2px; }
.att-footer-summary strong { font-size: 0.9rem; }
.att-footer-summary small { font-size: 0.8rem; }

.att-fab-save {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px -8px rgba(79, 70, 229, 0.6);
    opacity: 0;
    transform: translateY(18px) scale(0.94);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.28s var(--ease), box-shadow 0.2s;
}
.att-fab-save.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.att-fab-save:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(79, 70, 229, 0.7); }
.att-fab-badge {
    background: rgba(255, 255, 255, 0.22);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}

/* === TABEL MATRIKS REKAP PENUH 1 BULAN (LIBUR & TIDAK ADA JADWAL) === */
.matrix-panel { padding: 18px 20px; }
.matrix-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.matrix-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }

.holiday-chips-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fff5f6;
    border: 1px solid #fecdd3;
    border-radius: 12px;
}
.holiday-chips-label { font-size: 0.76rem; font-weight: 700; color: #be123c; }
.holiday-chip {
    border: 1px solid #fda4af;
    background: #fff;
    color: #9f1239;
    padding: 3px 10px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.holiday-chip:hover { background: var(--rose); color: #fff; border-color: var(--rose); }

.matrix-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}
.matrix-table th,
.matrix-table td {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: middle;
    white-space: nowrap;
}
.matrix-table thead th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 7px 4px;
    border-bottom: 1.5px solid var(--border);
}
.matrix-table tbody tr:hover td { background: #f8fafc; }
.matrix-table tbody tr:last-child td { border-bottom: 1.5px solid var(--border); }

.matrix-table .sticky-no {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 36px;
    min-width: 36px;
    text-align: center;
    background: #fff;
    color: var(--muted);
    font-weight: 600;
}
.matrix-table .sticky-name {
    position: sticky;
    left: 36px;
    z-index: 3;
    min-width: 170px;
    max-width: 215px;
    padding: 6px 11px;
    text-align: left;
    background: #fff;
    border-right: 1.5px solid rgba(79, 70, 229, 0.18);
    box-shadow: 4px 0 10px -6px rgba(15, 23, 42, 0.12);
}
.matrix-table thead .sticky-no,
.matrix-table thead .sticky-name { z-index: 5; background: #f8fafc; }
.matrix-table tbody tr:hover .sticky-no,
.matrix-table tbody tr:hover .sticky-name { background: #f5f7ff; }
.matrix-student-name {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.matrix-table .col-kelas { padding: 6px 9px; text-align: center; background: #fff; }
.matrix-table thead .col-kelas { background: #f8fafc; }

.matrix-table .col-day { min-width: 31px; width: 31px; text-align: center; }
.matrix-table th.col-day.is-clickable { cursor: pointer; transition: background 0.16s ease; }
.matrix-table th.col-day.is-clickable:hover { background: #e0e7ff !important; }

.day-num { display: block; font-size: 0.77rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.day-short { display: block; font-size: 0.62rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.day-tag {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1.1;
}
.tag-libur { background: #fecdd3; color: #9f1239; }
.tag-nojadwal { background: #cbd5e1; color: #475569; }

.matrix-table th.has-meeting { background: #eef2ff; }
.matrix-table th.has-meeting .day-num { color: var(--primary); }
.matrix-table td.has-meeting { background: rgba(238, 242, 255, 0.25); }

.matrix-table th.is-holiday,
.matrix-table td.is-holiday { background: #fff1f2 !important; }
.matrix-table th.is-holiday .day-num,
.matrix-table th.is-holiday .day-short { color: #be123c; }

.matrix-table th.is-no-schedule { background: #f1f5f9; }
.matrix-table th.is-no-schedule .day-num { color: #64748b; }
.matrix-table td.is-no-schedule {
    background: repeating-linear-gradient(
        -45deg,
        #f8fafc,
        #f8fafc 4px,
        #eef2f6 4px,
        #eef2f6 8px
    ) !important;
}
.cell-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
}
.swatch-nojadwal {
    background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 3px, #e2e8f0 3px, #e2e8f0 6px);
}
.cell-nojadwal { color: #94a3b8; font-weight: 700; font-size: 0.82rem; }

.matrix-table th.is-today { box-shadow: inset 0 3px 0 var(--primary); }
.matrix-table th.is-today .day-num { color: var(--primary); }

.cell-badge {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 6px;
    font-size: 0.69rem;
    font-weight: 800;
    line-height: 1;
}
.badge-m { background: #d1fae5; color: #047857; }
.badge-t { background: #ffe4e6; color: #be123c; }
.badge-l { background: #fecdd3; color: #9f1239; }
.cell-empty { color: #cbd5e1; font-size: 0.8rem; }

.foot-tag-libur { color: #be123c; font-weight: 800; font-size: 0.7rem; }
.foot-tag-nojadwal { color: #64748b; font-weight: 700; font-size: 0.66rem; }

.matrix-table .col-sum { min-width: 38px; text-align: center; padding: 6px 7px; }
.matrix-table .sum-m { background: #f0fdf4; color: #047857; }
.matrix-table .sum-t { background: #fff1f2; color: #be123c; }
.matrix-table .sum-pct { background: #eef2ff; color: #4338ca; border-right: none; }

.matrix-foot-row td { background: #f8fafc !important; font-size: 0.76rem; border-bottom: none; }
.print-only-header,
.print-only-legend { display: none; }

/* Empty State */
.empty-card {
    background: var(--surface);
    border: 1.5px dashed rgba(79, 70, 229, 0.28);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
}
.empty-card h3 { margin-bottom: 6px; }
.empty-card p { color: var(--muted); margin-bottom: 14px; }

/* Halaman Login & Tombol Sidik Jari per User Terdaftar */
.auth-body { justify-content: center; align-items: center; padding: 20px; }
.auth-wrapper { width: 100%; max-width: 430px; }
.auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 34px 30px;
    box-shadow: 0 24px 60px -20px rgba(79, 70, 229, 0.25);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: grid; place-items: center;
    box-shadow: 0 12px 24px -8px rgba(79, 70, 229, 0.6);
}
.auth-header h1 { font-size: 1.45rem; font-weight: 800; }
.auth-header p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.bio-inline-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid var(--rose);
    color: #9f1239;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 12px;
    animation: fadeUp 0.25s var(--ease);
}

.saved-bio-list { display: flex; flex-direction: column; gap: 9px; }
.saved-bio-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 14px;
    border: 1.5px solid rgba(79, 70, 229, 0.22);
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.saved-bio-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.35);
}
.saved-bio-btn:disabled { opacity: 0.65; cursor: wait; }
.saved-bio-fp-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.saved-bio-meta { flex: 1; min-width: 0; }
.saved-bio-meta strong { display: block; font-size: 0.86rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-bio-meta small { display: block; font-size: 0.73rem; color: var(--muted); }

/* Modal Konfirmasi & Dialog Modern */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s;
}
#confirmModal { z-index: 95; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal-card {
    background: #fff;
    border-radius: 22px;
    padding: 26px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 28px 60px -15px rgba(15, 23, 42, 0.35);
    transform: translateY(16px) scale(0.96);
    transition: transform 0.3s var(--ease);
}
.modal-wide { max-width: 520px; }
.modal-backdrop.open .modal-card { transform: translateY(0) scale(1); }
.confirm-card { text-align: center; }
.confirm-icon {
    width: 56px; height: 56px; border-radius: 18px;
    margin: 0 auto 14px;
    display: grid; place-items: center;
    background: #eef2ff; color: var(--primary);
}
.confirm-icon.danger { background: #ffe4e6; color: var(--rose); }
.confirm-card h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 8px; }
.confirm-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }
.confirm-actions { display: flex; justify-content: center; gap: 10px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-close { border: none; background: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; }

/* Toast Alert Elegan */
.toast-stack {
    position: fixed;
    top: calc(18px + env(safe-area-inset-top, 0px));
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.toast {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.22);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    animation: fadeUp 0.35s var(--ease);
}
.toast.success { border-left-color: var(--emerald); }
.toast.error { border-left-color: var(--rose); }

/* Footer */
.footer { border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.65); }
.footer-inner {
    max-width: 1180px; margin: 0 auto; padding: 18px 20px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; flex-wrap: wrap; font-size: 0.84rem; color: var(--muted);
}
.footer-tag { font-weight: 600; color: var(--primary); }

/* Responsif Mobile */
@media (max-width: 920px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 65px; left: 16px; right: 16px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.2);
        display: none;
    }
    .nav-links.open { display: flex; animation: fadeUp 0.25s var(--ease); }
    .nav-actions { margin: 8px 0 0; padding: 12px 0 0; border-left: none; border-top: 1px solid var(--border); flex-wrap: wrap; }
    .compact-class-stack { grid-template-columns: 1fr; }
    .compact-hint { display: none; }
    .search-box { flex: 1 1 100%; }
    .att-right-tools { width: 100%; justify-content: space-between; }
    .dashboard-head-tools { width: 100%; justify-content: space-between; }
    .admin-teacher-label { min-width: 100%; border-right: none; padding-right: 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
    .matrix-table .sticky-name { min-width: 135px; max-width: 160px; padding: 6px 8px; }
}

@media (max-width: 580px) {
    .profile-grid { grid-template-columns: 1fr; }
    .att-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
    .att-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
    .att-seg-opt span { padding: 7px 6px; font-size: 0.74rem; }
    .att-fab-save { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 9px 14px; font-size: 0.8rem; }
}

/* Mode Cetak / Simpan PDF 1 Lembar Landscape */
@page { size: A4 landscape; margin: 7mm; }
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .navbar, .footer, .page-hero, .stat-grid, .bg-orb, .no-print, .att-fab-save, .modal-backdrop, .pwa-banner {
        display: none !important;
    }
    body { background: #fff; padding-bottom: 0; }
    .main-container { max-width: 100%; padding: 0; margin: 0; }
    .glass-panel.matrix-panel {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        background: #fff;
        zoom: var(--print-zoom, 1);
    }
    .print-only-header { display: block; margin-bottom: 8px; }
    .print-only-header h2 { font-size: 13px; margin-bottom: 2px; color: #0f172a; }
    .print-only-header p { font-size: 10px; color: #334155; }
    .matrix-wrap { overflow: visible; border-radius: 0; border: 1px solid #94a3b8; }
    .matrix-table { font-size: 8.5px; }
    .matrix-table th, .matrix-table td { padding: 3px 2px; border-color: #cbd5e1; }
    .matrix-table .sticky-no,
    .matrix-table .sticky-name {
        position: static;
        box-shadow: none;
        min-width: auto;
        max-width: none;
    }
    .matrix-table .sticky-name { padding: 3px 6px; }
    .matrix-table .col-day { min-width: 18px; width: auto; }
    .day-num { font-size: 8px; }
    .day-short { font-size: 6.5px; margin-top: 1px; }
    .day-tag { font-size: 5.5px; padding: 0 2px; }
    .cell-badge { width: 14px; height: 14px; font-size: 7.5px; border-radius: 3px; }
    .pill-xs { padding: 1px 5px; font-size: 7.5px; }
    .print-only-legend {
        display: block;
        margin-top: 7px;
        font-size: 8.5px;
        color: #334155;
        line-height: 1.4;
    }
}