/* ==========================================================================
   SISTEM JURNAL MENGAJAR DIGITAL - SMKS MEKARWANGI (SMK MIC)
   Theme: Elegant Glassmorphism, Deep Navy/Indigo & Clean Mobile-First UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #e0e7ff;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- NAVBAR HEADER --- */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.btn-header-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.btn-header-back:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(-2px);
}

.header-page-info {
    min-width: 0;
}

.header-page-info .brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-page-info .brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
    line-height: 1.15;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Multi-Role Switcher Pill */
.role-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.role-pill {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.role-pill:hover {
    color: var(--primary);
}

.role-pill.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 50px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.user-name-short {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- MAIN CONTAINER --- */
.main-wrapper {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* --- CARDS & CONTAINERS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- TOP PROFILE & GATE ATTENDANCE STATUS CARD (MODERN FUTURISTIC DESIGN) --- */
.teacher-profile-card {
    background: linear-gradient(135deg, #090d16 0%, #111827 28%, #1e1b4b 72%, #312e81 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 24px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.teacher-profile-card::before {
    content: '';
    position: absolute;
    top: -90px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(129, 140, 248, 0.06) 55%, transparent 70%);
    pointer-events: none;
    filter: blur(25px);
    z-index: 0;
}

.teacher-profile-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 20%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(30px);
    z-index: 0;
}

.profile-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    min-width: 0;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
}

.profile-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    background: #1e293b;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.teacher-profile-card:hover .profile-avatar-large {
    transform: scale(1.04);
}

.avatar-status-ring {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 3px solid #0f172a;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.profile-text-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.badge-role-guru {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(165, 180, 252, 0.45);
    color: #e0e7ff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.profile-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
}

.profile-badge strong {
    color: #38bdf8;
    font-weight: 700;
}

.profile-badge.badge-date {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Action Panel (Right Side on Desktop) */
.profile-action-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 1;
}

/* Header SSO & Logout Buttons */
.btn-sso-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.22);
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-sso-header:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-header-logout {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #64748b;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-header-logout:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* Gate Attendance Status Badge (Live Pulse) */
.gate-status-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
}

.gate-status-hadir {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
}

.gate-status-belum {
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fde68a;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.gate-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.gate-pulse-dot.dot-hadir {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.gate-pulse-dot.dot-hadir::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: pulseRadarHadir 1.8s infinite ease-out;
}

.gate-pulse-dot.dot-belum {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}
.gate-pulse-dot.dot-belum::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #f59e0b;
    animation: pulseRadarBelum 1.8s infinite ease-out;
}

@keyframes pulseRadarHadir {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}
@keyframes pulseRadarBelum {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.profile-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Button ID Card Barcode Digital */
.btn-id-card {
    background: #ffffff;
    color: #1e1b4b;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-id-card:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
    color: var(--primary);
}

/* Button Portal Presensi (SSO) */
.btn-profile-presensi {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(165, 180, 252, 0.45);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-profile-presensi:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
    border-color: rgba(199, 210, 254, 0.7);
    color: #ffffff;
}

/* --- KBM SESSION CARDS (SCHEDULE) --- */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.session-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    border-left: 5px solid var(--primary);
    transition: all 0.2s ease;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.session-card.status-done {
    border-left-color: var(--success);
    background: #fbfdfc;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.session-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 50px;
}

.session-class {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 6px;
}

.session-subject {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
}

.session-status-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

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

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

.session-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    gap: 10px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

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

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

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

.btn-block {
    width: 100%;
}

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

/* --- FORM STYLES --- */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

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

/* --- STUDENT ATTENDANCE TABLE (IN-CLASS) --- */
.student-attendance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

.student-attendance-table th {
    background: #f8fafc;
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid var(--border-color);
    text-align: left;
}

.student-attendance-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
}

.student-row:hover td {
    background: #f8fafc;
}

/* --- ARSIP JURNAL TABLE & CARD SYSTEM --- */
.archive-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-dates-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-actions-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-date-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-date-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.filter-date-group input[type="date"] {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
}

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

.archive-table th {
    background: #f8fafc;
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid var(--border-color);
    text-align: left;
}

.archive-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
}

.archive-row:hover td {
    background: #fafbfc;
}

.archive-badge-kelas {
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    display: inline-block;
}

.archive-mapel-title {
    font-weight: 700;
    color: var(--text-main);
}

.archive-materi-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.35;
    max-width: 300px;
}

.archive-photo-tag {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.archive-card-footer {
    display: contents;
}

.archive-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action-edit {
    color: var(--primary);
    border-color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}
.btn-action-edit:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-action-delete {
    color: var(--danger);
    border-color: #fecaca;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border: 1px solid #fecaca;
    transition: all 0.15s ease;
}
.btn-action-delete:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 4px 4px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-link {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.page-link:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}
.page-link.disabled {
    color: var(--text-subtle);
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
}

/* Attendance Radio Pills */
.status-radio-group {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 50px;
}

.status-radio-label {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.status-radio-input {
    display: none;
}

.status-radio-input:checked + .status-radio-label.hadir {
    background: var(--success);
    color: #fff;
}

.status-radio-input:checked + .status-radio-label.sakit {
    background: #3b82f6;
    color: #fff;
}

.status-radio-input:checked + .status-radio-label.izin {
    background: var(--warning);
    color: #fff;
}

.status-radio-input:checked + .status-radio-label.alpa {
    background: var(--danger);
    color: #fff;
}

/* Prior Teacher Note Badge */
.sync-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

/* --- MODAL DIGITAL ID CARD --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s ease;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.id-card-wrapper {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #fff;
    padding: 24px 20px 20px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.id-card-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.barcode-box {
    background: #ffffff;
    padding: 16px 12px;
    margin: 16px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    border: 2px dashed #cbd5e1;
}

.barcode-text {
    font-family: 'Courier New', monospace;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #0f172a;
    margin-top: 8px;
}

/* --- FOOTER --- */
.app-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* --- ULTRA-COMPACT STUDENT ATTENDANCE SYSTEM --- */
.attendance-container {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.attendance-title-group h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-title-group p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Attendance Toolbar: Filters & Live Search */
.attendance-toolbar {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.attendance-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.attendance-filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-tab.active {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}
.filter-tab.active.tab-hadir {
    background: #059669;
    border-color: #059669;
}
.filter-tab.active.tab-absen {
    background: #dc2626;
    border-color: #dc2626;
}

.attendance-search-box {
    position: relative;
    min-width: 170px;
    flex: 1;
    max-width: 300px;
}

.attendance-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

.attendance-search-box input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
}
.attendance-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* List Items */
.attendance-list {
    display: flex;
    flex-direction: column;
}

.student-item {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}
.student-item:last-child {
    border-bottom: none;
}
.student-item:hover {
    background: #fafbfc;
}
.student-item.filtered-out {
    display: none !important;
}

.student-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    gap: 12px;
    min-height: 48px;
}

.student-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.student-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 22px;
    text-align: right;
    flex-shrink: 0;
}

.student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    flex-shrink: 0;
}

.student-names {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.student-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
}

.student-nis {
    font-size: 0.72rem;
    color: var(--text-subtle);
    font-weight: 500;
}

.student-sync-tag {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* Actions: Status Segmented Pills + Note Toggle */
.student-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.status-pills {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border-color);
}

.status-pill {
    cursor: pointer;
    position: relative;
    margin: 0;
    display: inline-block;
}

.status-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.status-pill .pill-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #64748b;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.status-pill .pill-label-desktop {
    display: none;
    margin-left: 3px;
    font-weight: 600;
    font-size: 0.75rem;
}

.status-pill input[type="radio"]:checked + .pill-box {
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Colors for active pills */
.status-pill.pill-h input[type="radio"]:checked + .pill-box {
    background: #10b981;
}
.status-pill.pill-s input[type="radio"]:checked + .pill-box {
    background: #0ea5e9;
}
.status-pill.pill-i input[type="radio"]:checked + .pill-box {
    background: #f59e0b;
}
.status-pill.pill-a input[type="radio"]:checked + .pill-box {
    background: #ef4444;
}
/* Hover effect on pills */
.status-pill:hover .pill-box {
    background: #e2e8f0;
    color: #0f172a;
}
.status-pill input[type="radio"]:checked + .pill-box:hover {
    filter: brightness(1.05);
}

/* Note button toggle */
.btn-note-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.btn-note-toggle:hover {
    background: #e0e7ff;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-note-toggle.has-note {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}
.btn-note-toggle.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Expandable Note Drawer */
.student-note-drawer {
    display: none;
    padding: 0 16px 10px 48px;
    background: #fdfefe;
}
.student-note-drawer.open {
    display: block;
    animation: drawerSlideDown 0.2s ease-out;
}

@keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.note-drawer-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.note-drawer-inner:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.note-drawer-inner .note-icon {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.student-note-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
    padding: 3px 0;
}

/* Floating Sticky Mobile Bottom Bar */
.mobile-sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.sticky-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sticky-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sticky-badge.badge-h {
    background: #d1fae5;
    color: #065f46;
}
.sticky-badge.badge-absen {
    background: #fee2e2;
    color: #991b1b;
}

.btn-sticky-submit {
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 800;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* Helper Utilities */
.hide-desktop { display: none !important; }
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .hide-desktop { display: block !important; }
}

/* --- RESPONSIVE MOBILE ADAPTATIONS --- */
@media (max-width: 768px) {
    .app-header {
        padding: 8px 12px;
    }
    
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px 8px;
    }
    
    .brand-wrapper {
        flex: 1;
        min-width: 0;
        gap: 8px;
        justify-content: flex-start;
    }
    
    .brand-logo {
        height: 32px;
    }
    
    .brand-title {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .header-actions {
        flex-shrink: 0;
        gap: 8px;
        align-items: center;
    }
    
    .btn-sso-header {
        padding: 5px 9px;
        font-size: 0.74rem;
        border-radius: 14px;
        gap: 4px;
    }
    
    .btn-header-logout {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }

    /* Teacher Profile Card Mobile (Modern, Sleek, Ultra-Responsive & Lightweight) */
    .teacher-profile-card {
        padding: 16px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
        border-radius: 18px;
        background: linear-gradient(135deg, #090d16 0%, #111827 30%, #1e1b4b 75%, #312e81 100%);
        box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.45);
    }
    .profile-main-info {
        gap: 12px;
        align-items: flex-start;
        width: 100%;
    }
    .profile-avatar-large {
        width: 52px;
        height: 52px;
        border-width: 2.5px;
    }
    .avatar-status-ring {
        width: 13px;
        height: 13px;
        border-width: 2.5px;
        bottom: 1px;
        right: 1px;
    }
    .profile-text-group {
        gap: 4px;
        flex: 1;
        min-width: 0;
    }
    .profile-title-row {
        gap: 6px;
        align-items: center;
    }
    .profile-name {
        font-size: 1.08rem;
        line-height: 1.25;
        word-break: break-word;
    }
    .badge-role-guru {
        font-size: 0.68rem;
        padding: 2px 8px;
    }
    .profile-meta {
        gap: 5px;
        margin-top: 2px;
    }
    .profile-badge {
        font-size: 0.68rem;
        padding: 2px 8px;
        border-radius: 8px;
    }
    .profile-action-panel {
        align-items: stretch;
        width: 100%;
        gap: 9px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px;
        margin-top: 2px;
    }
    .gate-status-pill {
        width: 100%;
        font-size: 0.76rem;
        padding: 7px 12px;
        justify-content: center;
        border-radius: 12px;
    }
    .profile-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .btn-id-card,
    .btn-profile-presensi {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 0.78rem;
        padding: 9px 8px;
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    .role-switcher {
        width: 100%;
        order: 3;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 4px;
        padding: 3px 6px;
        background: #f1f5f9;
    }
    .role-switcher::-webkit-scrollbar {
        display: none;
    }
    
    .role-pill {
        padding: 5px 12px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Attendance list mobile layout */
    .attendance-header {
        padding: 12px 14px;
        gap: 8px;
    }
    .attendance-title-group h3 {
        font-size: 1rem;
    }
    .attendance-toolbar {
        padding: 8px 12px;
        gap: 8px;
    }
    .attendance-search-box {
        max-width: 100%;
        min-width: 100%;
        order: 2;
    }
    .attendance-filter-tabs {
        width: 100%;
        order: 1;
    }
    
    .student-item-main {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .student-meta {
        gap: 6px;
    }
    
    .student-avatar {
        width: 28px;
        height: 28px;
    }
    
    .student-num {
        width: 16px;
        font-size: 0.7rem;
    }
    
    .student-name {
        font-size: 0.82rem;
        max-width: 110px;
    }
    
    .student-sub {
        font-size: 0.68rem;
    }
    
    .status-pills {
        padding: 2px;
        gap: 1px;
    }
    
    .status-pill .pill-box {
        min-width: 26px;
        height: 26px;
        padding: 0 4px;
        font-size: 0.75rem;
    }
    
    .btn-note-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .student-note-drawer {
        padding: 0 10px 8px 32px;
    }
    
    /* Stats grid in kurikulum */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .stat-card {
        padding: 12px !important;
        gap: 10px !important;
    }
    .stat-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
    .stat-val {
        font-size: 1.25rem !important;
    }
    .stat-label {
        font-size: 0.7rem !important;
    }

    /* Teacher Profile card mobile */
    .teacher-profile-card {
        padding: 16px;
        gap: 14px;
        border-radius: var(--radius-lg);
    }
    .profile-info-group {
        gap: 12px;
    }
    .profile-avatar-large {
        width: 58px;
        height: 58px;
    }
    .profile-name {
        font-size: 1.15rem;
    }
    .profile-meta {
        gap: 4px;
    }
    .profile-badge {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
    .profile-actions {
        width: 100%;
        justify-content: stretch;
    }
    .btn-id-card {
        width: 100%;
        justify-content: center;
    }

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

    /* Monitoring table card conversion on mobile */
    .monitoring-table,
    .monitoring-table tbody,
    .monitoring-table tr,
    .monitoring-table td {
        display: block;
        width: 100% !important;
    }

    .monitoring-table thead {
        display: none;
    }

    .monitoring-row {
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 14px;
        padding: 14px;
        box-shadow: var(--shadow-sm);
    }

    .monitoring-table td {
        padding: 4px 0 !important;
        border: none !important;
    }

    .monitoring-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--border-color);
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    /* Archive table card conversion on mobile (Ultra-Minimalist & Compact) */
    .archive-filter-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .filter-dates-wrapper {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .filter-date-group {
        width: 100%;
        padding: 4px 8px;
        background: #f8fafc;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .filter-date-group label {
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--text-muted);
    }
    .filter-date-group input[type="date"] {
        flex: 1;
        text-align: right;
        font-size: 0.76rem;
        padding: 1px 0;
        min-width: 0;
    }
    .filter-actions-row {
        width: 100%;
        display: flex;
        gap: 6px;
    }
    .filter-actions-row .btn {
        flex: 1;
        justify-content: center;
        padding: 6px 10px;
        font-size: 0.78rem;
    }
    
    .archive-table,
    .archive-table tbody,
    .archive-table tr,
    .archive-table td {
        display: block;
        width: 100% !important;
    }
    
    .archive-table thead {
        display: none;
    }
    
    .archive-row {
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        margin-bottom: 7px;
        padding: 9px 12px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
        transition: all 0.15s ease;
    }
    .archive-row:hover {
        border-color: #cbd5e1;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }
    
    .archive-table td {
        padding: 0 !important;
        border: none !important;
    }
    
    .archive-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 2px;
    }
    
    .archive-date-jp {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .archive-date {
        font-size: 0.82rem;
        font-weight: 800;
        color: var(--text-main);
    }
    .archive-date i {
        font-size: 0.72rem;
        color: var(--text-muted);
        margin-right: 2px;
    }
    
    .archive-jp {
        font-size: 0.72rem;
        color: #475569;
        background: #f1f5f9;
        padding: 1px 6px;
        border-radius: 4px;
        font-weight: 600;
    }

    .archive-badge-kelas {
        font-size: 0.72rem;
        padding: 2px 7px;
        border-radius: 5px;
        font-weight: 800;
    }
    
    .archive-mapel-title {
        font-size: 0.88rem;
        font-weight: 800;
        color: var(--text-main);
        margin-top: 1px;
        display: flex;
        align-items: center;
        gap: 6px;
        line-height: 1.25;
    }

    .archive-photo-tag {
        font-size: 0.68rem;
        color: var(--primary);
        background: var(--primary-light);
        padding: 1px 5px;
        border-radius: 4px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }
    
    .archive-materi-preview {
        font-size: 0.78rem;
        color: var(--text-muted);
        line-height: 1.3;
        margin: 2px 0 0 0;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .archive-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-top: 6px;
        margin-top: 6px;
        border-top: 1px solid #f1f5f9;
    }

    .archive-badges-mobile {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .badge-mini-hadir {
        font-size: 0.7rem;
        font-weight: 800;
        padding: 2px 7px;
        border-radius: 12px;
        background: #d1fae5;
        color: #065f46;
        letter-spacing: 0.2px;
    }

    .badge-mini-absen {
        font-size: 0.7rem;
        font-weight: 800;
        padding: 2px 7px;
        border-radius: 12px;
        background: var(--danger-light);
        color: var(--danger);
        letter-spacing: 0.2px;
    }
    
    .archive-actions-group {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        width: auto;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    .archive-actions-group .btn-action-edit,
    .archive-actions-group .btn-action-delete {
        flex: initial;
        padding: 3px 9px;
        font-size: 0.72rem;
        height: 26px;
        border-radius: 6px;
        font-weight: 700;
        gap: 4px;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .pagination-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Card & Card Header Mobile Optimization */
    .card {
        padding: 14px 12px;
        border-radius: var(--radius-md);
        margin-bottom: 12px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    /* Body padding if has sticky bar */
    body.has-sticky-bar {
        padding-bottom: 74px;
    }
}
