/* =========================================================
   LMS SMK PGRI 2 TAMAN (LMS DUTA) - MODERN RESPONSIVE CSS
   ========================================================= */

:root {
    /* Standard Brand Palette from User Specification */
    --brand-dark-blue: #3368A0;   /* rgb(51, 104, 160) - Primary */
    --brand-steel-blue: #66A3BF;  /* rgb(102, 163, 191) - Secondary */
    --brand-mint: #C8DFDB;        /* rgb(200, 223, 219) - Accent */
    --brand-cream: #F2EFE7;       /* rgb(242, 239, 231) - Light Background */

    /* Functional CSS Variables */
    --primary: #3368A0;
    --primary-hover: #265383;
    --primary-light: #C8DFDB;
    --primary-tint: rgba(51, 104, 160, 0.08);

    --secondary: #66A3BF;
    --secondary-hover: #4f8ba8;
    --secondary-light: #dceaf1;

    --accent: #C8DFDB;
    --accent-dark: #23547b;

    --dark: #18334f;
    --dark-surface: #204165;
    --light-bg: #F2EFE7;
    --card-bg: #ffffff;
    --text-main: #18334f;
    --text-muted: #5d758d;
    --border-color: #d8dedb;
    --border-subtle: #e6e9e8;

    --shadow-sm: 0 1px 3px rgba(24, 51, 79, 0.06);
    --shadow-md: 0 4px 8px -1px rgba(24, 51, 79, 0.09), 0 2px 4px -1px rgba(24, 51, 79, 0.05);
    --shadow-lg: 0 12px 20px -3px rgba(24, 51, 79, 0.12), 0 4px 6px -2px rgba(24, 51, 79, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #18334f 0%, #204165 100%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(51, 104, 160, 0.4);
}

.sidebar-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
}

.sidebar-brand-sub {
    font-size: 0.72rem;
    color: #C8DFDB;
    text-transform: uppercase;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE & Edge */
}

.sidebar-menu::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.menu-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9cb5cb;
    font-weight: 700;
    padding: 12px 12px 6px 12px;
    letter-spacing: 0.8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: #c7d8e6;
    font-weight: 500;
    margin-bottom: 4px;
    transition: var(--transition);
}

.menu-item:hover, .menu-item.active {
    background: rgba(200, 223, 219, 0.15);
    color: #ffffff;
    border-left: 3px solid var(--secondary);
}

.menu-item i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Dropdown & Submenu */
.menu-dropdown {
    margin-bottom: 4px;
}

.menu-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: left;
}

.menu-dropdown-toggle .menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-dropdown-toggle .chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
    color: #9cb5cb;
}

.menu-dropdown.open .chevron-icon {
    transform: rotate(90deg);
    color: #ffffff;
}

.menu-dropdown.open > .menu-dropdown-toggle {
    background: rgba(200, 223, 219, 0.15);
    color: #ffffff;
    border-left: 3px solid var(--secondary);
}

.submenu-list {
    display: none;
    padding-left: 18px;
    margin: 4px 0 6px 0;
    flex-direction: column;
    gap: 2px;
}

.menu-dropdown.open .submenu-list {
    display: flex;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    color: #b0c7db;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.submenu-item:hover {
    background: rgba(200, 223, 219, 0.12);
    color: #ffffff;
    padding-left: 18px;
}

.submenu-item.active {
    background: rgba(200, 223, 219, 0.22);
    color: #ffffff;
    font-weight: 700;
    border-left: 3px solid #C8DFDB;
}

.submenu-item i {
    width: 15px;
    height: 15px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.user-mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-mini-info {
    flex: 1;
    overflow: hidden;
}

.user-mini-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-role {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content Area (Mobile First: Default Full Width) */
.main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    height: 64px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.btn-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--text-main);
    cursor: pointer;
    flex-shrink: 0;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-sidebar-toggle:hover {
    background-color: rgba(24, 51, 79, 0.08);
}

.btn-sidebar-toggle:active {
    transform: scale(0.94);
}

.topbar-title-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.page-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-subtitle i,
.topbar-user-subtitle svg {
    width: 12px;
    height: 12px;
    color: #059669;
    flex-shrink: 0;
}

.topbar-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
}

.badge-role i,
.badge-role svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.badge-admin { background: #fee2e2; color: #b91c1c; }
.badge-guru { background: var(--accent); color: var(--dark); font-weight: 700; }
.badge-kurikulum { background: #f5f3ff; color: #7c3aed; font-weight: 700; border: 1px solid #ddd6fe; }
.badge-siswa { background: var(--secondary-light); color: var(--primary); font-weight: 700; }
.badge-mode-admin { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-mode-guru { background: var(--accent); color: var(--dark); border: 1px solid rgba(0,0,0,0.06); }
.badge-mode-kurikulum { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

/* Page Body Container */
.page-container {
    padding: 24px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* Cards & UI Components */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
    scroll-margin-top: 85px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.dashboard-list-card {
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.11), 0 2px 4px rgba(15, 23, 42, 0.06) !important;
}

/* ===================================================
   SLIM & ELEGANT STAT CARDS (GLOBAL UTILITY)
   =================================================== */
.stats-row-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1100px) {
    .stats-row-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    .stats-row-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 993px) and (max-width: 1099px) {
    .stats-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .stats-row-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.stat-card-compact {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* Subtle Left Accent Indicator Line */
.stat-card-compact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    border-radius: 4px 0 0 4px;
}

.stat-border-admin::before     { background: #2563eb; }
.stat-border-guru::before      { background: #059669; }
.stat-border-kurikulum::before { background: #7c3aed; }
.stat-border-dual::before      { background: #4f46e5; }
.stat-border-total::before     { background: #0284c7; }

.stat-border-siswa::before     { background: #3b82f6; }
.stat-border-aktif::before     { background: #10b981; }
.stat-border-kelas::before     { background: #06b6d4; }
.stat-border-nonaktif::before  { background: #f59e0b; }
.stat-border-rombel::before    { background: #d97706; }
.stat-border-mapel::before     { background: #e11d48; }

/* Active State Highlights */
.stat-card-compact.stat-active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.stat-border-admin.stat-active     { border-color: #2563eb; background: #f8faff; }
.stat-border-guru.stat-active      { border-color: #059669; background: #f7fdfa; }
.stat-border-kurikulum.stat-active { border-color: #7c3aed; background: #faf8ff; }
.stat-border-dual.stat-active      { border-color: #4f46e5; background: #f8f9ff; }
.stat-border-total.stat-active     { border-color: #0284c7; background: #f8fcff; }

.stat-border-siswa.stat-active     { border-color: #3b82f6; background: #eff6ff; }
.stat-border-aktif.stat-active     { border-color: #10b981; background: #ecfdf5; }
.stat-border-kelas.stat-active     { border-color: #06b6d4; background: #ecfeff; }
.stat-border-nonaktif.stat-active  { border-color: #f59e0b; background: #fffbeb; }
.stat-border-rombel.stat-active    { border-color: #d97706; background: #fffbeb; }
.stat-border-mapel.stat-active     { border-color: #e11d48; background: #fff1f2; }

/* Stat Icon Box */
.stat-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-box svg, 
.stat-icon-box i {
    width: 18px;
    height: 18px;
}

.stat-icon-admin     { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.stat-icon-guru      { background: rgba(5, 150, 105, 0.1); color: #059669; }
.stat-icon-kurikulum { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.stat-icon-dual      { background: rgba(79, 70, 229, 0.1); color: #4f46e5; }
.stat-icon-total     { background: rgba(2, 132, 199, 0.1); color: #0284c7; }

.stat-icon-siswa     { background: #eff6ff; color: #3b82f6; }
.stat-icon-aktif     { background: #ecfdf5; color: #10b981; }
.stat-icon-kelas     { background: #ecfeff; color: #06b6d4; }
.stat-icon-nonaktif  { background: #fffbeb; color: #f59e0b; }
.stat-icon-rombel    { background: #fef3c7; color: #d97706; }
.stat-icon-mapel     { background: #ffe4e6; color: #e11d48; }

/* Stat Info Box */
.stat-info-box {
    flex: 1;
    min-width: 0;
}

.stat-meta-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.stat-number-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 3px;
}

.stat-number-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.text-admin     { color: #1e40af; }
.text-guru      { color: #065f46; }
.text-kurikulum { color: #5b21b6; }
.text-dual      { color: #4338ca; }
.text-total     { color: #0369a1; }

.text-siswa     { color: #1d4ed8; }
.text-aktif     { color: #059669; }
.text-kelas     { color: #0891b2; }
.text-nonaktif  { color: #d97706; }
.text-rombel    { color: #b45309; }
.text-mapel     { color: #be123c; }

.stat-meta-unit {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Breakpoint Styles */
@media (max-width: 991px) and (min-width: 577px) {
    .stats-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }
    .stats-row-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .stat-card-compact {
        padding: 10px 12px;
        gap: 10px;
    }
    .stat-icon-box {
        width: 34px;
        height: 34px;
    }
    .stat-icon-box svg, .stat-icon-box i {
        width: 16px;
        height: 16px;
    }
    .stat-number-val {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .stats-row-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .stat-card-compact {
        padding: 9px 10px;
        gap: 8px;
        border-radius: 12px;
    }
    .stat-icon-box {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .stat-icon-box svg, .stat-icon-box i {
        width: 15px;
        height: 15px;
    }
    .stat-meta-title {
        font-size: 0.72rem;
    }
    .stat-number-val {
        font-size: 1.15rem;
    }
    .stat-meta-unit {
        font-size: 0.68rem;
    }
    .stat-card-compact:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

@media (max-width: 330px) {
    .stats-row-container {
        grid-template-columns: 1fr !important;
    }
    .stat-card-compact:last-child:nth-child(odd) {
        grid-column: span 1;
    }
}

/* Kurikulum Dashboard Shortcut Tiles (Slim & Responsive) */
.kurikulum-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.kurikulum-shortcut-card {
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.kurikulum-shortcut-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.kurikulum-shortcut-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kurikulum-shortcut-icon svg,
.kurikulum-shortcut-icon i {
    width: 18px;
    height: 18px;
}

.kurikulum-shortcut-title {
    margin: 0 0 2px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kurikulum-shortcut-desc {
    margin: 0;
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991px) and (min-width: 577px) {
    .kurikulum-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .kurikulum-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 20px;
    }
    .kurikulum-shortcut-card {
        padding: 10px 10px;
        gap: 8px;
        border-radius: 10px;
    }
    .kurikulum-shortcut-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .kurikulum-shortcut-icon svg,
    .kurikulum-shortcut-icon i {
        width: 15px;
        height: 15px;
    }
    .kurikulum-shortcut-title {
        font-size: 0.8rem;
    }
    .kurikulum-shortcut-desc {
        font-size: 0.68rem;
    }
}

@media (max-width: 330px) {
    .kurikulum-shortcuts-grid {
        grid-template-columns: 1fr;
    }
}

[id^="daftar-"] {
    scroll-margin-top: 85px;
}

tr[id^="row-"] {
    scroll-margin-top: 110px;
    scroll-margin-bottom: 110px;
    transition: background-color 1.5s ease;
}

@keyframes rowPulseEdit {
    0% {
        background-color: rgba(37, 99, 235, 0.25) !important;
        box-shadow: inset 0 0 0 2px #3b82f6;
    }
    50% {
        background-color: rgba(37, 99, 235, 0.12) !important;
        box-shadow: inset 0 0 0 2px #93c5fd;
    }
    100% {
        background-color: transparent !important;
        box-shadow: inset 0 0 0 2px transparent;
    }
}

@keyframes rowPulseDelete {
    0% {
        background-color: rgba(239, 68, 68, 0.25) !important;
        box-shadow: inset 0 0 0 2px #ef4444;
    }
    50% {
        background-color: rgba(239, 68, 68, 0.12) !important;
        box-shadow: inset 0 0 0 2px #fca5a5;
    }
    100% {
        background-color: transparent !important;
        box-shadow: inset 0 0 0 2px transparent;
    }
}

.row-highlight-edit {
    animation: rowPulseEdit 2.5s ease-out forwards;
}

.row-highlight-delete {
    animation: rowPulseDelete 2.5s ease-out forwards;
}

@keyframes highlightAutofocus {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-color: #fca5a5;
    }
    40% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }
    100% {
        box-shadow: var(--shadow-sm);
        border-color: var(--border-color);
    }
}

.card-autofocus {
    animation: highlightAutofocus 1.8s ease-in-out;
}

.card-header-custom {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title-custom {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-body-custom {
    padding: 20px;
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-purple, .icon-blue { background: var(--accent); color: var(--primary); }
.icon-teal { background: var(--secondary-light); color: var(--secondary); }
.icon-amber { background: #fdf3e2; color: #b45309; }
.icon-rose { background: #fee2e2; color: #b91c1c; }

/* Buttons */
.btn-custom {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    position: relative;
    user-select: none;
}

.btn-custom i,
.btn-custom svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Global hover effect for all .btn-custom */
.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.btn-custom:hover i,
.btn-custom:hover svg {
    transform: scale(1.12);
}

/* Global active / click effect */
.btn-custom:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.btn-custom:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 1. Primary Button */
.btn-primary { 
    background: var(--primary); 
    color: #ffffff !important; 
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(51, 104, 160, 0.28); 
}
.btn-primary:hover { 
    background: var(--primary-hover); 
    border-color: var(--primary-hover);
    color: #ffffff !important; 
    box-shadow: 0 8px 22px rgba(51, 104, 160, 0.42);
    transform: translateY(-2px);
}
.btn-primary:active {
    background: var(--primary-hover);
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(51, 104, 160, 0.3);
}

/* 2. Secondary Button */
.btn-secondary { 
    background: var(--secondary); 
    color: #ffffff !important; 
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(102, 163, 191, 0.28);
}
.btn-secondary:hover { 
    background: var(--secondary-hover); 
    border-color: var(--secondary-hover);
    color: #ffffff !important; 
    box-shadow: 0 8px 22px rgba(102, 163, 191, 0.42);
    transform: translateY(-2px);
}
.btn-secondary:active {
    background: var(--secondary-hover);
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(102, 163, 191, 0.3);
}

/* 3. Outline Button */
.btn-outline { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    color: var(--text-main); 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-outline:hover { 
    background: #f8fafc; 
    color: var(--primary); 
    border-color: var(--primary); 
    box-shadow: 0 6px 16px rgba(51, 104, 160, 0.16);
    transform: translateY(-2px);
}
.btn-outline:active { 
    background: #f1f5f9;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* 4. Success / Emerald Button */
.btn-success {
    background: #059669;
    color: #ffffff !important;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}
.btn-success:hover {
    background: #047857;
    border-color: #047857;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(5, 150, 105, 0.42);
    transform: translateY(-2px);
}
.btn-success:active {
    background: #065f46;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* 5. Danger / Red Button */
.btn-danger {
    background: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.42);
    transform: translateY(-2px);
}
.btn-danger:active {
    background: #b91c1c;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* 6. Table Action Buttons (Edit, Hapus, Detail) Hover */
.btn-edit-kelas,
.btn-edit-jurusan,
.btn-edit-guru,
.btn-edit-siswa,
.btn-edit-materi {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-edit-kelas:hover,
.btn-edit-jurusan:hover,
.btn-edit-guru:hover,
.btn-edit-siswa:hover,
.btn-edit-materi:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-2px) !important;
}

.btn-edit-kelas:hover i,
.btn-edit-jurusan:hover i,
.btn-edit-guru:hover i,
.btn-edit-siswa:hover i,
.btn-edit-materi:hover i {
    color: #ffffff !important;
    transform: scale(1.15) !important;
}

/* Red Outline Delete Buttons in Tables */
a.btn-custom.btn-outline[style*="#ef4444"]:hover,
button.btn-custom.btn-outline[style*="#ef4444"]:hover,
a.btn-custom.btn-outline[title*="Hapus"]:hover,
button.btn-custom.btn-outline[title*="Hapus"]:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 5px 14px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-2px) !important;
}

a.btn-custom.btn-outline[style*="#ef4444"]:hover i,
button.btn-custom.btn-outline[style*="#ef4444"]:hover i,
a.btn-custom.btn-outline[title*="Hapus"]:hover i,
button.btn-custom.btn-outline[title*="Hapus"]:hover i {
    color: #ffffff !important;
    transform: scale(1.15) !important;
}

/* Buttons with inline custom colors */
.btn-custom[style*="background: #059669"]:hover,
.btn-custom[style*="background:#059669"]:hover {
    background: #047857 !important;
    border-color: #047857 !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4) !important;
    transform: translateY(-2px) !important;
}

.btn-custom[style*="background: #1e3a8a"]:hover,
.btn-custom[style*="background:#1e3a8a"]:hover {
    background: #172554 !important;
    border-color: #172554 !important;
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.4) !important;
    transform: translateY(-2px) !important;
}

.btn-custom[style*="background: #f1f5f9"]:hover,
.btn-custom[style*="background:#f1f5f9"]:hover {
    background: #e2e8f0 !important;
    color: #334155 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-block { width: 100%; justify-content: center; }

/* General button tag fallback */
button[type="submit"]:not(.btn-custom):hover,
button[type="button"]:not(.btn-custom):not(.btn-sidebar-toggle):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

button[type="submit"]:not(.btn-custom):active,
button[type="button"]:not(.btn-custom):not(.btn-sidebar-toggle):active {
    transform: translateY(0) scale(0.98);
}

/* Disabled state */
.btn-custom:disabled,
.btn-custom[disabled],
button:disabled,
.btn-custom[style*="cursor: not-allowed"] {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* KBM Course Card Action Buttons */
.btn-kbm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-kbm i {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.btn-kbm:hover {
    transform: translateY(-2px);
}

.btn-kbm:hover i {
    transform: scale(1.1);
}

/* 1. Materi: Soft Navy Blue */
.btn-kbm-materi {
    background: #eef5fb;
    border: 1px solid #d3e4f2;
    color: #20548a;
}
.btn-kbm-materi:hover {
    background: #3368A0;
    border-color: #3368A0;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(51, 104, 160, 0.25);
}

/* 2. Tugas: Soft Deep Blue */
.btn-kbm-tugas {
    background: #edf2f7;
    border: 1px solid #d4dfe8;
    color: #18334f;
}
.btn-kbm-tugas:hover {
    background: #18334f;
    border-color: #18334f;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 51, 79, 0.25);
}

/* 3. Absen: Soft Sage / Mint Teal */
.btn-kbm-absen {
    background: #eef8f5;
    border: 1px solid #d0ebe3;
    color: #1a6b5e;
}
.btn-kbm-absen:hover {
    background: #257f72;
    border-color: #257f72;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 127, 114, 0.25);
}

/* 4. CBT Ujian: Soft Teal Cyan */
.btn-kbm-cbt {
    background: #f0f7fb;
    border: 1px solid #d4e8f2;
    color: #1b6385;
}
.btn-kbm-cbt:hover {
    background: #2c7b9e;
    border-color: #2c7b9e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(44, 123, 158, 0.25);
}

/* ========================
   Locked / Scheduled State Button
   ======================== */
.btn-locked-state {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    border-radius: var(--radius-sm, 8px);
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.79rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    white-space: nowrap;
    cursor: not-allowed;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-locked-state i,
.btn-locked-state svg {
    width: 14px;
    height: 14px;
    color: #b45309;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.btn-locked-state span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-locked-state:hover {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.16);
    transform: translateY(-2px);
}

.btn-locked-state:hover i,
.btn-locked-state:hover svg {
    color: #d97706;
    transform: scale(1.2) rotate(-6deg);
}

.btn-locked-state:active {
    transform: translateY(0);
}

.btn-tugas-terkirim {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-tugas-terkirim:hover {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #065f46 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-tugas-dinilai {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-tugas-dinilai:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* ========================
   Card Tugas Item with Shadow & Hover Effect
   ======================== */
.card-tugas-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 12px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.card-tugas-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.13), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.card-materi-item {
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.card-materi-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.13), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
}

.card-kbm-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.card-kbm-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.13), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(51, 104, 160, 0.18);
}

/* Tables */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.45;
}

.table-custom th {
    background: #f8fafc;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    border-bottom: 1.5px solid #e2e8f0;
    white-space: nowrap;
}

.table-custom td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.table-custom tbody tr {
    transition: background-color 0.15s ease;
}

.table-custom tbody tr:hover {
    background: #f8fafc;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Modern Table Badges & Elements */
.badge-table-mapel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.35;
    max-width: 280px;
    white-space: normal;
    word-break: break-word;
}
.badge-table-mapel svg,
.badge-table-mapel i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #2563eb;
}

.badge-table-kelas {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.3;
}
.badge-table-kelas svg,
.badge-table-kelas i {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: #64748b;
}

.badge-semester {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
}
.badge-semester.semester-ganjil {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.badge-semester.semester-genap {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.teacher-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.teacher-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.teacher-name {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.btn-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}
.btn-icon-action svg,
.btn-icon-action i {
    width: 14px;
    height: 14px;
}
.btn-icon-action.btn-action-edit {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.btn-icon-action.btn-action-edit:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -1px rgba(37, 99, 235, 0.3);
}
.btn-icon-action.btn-action-delete {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}
.btn-icon-action.btn-action-delete:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -1px rgba(220, 38, 38, 0.3);
}


/* CBT & Quiz Engine Styles */
.cbt-container {
    max-width: 1000px;
    margin: 0 auto;
}

.cbt-header-card {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.cbt-timer {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cbt-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}

.soal-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.soal-text {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
    line-height: 1.6;
}

.opsi-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opsi-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.opsi-item:hover {
    border-color: var(--secondary);
    background: #faf8f3;
}

.opsi-item.selected {
    border-color: var(--primary);
    background: rgba(200, 223, 219, 0.35);
}

.opsi-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef3f1;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
}

.opsi-item.selected .opsi-badge {
    background: var(--primary);
    color: white;
}

/* Navigasi Nomor Soal Grid */
.soal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.btn-no-soal {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-no-soal:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.btn-no-soal:active {
    transform: translateY(0) scale(0.95);
}

.btn-no-soal.answered {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.btn-no-soal.active {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 2px var(--accent);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    z-index: 1020;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    gap: 2px;
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1035;
}

/* =========================================================
   SISTEM RESPONDIF MULTI-DEVICE (HP, TABLET, LAPTOP)
   ========================================================= */

/* 1. TABLET & IPAD (Layar <= 992px) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.35);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .btn-sidebar-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-container {
        padding: 20px 16px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .cbt-layout {
        grid-template-columns: 1fr;
    }

    /* Modal Responsive */
    .modal-box {
        width: 92% !important;
        max-width: 500px !important;
        padding: 20px !important;
        margin: auto;
    }

    /* Tabel di Layar Tablet */
    .table-custom th,
    .table-custom td {
        padding: 10px 8px;
        font-size: 0.82rem;
    }
}

/* 2. SMARTPHONE & PONSEL KECIL (Layar <= 640px) */
@media (max-width: 640px) {
    .page-container {
        padding: 12px 10px;
        padding-bottom: 76px; /* Offset ruang untuk mobile bottom nav */
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    .topbar {
        padding: 0 12px;
        height: 56px;
    }

    .topbar-left {
        gap: 8px;
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
    }

    .topbar-title-wrapper {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .topbar-right {
        gap: 6px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .page-title {
        font-size: clamp(0.85rem, 3.5vw, 0.95rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1 1 auto;
        min-width: 0;
        line-height: 1.2;
    }

    .topbar-user-subtitle {
        font-size: 0.68rem;
        gap: 4px;
        margin-top: 1px;
    }

    .topbar-user-subtitle i,
    .topbar-user-subtitle svg {
        width: 10px;
        height: 10px;
    }

    .switch-text-full {
        display: none !important;
    }

    .switch-text-mobile {
        display: inline !important;
    }

    .btn-role-switch {
        padding: 5px 10px;
        font-size: 0.72rem;
        gap: 4px;
    }

    .btn-role-switch i,
    .btn-role-switch svg {
        width: 12px;
        height: 12px;
    }

    .badge-role {
        padding: 3px 8px;
        font-size: 0.68rem;
        gap: 4px;
        white-space: normal !important;
        word-break: break-word;
        max-width: 100%;
        line-height: 1.3;
        text-align: left;
    }

    .badge-role i,
    .badge-role svg {
        width: 11px;
        height: 11px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .card-custom {
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .card-header-custom {
        padding: 12px 10px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-body-custom {
        padding: 10px 8px;
    }

    /* Form & Input di Layar Ponsel */
    .form-group {
        margin-bottom: 12px;
    }

    .form-control, .form-select {
        font-size: 0.88rem;
        padding: 8px 12px;
    }

    /* Tombol Aksi di Header */
    .page-section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 14px;
    }

    .btn-header-action {
        width: 100%;
        justify-content: center;
        padding: 9px 12px;
        font-size: 0.82rem;
    }

    /* Card Action KBM Guru & Siswa */
    .btn-kbm {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    /* Tabel di Layar HP */
    .table-custom th,
    .table-custom td {
        padding: 9px 8px;
        font-size: 0.8rem;
    }

    /* Modal Layar HP */
    .modal-box {
        width: 95% !important;
        padding: 18px 16px !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* 3. LAPTOP & DESKTOP (Layar >= 993px) */
@media (min-width: 993px) {
    .sidebar {
        transform: translateX(0);
        transition: transform 0.25s ease-in-out;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    .main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
        max-width: calc(100% - 260px);
    }

    /* Collapsed Sidebar on Desktop/Laptop */
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-collapsed .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* 4. OPTIMASI TAMPILAN LAPTOP (Layar 993px - 1366px pada Zoom 100%) */
@media (min-width: 993px) and (max-width: 1366px) {
    .topbar {
        padding: 0 18px;
        height: 60px;
    }

    .page-title {
        font-size: 1.05rem;
    }

    .page-container {
        padding: 18px;
    }

    /* Stat Cards Compact on Laptop */
    .stat-card-compact {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .stat-icon-box {
        width: 35px;
        height: 35px;
        border-radius: 8px;
    }

    .stat-icon-box svg,
    .stat-icon-box i {
        width: 16px;
        height: 16px;
    }

    .stat-meta-title {
        font-size: 0.72rem;
    }

    .stat-number-val {
        font-size: 1.22rem;
    }

    .stat-meta-unit {
        font-size: 0.7rem;
    }

    /* Card & Table Optimization on Laptop */
    .card-header-custom {
        padding: 13px 18px;
    }

    .card-title-custom {
        font-size: 0.94rem;
    }

    .table-custom th {
        padding: 10px 8px;
        font-size: 0.74rem;
    }

    .table-custom td {
        padding: 10px 8px;
        font-size: 0.84rem;
    }

    .badge-table-mapel {
        max-width: 240px;
        font-size: 0.74rem;
        padding: 3px 8px;
    }

    .badge-table-kelas {
        font-size: 0.74rem;
        padding: 3px 8px;
    }

    .badge-semester {
        font-size: 0.72rem;
        padding: 2px 8px;
    }
}

/* Quick Role Switcher Button for Dual-Role accounts (SIMAKS style) */
.btn-role-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}
.btn-role-switch i,
.btn-role-switch svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.btn-role-switch-guru {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #047857;
}
.btn-role-switch-guru:hover {
    background: #d1fae5;
    color: #065f46;
}
.btn-role-switch-admin {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #1d4ed8;
}
.btn-role-switch-admin:hover {
    background: #dbeafe;
    color: #1e40af;
}
.btn-role-switch-kurikulum {
    background: #f5f3ff;
    border: 1.5px solid #ddd6fe;
    color: #7c3aed;
}
.btn-role-switch-kurikulum:hover {
    background: #ede9fe;
    color: #6d28d9;
}
.btn-role-switch:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    filter: brightness(0.96);
}
.btn-role-switch:active {
    transform: translateY(0);
}

.switch-text-full {
    display: inline;
}
.switch-text-mobile {
    display: none;
}

/* Extra small smartphones (<= 420px) */
@media (max-width: 420px) {
    .page-title {
        font-size: clamp(0.8rem, 3.2vw, 0.88rem);
        letter-spacing: -0.01em;
        line-height: 1.2;
    }
    .topbar-user-subtitle {
        font-size: 0.64rem;
        gap: 3px;
    }
    .topbar-user-subtitle i,
    .topbar-user-subtitle svg {
        width: 9px;
        height: 9px;
    }
    .topbar {
        padding: 0 8px;
    }
    .topbar-left {
        gap: 6px;
    }
    .topbar-right {
        gap: 4px;
    }
    .btn-role-switch {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 3px;
    }
    .btn-role-switch i,
    .btn-role-switch svg {
        width: 11px;
        height: 11px;
    }
    .badge-role {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    .badge-role .badge-mode-text {
        display: none !important;
    }
    .page-container {
        padding: 8px 6px;
        padding-bottom: 76px;
    }
    .card-custom {
        margin-bottom: 12px;
        border-radius: 8px;
    }
    .card-header-custom {
        padding: 10px 10px;
    }
    .card-body-custom {
        padding: 10px 8px;
    }
}

/* =========================================================
   SUPERVISI KURIKULUM & FILTER BAR RESPONSIVE COMPONENTS
   ========================================================= */

/* Filter Bar Component */
.filter-form-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filter-inputs-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-search-box {
    position: relative;
    flex: 1 1 240px;
    min-width: 180px;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #94a3b8;
    pointer-events: none;
}

.filter-search-input {
    padding-left: 36px !important;
    height: 40px !important;
    font-size: 0.88rem !important;
    border-radius: var(--radius-sm) !important;
}

.filter-select-box {
    min-width: 150px;
    flex: 0 1 auto;
}

.filter-select {
    height: 40px !important;
    font-size: 0.88rem !important;
    border-radius: var(--radius-sm) !important;
}

.btn-filter {
    height: 40px;
    padding: 0 16px;
    font-size: 0.84rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-total-text {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Teacher Avatar & Monitoring Badges */
.teacher-avatar-emerald {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.teacher-avatar-purple {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.btn-telaah {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap !important;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-telaah:hover {
    background: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    transform: translateY(-2px);
}

.btn-telaah:active {
    transform: translateY(0);
}

.btn-telaah i, .btn-telaah svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .filter-inputs-row {
        width: 100%;
    }
    .filter-search-box {
        width: 100%;
        flex: 1 1 100%;
    }
    .filter-select-box {
        width: 100%;
        flex: 1 1 100%;
    }
    .btn-filter {
        width: 100%;
    }
    .filter-total-text {
        width: 100%;
        justify-content: center;
    }
}

/* Tombol Status Pengumpulan Tugas Siswa */
.btn-tugas-terkirim {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1.5px solid #a7f3d0 !important;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-tugas-terkirim:hover {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #065f46 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
    transform: translateY(-1px);
}

.btn-tugas-terkirim:active {
    transform: translateY(0);
}

.btn-tugas-dinilai {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1.5px solid #bfdbfe !important;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-tugas-dinilai:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.btn-tugas-dinilai:active {
    transform: translateY(0);
}

/* =========================================================
   GLOBAL PRINT & PDF STYLES
/* =========================================================
   PWA (PROGRESSIVE WEB APP) INSTALL PROMPT & UI STYLES
   ========================================================= */

/* Floating Install Banner (Bottom-pinned) */
.pwa-install-banner {
    position: fixed;
    z-index: 99990;
    left: 16px;
    right: 16px;
    bottom: 16px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media (min-width: 768px) {
    .pwa-install-banner {
        left: auto;
        right: 24px;
        bottom: 24px;
        width: 380px;
        max-width: calc(100vw - 48px);
    }
}

@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: 74px;
    }
}

.pwa-install-banner.is-visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.pwa-banner-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.96) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 18px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-banner-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-banner-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pwa-banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-banner-info {
    flex: 1;
    min-width: 0;
}

.pwa-banner-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 3px;
}

.pwa-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.pwa-banner-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
}

.pwa-banner-desc {
    margin: 3px 0 0 0;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-btn-install {
    flex: 1;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.pwa-btn-install:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.pwa-btn-dismiss {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* iOS Safari Modal */
.pwa-ios-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pwa-ios-modal-overlay.is-open {
    opacity: 1;
}

.pwa-ios-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    color: #1e293b;
    animation: pwaZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaZoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pwa-ios-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.pwa-ios-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.pwa-ios-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pwa-ios-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-ios-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.pwa-ios-sub {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pwa-ios-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.pwa-ios-step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-ios-step-desc {
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.4;
}

.pwa-ios-badge-icon {
    display: inline-flex;
    vertical-align: middle;
    background: #e0f2fe;
    color: #0284c7;
    padding: 2px 5px;
    border-radius: 6px;
    margin: 0 2px;
}

.pwa-ios-footer {
    text-align: center;
}

.pwa-ios-btn-ack {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.pwa-ios-btn-ack:hover {
    background: #0369a1;
}

/* Toast Alert */
.pwa-toast-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.pwa-toast-alert.show {
    opacity: 1;
    transform: translateY(0);
}

/* Topbar Install Button */
.btn-pwa-topbar-install {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(14, 165, 233, 0.18));
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.35);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.btn-pwa-topbar-install:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-pwa-topbar-install i,
.btn-pwa-topbar-install svg {
    width: 14px;
    height: 14px;
}

/* Sidebar Install Item */
.sidebar-pwa-container {
    padding: 10px 16px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.sidebar-pwa-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(14, 165, 233, 0.12));
    border: 1px dashed rgba(2, 132, 199, 0.4);
    color: #0284c7;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-pwa-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-style: solid;
}

/* Login Card CTA */
.pwa-login-install-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
}

.btn-pwa-login-install {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.btn-pwa-login-install:hover {
    background: #f0f9ff;
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.pwa-login-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-login-icon svg,
.pwa-login-icon i {
    width: 18px;
    height: 18px;
}

.pwa-login-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pwa-login-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.pwa-login-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 1px;
}

.pwa-login-arrow {
    color: #94a3b8;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
    /* Sembunyikan semua scrollbar bawaan browser saat print */
    ::-webkit-scrollbar,
    *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }

    * {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    .sidebar,
    .topbar,
    header.topbar,
    .sidebar-overlay,
    .mobile-bottom-nav,
    .pwa-install-banner,
    .pwa-ios-modal-overlay,
    .btn-pwa-topbar-install,
    .sidebar-pwa-container,
    .pwa-login-install-box,
    .no-print {
        display: none !important;
    }

    html,
    body,
    .app-wrapper,
    .main-content,
    .page-container,
    .document-paper-sheet,
    .table-responsive {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        position: static !important;
        display: block !important;
    }
}
