:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --secondary: #2563eb;
    --accent: #f97316;
    --accent-dark: #c2410c;
    --accent-light: #ffedd5;
    --success: #15803d;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #ffedd5;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0284c7;
    --info-light: #e0f2fe;
    --dark: #0a2540;
    --gray: #5b6478;
    --light-gray: #f3f5fa;
    --border: #e4e8f1;
    --white: #ffffff;
    --ink: #0a2540;
    --ink-2: #0ea5e9;
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 1px 2px rgba(16, 26, 44, 0.06), 0 1px 3px rgba(16, 26, 44, 0.07);
    --shadow-lg: 0 20px 35px -10px rgba(13, 30, 66, 0.18), 0 6px 12px rgba(13, 30, 66, 0.08);
    --nav-active-shadow: 0 10px 20px rgba(14, 165, 233, 0.28), 0 3px 8px rgba(249, 115, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    --sidebar-width: 264px;
    --sidebar-collapsed-width: 80px;
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f4f6fb;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: 0.9rem;
}

h1,
h2,
h3,
h4 {
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--dark);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea {
    min-height: 70px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #b45309;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #0369a1;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 25%;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    position: relative;
    flex: 1;
    background: radial-gradient(640px 420px at 85% 8%, rgba(249, 115, 22, 0.18), transparent 60%), linear-gradient(160deg, #38bdf8 0%, #0284c7 48%, #0ea5e9 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    overflow: hidden;
}

.login-mascot {
    position: absolute;
    right: 2%;
    bottom: 0;
    height: 78%;
    max-height: 480px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.2));
}

@media (max-width: 1200px) {
    .login-mascot {
        height: 60%;
        opacity: 0.9;
    }
}

.login-brand .logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.login-brand h1 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.login-brand h1 span {
    opacity: 0.85;
    font-weight: 300;
}

.login-brand p {
    opacity: 0.9;
}

.login-brand .subtitle {
    opacity: 0.7;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.login-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.login-subtitle {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.role-selector {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.role-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.role-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--nav-active-shadow);
}

.role-btn i {
    font-size: 1.2rem;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
}

.btn-login {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer .version {
    font-size: 0.75rem;
    color: var(--gray);
}

@media (max-width: 900px) {
    .login-left {
        display: none;
    }
}

body.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    color: var(--dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease, width 0.25s ease;
}

.sidebar-toggle-btn {
    display: none;
    position: absolute;
    top: 1.55rem;
    right: -13px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gray);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 0.7rem;
    z-index: 5;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

@media (min-width: 769px) {
    .sidebar-toggle-btn {
        display: flex;
    }

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width) !important;
    }

    body.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-collapsed-width) !important;
    }

    .main-content {
        transition: margin-left 0.25s ease;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: center;
        padding: 1.3rem 0.6rem;
    }

    .sidebar.collapsed .sidebar-header > div:not(.logo-icon),
    .sidebar.collapsed .nav-section,
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .user-details,
    .sidebar.collapsed .sidebar-footer .btn-danger span {
        display: none;
    }

    .sidebar.collapsed .nav-item {
        justify-content: center;
        gap: 0;
        padding: 0.75rem;
    }

    .sidebar.collapsed .nav-item.active {
        transform: scale(1.06);
    }

    .sidebar.collapsed .sidebar-footer {
        padding: 1rem 0.6rem;
    }

    .sidebar.collapsed .user-info {
        justify-content: center;
    }

    .sidebar.collapsed .sidebar-footer .btn-danger {
        padding: 0.6rem;
    }

    .sidebar.collapsed .sidebar-resize-handle {
        display: none;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.3rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header h3 {
    color: var(--dark);
    font-size: 1rem;
}

.sidebar-header p {
    color: var(--gray);
    font-size: 0.75rem;
}

.sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.1rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem 0.6rem;
}

.nav-section {
    padding: 1rem 0.6rem 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    opacity: 0.75;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    margin-bottom: 0.15rem;
    color: var(--gray);
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    position: relative;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.nav-item i {
    width: 18px;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    transform: translateX(6px) scale(1.02);
    box-shadow: var(--nav-active-shadow);
    z-index: 2;
}

.nav-item.active i {
    transform: scale(1.12);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
}

.sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.user-details p {
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-details span {
    color: var(--gray);
    font-size: 0.75rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.8rem;
    min-width: 0;
}

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 90;
    background: white;
    padding: 0.9rem 1.2rem;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark);
}

.mobile-title {
    font-weight: 600;
}

.mobile-logout-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--danger);
    margin-left: auto;
    padding: 0.3rem 0.5rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.topbar h1 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar-actions {
    display: flex;
    gap: 0.6rem;
}

.filter-bar {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    align-items: center;
}

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.4rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.stat-icon.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.red {
    background: linear-gradient(135deg, #f87171, #dc2626);
}

.stat-info h3 {
    font-size: 1.5rem;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.8rem;
}

.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.87rem;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--gray);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--light-gray);
}

tbody tr:hover {
    background: #fafbff;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.5rem;
}

.text-danger {
    color: var(--danger);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 200;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal-content {
    background: white;
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius);
    padding: 1.8rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-large .modal-content {
    max-width: 700px;
}

.modal-content h2 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--dark);
}

.soal-form-group {
    margin-bottom: 1.1rem;
}

.rumus-toolbar {
    background: var(--light, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 1.1rem;
}

.rumus-toolbar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rumus-toolbar-buttons .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

.rumus-toolbar-hint {
    font-size: 0.76rem;
    color: var(--gray, #64748b);
    margin: 0.5rem 0 0;
}

.rumus-toolbar-hint code {
    background: #eef2ff;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

.rumus-preview {
    margin-top: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: #fafaf9;
    border: 1px dashed var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.9rem;
    overflow-x: auto;
}

.rumus-preview:empty {
    display: none;
}

.soal-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.option-row input[type="text"] {
    flex: 1;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    padding: 0.4rem;
}

.btn-icon-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--light-gray);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon-upload:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-icon-upload input[type="file"] {
    display: none;
}

.soal-editor {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.question-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-pg {
    background: #e0e7ff;
    color: #4338ca;
}

.type-pgk {
    background: #fce7f3;
    color: #be185d;
}

.type-mj {
    background: #dbeafe;
    color: #1d4ed8;
}

.type-is {
    background: #ffedd5;
    color: #b45309;
}

.type-ur {
    background: #d1fae5;
    color: #047857;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.exam-shell {
    min-height: 100vh;
    background: #f0f2f7;
    display: flex;
    flex-direction: column;
}

.exam-topbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.exam-topbar h2 {
    font-size: 1rem;
}

.exam-topbar p {
    font-size: 0.8rem;
    color: var(--gray);
}

.exam-timer {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exam-timer.warning {
    background: var(--danger-light);
    color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.exam-body {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.exam-main {
    flex: 1;
    min-width: 0;
}

.exam-question-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
    margin-bottom: 1.2rem;
}

.exam-stimulus {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.exam-question-text {
    font-weight: 500;
    margin-bottom: 1.2rem;
    font-size: 0.98rem;
}

.exam-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.exam-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.exam-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.exam-option input {
    accent-color: var(--primary);
}

.exam-nav-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.exam-sidebar {
    width: 260px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .exam-body {
        flex-direction: column;
    }

    .exam-sidebar {
        width: 100%;
        order: -1;
    }
}

.exam-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.btn-nav-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.btn-nav-toggle:hover {
    background: var(--light, #f1f5f9);
    color: var(--primary);
}

.exam-nav-btn {
    aspect-ratio: 1;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: white;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.exam-nav-btn.answered {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.exam-nav-btn.current {
    border-color: transparent;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    transform: scale(1.12);
    box-shadow: var(--nav-active-shadow);
    z-index: 1;
}

.exam-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.exam-legend span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.user-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-foto-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
}

.ujian-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.ujian-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

#laporanContent {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    background: #fafafa;
    border-radius: var(--radius-sm);
}

#printArea {
    background: white;
    padding: 2rem;
}

.matching-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
}

@media (max-width: 767px) {
    .matching-row {
        grid-template-columns: 1fr;
    }
}

.essay-grade-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

input:disabled,
select:disabled {
    background: #f1f5f9;
    color: var(--gray);
    cursor: not-allowed;
}

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

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.4s ease;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.08);
    z-index: 100;
    border-top: 1px solid #e2e8f0;
    height: 48px;
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 48px;
    max-width: 420px;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #94a3b8;
    font-size: 0.55rem;
    font-weight: 500;
    text-decoration: none;
    height: 100%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 0 2px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 0.95rem;
    margin-bottom: 1px;
}

.bottom-nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: translateY(-8px) scale(1.08);
    border-radius: 14px;
    box-shadow: var(--nav-active-shadow);
}

.bottom-nav-item:active {
    transform: scale(0.88);
    opacity: 0.7;
}

@media (max-width: 768px) {

    aside.sidebar,
    div.sidebar,
    .sidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        clip: rect(0, 0, 0, 0) !important;
    }

    main.main-content,
    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0.6rem 0.6rem 52px 0.6rem !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        position: relative !important;
        left: 0 !important;
    }

    body.dashboard {
        display: block !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-bottom: 48px;
    }

    .mobile-header {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 90;
        padding: 0.6rem 0.8rem;
        gap: 0.6rem;
        width: 100% !important;
    }

    .mobile-header .mobile-menu-btn {
        display: none !important;
    }

    .mobile-title {
        margin-left: 0;
        font-size: 1rem;
    }

    .bottom-nav {
        display: block !important;
    }

    .sidebar-header,
    .sidebar-nav,
    .sidebar-footer,
    .sidebar-close,
    .sidebar-resize-handle,
    .nav-item,
    .nav-section,
    .user-info,
    .user-avatar,
    .user-details {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    :root {
        --sidebar-width: 220px;
    }
}

#moreMenuModal {
    padding: 0 !important;
    align-items: flex-end !important;
}

#moreMenuModal .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    margin: 0;
    max-height: 65vh;
    padding: 1.2rem;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#moreMenuModal .modal-content h2 {
    margin: -1.2rem -1.2rem 0.8rem -1.2rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    background: rgba(14, 165, 233, 0.05);
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
}

#moreMenuModal .menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

#moreMenuModal .menu-grid a {
    justify-content: center;
    padding: 0.6rem;
    font-size: 0.8rem;
}

.modal-content {
    position: relative;
    max-width: none !important;
    width: auto;
    min-width: 280px;
    min-height: 120px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-large .modal-content {
    width: 700px;
}

.modal-content>form,
.modal-content>#soalFormContainer,
.modal-content>#nilaiDetail,
.modal-content>#laporanContent,
.modal-content>div:not(.resize-handle):not(.close) {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

.modal-content .resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    cursor: nwse-resize;
    z-index: 20;
    background:
        linear-gradient(135deg, transparent 50%, var(--primary) 50%, var(--primary) 55%, transparent 55%),
        linear-gradient(135deg, transparent 62%, var(--primary) 62%, var(--primary) 67%, transparent 67%),
        linear-gradient(135deg, transparent 74%, var(--primary) 74%, var(--primary) 79%, transparent 79%);
    opacity: 0.5;
    border-bottom-right-radius: var(--radius);
    transition: opacity 0.2s;
}

.modal-content .resize-handle:hover,
.modal-content .resize-handle:active {
    opacity: 0.95;
    width: 36px;
    height: 36px;
}

.modal-content h2 {
    cursor: grab;
    user-select: none;
    touch-action: none;
    padding: 0.8rem 2.5rem 0.8rem 0;
    margin: -1.8rem -1.8rem 1rem -1.8rem;
    padding-left: 1.8rem;
    background: rgba(14, 165, 233, 0.05);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 1rem;
}

.modal-content h2:active {
    cursor: grabbing;
    background: rgba(14, 165, 233, 0.1);
}

@media (max-width: 640px) {
    .modal {
        padding: 0 !important;
        align-items: flex-end !important;
        justify-content: center;
    }

    .modal-content {
        width: 100% !important;
        height: auto !important;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        padding: 1.2rem;
    }

    .modal-content h2 {
        margin: -1.2rem -1.2rem 0.8rem -1.2rem;
        padding: 0.8rem 1.2rem;
        padding-left: 1.2rem;
        cursor: default;
        font-size: 0.95rem;
    }

    .modal-content .resize-handle {
        display: none;
    }

    .close {
        top: 0.6rem;
        right: 0.8rem;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--light-gray);
        border-radius: 50%;
        font-size: 1.1rem;
        z-index: 25;
    }
}

.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 101;
    transition: background 0.2s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.active {
    background: var(--primary);
    opacity: 0.35;
}

/* ---- Kunci body ---- */
body.modal-open {
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .main-content {
        padding: 0.6rem 0.6rem 48px 0.6rem !important;
    }

    .card-body {
        padding: 0.8rem;
    }

    .topbar {
        margin-bottom: 0.8rem;
        gap: 0.5rem;
    }

    .topbar h1 {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .stat-info h3 {
        font-size: 1.1rem;
    }

    .stat-info p {
        font-size: 0.7rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.4rem;
    }

    .filter-bar .form-group,
    .filter-bar .btn {
        width: 100% !important;
        min-width: auto !important;
        margin-bottom: 0;
    }

    .filter-bar .btn {
        justify-content: center;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
    }

    .card-header h3 {
        font-size: 0.9rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .table-container {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    table {
        font-size: 0.75rem;
    }

    th,
    td {
        padding: 0.5rem 0.5rem;
        white-space: nowrap;
    }

    .ujian-card .card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.6rem !important;
        padding: 1rem;
    }

    .soal-editor {
        padding: 0.7rem;
    }

    .option-row {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .option-row input[type="text"] {
        min-width: 0;
        width: 100%;
        order: 3;
    }

    .matching-row {
        grid-template-columns: 1fr !important;
        gap: 0.3rem;
        padding: 0.5rem;
    }

    .exam-body {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .exam-question-card {
        padding: 0.8rem;
    }

    .exam-option {
        padding: 0.55rem 0.7rem;
        margin-bottom: 0.4rem;
        font-size: 0.85rem;
    }

    .exam-nav-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.3rem;
    }

    .exam-nav-btn {
        font-size: 0.7rem;
    }

    .exam-topbar {
        padding: 0.5rem 0.7rem;
        gap: 0.4rem;
    }

    .exam-topbar h2 {
        font-size: 0.8rem;
    }

    .exam-timer {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .exam-question-text {
        font-size: 0.88rem;
    }

    .login-card {
        padding: 0 1rem;
    }

    .role-btn {
        padding: 0.6rem 0.2rem;
        font-size: 0.7rem;
    }

    .role-btn i {
        font-size: 0.95rem;
    }

    td .btn-sm {
        margin-bottom: 0.2rem;
        margin-right: 0.15rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .soal-form-group {
        margin-bottom: 0.7rem;
    }

    .modal-content>form,
    .modal-content>#soalFormContainer,
    .modal-content>#nilaiDetail {
        max-height: 55vh;
    }

    .bottom-nav {
        height: 44px;
    }

    .bottom-nav-inner {
        height: 44px;
    }

    .bottom-nav-item {
        font-size: 0.5rem;
        gap: 0px;
    }

    .bottom-nav-item i {
        font-size: 0.85rem;
    }

    body {
        padding-bottom: 44px;
    }
}

button,
.btn,
.nav-item,
.exam-option,
.exam-nav-btn,
.role-btn,
.close,
.resize-handle,
.sidebar-resize-handle,
.bottom-nav-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    font-size: 16px;
}

@media (min-width: 769px) {

    input,
    select,
    textarea {
        font-size: 0.9rem;
    }
}

.nav-item {
    min-height: 44px;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-content>form::-webkit-scrollbar,
.modal-content>div::-webkit-scrollbar {
    width: 4px;
}

.modal-content>form::-webkit-scrollbar-thumb,
.modal-content>div::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

.modal-content,
.card,
.bottom-nav {
    transition: transform 0.3s ease, box-shadow 0.2s ease, width 0.08s linear, height 0.08s linear;
}

body.dashboard {
    background:
      radial-gradient(1100px 520px at 100% -10%, rgba(23, 64, 138, 0.05), transparent 60%),
      #f4f6fb;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    box-shadow: 0 6px 14px -4px rgba(13, 42, 99, 0.45);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2563c9, var(--primary-dark));
    box-shadow: 0 10px 20px -6px rgba(13, 42, 99, 0.55);
    transform: translateY(-2px);
}
.btn-success { background: linear-gradient(135deg, #22a35a, var(--success)); box-shadow: 0 6px 14px -4px rgba(21,128,61,.4); }
.btn-danger  { background: linear-gradient(135deg, #ef4444, var(--danger)); box-shadow: 0 6px 14px -4px rgba(220,38,38,.35); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, var(--warning)); box-shadow: 0 6px 14px -4px rgba(217,119,6,.35); }
.btn-info    { background: linear-gradient(135deg, #38bdf8, var(--info)); box-shadow: 0 6px 14px -4px rgba(2,132,199,.35); }
.btn-outline {
    border-width: 1.5px;
    background: #fff;
}
.btn-outline:hover { border-color: var(--primary-dark); color: var(--primary-dark); }

input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="datetime-local"], input[type="file"],
select, textarea {
    border-color: #dde2ee;
    background: #fbfcfe;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(23, 64, 138, 0.12);
    background: #fff;
}

.sidebar {
    background: linear-gradient(190deg, #ffffff 0%, #f0f9ff 55%, #ffffff 100%);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(14, 165, 233, 0.08);
}
.sidebar::before {
    content: "";
    position: absolute;
    top: -120px; right: -90px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(249,115,22,0.10), transparent 68%);
    pointer-events: none;
}
.sidebar-header { border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.sidebar-header img.logo-sekolah {
    box-shadow: 0 0 0 3px rgba(14,165,233,0.12), 0 4px 10px rgba(14,165,233,.15);
}
.sidebar-header h3 { color: var(--dark); letter-spacing: -.01em; }
.sidebar-header p { color: var(--gray); }
.sidebar-close { color: var(--dark); }
.sidebar-toggle-btn { background: var(--primary-light); border-color: var(--border); color: var(--primary-dark); }
.sidebar-toggle-btn:hover { background: var(--accent); color: #fff; }

.nav-section { color: var(--gray); opacity: .75; }
.nav-item { color: var(--dark); opacity: .82; position: relative; z-index: 1; }
.nav-item i { color: var(--primary); }
.nav-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-item:hover i { color: var(--accent); }
.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(14,165,233,.28);
}
.nav-item.active i { color: #ffffff; }
.nav-item.active:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
}

.sidebar-footer { border-top: 1px solid var(--border); }
.user-avatar { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #ffffff; box-shadow: 0 4px 10px rgba(14,165,233,.30); }
.user-details p { color: var(--dark); }
.user-details span { color: var(--gray); }
#btnLogout { border-color: var(--border); color: var(--gray); background: transparent; }
#btnLogout:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }

.sidebar-resize-handle:hover, .sidebar-resize-handle.active { background: var(--primary); }

.mobile-header {
    background: #ffffff;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(14,165,233,.10);
}
.mobile-menu-btn, .mobile-title { color: var(--dark); }

.bottom-nav { background: #ffffff; border-top: 1px solid var(--border); box-shadow: 0 -6px 16px rgba(14,165,233,.08); }
.bottom-nav-item { color: var(--gray); }
.bottom-nav-item.active { color: var(--accent); }

.topbar h1 { color: var(--dark); }
.topbar h1 i { color: var(--primary); }

.card {
    border: 1px solid rgba(16, 26, 44, 0.05);
    box-shadow: 0 1px 2px rgba(16,26,44,.04), 0 8px 20px -12px rgba(16,26,44,.12);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card-header {
    background: linear-gradient(180deg, #fbfcfe, #ffffff);
    border-bottom: 1px solid var(--border);
}
.card-header h3 i { color: var(--primary); }

.stat-card {
    position: relative;
    border: 1px solid rgba(16, 26, 44, 0.05);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon { box-shadow: 0 6px 14px -4px rgba(0,0,0,.28); }
.stat-info h3 { letter-spacing: -0.02em; font-weight: 800; }

th {
    background: #eef1f8;
    color: var(--ink-2);
    font-weight: 700;
}
tbody tr:hover { background: #f6f8ff; }
.table-container { border-radius: var(--radius); }

.badge { font-weight: 600; letter-spacing: .01em; }

.modal-content { border: 1px solid rgba(16,26,44,.05); }
.modal-content h2 { background: rgba(23, 64, 138, 0.05); }

.login-container { background: #f4f6fb; }

.login-left {
    background:
        radial-gradient(640px 420px at 85% 8%, rgba(237, 236, 233, 0.16), transparent 60%), 
        linear-gradient(160deg, #0284c7 0%, #0ea5e9 50%, #0284c7 100%);
    justify-content: center;
    padding: 3rem 4rem;
}
.login-left .login-brand { position: relative; z-index: 2; }

.login-glow {
    position: absolute;
    width: 480px; height: 480px;
    right: -160px; bottom: -180px;
    background: radial-gradient(circle, rgba(249,115,22,0.18), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.login-coins { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-coins span {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(249,115,22,0.28);
    background: radial-gradient(circle at 35% 30%, rgba(249,115,22,0.16), transparent 70%);
}
.login-coins span:nth-child(1){ width:120px; height:120px; top:8%; left:8%; }
.login-coins span:nth-child(2){ width:70px;  height:70px;  top:65%; left:14%; }
.login-coins span:nth-child(3){ width:160px; height:160px; top:30%; left:78%; }
.login-coins span:nth-child(4){ width:46px;  height:46px;  top:12%; left:60%; }
.login-coins span:nth-child(5){ width:90px;  height:90px;  top:78%; left:55%; }

.login-brand h1 { font-size: 2.4rem; font-weight: 800; }
.login-brand h1 span { color: var(--accent); opacity: 1; font-weight: 300; }
.login-brand p { opacity: .92; }
.login-brand .subtitle { opacity: .62; margin-top: .5rem; }

.login-features {
    grid-template-columns: 1fr 1fr;
    margin-top: 2.6rem;
    gap: .9rem;
}
.feature-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: .7rem .9rem;
    gap: .6rem;
}
.feature-item i { color: var(--accent); }

.login-right { background: #f4f6fb; }
.login-card {
    background: #fff;
    border: 1px solid rgba(16,26,44,.05);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.6rem 2.4rem;
}
.login-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--primary-light); color: var(--primary-dark);
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    padding: .35rem .7rem; border-radius: 999px;
    margin: .6rem auto 0; display: flex; width: fit-content;
}
.login-title { text-align: center; margin-top: .9rem; font-size: 1.5rem; }
.login-card > .login-subtitle { text-align: center; margin-top: .25rem; }
.login-card #loginForm { margin-top: 1.6rem; }

.btn-login {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    box-shadow: 0 10px 20px -6px rgba(13,42,99,.5);
}
.btn-login:hover { box-shadow: 0 14px 24px -6px rgba(13,42,99,.6); transform: translateY(-1px); }

@media (max-width: 900px) {
    .login-features { display: none; }
}

.sidebar-header .logo-icon img,
.sidebar-header img.logo-sekolah,
.public-header .brand img,
.mobile-header img,
.login-brand-logo,
.login-card > img.logos,
#loginLogoImg {
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.login-card > img.logos,
#loginLogoImg {
    display: block;
    margin: 0 auto 0.6rem auto;
}

@media print {
    @page { margin: 1.5cm; size: A4 portrait; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    body { background: white !important; color: #000 !important; }

    /* Sembunyikan semua elemen UI */
    .sidebar, .mobile-header, .bottom-nav, .topbar,
    .filter-bar, .stats-grid, .card:not(:has(#printArea)),
    .btn, .modal, .login-container, .public-header,
    .public-main, .public-footer, .nav-item, .sidebar-toggle-btn,
    .sidebar-resize-handle, .user-info, #moreMenuModal {
        display: none !important;
    }

    /* Tampilkan hanya printArea */
    #printArea {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        color: #000 !important;
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    #printArea * { visibility: visible !important; color: #000 !important; }
}

#printArea {
    display: none;
    background: white;
    padding: 2rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.5;
}

.kop-surat {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 4px double #000;
    margin-bottom: 1.5rem;
}

.kop-surat img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.kop-text h2 {
    font-size: 14pt;
    margin: 0 0 0.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}

.kop-text h1 {
    font-size: 16pt;
    margin: 0.2rem 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}

.kop-text p {
    font-size: 10pt;
    margin: 0.1rem 0;
    color: #222;
}

.print-title {
    text-align: center;
    text-transform: uppercase;
    font-size: 14pt;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    color: #000;
}

.print-subtitle {
    text-align: center;
    font-size: 11pt;
    margin-bottom: 1.5rem;
    color: #222;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 11pt;
}

.print-table th,
.print-table td {
    border: 1px solid #333;
    padding: 0.45rem 0.5rem;
    vertical-align: top;
}

.print-table th {
    background: #f0f0f0 !important;
    font-weight: 700;
    text-align: center;
    color: #000;
}

.print-table td:nth-child(1),
.print-table td:nth-child(5),
.print-table td:nth-child(6) {
    text-align: center;
}

.print-ringkasan {
    font-size: 11pt;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.ttd-section {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 0 1rem;
}

.ttd-box {
    text-align: center;
    width: 240px;
}

.ttd-box p {
    margin: 0.15rem 0;
    font-size: 11pt;
    color: #000;
}

.ttd-box .ttd-jabatan {
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.ttd-box .ttd-nama {
    margin-top: 3.5rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ttd-box .ttd-nip {
    font-size: 10pt;
    margin-top: 0.3rem;
}

body.dashboard {
    background:
        radial-gradient(1200px 600px at 110% -5%, rgba(7, 45, 200, 0.035), transparent 60%),
        radial-gradient(800px 400px at -5% 105%, rgba(249, 115, 22, 0.03), transparent 50%),
        #f4f6fb;
}

.card {
    border: 1px solid rgba(16, 26, 44, 0.04);
    box-shadow: 0 1px 3px rgba(16,26,44,.04), 0 12px 24px -10px rgba(16,26,44,.10);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px -14px rgba(13,30,66,.20), 0 8px 16px rgba(13,30,66,.10);
}

.sidebar {
    background: linear-gradient(195deg, #ffffff 0%, #f0f9ff 50%, #ffffff 100%);
    box-shadow: 8px 0 32px rgba(14, 165, 233, 0.10);
}
.sidebar::before {
    content: "";
    position: absolute;
    top: -120px; right: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(249,115,22,0.10), transparent 68%);
    pointer-events: none;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(14,165,233,.30), inset 0 1px 0 rgba(255,255,255,.4);
}
.nav-item.active i { color: #ffffff; }

.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: var(--radius) 0 0 var(--radius);
}

.btn {
    transition: all .2s cubic-bezier(.34,1.56,.64,1);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent 40%);
    pointer-events: none;
}
.btn:active { transform: scale(0.96); }

th {
    background: linear-gradient(180deg, #eef1f8, #e4e8f1);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.02em;
}
tbody tr { transition: background .15s; }

.topbar h1 {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.98);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 4px rgba(7, 45, 200, 0.10);
}

.badge {
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.alert { animation: fadeIn 0.4s ease; }