/* ==========================================
   DESIGN SYSTEM — SPK Penilaian Dosen
   Dark Mode Premium + Glassmorphism
   ========================================== */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-hover: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.15);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.3);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.3);
    --purple: #8b5cf6;
    --amber: #f59e0b;
    --red: #ef4444;
    --cyan: #06b6d4;
    --sidebar-w: 270px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #60a5fa;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

/* --- Layout --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    transition: var(--transition);
}

.content-area {
    padding: 24px;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1a1f3a 100%);
    border-right: 1px solid var(--border);
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.logo-text h1 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

.sidebar-user {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    font-size: 32px;
    color: var(--blue);
}

.user-info h3 {
    font-size: 13px;
    font-weight: 600;
}

.user-info .badge-role {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-label {
    display: block;
    padding: 8px 20px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-link.active {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-left-color: var(--blue);
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.nav-logout:hover {
    color: var(--red);
    background: rgba(239, 68, 68, 0.08);
}

/* --- Topbar --- */
.topbar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-date {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Content Header --- */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.content-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* --- Cards --- */
.card {
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

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

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--blue);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-blue::before {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.stat-emerald::before {
    background: linear-gradient(90deg, var(--emerald), #34d399);
}

.stat-purple::before {
    background: linear-gradient(90deg, var(--purple), #a78bfa);
}

.stat-amber::before {
    background: linear-gradient(90deg, var(--amber), #fbbf24);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-blue .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.stat-emerald .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald);
}

.stat-purple .stat-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.stat-amber .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
}

.stat-info h3 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: rgba(15, 23, 42, 0.5);
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

.data-table-sm th,
.data-table-sm td {
    padding: 8px 10px;
    font-size: 12px;
}

.actions {
    display: flex;
    gap: 6px;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), #2563eb);
    color: white;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--blue-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #475569;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--emerald), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #dc2626);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    background: transparent;
}

.btn-edit {
    color: var(--blue);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.15);
}

.btn-delete {
    color: var(--red);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.required {
    color: var(--red);
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-actions {
    padding-top: 8px;
    display: flex;
    gap: 8px;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* --- Info List (Dashboard) --- */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    font-size: 13px;
    color: var(--text-muted);
}

.info-value {
    font-size: 13px;
    font-weight: 600;
}

/* --- Quick Actions --- */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.quick-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(59, 130, 246, 0.05);
}

.quick-btn i {
    color: var(--blue);
}

/* --- Dosen Card Grid --- */
.dosen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.dosen-card {
    padding: 20px;
    transition: var(--transition);
}

.dosen-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.dosen-card.done {
    opacity: 0.7;
}

.dosen-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.dosen-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.dosen-info h3 {
    font-size: 14px;
    font-weight: 600;
}

.dosen-card-footer {
    display: flex;
    justify-content: flex-end;
}

/* --- Kuesioner Form --- */
.pertanyaan-item {
    padding: 20px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.pertanyaan-item.highlight-error {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.05);
}

.pertanyaan-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pertanyaan-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.pertanyaan-text p {
    font-size: 13px;
    line-height: 1.6;
}

.skala-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.skala-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.skala-option input {
    display: none;
}

.skala-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skala-option:hover .skala-btn {
    border-color: var(--blue);
    color: var(--blue);
}

.skala-option.selected .skala-btn,
.skala-option input:checked~.skala-btn {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--blue-glow);
}

.skala-option small {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- Ranking Badge --- */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
}

.rank-3 {
    background: linear-gradient(135deg, #b45309, #92400e);
    color: white;
}

.rank-other {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* --- Progress Bar --- */
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 120px;
}

.progress-bar-wrapper span {
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
}

.progress-bar-fill {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--blue), var(--emerald));
    transition: width 0.8s ease;
}

/* --- Cell Detail --- */
.cell-detail {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.val-avg {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.val-crisp {
    font-size: 10px;
    color: var(--blue);
}

/* --- Row Colors --- */
.row-positive td {
    background: rgba(16, 185, 129, 0.08);
}

.row-negative td {
    background: rgba(239, 68, 68, 0.08);
}

/* --- Chart --- */
.chart-container {
    position: relative;
    height: 300px;
}

/* --- Success Page --- */
.success-container {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.5s ease;
}

.success-icon {
    font-size: 80px;
    color: var(--emerald);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.success-container h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.success-container p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.success-container .btn {
    margin-top: 20px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* --- Login Page --- */
.login-body {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    margin-bottom: 20px;
}

.logo-glow {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 30px var(--blue-glow);
    animation: float 3s ease-in-out infinite;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.login-subtitle {
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.input-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.input-icon input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Login Decorations */
.login-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 6s ease-in-out infinite;
}

.c1 {
    width: 400px;
    height: 400px;
    background: var(--blue);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.c2 {
    width: 300px;
    height: 300px;
    background: var(--purple);
    bottom: -80px;
    left: -80px;
    animation-delay: 2s;
}

.c3 {
    width: 200px;
    height: 200px;
    background: var(--emerald);
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

/* --- Utilities --- */
.text-center {
    text-align: center;
}

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

.mb-1 {
    margin-bottom: 20px;
}

.mt-1 {
    margin-top: 16px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s ease;
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.card,
.stat-card,
.dosen-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* --- Sticky Aksi Column --- */
.data-table th:last-child,
.data-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 10;
}

.data-table td:last-child {
    /* Calculated solid color of rgba(30,41,59,0.8) over #0f172a */
    background: #1b2538;
}

.data-table th:last-child {
    /* Calculated solid color of rgba(15,23,42,0.5) over #1b2538 */
    background: #151e31;
    z-index: 11;
}

.data-table tr:hover td:last-child {
    /* Calculated solid color of rgba(59,130,246,0.05) over #1b2538 */
    background: #1d2a42;
}

/* Add a subtle border to separate from scrolled content */
.data-table th:last-child,
.data-table td:last-child {
    border-left: 1px solid var(--border);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }

    .sidebar-close {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .card-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .dosen-grid {
        grid-template-columns: 1fr;
    }

    .skala-group {
        gap: 6px;
    }

    .skala-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
}