#attendance-report thead th,
.badge-lg,
.calendar-legend,
.day,
.day-name,
.grid-item,
.legend-dot {
    text-align: center;
}

.wrap-datatable-column-100,
.wrap-datatable-column-150,
.wrap-datatable-column-200 {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

:root {
    --tblr-font-sans-serif: Poppins, sans-serif;
    --tblr-primary: #192332;
    --tblr-body-bg: #f8f9fa;
    --tblr-primary-rgb: 25, 35, 50;
    overflow-x: hidden;
}

.btn-link,
.btn-link:hover,
a {
    color: var(--tblr-primary);
}

.badge-lg,
.grid-item,
.rekap-column {
    color: #fff;
}

.card {
    border: none;
    --tblr-card-cap-bg: var(--tblr-card-color);
}

:focus {
    outline: 0;
}

.bg-standard {
    background-color: var(--tblr-body-bg);
}

table.dataTable thead > tr > td.dt-orderable-asc,
table.dataTable thead > tr > td.dt-orderable-asc:hover,
table.dataTable thead > tr > td.dt-orderable-desc,
table.dataTable thead > tr > td.dt-orderable-desc:hover,
table.dataTable thead > tr > th.dt-orderable-asc,
table.dataTable thead > tr > th.dt-orderable-asc:hover,
table.dataTable thead > tr > th.dt-orderable-desc,
table.dataTable thead > tr > th.dt-orderable-desc:hover {
    text-align: left;
    outline: 0;
}

div.dt-container div.dt-info {
    padding: 0;
}

div.dt-processing > div:last-child > div {
    background-color: var(--tblr-dark);
}

table .dropdown-menu,
table.dataTable tbody > tr > td > .dropdown-menu {
    transform: translate(0, 42px) !important;
}

.swal2-popup {
    background-color: var(--tblr-light);
}

.ts-dropdown {
    z-index: 10000000 !important;
}

.bg-auth {
    background-color: var(--tblr-white);
}

@media (min-width: 992px) {
    .bg-auth {
        background-color: var(--tblr-body-bg);
    }
}

.form-check-input:focus {
    outline: 0;
    box-shadow: none;
}

.bg-one {
    background-image: url(../vectors/bg-one.svg);
    background-size: cover;
    background-position: center;
}

.ck-editor__editable {
    min-height: 120px !important;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    justify-content: center;
    align-content: flex-start;
    min-height: 0;
    padding: 12px;
    margin-top: 10px;
}

.grid-item {
    border-radius: 14px;
    padding: 14px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.grid-item .card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Sudah absen - Hijau gradient */
.attended {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Sudah absen dengan pengganti - Ungu gradient */
.attended-subtitute {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

/* Belum absen - Merah gradient */
.not-attended {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Tidak ada jadwal - Abu gradient */
.no-schedule {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.calendar,
.day {
    background-color: #fff;
}

.subject {
    font-size: 11px;
    margin-top: 6px;
    margin-bottom: 0;
    opacity: 0.95;
    font-weight: 500;
}

.teacher {
    font-size: 0.55rem;
    margin-top: 4px;
    margin-bottom: 0;
    opacity: 0.85;
}

.wrap-datatable-column-100 {
    max-width: 100px;
}

.wrap-datatable-column-150 {
    max-width: 150px;
}

.wrap-datatable-column-200 {
    max-width: 200px;
}

input[type="radio"]:checked.pulse-radio {
    animation: 1.2s infinite pulse-radio;
}

@keyframes pulse-radio {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.badge-lg {
    min-width: 30px;
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.8rem;
}

#attendance-report thead th {
    font-weight: 700;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 14px;
    padding: 8px;
}

#attendance-report td:nth-child(2) {
    min-width: 200px;
    white-space: nowrap;
}

#attendance-report td.date-cell,
#attendance-report th.date-header {
    min-width: 90px;
    max-width: 100px;
    width: 95px;
    text-align: center;
}

.calendar-container {
    font-family: sans-serif;
    color: #212529;
}

.calendar-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.calendar-widget {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calendar-legend {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    scroll-padding-left: 1rem;
    -webkit-overflow-scrolling: touch;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    margin-bottom: 12px !important;
}

#calendar-body,
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

@media (min-width: 768px) {
    .calendar-legend {
        justify-content: center;
        overflow-x: visible;
    }
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    gap: 6px;
    white-space: nowrap;
    font-weight: 500;
    color: #64748b;
}

.calendar {
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.day-name {
    padding: 10px 5px;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: Smaller font and padding for day names */
@media (max-width: 480px) {
    .day-name {
        font-size: 0.65rem;
        padding: 6px 2px;
        letter-spacing: 0;
    }
    
    .day {
        padding: 4px;
        border-radius: 8px;
    }
    
    .day span {
        font-size: 0.8rem;
    }
    
    #calendar-body,
    .calendar {
        gap: 3px;
    }
    
    .legend-dot {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}

#calendar-body {
    gap: 6px;
    margin-top: 8px;
}

.day {
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    cursor: pointer;
    z-index: 1;
    background: #ffffff;
    transition: all 0.2s ease;
}

.day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.day span {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
}

.day.today {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.day.today span {
    color: #b45309;
}

.legend-dot,
.status-icon {
    border-radius: 50%;
    font-weight: 700;
}

.status-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin: 0 auto;
    color: #fff;
}

.status-hadir {
    background-color: #28a745;
}

.status-izin {
    background-color: #ffc107;
    color: #212529;
}

.status-sakit {
    background-color: #6f42c1;
}

.status-alpha {
    background-color: #000;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
    padding: 0;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.legend-dot.libur,
.status-libur {
    background-color: #dc3545;
    color:#fff;
}

.legend-dot.ujian {
    background-color: #ffc107;
    color:#fff
}

.legend-dot.hadir {
    background-color: #10B981 !important; /* Modern Green (Emerald) */
    color: #fff !important;
}

.legend-dot.dispen {
    background-color: #28a745;
    color:#fff;
}

.legend-dot.izin {
    background-color: #ffc107;
    color: #000;
}

.legend-dot.sakit {
    background-color: #6f42c1;
    color:#fff;
}

.legend-dot.alpha {
    background-color: #000;
    color:#fff
}

.legend-dot.kegiatan,
.status-kegiatan {
    background-color: #0d6efd;
    color:#fff;
}

.status-ujian {
    background-color: #fd7e14;
    color:#fff;
}

.status-icon,
.status-kegiatan,
.status-libur,
.status-ujian {
    pointer-events: none;
}

.event-popup {
    position: absolute;
    z-index: 999;
    background: #fff;
    color: #000;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    min-width: 280px;
    max-width: 380px;
    width: fit-content;
    display: none;
    transition: 0.2s;
}

@media (max-width: 768px) {
    .event-popup .d-flex {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .event-popup .btn {
        width: 100%;
        max-width: 240px;
        text-align: center;
    }

    .event-popup button {
        margin-top: -2px !important;
    }
}

.event-popup .action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.event-popup .action-buttons .btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

/* Announcement Style/*
 /* Dark mode styling khusus untuk elemen di luar tabler */
[data-bs-theme="dark"] .announcement-sidebar {
    background-color: #192433;
    color: #f1f1f1;
    border-color: #333;
}

[data-bs-theme="dark"] .announcement-header {
    background-color: #192433;
    border-bottom: 1px solid #444;
}

[data-bs-theme="dark"] .announcement-content-chat {
    background-color: #192433;
    color: #000000;
}

/* Tombol close */
[data-bs-theme="dark"] .btn-close {
    filter: invert(1);
}

.announcement-btn {
    position: fixed;
    color: #fff;
    top: 20%;
    right: 20px;
    background-color: #e12b5f;
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.announcement-btn svg {
    width: 28px;
    height: 28px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgb(215, 44, 94);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Sidebar style */
.announcement-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.announcement-sidebar.active {
    right: 0;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-content {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* btn-close uses Bootstrap/Tabler defaults */

.announcement-content-chat {
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    scroll-behavior: smooth;
}

.announcement-item {
    max-width: 100%;
    background-color: #eef2f7;
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 14px;
}

.announcement-item h6 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.announcement-date {
    font-size: 12px;
    font-weight: bold;
    color: #777;
    margin-bottom: 2px;
}

.announcement-item.color-1 {
    background-color: #f1f8ff;
}

.announcement-item.color-2 {
    background-color: #fdf2f8;
}

.announcement-item.color-3 {
    background-color: #f0fdf4;
}

.announcement-item.color-4 {
    background-color: #fff9ec;
}

.announcement-item.color-5 {
    background-color: #fef6e7;
}

.announcement-bubble {
    border-left: 4px solid #888;
    background: #f7f9fc;
    transition: background 0.3s ease;
}

#journalModal .modal-body {
    overflow-x: hidden; /* default */
}

@media (max-width: 576px) {
    #journalModal .modal-body {
        overflow-x: auto; /* aktifkan scroll horizontal */
        -webkit-overflow-scrolling: touch;
    }
}

/* Lebarkan tabel minimal agar ada ruang untuk teks Jurnal */
#journalModal .jm-table {
    width: auto; /* biar nurut ke min-width */
    min-width: 760px; /* tweak sesuai kebutuhan */
}

/* Jangan biarkan kolom Jurnal terlalu sempit */
#journalModal .jm-table td:nth-child(3),
#journalModal .jm-table th:nth-child(3) {
    min-width: 380px; /* ruang baca nyaman */
    white-space: normal; /* boleh membungkus baris */
    word-break: break-word; /* pecah kata panjang */
}

/* Di mobile, kolom non-inti dipersempit */
@media (max-width: 576px) {
    #journalModal .jm-table colgroup col:nth-child(1) {
        width: 3rem !important;
    }

    #journalModal .jm-table colgroup col:nth-child(2) {
        width: 8rem !important;
    }

    #journalModal .jm-table colgroup col:nth-child(4) {
        width: 8rem !important;
    }

    /* kolom jurnal (ke-3) tetap min 380px via rule di atas */
}

/* Hilangkan potensi style dari tempat lain yang “mengunci” lebar */
#journalModal .table-responsive {
    overflow-x: auto; /* pastikan kontainer tabel yang scroll */
}


.dropdown-divider {
    margin:0px!important
}

/* ============================================
   STUDENT MOBILE DASHBOARD STYLES
   ============================================ */

/* Emerald Green Color Variables */
:root {
    --student-primary: #10B981;
    --student-primary-dark: #059669;
    --student-primary-light: #D1FAE5;
    --student-accent: #083b28;
    --student-bg: #ffffff;
    --student-text-dark: #064E3B;
    --student-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Student Body Styles */
body.student-mobile-view {
    background-color: var(--student-bg);
}

body.student-mobile-view .page-wrapper {
    padding-bottom: 80px;
}

/* ===== MINI HEADER (Fixed Top) ===== */
.student-mini-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--student-gradient);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.student-mini-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-mini-header .header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.student-mini-header .header-avatar-text {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-mini-header .header-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-mini-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-mini-header .header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.student-mini-header .header-icon-btn:hover,
.student-mini-header .header-icon-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Fix notification icon color - ensure SVG stroke is white */
.student-mini-header .header-icon-btn svg {
    stroke: #fff !important;
    color: #fff !important;
}

.student-mini-header .notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #EF4444;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Mobile Notification Dropdown */
.student-mini-header .dropdown {
    position: static;
}

.student-mini-header .mobile-notif-dropdown {
    position: fixed !important;
    top: 60px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 95vw !important;
    max-width: 360px !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

.student-mini-header .mobile-notif-dropdown .card {
    border-radius: 12px;
    overflow: hidden;
}

.student-mini-header .mobile-notif-dropdown .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.student-mini-header .mobile-notif-dropdown .list-group-item {
    border-left: 0;
    border-right: 0;
}

/* ===== WELCOME CARD ===== */
.student-welcome-card {
    background: var(--student-gradient);
    border-radius: 20px;
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
}

.student-welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.student-welcome-card::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -20%;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.student-welcome-card .greeting {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.student-welcome-card .date-text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.student-welcome-card .class-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.student-welcome-card .class-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

/* ===== QUICK ACTION GRID ===== */
.student-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.student-quick-action {
    background: #fff;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--student-text-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.student-quick-action:hover,
.student-quick-action:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    color: var(--student-text-dark);
}

.student-quick-action::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--student-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.student-quick-action:active::after {
    opacity: 0.05;
}

.student-quick-action .action-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.student-quick-action .action-icon.icon-grades {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.student-quick-action .action-icon.icon-permit {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.student-quick-action .action-icon.icon-library {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.student-quick-action .action-icon.icon-violation {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.student-quick-action .action-label {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

/* ===== ATTENDANCE STATUS CARD ===== */
.student-attendance-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.student-attendance-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

.student-attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.student-attendance-item {
    padding: 16px;
    border-radius: 14px;
    text-align: center;
    color: #fff;
}

.student-attendance-item.check-in {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.student-attendance-item.check-out {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.student-attendance-item.check-out.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.student-attendance-item .time-label {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.student-attendance-item .time-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.student-attendance-item .time-date {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ===== MODERN SECTION CARD ===== */
.student-section-card {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.student-section-card .section-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.student-section-card .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--student-text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-section-card .section-title .title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--student-primary-light);
    color: var(--student-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-section-card .section-body {
    padding: 20px;
}

/* ===== ACTIVITY CARDS (Horizontal Scroll) ===== */
.student-activity-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 12px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.student-activity-scroll::-webkit-scrollbar {
    display: none;
}

.student-activity-card {
    flex: 0 0 280px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}

.student-activity-card .activity-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--student-text-dark);
    margin-bottom: 8px;
}

.student-activity-card .activity-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 12px;
}

.student-activity-card .activity-actions {
    display: flex;
    gap: 8px;
}

.student-activity-card .btn-activity {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-activity-card .btn-activity.btn-accept {
    background: var(--student-gradient);
    color: #fff;
}

.student-activity-card .btn-activity.btn-decline {
    background: #f1f5f9;
    color: #64748b;
}

/* ===== TABS MODERN ===== */
.student-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.student-tabs .tab-item {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.student-tabs .tab-item.active {
    background: #fff;
    color: var(--student-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.student-tab-content {
    display: none;
}

.student-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BOTTOM NAVIGATION ===== */
.student-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.student-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.2s ease;
    position: relative;
}

.student-bottom-nav .nav-item.active {
    color: var(--student-primary);
}

.student-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -4px;
    width: 40px;
    height: 3px;
    background: var(--student-primary);
    border-radius: 0 0 3px 3px;
}

.student-bottom-nav .nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-bottom-nav .nav-item.center-btn {
    margin-top: -20px;
}

.student-bottom-nav .nav-item.center-btn .nav-icon {
    width: 52px;
    height: 52px;
    background: var(--student-gradient);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.student-bottom-nav .nav-item.center-btn .nav-icon svg {
    width: 26px;
    height: 26px;
}

.student-bottom-nav .nav-item .nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.student-bottom-nav .nav-item.center-btn .nav-label {
    color: var(--student-primary);
    font-weight: 600;
}

/* ===== SUSPENSION ALERT ===== */
.student-suspension-alert {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.student-suspension-alert .alert-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.student-suspension-alert .alert-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.student-suspension-alert .alert-body {
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.6;
}

.student-suspension-alert .alert-reason {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
}

/* ===== DIAGNOSTIC PROMPT CARD ===== */
.student-diagnostic-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.student-diagnostic-card .diagnostic-icon {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.student-diagnostic-card .diagnostic-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 8px;
}

.student-diagnostic-card .diagnostic-text {
    font-size: 0.9rem;
    color: #0369a1;
    margin-bottom: 16px;
    line-height: 1.5;
}

.student-diagnostic-card .btn-diagnostic {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.student-diagnostic-card .btn-diagnostic:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

/* ===== SNPMB CARDS ===== */
.student-snpmb-eligible {
    background: var(--student-gradient);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.student-snpmb-eligible .trophy-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
}

.student-snpmb-eligible .congrats-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.student-snpmb-eligible .congrats-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 16px;
}

.student-snpmb-eligible .stats-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.student-snpmb-eligible .stat-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
}

.student-snpmb-eligible .stat-label {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-bottom: 4px;
}

.student-snpmb-eligible .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* ===== HIDE DESKTOP ELEMENTS ON MOBILE FOR STUDENTS ===== */
@media (max-width: 767.98px) {
    body.student-mobile-view .navbar,
    body.student-mobile-view .footer {
        display: none !important;
    }

    body.student-mobile-view .page-wrapper {
        padding-top: 64px !important;
        margin-top: 0;
    }

    body.student-mobile-view .page-body {
        padding-top: 0;
    }

    /* Ensure content is not hidden behind fixed header */
    body.student-mobile-view .page-header {
        margin-top: 0;
    }
}

/* Desktop: Hide mobile elements */
@media (min-width: 768px) {
    .student-mini-header,
    .student-bottom-nav {
        display: none;
    }

    body.student-mobile-view .page-wrapper {
        padding-bottom: 0;
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 380px) {
    .student-quick-actions {
        gap: 8px;
    }

    .student-quick-action {
        padding: 16px 12px;
    }

    .student-quick-action .action-icon {
        width: 44px;
        height: 44px;
    }

    .student-welcome-card {
        padding: 20px 16px;
    }

    .student-welcome-card .greeting {
        font-size: 1.3rem;
    }
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== PULL TO REFRESH VISUAL CUE ===== */
.student-pull-indicator {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--student-primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1025;
}

.student-pull-indicator.visible {
    transform: translateX(-50%) translateY(8px);
    opacity: 1;
}

/* ===== EMPTY STATE ===== */
.student-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.student-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.student-empty-state .empty-text {
    font-size: 0.9rem;
}

/* =====================================================
   STAFF MOBILE DASHBOARD (Teacher / BK)
   ===================================================== */

:root {
    --staff-primary: #206bc4;
    --staff-primary-dark: #1a56a0;
    --staff-primary-light: #e0f2fe;
    --staff-accent: #0c4a6e;
    --staff-bg: #ffffff;
    --staff-text-dark: #0c4a6e;
    --staff-gradient: linear-gradient(135deg, #206bc4 0%, #1a56a0 100%);
}

/* Staff Body Styles */
body.staff-mobile-view {
    background-color: var(--staff-bg);
}

body.staff-mobile-view .page-wrapper {
    padding-bottom: 20px;
}

/* ===== STAFF MINI HEADER (Fixed Top) ===== */
.staff-mini-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--staff-gradient);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 10px rgba(32, 107, 196, 0.3);
}

.staff-mini-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.staff-mini-header .header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.staff-mini-header .header-avatar-text {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-mini-header .header-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-mini-header .header-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
}

.staff-mini-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.staff-mini-header .header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.staff-mini-header .header-icon-btn:hover,
.staff-mini-header .header-icon-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Fix notification icon color - ensure SVG stroke is white */
.staff-mini-header .header-icon-btn svg {
    stroke: #fff !important;
    color: #fff !important;
}

.staff-mini-header .notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #EF4444;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Staff Notification Dropdown */
.staff-mini-header .dropdown {
    position: static;
}

.staff-mini-header .mobile-notif-dropdown {
    position: fixed !important;
    top: 60px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 95vw !important;
    max-width: 360px !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

/* ===== STAFF WELCOME CARD ===== */
.staff-welcome-card {
    background: var(--staff-gradient);
    border-radius: 20px;
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(32, 107, 196, 0.25);
    position: relative;
    overflow: hidden;
}

.staff-welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.staff-welcome-card::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -20%;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.staff-welcome-card .greeting {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.staff-welcome-card .date-text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.staff-welcome-card .role-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.staff-welcome-card .role-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

/* ===== STAFF QR CODE CARD ===== */
.staff-qr-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.staff-qr-card .qr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.staff-qr-card .qr-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--staff-primary-light);
    color: var(--staff-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-qr-card .qr-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--staff-text-dark);
    margin: 0;
}

.staff-qr-card .qr-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.staff-qr-card .qr-placeholder {
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #d1d5db;
    margin-bottom: 16px;
}

.staff-qr-card .qr-placeholder svg {
    color: #94a3b8;
    margin-bottom: 8px;
}

.staff-qr-card .qr-container {
    padding: 20px;
    background: #fff;
    border: 3px solid var(--staff-primary);
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(32, 107, 196, 0.2);
}

.staff-qr-card .qr-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.staff-qr-card .qr-info {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 12px;
}

.staff-qr-card .btn-generate {
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    background: var(--staff-gradient);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.staff-qr-card .btn-generate:hover,
.staff-qr-card .btn-generate:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 107, 196, 0.35);
}

.staff-qr-card .btn-generate:disabled {
    opacity: 0.7;
    transform: none;
}

/* ===== STAFF QR CARD - Desktop Floating Widget Design ===== */
@media (min-width: 768px) {
    .staff-qr-card {
        position: fixed;
        right: 24px;
        bottom: 24px;
        top: auto;
        width: auto;
        max-width: 320px;
        z-index: 1000;
        padding: 0;
        margin-bottom: 0;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Collapsed state - compact bar */
    .staff-qr-card.qr-collapsed {
        width: auto;
        max-width: none;
    }

    .staff-qr-card .qr-header {
        margin-bottom: 0;
        padding: 12px 16px;
        gap: 10px;
        cursor: pointer;
        background: linear-gradient(135deg, #206bc4 0%, #1a5aa8 100%);
        transition: all 0.2s ease;
    }

    .staff-qr-card .qr-header:hover {
        background: linear-gradient(135deg, #1a5aa8 0%, #144d8c 100%);
    }

    .staff-qr-card .qr-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .staff-qr-card .qr-icon svg {
        width: 18px;
        height: 18px;
    }

    .staff-qr-card .qr-title {
        font-size: 0.9rem;
        text-align: left;
        color: #fff;
    }

    .staff-qr-card .qr-subtitle {
        font-size: 0.7rem;
        text-align: left;
        color: rgba(255, 255, 255, 0.8);
    }

    /* Toggle indicator */
    .staff-qr-card .qr-header::after {
        content: '';
        width: 20px;
        height: 20px;
        margin-left: auto;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        transition: transform 0.3s ease;
    }

    .staff-qr-card.qr-collapsed .qr-header::after {
        transform: rotate(180deg);
    }

    /* Content area */
    .staff-qr-card .qr-content-wrapper {
        max-height: 400px;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: #fff;
        padding: 16px;
    }

    .staff-qr-card.qr-collapsed .qr-content-wrapper {
        max-height: 0;
        padding: 0 16px;
    }

    .staff-qr-card .qr-placeholder {
        padding: 20px 16px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .staff-qr-card .qr-placeholder svg {
        width: 32px;
        height: 32px;
    }

    .staff-qr-card .qr-placeholder .small {
        font-size: 0.75rem;
    }

    .staff-qr-card .qr-container {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 12px;
        border-width: 2px;
    }

    .staff-qr-card #staff-qrcode canvas,
    .staff-qr-card #staff-qrcode img {
        width: 160px !important;
        height: 160px !important;
    }

    .staff-qr-card .qr-timer {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .staff-qr-card .qr-info {
        font-size: 0.75rem;
        margin-top: 8px;
    }

    .staff-qr-card .btn-generate {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
        gap: 8px;
    }

    .staff-qr-card .btn-generate svg {
        width: 16px;
        height: 16px;
    }
}

/* Large desktop adjustments */
@media (min-width: 1200px) {
    .staff-qr-card {
        right: 32px;
        bottom: 32px;
    }
}

/* ===== STAFF QUICK ACTIONS ===== */
.staff-quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

/* Fallback for 4 items */
.staff-quick-actions .staff-quick-action:first-child:nth-last-child(4),
.staff-quick-actions .staff-quick-action:first-child:nth-last-child(4) ~ .staff-quick-action {
    /* When exactly 4 items, expand them slightly */
}

.staff-quick-action {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--staff-text-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.staff-quick-action:hover,
.staff-quick-action:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 107, 196, 0.15);
    color: var(--staff-text-dark);
}

.staff-quick-action .action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.staff-quick-action .action-icon.icon-attendance {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.staff-quick-action .action-icon.icon-library {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.staff-quick-action .action-icon.icon-supervision {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.staff-quick-action .action-icon.icon-schedule {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.staff-quick-action .action-icon.icon-class-admin {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.staff-quick-action .action-icon.icon-reports {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.staff-quick-action .action-icon.icon-report {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.staff-quick-action .action-icon.icon-penilaian {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.staff-quick-action .action-icon.icon-visit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.staff-quick-action .action-icon.icon-permits {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.staff-quick-action .action-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.staff-quick-action .action-icon.icon-guru-wali {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.staff-quick-action .action-label {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ===== STAFF SECTION CARD ===== */
.staff-section-card {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.staff-section-card .section-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.staff-section-card .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--staff-text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.staff-section-card .section-title .title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--staff-primary-light);
    color: var(--staff-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-section-card .section-body {
    padding: 20px;
}

.staff-section-card .section-body.p-0 {
    padding: 0;
}

/* ===== STAFF TABS ===== */
.staff-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-tabs .tab-item {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staff-tabs .tab-item:hover {
    color: var(--staff-primary);
}

.staff-tabs .tab-item.active {
    color: var(--staff-primary);
    border-bottom-color: var(--staff-primary);
    font-weight: 600;
}

.staff-tabs .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 10px;
}

.staff-tab-content {
    display: none;
    padding: 16px;
}

.staff-tab-content.active {
    display: block;
}

/* TomSelect dropdown fix - ensure dropdown appears above other elements */
.staff-section-card:has(.ts-wrapper),
.staff-section-card.has-dropdown {
    overflow: visible;
}

.staff-tab-content .ts-wrapper {
    position: relative;
    z-index: 100;
}

.staff-tab-content .ts-dropdown {
    position: absolute !important;
    z-index: 10000 !important;
    max-height: 250px !important;
}

/* ===== STAFF SCHEDULE LIST ===== */
.staff-schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.staff-schedule-item:last-child {
    border-bottom: none;
}

.staff-schedule-item .time-badge {
    min-width: 60px;
    padding: 8px 10px;
    background: var(--staff-primary-light);
    border-radius: 10px;
    text-align: center;
}

.staff-schedule-item .time-badge .time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--staff-primary);
}

.staff-schedule-item .time-badge .label {
    font-size: 0.65rem;
    color: #64748b;
}

.staff-schedule-item .info {
    flex: 1;
}

.staff-schedule-item .info .subject {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.staff-schedule-item .info .class-name {
    font-size: 0.8rem;
    color: #64748b;
}

.staff-schedule-item .action-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ===== STAFF HISA STATS ===== */
.staff-hisa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.staff-hisa-item {
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
}

.staff-hisa-item.hadir {
    background: rgba(16, 185, 129, 0.1);
}

.staff-hisa-item.izin {
    background: rgba(59, 130, 246, 0.1);
}

.staff-hisa-item.sakit {
    background: rgba(245, 158, 11, 0.1);
}

.staff-hisa-item.alpha {
    background: rgba(239, 68, 68, 0.1);
}

.staff-hisa-item .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.staff-hisa-item.hadir .value {
    color: #10B981;
}

.staff-hisa-item.izin .value {
    color: #3b82f6;
}

.staff-hisa-item.sakit .value {
    color: #f59e0b;
}

.staff-hisa-item.alpha .value {
    color: #ef4444;
}

.staff-hisa-item .label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* ===== STAFF EMPTY STATE ===== */
.staff-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.staff-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.staff-empty-state .empty-text {
    font-size: 0.9rem;
}

/* ===== STAFF BOTTOM NAVIGATION ===== */
.staff-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.staff-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.2s ease;
    position: relative;
}

.staff-bottom-nav .nav-item.active {
    color: var(--staff-primary);
}

.staff-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -4px;
    width: 40px;
    height: 3px;
    background: var(--staff-primary);
    border-radius: 0 0 3px 3px;
}

.staff-bottom-nav .nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-bottom-nav .nav-item.center-btn {
    margin-top: -20px;
}

.staff-bottom-nav .nav-item.center-btn .nav-icon {
    width: 52px;
    height: 52px;
    background: var(--staff-gradient);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 15px rgba(32, 107, 196, 0.4);
}

.staff-bottom-nav .nav-item.center-btn .nav-icon svg {
    width: 26px;
    height: 26px;
}

.staff-bottom-nav .nav-item .nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.staff-bottom-nav .nav-item.center-btn .nav-label {
    color: var(--staff-primary);
    font-weight: 600;
}

/* ===== STAFF MOBILE RESPONSIVE ===== */
@media (max-width: 767.98px) {
    body.staff-mobile-view .navbar {
        display: none;
    }

    body.staff-mobile-view .footer {
        display: flex;
        margin-bottom: 64px;
        padding: 16px;
        font-size: 0.8rem;
    }

    body.staff-mobile-view .page-wrapper {
        padding-top: 64px !important;
        padding-bottom: 16px !important;
        margin-top: 0;
        min-height: auto;
    }

    body.staff-mobile-view .page-body {
        padding-top: 0;
    }

    body.staff-mobile-view .page-header {
        margin-top: 0;
    }

    .staff-quick-actions {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .staff-quick-action .action-label {
        font-size: 0.65rem;
    }
}

/* Desktop: Hide mobile elements */
@media (min-width: 768px) {
    .staff-mini-header,
    .staff-bottom-nav {
        display: none;
    }

    body.staff-mobile-view .page-wrapper {
        padding-bottom: 0;
    }
}

/* BK Grid - 8 items layout */
.staff-quick-actions.bk-grid {
    grid-template-columns: repeat(4, 1fr);
}

.staff-quick-actions.bk-grid .action-label {
    font-size: 0.7rem;
    line-height: 1.2;
}

@media (max-width: 380px) {
    .staff-quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 5th item centered in second row on small screens */
    .staff-quick-actions .staff-quick-action:nth-child(5) {
        grid-column: 2;
        justify-self: center;
    }

    .staff-quick-actions.bk-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .staff-quick-actions.bk-grid .staff-quick-action {
        padding: 10px 4px;
    }

    .staff-quick-actions.bk-grid .action-icon {
        width: 36px;
        height: 36px;
    }

    .staff-quick-actions.bk-grid .action-icon svg {
        width: 18px;
        height: 18px;
    }

    .staff-quick-actions.bk-grid .action-label {
        font-size: 0.6rem;
    }

    .staff-quick-action {
        padding: 12px 6px;
    }

    .staff-quick-action .action-icon {
        width: 40px;
        height: 40px;
    }

    .staff-welcome-card {
        padding: 20px 16px;
    }

    .staff-welcome-card .greeting {
        font-size: 1.2rem;
    }
}

    /* Mobile Header */
    .profile-mobile-header {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        padding: 60px 20px 24px;
        margin: -60px -16px 0;
        border-radius: 0 0 24px 24px;
    }

    .profile-mobile-header .header-back {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .profile-mobile-header .back-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
    }

    .profile-mobile-header .header-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #fff;
        margin: 0;
    }

    .profile-mobile-header .header-spacer {
        width: 40px;
    }

    /* Desktop Header */
    .profile-desktop-header {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
        padding: 40px 0 32px;
        position: relative;
        overflow: hidden;
    }

    .profile-desktop-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 600px;
        height: 600px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
    }

    .profile-desktop-header .header-content {
        position: relative;
    }

    .profile-desktop-header .header-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .profile-desktop-header .back-btn-desktop {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        transition: all 0.2s;
    }

    .profile-desktop-header .back-btn-desktop:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .profile-desktop-header .header-title {
        font-size: 2rem;
        font-weight: 700;
        color: #fff;
        margin: 0;
    }

    .profile-desktop-header .header-subtitle {
        color: rgba(255, 255, 255, 0.85);
        margin: 4px 0 0 0;
        font-size: 1rem;
    }

    /* Page Content */
    .profile-page-content {
        padding: 24px 16px;
        padding-bottom: 40px;
    }

    /* Profile Card */
    .profile-card-main {
        background: #fff;
        border-radius: 24px;
        padding: 32px 24px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid #f3f4f6;
        text-align: center;
    }

    /* Avatar Section */
    .profile-avatar-section {
        margin-bottom: 24px;
    }

    .avatar-wrapper {
        display: inline-block;
        position: relative;
        cursor: pointer;
    }

    .avatar-wrapper .avatar-image {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        background-size: cover;
        background-position: center;
        border: 4px solid #fff;
        box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
        position: relative;
        overflow: hidden;
    }

    .avatar-wrapper .avatar-avatar {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        border: 4px solid #fff;
        box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3rem;
        font-weight: 700;
        color: #fff;
        position: relative;
        overflow: hidden;
    }

    .avatar-wrapper .avatar-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .avatar-wrapper:hover .avatar-overlay {
        opacity: 1;
    }

    .avatar-hint {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 12px;
        padding: 8px 16px;
        background: #f0f9ff;
        color: #0369a1;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
    }

    /* Profile Summary */
    .profile-summary {
        margin-bottom: 24px;
    }

    .profile-name {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 4px;
    }

    .profile-role {
        color: #6b7280;
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .profile-stats {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .profile-stat {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #9ca3af;
        font-size: 0.85rem;
    }

    .profile-stat svg {
        color: #d1d5db;
    }

    /* Quick Actions (Mobile) */
    .profile-quick-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .quick-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 20px;
        border-radius: 14px;
        border: none;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .quick-action-logout {
        background: #fef2f2;
        color: #dc2626;
    }

    .quick-action-logout:hover {
        background: #fee2e2;
    }

    /* Logout Button Mobile */
    .profile-logout-mobile {
        margin-top: 16px;
        padding: 0 4px;
    }

    .logout-mobile-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 20px;
        background: #fff;
        border: 1px solid #fecaca;
        color: #dc2626;
        border-radius: 14px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .logout-mobile-btn:hover,
    .logout-mobile-btn:active {
        background: #fef2f2;
    }

    /* Telegram Card Mobile - New Design */
    .profile-telegram-card-mobile {
        background: #fff;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #f3f4f6;
    }

    .telegram-mobile-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .telegram-mobile-body {
        padding: 20px;
    }

    .telegram-mobile-content {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 16px;
    }

    .telegram-mobile-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        background: #e2e8f0;
        color: #64748b;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .telegram-mobile-icon-success {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        color: #fff;
    }

    .telegram-mobile-info {
        flex: 1;
        min-width: 0;
    }

    .telegram-mobile-title {
        font-weight: 600;
        color: #1f2937;
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .telegram-mobile-desc {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .telegram-mobile-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 20px;
        border-radius: 12px;
        border: none;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .telegram-mobile-btn-primary {
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
    }

    .telegram-mobile-btn-primary:hover {
        box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4);
    }

    .telegram-mobile-btn-danger {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

    .telegram-mobile-btn-danger:hover {
        background: #fee2e2;
    }

    /* Old Telegram Card (Desktop) - Keep for backwards compatibility */
    .profile-telegram-card {
        background: #fff;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #f3f4f6;
    }

    .telegram-card-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px 20px;
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        font-weight: 600;
    }

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

    .telegram-connected,
    .telegram-disconnected {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
        border-radius: 16px;
    }

    .telegram-connected {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
    }

    .telegram-disconnected {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .telegram-icon-connected,
    .telegram-icon-pending {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .telegram-icon-connected {
        background: #22c55e;
        color: #fff;
    }

    .telegram-icon-pending {
        background: #e2e8f0;
        color: #64748b;
    }

    .telegram-status {
        flex: 1;
    }

    .telegram-status .status-text {
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 2px;
    }

    .telegram-status .status-desc {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .telegram-unlink-btn,
    .telegram-connect-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .telegram-unlink-btn {
        background: #fef2f2;
        color: #dc2626;
    }

    .telegram-connect-btn {
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
    }

    /* Form Section */
    .profile-form-section {
        background: #fff;
        border-radius: 20px;
        padding: 24px;
        margin-bottom: 20px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #f3f4f6;
    }

    .section-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .section-icon-contact {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }

    .section-icon-telegram {
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    }

    .section-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
    }

    .section-body {
        padding-left: 52px;
    }

    /* Form Groups */
    .form-group-modern {
        margin-bottom: 8px;
    }

    .form-label-modern {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
    }

    .form-control-modern {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 0.95rem;
        color: #1f2937;
        background: #f9fafb;
        transition: all 0.2s;
    }

    .form-control-modern:focus {
        outline: none;
        border-color: #3b82f6;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    }

    .form-control-modern:disabled {
        background: #f3f4f6;
        color: #9ca3af;
    }

    .form-control-modern.is-invalid {
        border-color: #dc2626;
        background: #fef2f2;
    }

    .form-control-modern.is-invalid:focus {
        border-color: #dc2626;
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    }

    .invalid-feedback {
        color: #dc2626;
        font-size: 0.85rem;
        margin-top: 6px;
    }

    .input-with-icon {
        position: relative;
    }

    .input-with-icon svg {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
    }

    .input-with-icon .form-control-modern {
        padding-left: 48px;
    }

    /* Telegram Status Card (Desktop) */
    .telegram-status-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 20px;
        border-radius: 16px;
    }

    .telegram-status-card.telegram-connected {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
    }

    .telegram-status-card.telegram-disconnected {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .status-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .status-connected {
        background: #22c55e;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    }

    .status-disconnected {
        background: #d1d5db;
    }

    .telegram-status-content {
        flex: 1;
    }

    .telegram-status-content .status-title {
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 2px;
    }

    .telegram-status-content .status-desc {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .btn-unlink-telegram,
    .btn-connect-telegram {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 10px;
        border: none;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .btn-unlink-telegram {
        background: #fef2f2;
        color: #dc2626;
    }

    .btn-unlink-telegram:hover {
        background: #fee2e2;
    }

    .btn-connect-telegram {
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
    }

    .btn-connect-telegram:hover {
        box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
    }

    /* QR Wrapper */
    .telegram-qr-wrapper {
        margin-top: 16px;
    }

    .qr-card {
        display: flex;
        align-items: center;
        gap: 24px;
        padding: 20px;
        background: #f8fafc;
        border-radius: 16px;
    }

    .qr-image-wrapper {
        flex-shrink: 0;
    }

    .qr-image-wrapper img {
        width: 120px;
        height: 120px;
        border-radius: 12px;
        border: 2px solid #e2e8f0;
    }

    .qr-instructions {
        flex: 1;
    }

    .qr-text {
        color: #6b7280;
        margin-bottom: 12px;
    }

    .btn-telegram-open {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        border-radius: 10px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.2s;
    }

    .btn-telegram-open:hover {
        box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
    }

    /* Form Actions */
    .profile-form-actions {
        display: flex;
        gap: 12px;
    }

    .btn-save-profile {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: #fff;
        border: none;
        border-radius: 14px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
        transition: all 0.2s;
    }

    .btn-save-profile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

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

    .btn-cancel-profile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        background: #f3f4f6;
        color: #6b7280;
        border: none;
        border-radius: 14px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .btn-cancel-profile:hover {
        background: #e5e7eb;
        color: #374151;
    }

    /* Logout Button Desktop */
    .btn-logout-desktop {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 16px 24px;
        background: #fff;
        border: 1px solid #f3f4f6;
        color: #dc2626;
        border-radius: 14px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .btn-logout-desktop:hover {
        background: #fef2f2;
        border-color: #fecaca;
    }

    /* Modal Telegram */
    .modal-telegram {
        border: none;
        border-radius: 24px;
    }

    .modal-telegram .modal-header {
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        border-radius: 24px 24px 0 0;
        padding: 20px 24px;
    }

    .modal-telegram .modal-title {
        color: #fff;
        font-weight: 600;
    }

    .modal-telegram .modal-body {
        padding: 32px 24px;
    }

    .qr-modal-wrapper {
        width: 200px;
        height: 200px;
        margin: 0 auto 20px;
    }

    .qr-modal-wrapper img {
        width: 100%;
        height: 100%;
        border-radius: 16px;
        border: 2px solid #e5e7eb;
    }

    .qr-modal-text {
        color: #6b7280;
        margin-bottom: 16px;
    }

    .btn-telegram-modal {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 24px;
        background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
        color: #fff;
        border-radius: 12px;
        font-weight: 600;
        text-decoration: none;
    }

    /* Cropper Modal */
    .img-container {
        height: 400px;
        background: #000;
        overflow: hidden;
    }

    .img-container img {
        max-width: 100%;
        max-height: 400px;
    }

    /* Desktop adjustments */
    @media (min-width: 768px) {
        .profile-page-content {
            padding: 32px;
        }

        .profile-form-section {
            padding: 32px;
        }

        .profile-card-main {
            padding: 40px;
        }

        .profile-form-actions {
            justify-content: flex-end;
        }

        .btn-save-profile {
            width: auto;
            flex: none;
        }

        .btn-cancel-profile {
            width: auto;
            flex: none;
        }
    }

    /* Hide mobile elements on desktop */
    @media (min-width: 768px) {
        .profile-mobile-header {
            display: none !important;
        }
    }

    /* Security Card */
    .security-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 20px;
    }

    .security-card-success {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border-color: #bbf7d0;
    }

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

    .security-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .security-icon-success {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    }

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

    .security-title {
        font-weight: 600;
        color: #1f2937;
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .security-desc {
        font-size: 0.875rem;
        color: #6b7280;
    }

    .security-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 20px;
        border-radius: 12px;
        border: none;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .security-btn-primary {
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        color: #fff;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

    .security-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    }

    .security-btn-danger {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

    .security-btn-danger:hover {
        background: #fee2e2;
    }

    /* Desktop: horizontal layout */
    @media (min-width: 768px) {
        .security-card {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .security-card-header {
            flex: 1;
            margin-bottom: 0;
        }

        .security-btn {
            width: auto;
            flex-shrink: 0;
        }
    }

    /* Hide desktop elements on mobile */
    @media (max-width: 767px) {
        .profile-desktop-header {
            display: none !important;
        }

        .profile-form-section .section-body {
            padding-left: 0;
        }

        .section-header {
            justify-content: center;
            margin-bottom: 16px;
        }

        .section-icon {
            display: none;
        }

        .section-title {
            text-align: center;
        }
    }
        /* ===== MODERN MODAL STYLES ===== */
        .modal-content {
            border: none;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }

        .modal-header {
            background: linear-gradient(135deg, var(--tblr-primary) 0%, #1a4fd6 100%);
            border-bottom: none;
            padding: 20px 24px;
        }

        .modal-title {
            color: #fff;
            font-weight: 600;
            font-size: 1.15rem;
        }

        .modal-header .btn-close {
            background-color: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 8px;
            width: 32px;
            height: 32px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .modal-header .btn-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .modal-header .btn-close:focus {
            box-shadow: none;
            outline: none;
        }

        .modal-body {
            padding: 24px;
            font-size: 0.95rem;
        }

        .modal-footer {
            border-top: 1px solid #f1f5f9;
            padding: 16px 24px;
            background: #fafbfc;
        }

        /* Modal Form Labels */
        .modal .form-label,
        .modal .col-form-label,
        .modal label {
            font-weight: 600;
            color: #475569;
            font-size: 0.875rem;
        }

        /* Modal Inputs */
        .modal .form-control,
        .modal .form-select {
            border-radius: 10px;
            border: 2px solid #e2e8f0;
            padding: 10px 14px;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .modal .form-control:focus,
        .modal .form-select:focus {
            border-color: var(--tblr-primary);
            box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.1);
        }

        /* Modal Buttons */
        .modal .btn {
            border-radius: 10px;
            padding: 10px 20px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .modal .btn-primary {
            background: linear-gradient(135deg, var(--tblr-primary) 0%, #1a4fd6 100%);
            border: none;
        }

        .modal .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
        }

        .modal .btn-secondary {
            background: #f1f5f9;
            border: none;
            color: #64748b;
        }

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

        .modal .btn-danger {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            border: none;
        }

        .modal .btn-danger:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
        }

        .modal .btn-success {
            background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
            border: none;
        }

        .modal .btn-success:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
        }

        /* Modal Cards inside body */
        .modal .card {
            border: none;
            border-radius: 14px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .modal .card-header {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border-bottom: 1px solid #e2e8f0;
            border-radius: 14px 14px 0 0;
            padding: 16px 20px;
            font-weight: 600;
        }

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

        /* Modal Checkboxes & Radios */
        .modal .form-check {
            margin-bottom: 12px;
        }

        .modal .form-check-input:checked {
            background-color: var(--tblr-primary);
            border-color: var(--tblr-primary);
        }

        /* Mobile Responsive Modal */
        @media (max-width: 767.98px) {
            .modal-dialog {
                margin: 8px;
                max-width: calc(100% - 16px);
            }

            .modal-content {
                border-radius: 20px;
            }

            .modal-header {
                padding: 16px 20px;
            }

            .modal-body {
                padding: 20px;
            }

            .modal-footer {
                padding: 12px 16px;
            }

            .modal .btn {
                padding: 10px 16px;
                font-size: 0.85rem;
            }
        }

        /* Modal Backdrop */
        .modal-backdrop {
            background: rgba(0, 0, 0, 0.5) !important;
            backdrop-filter: blur(4px);
        }

        .modal-backdrop.show {
            opacity: 1;
        }

        /* Modal Animation */
        .modal.fade .modal-dialog {
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            transform: translate(0, -50px) scale(0.95);
        }

        .modal.show .modal-dialog {
            transform: translate(0, 0) scale(1);
        }

        /* Modal Large */
        .modal-xl .modal-dialog {
            max-width: 90%;
        }

        /* Modal Small */
        .modal-sm .modal-dialog {
            max-width: 400px;
        }

        /* Alert/Info boxes in modals */
        .modal .alert {
            border: none;
            border-radius: 12px;
            padding: 14px 18px;
        }

        .modal .alert-info {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1e40af;
        }

        .modal .alert-warning {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            color: #92400e;
        }

        .modal .alert-danger {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            color: #991b1b;
        }

        .modal .alert-success {
            background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
            color: #065f46;
        }

        /* Tables in modals */
        .modal .table {
            border-radius: 10px;
            overflow: hidden;
        }

        .modal .table thead th {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            font-weight: 600;
            color: #475569;
            border-bottom: 2px solid #e2e8f0;
        }

        .modal .table tbody tr {
            transition: background-color 0.2s;
        }

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

        /* ===== MOBILE MENU MODAL STYLES ===== */
        .mobile-menu-content {
            border: none;
            border-radius: 0;
            height: 100vh;
            margin: 0;
            max-width: 100%;
        }

        .mobile-menu-header {
            background: linear-gradient(135deg, var(--tblr-primary) 0%, #1a4fd6 100%);
            padding: 20px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: none;
        }

        .mobile-menu-header .modal-title {
            color: #fff;
            font-weight: 600;
            font-size: 1.25rem;
            margin: 0;
        }

        .mobile-menu-header .btn-close {
            background-color: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 8px;
            width: 36px;
            height: 36px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .mobile-menu-header .btn-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .mobile-menu-body {
            padding: 0;
            height: calc(100vh - 72px);
            overflow-y: auto;
            background: #f8fafc;
        }

        .mobile-menu-list {
            list-style: none;
            margin: 0;
            padding: 12px 0;
        }

        .mobile-menu-item {
            margin: 0;
            padding: 0;
            border-bottom: 1px solid #f1f5f9;
        }

        .mobile-menu-link {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 20px;
            color: #334155;
            text-decoration: none;
            transition: all 0.2s;
            font-weight: 500;
            font-size: 0.95rem;
        }

        .mobile-menu-link:hover {
            background: #e2e8f0;
            color: var(--tblr-primary);
        }

        .mobile-menu-link svg {
            flex-shrink: 0;
            width: 22px;
            height: 22px;
        }

        .mobile-menu-link span {
            flex: 1;
        }

        .mobile-menu-item.active .mobile-menu-link {
            background: linear-gradient(135deg, var(--tblr-primary) 0%, #1a4fd6 100%);
            color: #fff;
        }

        .mobile-menu-toggle {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 20px;
            color: #334155;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
            font-size: 0.95rem;
            user-select: none;
        }

        .mobile-menu-toggle:hover {
            background: #e2e8f0;
            color: var(--tblr-primary);
        }

        .mobile-menu-toggle svg:first-child {
            flex-shrink: 0;
            width: 22px;
            height: 22px;
        }

        .mobile-menu-toggle span {
            flex: 1;
        }

        .mobile-menu-toggle svg:last-child {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
            transition: transform 0.2s;
        }

        .mobile-menu-toggle[aria-expanded="true"] svg:last-child {
            transform: rotate(180deg);
        }

        .mobile-menu-submenu {
            background: #ffffff;
            padding: 8px 0;
            border-top: 1px solid #f1f5f9;
        }

        .mobile-submenu-link {
            display: block;
            padding: 12px 20px 12px 56px;
            color: #64748b;
            text-decoration: none;
            transition: all 0.2s;
            font-size: 0.9rem;
        }

        .mobile-submenu-link:hover {
            background: #f1f5f9;
            color: var(--tblr-primary);
        }

        .mobile-submenu-link.active {
            background: linear-gradient(90deg, rgba(32, 107, 196, 0.1) 0%, transparent 100%);
            color: var(--tblr-primary);
            font-weight: 600;
            padding-left: 52px;
            border-left: 4px solid var(--tblr-primary);
        }

        /* Desktop: Hide mobile menu modal */
        @media (min-width: 768px) {
            #mobile-menu-modal {
                display: none !important;
            }
        }

        /* Mobile: Ensure modal takes full screen */
        @media (max-width: 767.98px) {
            #mobile-menu-modal .modal-dialog {
                margin: 0;
                max-width: 100%;
                height: 100vh;
            }

            #mobile-menu-modal .modal-content {
                height: 100vh;
                border-radius: 0;
            }

            #mobile-menu-modal .modal-dialog-scrollable {
                height: 100vh;
            }
        }

/* ============================================
   STUDENT REPORT REDESIGN STYLES
   ============================================ */

/* Sticky Columns Logic */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020; /* Higher than content */
}

.sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 5 !important;
  background-color: #fff; /* Ensure opacity */
}

/* Fixed Widths for Sticky Cols */
.first-col {
  left: 0;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  z-index: 10 !important;
  border-right: 1px solid #e2e8f0;
}

.second-col {
  left: 50px;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  z-index: 10 !important;
  border-right: 1px solid #e2e8f0;
  box-shadow: 4px 0 8px -2px rgba(0,0,0,0.05); /* Drop shadow on the edge */
}

/* Ensure Headers align */
thead .sticky-col {
    z-index: 20 !important; /* Higher than body sticky cols */
    background-color: #f8f9fa !important;
}

/* Custom Scrollbar for the table container */
.table-responsive::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1; 
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; 
}

/* Soft Badges (Light variations) */
.bg-green-lt { background-color: #ecfdf5 !important; color: #059669 !important; border: 1px solid #a7f3d0; }
.bg-blue-lt { background-color: #eff6ff !important; color: #1d4ed8 !important; border: 1px solid #bfdbfe; }
.bg-yellow-lt { background-color: #fffbeb !important; color: #d97706 !important; border: 1px solid #fde68a; }
.bg-red-lt { background-color: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca; }
.bg-purple-lt { background-color: #f5f3ff !important; color: #7c3aed !important; border: 1px solid #ddd6fe; }
.bg-secondary-lt { background-color: #f9fafb !important; color: #4b5563 !important; border: 1px solid #e5e7eb; }

/* Rounded Inputs */
.form-control-rounded, .form-select.form-control-rounded {
    border-radius: 20px;
    padding-left: 15px;
    border-color: #e2e8f0;
}
.form-control-rounded:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    border-color: #10B981;
}

.btn-rounded {
    border-radius: 20px;
}
