.modification-request-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.request-info h4 {
    margin: 0;
    color: var(--text-color);
}

.request-info .date {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.status-badge.pending {
    background: var(--warning-color);
    color: white;
}

.status-badge.approved {
    background: var(--success-color);
    color: white;
}

.status-badge.rejected {
    background: var(--danger-color);
    color: white;
}

.request-details {
    margin: 15px 0;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
}

.detail-row .label {
    font-weight: bold;
    width: 100px;
    color: var(--text-secondary);
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.request-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.2s;
}

.request-actions button:hover {
    opacity: 0.9;
}

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

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

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 24px 36px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 20%);
    z-index: 1;
    transform: rotate(-3deg);
    opacity: 0.8;
}

.header h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card {
    background-color: white;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    width: 100%;
}

.card-body {
    padding: 36px;
    max-width: 1600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 28px;
    max-width: 600px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="number"],
input[type="datetime-local"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--gray-50);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

select.multi-select {
    min-height: 110px;
    padding: 10px 12px;
}

.field-hint {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.section-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-picker select {
    flex: 1;
}

.section-picker .small {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.selected-sections {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.section-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.85rem;
    border: 1px solid var(--gray-200);
}

.section-chip .chip-remove {
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.section-chip .chip-remove:hover {
    color: var(--danger-color);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

button {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

button:active {
    transform: translateY(-1px);
}

button.export-btn {
    background: linear-gradient(to right, var(--success-color), #059669);
}

button.export-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

button.delete-btn {
    background: linear-gradient(to right, var(--danger-color), #b91c1c);
}

button.delete-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
}

.attendance-list {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.attendance-list th,
.attendance-list td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.attendance-list th {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.attendance-list tr {
    transition: var(--transition);
}

.attendance-list tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.005);
}

.attendance-list tr:last-child td {
    border-bottom: none;
}

.logout-btn {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
    position: relative;
    z-index: 2;
}

.logout-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.2), 0 4px 6px -2px rgba(249, 115, 22, 0.1);
}

.status-indicator {
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left: 4px solid var(--primary-light);
}

.hidden {
    display: none;
}

.tab-container {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 36px;
    overflow-x: auto;
    scrollbar-width: thin;
    position: relative;
    gap: 4px;
    padding-bottom: 2px;
}

.tab-container::-webkit-scrollbar {
    height: 5px;
}

.tab-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.tab-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.tab {
    padding: 16px 28px;
    cursor: pointer;
    border: none;
    margin-right: 8px;
    white-space: nowrap;
    font-weight: 500;
    transition: var(--transition);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.tab.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    z-index: 2;
}

.tab i {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
    background-color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 2px;
    position: relative;
    z-index: 10;
}

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

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

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

#map {
    display: none;
    /* Hide map element but keep it for compatibility */
}

.status-badge {
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.badge-present {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-present::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.badge-absent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-absent::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
}

.badge-late {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-late::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f59e0b;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 6px 6px 0 0;
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(to right, var(--success-color), #059669);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(to right, var(--secondary-color), #0284c7);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
}

.stat-card h3 {
    margin-top: 0;
    color: var(--gray-700);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card i {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.stat-card:hover i {
    transform: scale(1.1);
    background-color: rgba(59, 130, 246, 0.15);
}

.stat-card:nth-child(2) i {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-card:nth-child(3) i {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
}

.stat-card:nth-child(4) i {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--accent-color);
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 700;
    margin: 5px 0 15px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
    line-height: 1;
}

.stat-card:nth-child(2) .number {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.stat-card:nth-child(3) .number {
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.stat-card:nth-child(4) .number {
    background: linear-gradient(135deg, var(--accent-color), #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(249, 115, 22, 0.2);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.05), transparent 70%);
    z-index: 0;
    border-top-left-radius: 100%;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-200);
}

.filter-bar select,
.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-bar .button-group {
    display: flex;
    gap: 10px;
}

.scheduled-badge {
    background-color: #8B5CF6;
    color: white;
}

.scheduled-time {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.attendance-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.small-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

#attendance-list-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: white;
}

/* Login form styling */
#login-section {
    max-width: 500px;
    margin: 100px auto;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background-color: white;
}

#login-section .card-body {
    padding: 40px;
}

#login-section .header {
    text-align: center;
    display: block;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

#login-section button {
    width: 100%;
    margin-top: 15px;
    padding: 16px;
}

#login-section input {
    border-radius: var(--border-radius);
    padding: 16px;
    background-color: var(--gray-50);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* Attendance map in popup */
#attendance-map {
    display: none;
    /* Hide attendance map */
}

/* Responsive styling */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .header h2 {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .attendance-list th,
    .attendance-list td {
        padding: 12px 10px;
        font-size: 14px;
    }

    #login-section {
        margin: 50px 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   MODERN SIDEBAR REDESIGN - MATCHES SITE THEME
   ============================================ */

/* Modern Sidebar Container */
.sidebar.sidebar-modern {
    width: 280px !important;
    background: linear-gradient(165deg, var(--primary-dark) 0%, var(--primary-color) 50%, #152654 100%) !important;
    color: white !important;
    position: fixed !important;
    height: 100vh !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Background Decorations */
.sidebar-bg-decoration {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
    animation: floatBg 15s infinite ease-in-out alternate;
}

.sidebar-bg-decoration-2 {
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: floatBg2 12s infinite ease-in-out alternate;
}

@keyframes floatBg {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-10%, 10%) rotate(15deg);
    }
}

@keyframes floatBg2 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(10%, -5%) rotate(-10deg);
    }
}

/* Sidebar Header Modern */
.sidebar-header-modern {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    /* Prevent header from shrinking */
}

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

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.sidebar-logo i {
    font-size: 1.4rem;
    color: white;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.sidebar-brand-tagline {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Close Button */
.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

/* Sidebar Search */
.sidebar-search {
    padding: 16px 20px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    /* Prevent search from shrinking */
}

.sidebar-search i {
    position: absolute;
    left: 32px;
    /* Position relative to container padding */
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    /* Force padding */
    background: rgba(255, 255, 255, 0.1) !important;
    /* Force dark translucent bg */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    color: white !important;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: none !important;
    /* Remove any default shadows */
}

/* Fix Autofill White Background */
.sidebar-search input:-webkit-autofill,
.sidebar-search input:-webkit-autofill:hover,
.sidebar-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px #302b63 inset;
    /* Match sidebar dark theme */
    transition: background-color 5000s ease-in-out 0s;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.sidebar-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.sidebar-search input:focus+i,
.sidebar-search:focus-within i {
    color: #93c5fd;
}

/* Sidebar Menu Modern */
.sidebar-menu-modern {
    flex: 1 1 auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 8px 0;
    position: relative;
    z-index: 2;
    min-height: 0;
    max-height: calc(100vh - 280px);
    /* Subtract header, search, and footer heights */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Scrollbar */
.sidebar-menu-modern::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu-modern::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu-modern::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.sidebar-menu-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Section */
.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    padding: 12px 20px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
}

/* Menu Item Modern */
.sidebar-menu-item-modern {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 0;
    /* Icons are hidden, no gap needed */
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 12px;
    border-radius: 10px;
}

.sidebar-menu-item-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-menu-item-modern:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-menu-item-modern:hover::before {
    opacity: 1;
}

.sidebar-menu-item-modern.active {
    color: white;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(14, 165, 233, 0.15));
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.sidebar-menu-item-modern.active::before {
    opacity: 0;
}

/* Menu Item Icon - Hidden per user request */
.menu-item-icon {
    display: none;
    /* Hide menu icons */
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.menu-item-icon i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.sidebar-menu-item-modern:hover .menu-item-icon {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.sidebar-menu-item-modern:hover .menu-item-icon i {
    transform: scale(1.1);
}

.sidebar-menu-item-modern.active .menu-item-icon {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Warning Icon State */
.menu-item-icon.warning {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.sidebar-menu-item-modern:hover .menu-item-icon.warning {
    background: rgba(239, 68, 68, 0.3);
}

/* Menu Item Text */
.menu-item-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

/* Menu Item Indicator (Active state arrow) */
.menu-item-indicator {
    position: absolute;
    right: 8px;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-light), var(--accent-color));
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-menu-item-modern.active .menu-item-indicator {
    opacity: 1;
}

/* Menu Item Badge */
.menu-item-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    position: relative;
    z-index: 1;
    animation: badgePulse 2s infinite;
}

.menu-item-badge.is-hidden {
    display: none;
}

.menu-item-badge.pending {
    background: linear-gradient(135deg, var(--warning-color), var(--accent-color));
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

@keyframes badgePulse {

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

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

/* Sidebar Footer Modern - Compact */
.sidebar-footer-modern {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* User Profile - Compact */
.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.3s ease;
}

.sidebar-user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.5);
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--primary-dark);
}

.user-status-dot.online {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.user-status-dot.offline {
    background: #6b7280;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 2px;
    flex: 1;
    min-width: 0;
    /* Critical for flex child text truncation */
    text-align: left;
    justify-content: center;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    width: 100%;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.user-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    width: 100%;
    display: block;
    text-align: left;
    direction: ltr;
}

.user-role {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logout Button */
.sidebar-menu-item-modern.logout {
    margin: 0;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.sidebar-menu-item-modern.logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.sidebar-menu-item-modern.logout::before {
    display: none;
}

.menu-item-icon.logout-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.sidebar-menu-item-modern.logout:hover .menu-item-icon.logout-icon {
    background: rgba(239, 68, 68, 0.3);
}

.sidebar-menu-item-modern.logout .menu-item-text {
    color: #f87171;
}

/* Mobile Sidebar Styles */
@media (max-width: 992px) {
    .sidebar.sidebar-modern {
        transform: translateX(-100%);
        width: 300px;
    }

    .sidebar.sidebar-modern.visible {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* Menu toggle button */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: none;
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.menu-toggle:active {
    transform: scale(0.98);
}

.menu-toggle i {
    font-size: 1.2rem;
}

/* Hide menu toggle on desktop */
@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

/* Animation for menu items on load */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.sidebar-menu-item-modern {
    animation: slideInFromLeft 0.4s ease forwards;
}

.sidebar-section:nth-child(1) .sidebar-menu-item-modern:nth-child(2) {
    animation-delay: 0.05s;
}

.sidebar-section:nth-child(1) .sidebar-menu-item-modern:nth-child(3) {
    animation-delay: 0.1s;
}

.sidebar-section:nth-child(2) .sidebar-menu-item-modern:nth-child(2) {
    animation-delay: 0.15s;
}

.sidebar-section:nth-child(2) .sidebar-menu-item-modern:nth-child(3) {
    animation-delay: 0.2s;
}

.sidebar-section:nth-child(2) .sidebar-menu-item-modern:nth-child(4) {
    animation-delay: 0.25s;
}

.sidebar-section:nth-child(3) .sidebar-menu-item-modern:nth-child(2) {
    animation-delay: 0.3s;
}

.sidebar-section:nth-child(3) .sidebar-menu-item-modern:nth-child(3) {
    animation-delay: 0.35s;
}

.sidebar-section:nth-child(3) .sidebar-menu-item-modern:nth-child(4) {
    animation-delay: 0.4s;
}

.sidebar-section:nth-child(4) .sidebar-menu-item-modern:nth-child(2) {
    animation-delay: 0.45s;
}

.sidebar-section:nth-child(4) .sidebar-menu-item-modern:nth-child(3) {
    animation-delay: 0.5s;
}

/* Hover Glow Effect */
.sidebar-menu-item-modern:hover .menu-item-icon {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Ripple Effect on Click */
.sidebar-menu-item-modern::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.sidebar-menu-item-modern:active::after {
    transform: translate(-50%, -50%) scale(40);
    opacity: 0;
}

/* ============================================
   ADMIN PROFILE PHOTO MODAL
   ============================================ */

.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.admin-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

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

.admin-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 20px;
    text-align: center;
}

.admin-modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-modal-header h3 i {
    margin-right: 8px;
}

.admin-modal-body {
    padding: 24px;
}

.modal-description {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.photo-upload-area {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 4px solid var(--primary-light);
    transition: all 0.3s ease;
}

.photo-upload-area:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.photo-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.photo-upload-area:hover .photo-upload-overlay {
    opacity: 1;
}

.photo-upload-overlay i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.photo-upload-overlay span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-upload-area.has-image .photo-upload-overlay {
    opacity: 0;
}

.photo-upload-area.has-image:hover .photo-upload-overlay {
    opacity: 1;
}

.photo-hint-text {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.photo-hint-text.success {
    color: var(--success-color);
}

.photo-hint-text i {
    margin-right: 4px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.save-photo-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.save-photo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skip-photo-btn {
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.skip-photo-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.action-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 6px;
    display: none;
    overflow: visible;
    border: 1px solid var(--gray-200);
    transform: translateY(0);
    /* Prevent fluctuation */
}

.action-dropdown.show {
    display: block;
    /* Show when active */
}

.action-dropdown a {
    color: var(--gray-700);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.action-dropdown a i {
    width: 16px;
    text-align: center;
}

.action-dropdown a:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* Add delete-action class styling */
.delete-action {
    color: var(--danger-color) !important;
}

.delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    color: white;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.loader-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 3s infinite ease-in-out;
}

.loader-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
}

.loader-spinner::before {
    border-top-color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    animation: spin 1.2s linear infinite;
}

.loader-spinner::after {
    border-left-color: white;
    border-right-color: rgba(255, 255, 255, 0.3);
    animation: spin 0.8s linear infinite reverse;
}

.loader-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, white, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.loader-text p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 25px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.loader-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    position: absolute;
    border-radius: 10px;
    animation: progress 1.5s ease-in-out infinite;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

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

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.4;
    }
}

@keyframes progress {
    0% {
        width: 0%;
        left: 0;
    }

    50% {
        width: 30%;
        left: 35%;
    }

    100% {
        width: 0%;
        left: 100%;
    }
}

.admin-name {
    color: #ea580c;
}

/* Location block styling for attendance records */
.location-blocks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    /* Ensure proper stacking context */
}

/* Ensure location block has proper padding for the action button */
.location-block {
    position: relative;
    padding: 15px;
    padding-right: 40px;
    /* Add padding to make room for the action button */
    overflow: visible;
    /* Allow content to overflow for the dropdown menu */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 10px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    cursor: pointer;
}

.location-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.location-block .location-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.location-block .student-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-block .student-count i {
    font-size: 0.9rem;
}

.location-block::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    z-index: 1;
    /* Ensure it's behind the menu */
}

.back-button {
    background-color: #f3f4f6;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #e5e7eb;
}

.back-button i {
    font-size: 0.9rem;
}

.device-info {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 5px;
}

.device-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.device-mobile {
    background-color: #f97316;
    color: white;
}

.device-desktop {
    background-color: #3b82f6;
    color: white;
}

@media (max-width: 768px) {
    .location-block {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .location-block {
        width: 100%;
    }
}

/* Device compatibility indicator */
.compatibility-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8rem;
}

.compatibility-indicator span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.compatibility-indicator i {
    font-size: 0.9rem;
}

/* Add styles for location block ellipsis menu */
.location-block {
    position: relative;
}

.location-block-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200;
}

.location-block-menu .action-button {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    /* Ensure proper stacking */
    z-index: 10;
    /* Higher than the decoration */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.location-block-menu .action-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.location-block-menu .action-dropdown {
    background-color: white;
    right: 0;
    top: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    z-index: 2000;
    /* Higher z-index */
    position: absolute;
    /* Ensure it's not affected by overflow */
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Round corners for inner elements */
    display: none;
    /* Hide by default */
}

.location-block-menu .action-dropdown.show {
    display: block;
    /* Show when active */
}

.location-block-menu .action-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
}

.location-block-menu .action-dropdown a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.export-link {
    color: var(--secondary-color) !important;
}

.export-link:hover {
    background-color: rgba(14, 165, 233, 0.1) !important;
}

.block-delete-action {
    color: var(--danger-color) !important;
}

.block-delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Prevent event bubbling from menu to block */
.location-block-menu .action-button,
.location-block-menu .action-dropdown a {
    cursor: pointer;
}

/* Style updates for action menu in attendance tables */
.attendance-list td {
    padding: 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list td .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

.attendance-list .action-button {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    /* Ensure proper stacking */
    z-index: 5;
    /* Higher than the decoration */
}

.attendance-list .action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.attendance-list .action-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    /* Add slight offset to prevent flickering */
    z-index: 2000;
    /* Higher z-index to appear above tabs */
    transform: translateY(0);
    /* Prevent fluctuation */
}

.attendance-list .action-dropdown.show {
    display: block;
}

/* Restore action button hover styles */
.action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* For user management section specifically */
#users-tab .action-dropdown {
    z-index: 2000;
    /* Even higher z-index for tabs section */
    right: 0;
    top: calc(100% + 5px);
    /* Slight offset to prevent flickering */
    position: absolute;
}

/* For attendance section specifically */
#attendance-tab .action-dropdown {
    z-index: 2000;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
}

/* Make sure table action dropdowns are stable */
.attendance-list td {
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

/* Prevent action button dropdowns from affecting cursor positioning */
.action-menu,
.action-button,
.action-dropdown {
    pointer-events: auto;
    /* Ensures clicks are captured */
}

/* The parent containers should let events pass through to the action elements */
.attendance-list td,
.tabs-wrapper,
.tab-content {
    pointer-events: auto;
}

/* Sidebar Styles */
.main-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    visibility: hidden;
    /* Hide sidebar by default */
}

.sidebar.visible {
    visibility: visible;
    /* Show sidebar when this class is added */
}

.sidebar-collapsed {
    transform: translateX(-280px);
}

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

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-left: 110px;
}

/* Style for the menu toggle inside the sidebar header */
.sidebar-header .menu-toggle {
    position: static;
    visibility: visible;
    width: 32px;
    height: 32px;
    background-color: transparent;
    box-shadow: none;
    color: white;
}

.sidebar-header .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu-item i {
    margin-right: 14px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.device-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 500;
}

.menu-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 101;
    background-color: var(--primary-color);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    visibility: visible;
    /* Hide menu toggle by default */
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-toggle i {
    font-size: 1.2rem;
}

.menu-toggle:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Show the main menu toggle on mobile only */
@media (max-width: 992px) {
    #menu-toggle {
        visibility: hidden;
        opacity: 0;
    }

    /* Show menu toggle only when sidebar is collapsed */
    .sidebar.sidebar-collapsed~#menu-toggle {
        visibility: visible;
        opacity: 1;
    }

    /* Hide header menu toggle on mobile */
    .sidebar-header .menu-toggle {
        display: block;
    }
}

.content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin 0.3s ease, width 0.3s ease;
    width: calc(100% - 280px);
}

.content-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is hidden (login page), content takes full width */
.sidebar:not(.visible)~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is visible but collapsed */
.sidebar.visible.sidebar-collapsed~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* Device List Styles */
.device-list {
    margin-top: 15px;
}

.device-item {
    padding: 10px 15px 10px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-item-left {
    display: flex;
    flex-direction: column;
}

.device-name {
    font-weight: 500;
}

.device-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.admin-list-item {
    padding: 12px 15px 12px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-item-controls {
    display: flex;
    gap: 10px;
}

.admin-item-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.admin-item-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.admin-item-btn.delete {
    background: rgb(201, 17, 17);
}

.admin-item-btn.delete:hover {
    background: rgba(198, 24, 24, 0.649);
}

/* Adjust existing container styles */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

#admin-panel .header {
    padding-left: 80px;
    /* Make room for the menu toggle button */
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .content-wrapper {
        margin-left: 0;
        width: 100% !important;
        /* Force full width on mobile regardless of other styles */
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Ensure login section is properly centered on mobile */
    #login-section {
        margin: 50px auto;
        max-width: 90%;
    }
}

.menu-toggle.visible {
    visibility: visible;
    /* Show menu toggle when this class is added */
}

/* Section header menu button */
.section-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    margin-right: 10px;
}

.section-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
}

/* Hide section menu button on larger screens */
@media (min-width: 993px) {
    .section-menu-btn {
        display: none;
    }
}

/* Adjust stat cards height and responsive behavior */
.stat-card {
    padding: 15px 20px;
    /* Reduce padding to make cards less tall */
    max-height: 180px;
    /* Limit maximum height */
}

.stat-card .number {
    font-size: 2.5rem;
    /* Slightly smaller number size */
    margin: 0 0 10px;
    /* Less margin */
}

.stat-card i {
    margin-bottom: 8px;
    /* Less margin below icon */
}

.stat-card h3 {
    margin-bottom: 8px;
    /* Less margin below heading */
    font-size: 1rem;
    /* Slightly smaller heading */
}

/* Ensure responsive width adjustment */
.dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    /* Allow narrower cards */
    gap: 20px;
    /* Slightly less gap between cards */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

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

/* Notifications Styles */
.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notifications-list-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notification-item {
    padding: 16px;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #4a6cf7;
}

.notification-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.notification-header {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.notification-preview {
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.notification-actions button {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.notification-actions .view-btn:hover {
    color: #4a6cf7;
}

.notification-actions .delete-btn:hover {
    color: #f74a4a;
}

.notification-compose {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.text-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
}

.text-editor-toolbar button,
.text-editor-toolbar select {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: var(--primary-color);
}

.text-editor-toolbar button:hover,
.text-editor-toolbar select:hover {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Notification Detail Modal */
.notification-detail {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.notification-recipients {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 15px;
}

/* Students List in Selection Modal */
.students-selection-modal .modal-content {
    max-width: 600px;
}

.students-selection-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

/* Additional notification styles */
.text-editor {
    min-height: 200px;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 4px 4px;
    padding: 12px;
    font-family: inherit;
    background-color: white;
    overflow-y: auto;
}

.text-editor:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Recipients selection styling */
.recipients-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* Students selection */
#students-selection {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background-color: var(--gray-100);
}

.students-search {
    margin-bottom: 12px;
}

.students-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 8px;
    background-color: white;
}

.student-item {
    padding: 8px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal styles for notification details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.notification-detail {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--gray-100);
}

.notification-recipients {
    margin-top: 8px;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Profile Requests Styles */
.request-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.request-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.request-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--gray-800);
}

.user-email {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.request-time {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.request-body {
    padding: 15px;
}

.changes-list {
    display: grid;
    gap: 10px;
}

.change-item {
    padding: 10px;
    background-color: var(--gray-50);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.field-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.change-values {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.old-value {
    color: var(--gray-600);
    text-decoration: line-through;
}

.new-value {
    color: var(--primary-color);
    font-weight: 500;
}

.request-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.approve-btn,
.reject-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.approve-btn:hover {
    background-color: #0da26f;
}

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

.reject-btn:hover {
    background-color: #dc2626;
}

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--gray-500);
}

.error-message {
    padding: 15px;
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 6px;
    margin: 20px 0;
}

/* Mobile-specific styles */
@media screen and (max-width: 992px) {

    /* Content wrapper adjustments */
    .content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 10px;
        overflow-x: hidden;
    }

    /* Sidebar adjustments */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        visibility: visible !important;
    }

    .sidebar.visible:not(.sidebar-collapsed) {
        transform: translateX(0);
    }

    /* Header adjustments */
    .header {
        padding: 15px !important;
        margin-left: 0 !important;
    }

    .header h2 {
        font-size: 1.5rem !important;
    }

    /* Card and form adjustments */
    .card-body {
        padding: 15px !important;
    }

    .form-group {
        margin-bottom: 15px !important;
    }

    /* Table adjustments */
    .attendance-list {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Dashboard stats adjustments */
    .dashboard-stats {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 10px !important;
    }

    .stat-card {
        margin-bottom: 10px !important;
    }

    /* Filter bar adjustments */
    .filter-bar {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100% !important;
    }

    .button-group {
        display: flex;
        width: 100%;
        gap: 10px;
    }

    .button-group button {
        flex: 1;
    }

    /* Location blocks adjustments */
    .location-block {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Menu toggle button adjustments */
    .menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1001;
    }

    /* Hide menu toggle when sidebar is open */
    .sidebar:not(.sidebar-collapsed)~.menu-toggle {
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95% !important;
        margin: 10px !important;
        max-height: 90vh !important;
    }

    /* Tab container adjustments */
    .tab-container {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px !important;
    }

    .tab {
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }

    /* Fix for nested scrollable content */
    .tab-content {
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure proper spacing around section titles */
    .section-title {
        margin: 15px 0 !important;
        font-size: 1.3rem !important;
    }

    /* Fix for action dropdowns */
    .action-dropdown {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 300px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    /* Ensure proper touch targets */
    button,
    .action-button,
    .sidebar-menu-item {
        min-height: 44px !important;
        padding: 10px 15px !important;
    }
}

/* Additional fixes for extra small screens */
@media screen and (max-width: 576px) {
    .header h2 {
        font-size: 1.2rem !important;
    }

    .stat-card .number {
        font-size: 2rem !important;
    }

    .tab {
        padding: 10px 15px !important;
    }

    .action-dropdown {
        width: 95% !important;
    }
}

/* Add these styles in the existing style block, before the closing style tag */

/* Sidebar overlay styles */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

@media screen and (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.visible:not(.sidebar-collapsed) {
        transform: translateX(0);
    }

    .sidebar.sidebar-collapsed {
        transform: translateX(-100%) !important;
    }

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

    .menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar.visible:not(.sidebar-collapsed)~.menu-toggle {
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@media screen and (max-width: 992px) {
    .action-menu {
        position: static !important;
    }

    .action-dropdown {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 300px !important;
        background: white !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        border-radius: 8px !important;
        z-index: 9999 !important;
    }

    .action-button {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 50% !important;
    }

    .action-dropdown a {
        padding: 16px !important;
        font-size: 16px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
}

/* Student Details Section Styles */
.student-profile {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-top: 20px;
    overflow: hidden;
}

.student-profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    position: relative;
    text-align: center;
}

.student-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.student-email {
    font-size: 1rem;
    opacity: 0.9;
}

.student-info {
    padding: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: var(--gray-50);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.info-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-value {
    color: var(--gray-900);
    font-weight: 500;
    font-size: 1.1rem;
}

.attendance-summary {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-top: 20px;
    padding: 20px;
}

.attendance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.attendance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--gray-50);
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.attendance-chart {
    height: 300px;
    margin-top: 20px;
}

@media screen and (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .attendance-stats {
        grid-template-columns: 1fr;
    }

    .student-profile-header {
        padding: 20px;
    }

    .student-avatar {
        width: 100px;
        height: 100px;
    }

    .student-name {
        font-size: 1.5rem;
    }
}

/* Add these new styles */
.search-container {
    position: relative;
    flex: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.2s ease;
}

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

.suggestion-item:hover {
    background-color: var(--gray-100);
}

.suggestion-item .highlight {
    color: var(--primary-color);
    font-weight: 500;
}

.suggestion-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.suggestion-name {
    font-weight: 500;
}

.suggestion-roll {
    color: var(--gray-600);
    font-size: 0.85rem;
}

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #0ea5e9;
    --accent-color: #f97316;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 12px;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 24px 36px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 20%);
    z-index: 1;
    transform: rotate(-3deg);
    opacity: 0.8;
}

.header h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card {
    background-color: white;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    width: 100%;
}

.card-body {
    padding: 36px;
    max-width: 1600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 28px;
    max-width: 600px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="number"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--gray-50);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

button {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

button:active {
    transform: translateY(-1px);
}

button.export-btn {
    background: linear-gradient(to right, var(--success-color), #059669);
}

button.export-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

button.delete-btn {
    background: linear-gradient(to right, var(--danger-color), #b91c1c);
}

button.delete-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
}

.attendance-list {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.attendance-list th,
.attendance-list td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.attendance-list th {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.attendance-list tr {
    transition: var(--transition);
}

.attendance-list tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.005);
}

.attendance-list tr:last-child td {
    border-bottom: none;
}

.logout-btn {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
    position: relative;
    z-index: 2;
}

.logout-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.2), 0 4px 6px -2px rgba(249, 115, 22, 0.1);
}

.status-indicator {
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left: 4px solid var(--primary-light);
}

.hidden {
    display: none;
}

.tab-container {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 36px;
    overflow-x: auto;
    scrollbar-width: thin;
    position: relative;
    gap: 4px;
    padding-bottom: 2px;
}

.tab-container::-webkit-scrollbar {
    height: 5px;
}

.tab-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.tab-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.tab {
    padding: 16px 28px;
    cursor: pointer;
    border: none;
    margin-right: 8px;
    white-space: nowrap;
    font-weight: 500;
    transition: var(--transition);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.tab.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    z-index: 2;
}

.tab i {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
    background-color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 2px;
    position: relative;
    z-index: 10;
}

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

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

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

#map {
    display: none;
    /* Hide map element but keep it for compatibility */
}

.status-badge {
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.badge-present {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-present::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.badge-absent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-absent::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
}

.badge-late {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-late::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f59e0b;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 6px 6px 0 0;
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(to right, var(--success-color), #059669);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(to right, var(--secondary-color), #0284c7);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
}

.stat-card h3 {
    margin-top: 0;
    color: var(--gray-700);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card i {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.stat-card:hover i {
    transform: scale(1.1);
    background-color: rgba(59, 130, 246, 0.15);
}

.stat-card:nth-child(2) i {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-card:nth-child(3) i {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
}

.stat-card:nth-child(4) i {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--accent-color);
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 700;
    margin: 5px 0 15px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
    line-height: 1;
}

.stat-card:nth-child(2) .number {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.stat-card:nth-child(3) .number {
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.stat-card:nth-child(4) .number {
    background: linear-gradient(135deg, var(--accent-color), #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(249, 115, 22, 0.2);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.05), transparent 70%);
    z-index: 0;
    border-top-left-radius: 100%;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-200);
}

.filter-bar select,
.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-bar .button-group {
    display: flex;
    gap: 10px;
}

.scheduled-badge {
    background-color: #8B5CF6;
    color: white;
}

.scheduled-time {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.attendance-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.small-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

#attendance-list-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: white;
}

/* Login form styling */
#login-section {
    max-width: 500px;
    margin: 100px auto;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background-color: white;
}

#login-section .card-body {
    padding: 40px;
}

#login-section .header {
    text-align: center;
    display: block;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

#login-section button {
    width: 100%;
    margin-top: 15px;
    padding: 16px;
}

#login-section input {
    border-radius: var(--border-radius);
    padding: 16px;
    background-color: var(--gray-50);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* Attendance map in popup */
#attendance-map {
    display: none;
    /* Hide attendance map */
}

/* Responsive styling */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .header h2 {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .attendance-list th,
    .attendance-list td {
        padding: 12px 10px;
        font-size: 14px;
    }

    #login-section {
        margin: 50px 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* Add these styles to improve sidebar appearance */
.sidebar {
    width: 280px;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-menu-item {
    padding: 15px 24px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--accent-color);
    font-weight: 500;
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 16px;
    font-size: 1.1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-menu-item:hover i {
    transform: scale(1.1);
}

.sidebar-menu-item[data-section="logout"] {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.sidebar-menu-item[data-section="logout"]:hover {
    background: rgba(249, 115, 22, 0.15);
}

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

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

    .sidebar-header {
        padding: 20px;
    }

    .sidebar-header h2 {
        font-size: 1.5rem;
    }

    .sidebar-menu-item {
        padding: 16px 20px;
        min-height: 56px;
    }

    .sidebar-menu-item i {
        font-size: 1.2rem;
        margin-right: 20px;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* Menu toggle button */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.menu-toggle i {
    font-size: 1.2rem;
}

/* Hide menu toggle on desktop */
@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

/* Improve scrollbar appearance */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Active section indicator */
.sidebar-menu-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px 0 0 2px;
    box-shadow: -2px 0 6px var(--accent-color);
}

/* Hover effect */
.sidebar-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar-menu-item:hover::before {
    transform: translateX(0);
}

.action-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 6px;
    display: none;
    overflow: visible;
    border: 1px solid var(--gray-200);
    transform: translateY(0);
    /* Prevent fluctuation */
}

.action-dropdown.show {
    display: block;
    /* Show when active */
}

.action-dropdown a {
    color: var(--gray-700);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.action-dropdown a i {
    width: 16px;
    text-align: center;
}

.action-dropdown a:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* Add delete-action class styling */
.delete-action {
    color: var(--danger-color) !important;
}

.delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    color: white;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.loader-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 3s infinite ease-in-out;
}

.loader-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
}

.loader-spinner::before {
    border-top-color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    animation: spin 1.2s linear infinite;
}

.loader-spinner::after {
    border-left-color: white;
    border-right-color: rgba(255, 255, 255, 0.3);
    animation: spin 0.8s linear infinite reverse;
}

.loader-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, white, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.loader-text p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 25px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.loader-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    position: absolute;
    border-radius: 10px;
    animation: progress 1.5s ease-in-out infinite;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

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

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.4;
    }
}

@keyframes progress {
    0% {
        width: 0%;
        left: 0;
    }

    50% {
        width: 30%;
        left: 35%;
    }

    100% {
        width: 0%;
        left: 100%;
    }
}

.admin-name {
    color: #ea580c;
}

/* Location block styling for attendance records */
.location-blocks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    /* Ensure proper stacking context */
}

/* Ensure location block has proper padding for the action button */
.location-block {
    position: relative;
    padding: 15px;
    padding-right: 40px;
    /* Add padding to make room for the action button */
    overflow: visible;
    /* Allow content to overflow for the dropdown menu */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 10px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    cursor: pointer;
}

.location-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.location-block .location-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.location-block .student-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-block .student-count i {
    font-size: 0.9rem;
}

.location-block::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    z-index: 1;
    /* Ensure it's behind the menu */
}

.back-button {
    background-color: #f3f4f6;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #e5e7eb;
}

.back-button i {
    font-size: 0.9rem;
}

.device-info {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 5px;
}

.device-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.device-mobile {
    background-color: #f97316;
    color: white;
}

.device-desktop {
    background-color: #3b82f6;
    color: white;
}

@media (max-width: 768px) {
    .location-block {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .location-block {
        width: 100%;
    }
}

/* Device compatibility indicator */
.compatibility-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8rem;
}

.compatibility-indicator span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.compatibility-indicator i {
    font-size: 0.9rem;
}

/* Add styles for location block ellipsis menu */
.location-block {
    position: relative;
}

.location-block-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200;
}

.location-block-menu .action-button {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    /* Ensure proper stacking */
    z-index: 10;
    /* Higher than the decoration */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.location-block-menu .action-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.location-block-menu .action-dropdown {
    background-color: white;
    right: 0;
    top: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    z-index: 2000;
    /* Higher z-index */
    position: absolute;
    /* Ensure it's not affected by overflow */
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Round corners for inner elements */
    display: none;
    /* Hide by default */
}

.location-block-menu .action-dropdown.show {
    display: block;
    /* Show when active */
}

.location-block-menu .action-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
}

.location-block-menu .action-dropdown a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.export-link {
    color: var(--secondary-color) !important;
}

.export-link:hover {
    background-color: rgba(14, 165, 233, 0.1) !important;
}

.block-delete-action {
    color: var(--danger-color) !important;
}

.block-delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Prevent event bubbling from menu to block */
.location-block-menu .action-button,
.location-block-menu .action-dropdown a {
    cursor: pointer;
}

/* Style updates for action menu in attendance tables */
.attendance-list td {
    padding: 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list td .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

.attendance-list .action-button {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    /* Ensure proper stacking */
    z-index: 5;
    /* Higher than the decoration */
}

.attendance-list .action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.attendance-list .action-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    /* Add slight offset to prevent flickering */
    z-index: 2000;
    /* Higher z-index to appear above tabs */
    transform: translateY(0);
    /* Prevent fluctuation */
}

.attendance-list .action-dropdown.show {
    display: block;
}

/* Restore action button hover styles */
.action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* For user management section specifically */
#users-tab .action-dropdown {
    z-index: 2000;
    /* Even higher z-index for tabs section */
    right: 0;
    top: calc(100% + 5px);
    /* Slight offset to prevent flickering */
    position: absolute;
}

/* For attendance section specifically */
#attendance-tab .action-dropdown {
    z-index: 2000;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
}

/* Make sure table action dropdowns are stable */
.attendance-list td {
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

/* Prevent action button dropdowns from affecting cursor positioning */
.action-menu,
.action-button,
.action-dropdown {
    pointer-events: auto;
    /* Ensures clicks are captured */
}

/* The parent containers should let events pass through to the action elements */
.attendance-list td,
.tabs-wrapper,
.tab-content {
    pointer-events: auto;
}

/* Sidebar Styles */
.main-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    visibility: hidden;
    /* Hide sidebar by default */
}

.sidebar.visible {
    visibility: visible;
    /* Show sidebar when this class is added */
}

.sidebar-collapsed {
    transform: translateX(-280px);
}

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

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-left: 110px;
}

/* Style for the menu toggle inside the sidebar header */
.sidebar-header .menu-toggle {
    position: static;
    visibility: visible;
    width: 32px;
    height: 32px;
    background-color: transparent;
    box-shadow: none;
    color: white;
}

.sidebar-header .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu-item i {
    margin-right: 14px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.device-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 500;
}

.menu-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 101;
    background-color: var(--primary-color);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    visibility: visible;
    /* Hide menu toggle by default */
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-toggle i {
    font-size: 1.2rem;
}

.menu-toggle:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Show the main menu toggle on mobile only */
@media (max-width: 992px) {
    #menu-toggle {
        visibility: hidden;
        opacity: 0;
    }

    /* Show menu toggle only when sidebar is collapsed */
    .sidebar.sidebar-collapsed~#menu-toggle {
        visibility: visible;
        opacity: 1;
    }

    /* Hide header menu toggle on mobile */
    .sidebar-header .menu-toggle {
        display: block;
    }
}

.content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin 0.3s ease, width 0.3s ease;
    width: calc(100% - 280px);
}

.content-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is hidden (login page), content takes full width */
.sidebar:not(.visible)~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is visible but collapsed */
.sidebar.visible.sidebar-collapsed~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* Device List Styles */
.device-list {
    margin-top: 15px;
}

.device-item {
    padding: 10px 15px 10px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-item-left {
    display: flex;
    flex-direction: column;
}

.device-name {
    font-weight: 500;
}

.device-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.admin-list-item {
    padding: 12px 15px 12px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-item-controls {
    display: flex;
    gap: 10px;
}

.admin-item-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.admin-item-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.admin-item-btn.delete {
    background: rgb(201, 17, 17);
}

.admin-item-btn.delete:hover {
    background: rgba(198, 24, 24, 0.649);
}

/* Adjust existing container styles */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

#admin-panel .header {
    padding-left: 80px;
    /* Make room for the menu toggle button */
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .content-wrapper {
        margin-left: 0;
        width: 100% !important;
        /* Force full width on mobile regardless of other styles */
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Ensure login section is properly centered on mobile */
    #login-section {
        margin: 50px auto;
        max-width: 90%;
    }
}

.menu-toggle.visible {
    visibility: visible;
    /* Show menu toggle when this class is added */
}

/* Section header menu button */
.section-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    margin-right: 10px;
}

.section-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
}

/* Hide section menu button on larger screens */
@media (min-width: 993px) {
    .section-menu-btn {
        display: none;
    }
}

/* Adjust stat cards height and responsive behavior */
.stat-card {
    padding: 15px 20px;
    /* Reduce padding to make cards less tall */
    max-height: 180px;
    /* Limit maximum height */
}

.stat-card .number {
    font-size: 2.5rem;
    /* Slightly smaller number size */
    margin: 0 0 10px;
    /* Less margin */
}

.stat-card i {
    margin-bottom: 8px;
    /* Less margin below icon */
}

.stat-card h3 {
    margin-bottom: 8px;
    /* Less margin below heading */
    font-size: 1rem;
    /* Slightly smaller heading */
}

/* Ensure responsive width adjustment */
.dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    /* Allow narrower cards */
    gap: 20px;
    /* Slightly less gap between cards */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

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

/* Notifications Styles */
.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notifications-list-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notification-item {
    padding: 16px;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #4a6cf7;
}

.notification-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.notification-header {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.notification-preview {
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.notification-actions button {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.notification-actions .view-btn:hover {
    color: #4a6cf7;
}

.notification-actions .delete-btn:hover {
    color: #f74a4a;
}

.notification-compose {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.text-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
}

.text-editor-toolbar button,
.text-editor-toolbar select {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: var(--primary-color);
}

.text-editor-toolbar button:hover,
.text-editor-toolbar select:hover {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Notification Detail Modal */
.notification-detail {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.notification-recipients {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 15px;
}

/* Students List in Selection Modal */
.students-selection-modal .modal-content {
    max-width: 600px;
}

.students-selection-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

/* Additional notification styles */
.text-editor {
    min-height: 200px;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 4px 4px;
    padding: 12px;
    font-family: inherit;
    background-color: white;
    overflow-y: auto;
}

.text-editor:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Recipients selection styling */
.recipients-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* Students selection */
#students-selection {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background-color: var(--gray-100);
}

.students-search {
    margin-bottom: 12px;
}

.students-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 8px;
    background-color: white;
}

.student-item {
    padding: 8px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal styles for notification details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.notification-detail {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--gray-100);
}

.notification-recipients {
    margin-top: 8px;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Profile Requests Styles */
.request-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.request-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.request-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--gray-800);
}

.user-email {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.request-time {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.request-body {
    padding: 15px;
}

.changes-list {
    display: grid;
    gap: 10px;
}

.change-item {
    padding: 10px;
    background-color: var(--gray-50);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.field-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.change-values {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.old-value {
    color: var(--gray-600);
    text-decoration: line-through;
}

.new-value {
    color: var(--primary-color);
    font-weight: 500;
}

.request-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.approve-btn,
.reject-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.approve-btn:hover {
    background-color: #0da26f;
}

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

.reject-btn:hover {
    background-color: #dc2626;
}

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--gray-500);
}

.error-message {
    padding: 15px;
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 6px;
    margin: 20px 0;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 24px 36px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 20%);
    z-index: 1;
    transform: rotate(-3deg);
    opacity: 0.8;
}

.header h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card {
    background-color: white;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    width: 100%;
}

.card-body {
    padding: 36px;
    max-width: 1600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 28px;
    max-width: 600px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--gray-50);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

button {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

button:active {
    transform: translateY(-1px);
}

button.export-btn {
    background: linear-gradient(to right, var(--success-color), #059669);
}

button.export-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

button.delete-btn {
    background: linear-gradient(to right, var(--danger-color), #b91c1c);
}

button.delete-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
}

.attendance-list {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.attendance-list th,
.attendance-list td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.attendance-list th {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.attendance-list tr {
    transition: var(--transition);
}

.attendance-list tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.005);
}

.attendance-list tr:last-child td {
    border-bottom: none;
}

.logout-btn {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
    position: relative;
    z-index: 2;
}

.logout-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.2), 0 4px 6px -2px rgba(249, 115, 22, 0.1);
}

.status-indicator {
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left: 4px solid var(--primary-light);
}

.hidden {
    display: none;
}

.tab-container {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 36px;
    overflow-x: auto;
    scrollbar-width: thin;
    position: relative;
    gap: 4px;
    padding-bottom: 2px;
}

.tab-container::-webkit-scrollbar {
    height: 5px;
}

.tab-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.tab-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.tab {
    padding: 16px 28px;
    cursor: pointer;
    border: none;
    margin-right: 8px;
    white-space: nowrap;
    font-weight: 500;
    transition: var(--transition);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.tab.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    z-index: 2;
}

.tab i {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
    background-color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 2px;
    position: relative;
    z-index: 10;
}

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

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

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

#map {
    display: none;
    /* Hide map element but keep it for compatibility */
}

.status-badge {
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.badge-present {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-present::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.badge-absent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-absent::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
}

.badge-late {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-late::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f59e0b;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 6px 6px 0 0;
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(to right, var(--success-color), #059669);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(to right, var(--secondary-color), #0284c7);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(to right, var(--accent-color), #ea580c);
}

.stat-card h3 {
    margin-top: 0;
    color: var(--gray-700);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card i {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.stat-card:hover i {
    transform: scale(1.1);
    background-color: rgba(59, 130, 246, 0.15);
}

.stat-card:nth-child(2) i {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-card:nth-child(3) i {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
}

.stat-card:nth-child(4) i {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--accent-color);
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 700;
    margin: 5px 0 15px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
    line-height: 1;
}

.stat-card:nth-child(2) .number {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.stat-card:nth-child(3) .number {
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.stat-card:nth-child(4) .number {
    background: linear-gradient(135deg, var(--accent-color), #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(249, 115, 22, 0.2);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.05), transparent 70%);
    z-index: 0;
    border-top-left-radius: 100%;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-200);
}

.filter-bar select,
.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-bar .button-group {
    display: flex;
    gap: 10px;
}

.scheduled-badge {
    background-color: #8B5CF6;
    color: white;
}

.scheduled-time {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.attendance-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.small-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

#attendance-list-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: white;
}

/* Login form styling */
#login-section {
    max-width: 500px;
    margin: 100px auto;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background-color: white;
}

#login-section .card-body {
    padding: 40px;
}

#login-section .header {
    text-align: center;
    display: block;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

#login-section button {
    width: 100%;
    margin-top: 15px;
    padding: 16px;
}

#login-section input {
    border-radius: var(--border-radius);
    padding: 16px;
    background-color: var(--gray-50);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

/* Attendance map in popup */
#attendance-map {
    display: none;
    /* Hide attendance map */
}

/* Responsive styling */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .header h2 {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .attendance-list th,
    .attendance-list td {
        padding: 12px 10px;
        font-size: 14px;
    }

    #login-section {
        margin: 50px 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* Add these styles to improve sidebar appearance */
.sidebar {
    width: 280px;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-menu-item {
    padding: 15px 24px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--accent-color);
    font-weight: 500;
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 16px;
    font-size: 1.1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-menu-item:hover i {
    transform: scale(1.1);
}

.sidebar-menu-item[data-section="logout"] {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.sidebar-menu-item[data-section="logout"]:hover {
    background: rgba(249, 115, 22, 0.15);
}

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

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

    .sidebar-header {
        padding: 20px;
    }

    .sidebar-header h2 {
        font-size: 1.5rem;
    }

    .sidebar-menu-item {
        padding: 16px 20px;
        min-height: 56px;
    }

    .sidebar-menu-item i {
        font-size: 1.2rem;
        margin-right: 20px;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* Menu toggle button */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.menu-toggle i {
    font-size: 1.2rem;
}

/* Hide menu toggle on desktop */
@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

/* Improve scrollbar appearance */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Active section indicator */
.sidebar-menu-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px 0 0 2px;
    box-shadow: -2px 0 6px var(--accent-color);
}

/* Hover effect */
.sidebar-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar-menu-item:hover::before {
    transform: translateX(0);
}

.action-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 6px;
    display: none;
    overflow: visible;
    border: 1px solid var(--gray-200);
    transform: translateY(0);
    /* Prevent fluctuation */
}

.action-dropdown.show {
    display: block;
    /* Show when active */
}

.action-dropdown a {
    color: var(--gray-700);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.action-dropdown a i {
    width: 16px;
    text-align: center;
}

.action-dropdown a:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* Add delete-action class styling */
.delete-action {
    color: var(--danger-color) !important;
}

.delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    color: white;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.loader-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 3s infinite ease-in-out;
}

.loader-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
}

.loader-spinner::before {
    border-top-color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    animation: spin 1.2s linear infinite;
}

.loader-spinner::after {
    border-left-color: white;
    border-right-color: rgba(255, 255, 255, 0.3);
    animation: spin 0.8s linear infinite reverse;
}

.loader-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, white, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.loader-text p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 25px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.loader-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    position: absolute;
    border-radius: 10px;
    animation: progress 1.5s ease-in-out infinite;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

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

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.4;
    }
}

@keyframes progress {
    0% {
        width: 0%;
        left: 0;
    }

    50% {
        width: 30%;
        left: 35%;
    }

    100% {
        width: 0%;
        left: 100%;
    }
}

.admin-name {
    color: #ea580c;
}

/* Location block styling for attendance records */
.location-blocks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    /* Ensure proper stacking context */
}

/* Ensure location block has proper padding for the action button */
.location-block {
    position: relative;
    padding: 15px;
    padding-right: 40px;
    /* Add padding to make room for the action button */
    overflow: visible;
    /* Allow content to overflow for the dropdown menu */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 10px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    cursor: pointer;
}

.location-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.location-block .location-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.location-block .student-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-block .student-count i {
    font-size: 0.9rem;
}

.location-block::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    z-index: 1;
    /* Ensure it's behind the menu */
}

.back-button {
    background-color: #f3f4f6;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #e5e7eb;
}

.back-button i {
    font-size: 0.9rem;
}

.device-info {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 5px;
}

.device-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.device-mobile {
    background-color: #f97316;
    color: white;
}

.device-desktop {
    background-color: #3b82f6;
    color: white;
}

@media (max-width: 768px) {
    .location-block {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .location-block {
        width: 100%;
    }
}

/* Device compatibility indicator */
.compatibility-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8rem;
}

.compatibility-indicator span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.compatibility-indicator i {
    font-size: 0.9rem;
}

/* Add styles for location block ellipsis menu */
.location-block {
    position: relative;
}

.location-block-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200;
}

.location-block-menu .action-button {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    /* Ensure proper stacking */
    z-index: 10;
    /* Higher than the decoration */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.location-block-menu .action-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.location-block-menu .action-dropdown {
    background-color: white;
    right: 0;
    top: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    z-index: 2000;
    /* Higher z-index */
    position: absolute;
    /* Ensure it's not affected by overflow */
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Round corners for inner elements */
    display: none;
    /* Hide by default */
}

.location-block-menu .action-dropdown.show {
    display: block;
    /* Show when active */
}

.location-block-menu .action-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
}

.location-block-menu .action-dropdown a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.export-link {
    color: var(--secondary-color) !important;
}

.export-link:hover {
    background-color: rgba(14, 165, 233, 0.1) !important;
}

.block-delete-action {
    color: var(--danger-color) !important;
}

.block-delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Prevent event bubbling from menu to block */
.location-block-menu .action-button,
.location-block-menu .action-dropdown a {
    cursor: pointer;
}

/* Style updates for action menu in attendance tables */
.attendance-list td {
    padding: 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list td .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

.attendance-list .action-button {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    /* Ensure proper stacking */
    z-index: 5;
    /* Higher than the decoration */
}

.attendance-list .action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.attendance-list .action-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    /* Add slight offset to prevent flickering */
    z-index: 2000;
    /* Higher z-index to appear above tabs */
    transform: translateY(0);
    /* Prevent fluctuation */
}

.attendance-list .action-dropdown.show {
    display: block;
}

/* Restore action button hover styles */
.action-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

/* For user management section specifically */
#users-tab .action-dropdown {
    z-index: 2000;
    /* Even higher z-index for tabs section */
    right: 0;
    top: calc(100% + 5px);
    /* Slight offset to prevent flickering */
    position: absolute;
}

/* For attendance section specifically */
#attendance-tab .action-dropdown {
    z-index: 2000;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
}

/* Make sure table action dropdowns are stable */
.attendance-list td {
    position: relative;
    /* Ensure proper positioning context */
}

.attendance-list .action-menu {
    position: relative;
    display: inline-block;
    z-index: 100;
    overflow: visible;
}

/* Prevent action button dropdowns from affecting cursor positioning */
.action-menu,
.action-button,
.action-dropdown {
    pointer-events: auto;
    /* Ensures clicks are captured */
}

/* The parent containers should let events pass through to the action elements */
.attendance-list td,
.tabs-wrapper,
.tab-content {
    pointer-events: auto;
}

/* Sidebar Styles */
.main-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    visibility: hidden;
    /* Hide sidebar by default */
}

.sidebar.visible {
    visibility: visible;
    /* Show sidebar when this class is added */
}

.sidebar-collapsed {
    transform: translateX(-280px);
}

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

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-left: 110px;
}

/* Style for the menu toggle inside the sidebar header */
.sidebar-header .menu-toggle {
    position: static;
    visibility: visible;
    width: 32px;
    height: 32px;
    background-color: transparent;
    box-shadow: none;
    color: white;
}

.sidebar-header .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu-item i {
    margin-right: 14px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.device-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 500;
}

.menu-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 101;
    background-color: var(--primary-color);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    visibility: visible;
    /* Hide menu toggle by default */
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-toggle i {
    font-size: 1.2rem;
}

.menu-toggle:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Show the main menu toggle on mobile only */
@media (max-width: 992px) {
    #menu-toggle {
        visibility: hidden;
        opacity: 0;
    }

    /* Show menu toggle only when sidebar is collapsed */
    .sidebar.sidebar-collapsed~#menu-toggle {
        visibility: visible;
        opacity: 1;
    }

    /* Hide header menu toggle on mobile */
    .sidebar-header .menu-toggle {
        display: block;
    }
}

.content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin 0.3s ease, width 0.3s ease;
    width: calc(100% - 280px);
}

.content-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is hidden (login page), content takes full width */
.sidebar:not(.visible)~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is visible but collapsed */
.sidebar.visible.sidebar-collapsed~.content-wrapper {
    margin-left: 0;
    width: 100%;
}

/* Device List Styles */
.device-list {
    margin-top: 15px;
}

.device-item {
    padding: 10px 15px 10px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-item-left {
    display: flex;
    flex-direction: column;
}

.device-name {
    font-weight: 500;
}

.device-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.admin-list-item {
    padding: 12px 15px 12px 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-item-controls {
    display: flex;
    gap: 10px;
}

.admin-item-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.admin-item-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.admin-item-btn.delete {
    background: rgb(201, 17, 17);
}

.admin-item-btn.delete:hover {
    background: rgba(198, 24, 24, 0.649);
}

/* Adjust existing container styles */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

#admin-panel .header {
    padding-left: 80px;
    /* Make room for the menu toggle button */
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .content-wrapper {
        margin-left: 0;
        width: 100% !important;
        /* Force full width on mobile regardless of other styles */
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Ensure login section is properly centered on mobile */
    #login-section {
        margin: 50px auto;
        max-width: 90%;
    }
}

.menu-toggle.visible {
    visibility: visible;
    /* Show menu toggle when this class is added */
}

/* Section header menu button */
.section-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    margin-right: 10px;
}

.section-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
}

/* Hide section menu button on larger screens */
@media (min-width: 993px) {
    .section-menu-btn {
        display: none;
    }
}

/* Adjust stat cards height and responsive behavior */
.stat-card {
    padding: 15px 20px;
    /* Reduce padding to make cards less tall */
    max-height: 180px;
    /* Limit maximum height */
}

.stat-card .number {
    font-size: 2.5rem;
    /* Slightly smaller number size */
    margin: 0 0 10px;
    /* Less margin */
}

.stat-card i {
    margin-bottom: 8px;
    /* Less margin below icon */
}

.stat-card h3 {
    margin-bottom: 8px;
    /* Less margin below heading */
    font-size: 1rem;
    /* Slightly smaller heading */
}

/* Ensure responsive width adjustment */
.dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    /* Allow narrower cards */
    gap: 20px;
    /* Slightly less gap between cards */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

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

/* Notifications Styles */
.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notifications-list-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notification-item {
    padding: 16px;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #4a6cf7;
}

.notification-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.notification-header {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.notification-preview {
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.notification-actions button {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.notification-actions .view-btn:hover {
    color: #4a6cf7;
}

.notification-actions .delete-btn:hover {
    color: #f74a4a;
}

.notification-compose {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.text-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
}

.text-editor-toolbar button,
.text-editor-toolbar select {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: var(--primary-color);
}

.text-editor-toolbar button:hover,
.text-editor-toolbar select:hover {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Notification Detail Modal */
.notification-detail {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.notification-recipients {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 15px;
}

/* Students List in Selection Modal */
.students-selection-modal .modal-content {
    max-width: 600px;
}

.students-selection-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

/* Additional notification styles */
.text-editor {
    min-height: 200px;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 4px 4px;
    padding: 12px;
    font-family: inherit;
    background-color: white;
    overflow-y: auto;
}

.text-editor:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Recipients selection styling */
.recipients-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* Students selection */
#students-selection {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background-color: var(--gray-100);
}

.students-search {
    margin-bottom: 12px;
}

.students-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 8px;
    background-color: white;
}

.student-item {
    padding: 8px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal styles for notification details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.notification-detail {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--gray-100);
}

.notification-recipients {
    margin-top: 8px;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Profile Requests Styles */
.request-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.request-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.request-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--gray-800);
}

.user-email {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.request-time {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.request-body {
    padding: 15px;
}

.changes-list {
    display: grid;
    gap: 10px;
}

.change-item {
    padding: 10px;
    background-color: var(--gray-50);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.field-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.change-values {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.old-value {
    color: var(--gray-600);
    text-decoration: line-through;
}

.new-value {
    color: var(--primary-color);
    font-weight: 500;
}

.request-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.approve-btn,
.reject-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.approve-btn:hover {
    background-color: #0da26f;
}

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

.reject-btn:hover {
    background-color: #dc2626;
}

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: var(--gray-500);
}

.error-message {
    padding: 15px;
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 6px;
    margin: 20px 0;
}

/* Password Reset Requests Styles */
.reset-requests-container {
    margin-top: 20px;
}

.requests-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.request-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.request-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.request-card.pending {
    border-left: 4px solid var(--warning-color);
}

.request-card.sent {
    border-left: 4px solid var(--success-color);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.user-details h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.request-time {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.sent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

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

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.send-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.sent-indicator {
    color: var(--success-color);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-requests {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.no-requests i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-requests p {
    font-size: 16px;
    margin: 0;
}

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

    .request-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .request-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Fix delete button text color */
.delete-btn:hover {
    color: white !important;
}







/* Live Attendees Button */
.live-attendees-btn {
    background: linear-gradient(to right, var(--success-color), #059669) !important;
    color: white !important;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.live-attendees-btn:hover {
    background: linear-gradient(to right, #059669, #047857) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Live Attendees Popup */
.live-attendees-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.live-attendees-popup.show {
    opacity: 1;
    visibility: visible;
}

.live-attendees-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.live-attendees-popup.show .live-attendees-content {
    transform: translateY(0);
}

.live-attendees-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-attendees-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.2);
}

.live-attendees-body {
    display: flex;
    height: 500px;
}

.qr-section {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
}

.qr-section h4 {
    margin: 0 0 20px 0;
    color: var(--gray-700);
    font-size: 1.1rem;
    text-align: center;
}

.qr-code-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.qr-info {
    text-align: center;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 10px;
}

.attendance-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.attendance-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--gray-50);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
}

.attendees-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.attendees-list-header {
    background: var(--gray-100);
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendee-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.attendee-item:hover {
    background: var(--gray-50);
}

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

.attendee-info {
    display: flex;
    flex-direction: column;
}

.attendee-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.attendee-time {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.attendee-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-recent {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.no-attendees {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-500);
}

.no-attendees i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .live-attendees-content {
        width: 95%;
        max-height: 90vh;
    }

    .live-attendees-body {
        flex-direction: column;
        height: auto;
    }

    .qr-section {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 20px;
    }

    .attendance-section {
        max-height: 300px;
    }

    .attendance-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ====================================
   COMPACT MINI DASHBOARD STATS
   Modern, sleek stats strip design
   ==================================== */

.dashboard-stats-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.dashboard-stats-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            var(--success-color) 33%,
            var(--secondary-color) 66%,
            var(--accent-color) 100%);
}

.mini-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    position: relative;
    overflow: hidden;
}

.mini-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.4) 100%);
    pointer-events: none;
}

.mini-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.mini-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.mini-stat-icon.students {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.mini-stat-icon.present {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.mini-stat-icon.locations {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.08) 100%);
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.mini-stat-icon.rate {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.08) 100%);
    color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15);
}

.mini-stat-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    position: relative;
    z-index: 1;
}

.mini-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--gray-800);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.mini-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hover animations for icons */
.mini-stat-card:hover .mini-stat-icon {
    transform: scale(1.08);
    transition: transform 0.25s ease;
}

.mini-stat-card:hover .mini-stat-icon.students {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
}

.mini-stat-card:hover .mini-stat-icon.present {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
}

.mini-stat-card:hover .mini-stat-icon.locations {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
}

.mini-stat-card:hover .mini-stat-icon.rate {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(249, 115, 22, 0.15) 100%);
}

/* Responsive Mini Stats */
@media (max-width: 768px) {
    .dashboard-stats-mini {
        gap: 8px;
        padding: 12px;
    }

    .mini-stat-card {
        padding: 10px 12px;
        min-width: 120px;
        flex: 1 1 calc(50% - 4px);
        max-width: none;
    }

    .mini-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .mini-stat-value {
        font-size: 1.1rem;
    }

    .mini-stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 400px) {
    .mini-stat-card {
        flex: 1 1 100%;
    }
}

/* ====================================
   MODERN PILL TAB NAVIGATION
   Premium floating pill-style tabs
   ==================================== */

.modern-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.9) 0%, rgba(226, 232, 240, 0.7) 100%);
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.tab-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.tab-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tab-pill:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(203, 213, 225, 0.5);
}

.tab-pill:hover::before {
    opacity: 1;
}

.tab-pill i {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

.tab-pill:hover i {
    transform: scale(1.1);
}

.tab-pill.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow:
        0 4px 12px rgba(30, 58, 138, 0.25),
        0 2px 4px rgba(30, 58, 138, 0.15);
    font-weight: 600;
}

.tab-pill.active::before {
    opacity: 1;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 100%);
}

.tab-pill.active i {
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive Pill Tabs */
@media (max-width: 768px) {
    .modern-tab-nav {
        gap: 6px;
        padding: 6px;
    }

    .tab-pill {
        padding: 8px 12px;
        font-size: 0.75rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .tab-pill span {
        display: none;
    }

    .tab-pill i {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .tab-pill {
        padding: 10px;
        flex: 1 1 calc(50% - 3px);
    }
}

/* ====================================
   ENHANCED CARD BODY STYLING
   More padding and spacing adjustments
   ==================================== */

.admin-panel .card-body,
#admin-panel .card-body {
    padding: 24px 28px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, white 100%);
}

/* Enhanced Section Titles */
.section-title {
    font-size: 1.2rem !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
}

.section-title::after {
    width: 40px !important;
    height: 3px !important;
}

/* Enhanced Filter Bar */
.filter-bar {
    padding: 16px 20px !important;
    margin-bottom: 20px !important;
    border-radius: 14px !important;
}

/* Compact Table Styling */
.attendance-list th,
.attendance-list td {
    padding: 12px 16px !important;
    font-size: 0.875rem !important;
}

/* Quick Action Buttons Enhancement */
.filter-bar button {
    padding: 10px 16px;
    font-size: 0.8rem;
}

/* ====================================
   MODERN HEADER STYLING
   Premium floating header design
   ==================================== */

.modern-header {
    padding: 16px 24px !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative;
}

.modern-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 100%);
}

.modern-header .header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modern-header .section-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.modern-header .section-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-brand>i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.admin-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

@keyframes statusPulse {

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

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn.compact {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn.compact:hover {
    background: rgba(249, 115, 22, 0.9) !important;
    border-color: transparent !important;
    transform: translateY(-1px);
}

.logout-btn.compact span {
    font-weight: 500;
}

/* Responsive Header */
@media (max-width: 768px) {
    .modern-header {
        padding: 12px 16px !important;
    }

    .header-brand>i {
        display: none;
    }

    .brand-name {
        font-size: 1rem;
    }

    .header-status {
        display: none;
    }

    .logout-btn.compact span {
        display: none;
    }

    .logout-btn.compact {
        padding: 8px 10px !important;
    }
}
