/* Futuristic / Cyberpunk / Glassmorphism Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&display=swap');

:root {
    --bg-color: #0b0e14;
    --sidebar-bg: #0f1219;
    --card-bg: rgba(23, 27, 34, 0.7);
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    --accent: #06b6d4;
    /* Cyan */
    --accent-glow: rgba(6, 182, 212, 0.4);
    --danger: #ef4444;
    --success: #10b981;

    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --font-main: 'Outfit', system-ui, sans-serif;
    --radius: 16px;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.05), transparent 25%);
    color: var(--text-primary);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

/* Sidebar */
/* Sidebar */
/* Styles moved to bottom for global toggle behavior */

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 24px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid transparent;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
}

/* Content */
/* Content */
/* Styles moved to bottom */

h2 {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

/* Cards (Glassmorphism) */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.card h3 {
    margin-top: 0;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 18px;
}

/* Custom Futuristic Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox .checkmark {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.custom-checkbox input:checked+.checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.custom-checkbox .checkmark::after {
    content: '✔';
    color: #fff;
    font-size: 16px;
    display: none;
}

.custom-checkbox input:checked+.checkmark::after {
    display: block;
}

/* More robust ALDI checkbox handling (supports any sibling order) */
.custom-checkbox input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}
.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.custom-checkbox:hover {
    color: #fff;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Forms */
label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

/* Date inputs: white calendar icon (dark theme) */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.9;
}
input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.9;
}

/* Buttons */
button {
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    box-shadow: 0 0 15px var(--accent-glow);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
    filter: brightness(1.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Gap between rows */
}

thead th {
    text-align: left;
    padding: 0 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border: 0;
}

tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}

td {
    padding: 16px;
    font-size: 14px;
    border: 0;
}

td:first-child {
    border-radius: 10px 0 0 10px;
}

td:last-child {
    border-radius: 0 10px 10px 0;
}

/* Utilities */
.muted {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 10px;
}

.alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Special Buttons */
.btn-del-emp {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    box-shadow: none;
}

.btn-del-emp:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.active[data-status="PRESENT"] {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Absent state: strong red styling */
.active[data-status="ABSENT"] {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fecaca !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-btn {
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
}

/* Auth Layout */
.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--glass-shadow);
    text-align: center;
}

/* Logos */
.logo {
    max-width: 150px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-logo {
    max-height: 40px;
    width: auto;
    margin-right: 12px;
}

.sidebar-top {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

/* Sidebar Adjustments */
.sidebar h3 {
    margin: 0;
    font-size: 22px;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logout-btn {
    color: var(--danger);
    margin-top: auto;
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

/* Mobile Toggle - Global */
.mobile-toggle {
    display: block;
    /* Always visible */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    background: rgba(15, 18, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

/* Sidebar - Hidden by default globally */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    border-right: var(--glass-border);
    position: fixed;
    top: 0;
    bottom: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;

    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
    transform: translateX(0);
}

/* Content - Full width globally */
.content {
    margin-left: 0;
    padding: 80px 40px 40px;
    /* Top padding for toggle button */
}

/* Top-right actions (notifications) */
.top-right-actions {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 250;
    display: flex;
    gap: 10px;
    align-items: center;
}

.notif-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    background: rgba(15, 18, 25, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

html[data-theme="light"] .notif-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0,0,0,0.25);
}

.notif-panel {
    position: absolute;
    top: 52px;
    right: 0;
    width: 320px;
    max-width: calc(100vw - 30px);
    background: var(--card-bg);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 14px;
    padding: 12px;
    display: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.notif-panel.open {
    display: block;
}

.notif-item {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
}

html[data-theme="light"] .notif-item {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.03);
}

.notif-item b {
    display: block;
    margin-bottom: 2px;
}

.notif-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Modal (custom popup) */
.eza-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.eza-modal {
    width: 520px;
    max-width: 100%;
    background: var(--card-bg);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.eza-modal h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.eza-modal .modal-body {
    display: grid;
    gap: 12px;
}

.eza-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.btn-secondary {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    box-shadow: none !important;
}

html[data-theme="light"] .btn-secondary {
    border-color: rgba(0,0,0,0.18) !important;
}

.toast {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 12000;
    background: rgba(15, 18, 25, 0.92);
    color: var(--text-primary);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
    padding: 10px 12px;
    max-width: 320px;
}

html[data-theme="light"] .toast {
    background: rgba(255,255,255,0.95);
}

/* Sidebar theme toggle button */
.sidebar-theme-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.sidebar-theme-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

/* Light theme */
html[data-theme="light"] {
    --bg-color: #f1f5f9;
    --sidebar-bg: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-border: 1px solid rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.06), transparent 25%);
}
html[data-theme="light"] .sidebar h3 {
    background: linear-gradient(90deg, #0f172a, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
html[data-theme="light"] input,
html[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    color: #0f172a;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus {
    background: #fff;
}
/* Light theme: date icon dark again (readable on light bg) */
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.7;
}
html[data-theme="light"] .mobile-toggle {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}
html[data-theme="light"] .sidebar a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}
html[data-theme="light"] .logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}
html[data-theme="light"] tbody tr {
    background: rgba(0, 0, 0, 0.02);
}
html[data-theme="light"] tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .custom-checkbox {
    color: var(--text-secondary);
}
html[data-theme="light"] .custom-checkbox:hover {
    color: var(--text-primary);
}
html[data-theme="light"] .custom-checkbox .checkmark {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.95);
}
html[data-theme="light"] .alert {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}
html[data-theme="light"] .sidebar-theme-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--text-secondary) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .sidebar-theme-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
}