:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --bg-glass: rgba(26, 26, 46, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --border: #2d2d44;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* Theme: Ocean Blue */
[data-theme="ocean"] {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --bg-dark: #0c1222;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-glass: rgba(30, 41, 59, 0.8);
    --border: #334155;
}

/* Theme: Neon Purple */
[data-theme="neon"] {
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --primary-light: #c084fc;
    --bg-dark: #13071f;
    --bg-card: #1f1232;
    --bg-card-hover: #2e1a4a;
    --bg-glass: rgba(31, 18, 50, 0.8);
    --border: #3b2260;
}

/* Theme: Turquoise */
[data-theme="turquoise"] {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #2dd4bf;
    --bg-dark: #0a1614;
    --bg-card: #132926;
    --bg-card-hover: #1a3d38;
    --bg-glass: rgba(19, 41, 38, 0.8);
    --border: #1f524c;
}

/* Theme: Amber */
[data-theme="amber"] {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --bg-dark: #1a150a;
    --bg-card: #2c2413;
    --bg-card-hover: #3d321a;
    --bg-glass: rgba(44, 36, 19, 0.8);
    --border: #4d4020;
}

/* Theme: Rose */
[data-theme="rose"] {
    --primary: #f43f5e;
    --primary-dark: #e11d48;
    --primary-light: #fb7185;
    --bg-dark: #1a0a0e;
    --bg-card: #2c1318;
    --bg-card-hover: #3d1a22;
    --bg-glass: rgba(44, 19, 24, 0.8);
    --border: #5c2030;
}

/* Theme: Logo (Green & Blue) */
[data-theme="logo"] {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --info: #3b82f6;
    --bg-dark: #0a1214;
    --bg-card: #122427;
    --bg-card-hover: #1a3438;
    --bg-glass: rgba(18, 36, 39, 0.8);
    --border: #2a4045;
}

/* ==================== LIGHT MODE ==================== */

[data-mode="light"] {
    --bg-dark: #eef0f2;
    --bg-card: #f8f9fa;
    --bg-card-hover: #e9ecef;
    --bg-glass: rgba(248, 249, 250, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5e;
    --text-muted: #7a7a8e;
    --border: #dee2e6;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info-bg: rgba(59, 130, 246, 0.15);
}

/* Light mode theme overrides */
[data-mode="light"][data-theme="ocean"] {
    --bg-dark: #e8f4fc;
    --bg-card: #f5fafd;
    --bg-card-hover: #dbeafe;
    --bg-glass: rgba(245, 250, 253, 0.95);
    --border: #bae6fd;
}

[data-mode="light"][data-theme="neon"] {
    --bg-dark: #f3edfc;
    --bg-card: #f9f7fc;
    --bg-card-hover: #ede5f7;
    --bg-glass: rgba(249, 247, 252, 0.95);
    --border: #e9d5ff;
}

[data-mode="light"][data-theme="turquoise"] {
    --bg-dark: #e6f7f5;
    --bg-card: #f3fbfa;
    --bg-card-hover: #ccfbf1;
    --bg-glass: rgba(243, 251, 250, 0.95);
    --border: #99f6e4;
}

[data-mode="light"][data-theme="amber"] {
    --bg-dark: #fdf6e3;
    --bg-card: #fefbf3;
    --bg-card-hover: #fef3c7;
    --bg-glass: rgba(254, 251, 243, 0.95);
    --border: #fde68a;
}

[data-mode="light"][data-theme="rose"] {
    --bg-dark: #fce8ea;
    --bg-card: #fdf5f6;
    --bg-card-hover: #ffe4e6;
    --bg-glass: rgba(253, 245, 246, 0.95);
    --border: #fecdd3;
}

[data-mode="light"][data-theme="logo"] {
    --bg-dark: #e8f5ec;
    --bg-card: #f3faf5;
    --bg-card-hover: #dcfce7;
    --bg-glass: rgba(243, 250, 245, 0.95);
    --border: #bbf7d0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 20px;
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 20px);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-light);
}

.logo-icon {
    width: 90px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Navigation */
.nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Admin two-row header */
.header-two-row {
    flex-direction: column;
    gap: 10px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.nav-bottom {
    width: 100%;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.nav-left {
    display: flex;
    gap: 6px;
}

.nav-right {
    display: flex;
    gap: 6px;
}

.icon-btn {
    padding: 6px 10px;
    font-size: 1.1rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.nav-btn.admin {
    border-color: var(--warning);
    color: var(--warning);
}

.nav-btn.admin:hover,
.nav-btn.admin.active {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Filter Buttons */
.filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 8px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.filter-btn .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.filter-btn .dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.filter-btn .dot.lunch {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.filter-btn .dot.offline {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.filter-btn .dot.leave {
    background: var(--info);
    box-shadow: 0 0 8px var(--info);
}

/* User List */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--text-muted);
    transition: all 0.25s ease;
}

.user-card.online::before {
    background: var(--success);
}

.user-card.lunch::before {
    background: var(--warning);
}

.user-card.offline::before {
    background: var(--danger);
}

.user-card.leave::before {
    background: var(--info);
}

.user-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
    transform: translateX(4px);
}

.user-card:active {
    transform: scale(0.98);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    flex-shrink: 0;
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.user-avatar.online {
    background: var(--success-bg);
    color: var(--success);
}

.user-avatar.online::after {
    background: var(--success);
}

.user-avatar.lunch {
    background: var(--warning-bg);
    color: var(--warning);
}

.user-avatar.lunch::after {
    background: var(--warning);
}

.user-avatar.offline {
    background: var(--danger-bg);
    color: var(--danger);
}

.user-avatar.offline::after {
    background: var(--danger);
}

.user-avatar.leave {
    background: var(--info-bg);
    color: var(--info);
}

.user-avatar.leave::after {
    background: var(--info);
}

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

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.lunch {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.offline {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-badge.leave {
    background: var(--info-bg);
    color: var(--info);
}

.status-time {
    color: var(--text-muted);
    font-size: 0.65rem;
}

/* Status Page Buttons */
.status-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.status-actions .status-btn:first-child {
    grid-column: span 2;
}

.status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.status-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.status-btn:active {
    transform: translateY(-1px);
}

.status-btn.online {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.status-btn.offline {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.status-btn.lunch {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.status-btn.leave {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
}

.status-btn .icon {
    font-size: 1.4rem;
}

.current-status {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.current-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--info));
}

.current-status-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.current-status-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Form Styles */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

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

.btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

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

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-link a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.form-link a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert::before {
    font-size: 1.1rem;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-error::before {
    content: '⚠️';
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-success::before {
    content: '✅';
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-warning::before {
    content: '⚡';
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-info::before {
    content: 'ℹ️';
}

/* Admin Panel */
.pending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pending-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}

.pending-card:hover {
    background: var(--bg-card-hover);
}

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

.pending-name {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.pending-email {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.action-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.action-btn.approve:hover {
    background: var(--success);
    color: white;
    transform: scale(1.1);
}

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

.action-btn.reject:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

/* Logout Button */
.logout-btn {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

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

/* Hidden */
.hidden {
    display: none !important;
}

/* Pulse animation for online status */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.user-avatar.online::after {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive - Tablet */
@media (min-width: 520px) {
    .container {
        max-width: 600px;
        padding: 20px 32px;
    }

    .page-title {
        font-size: 2rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 12px 10px;
    }

    .user-card {
        padding: 16px 20px;
    }
}

/* Responsive - Small phones */
@media (max-width: 380px) {
    .container {
        padding: 12px 16px;
    }

    .header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo {
        justify-content: center;
    }

    .nav {
        justify-content: center;
    }

    .page-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .page-subtitle {
        text-align: center;
    }

    .filter-tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-tabs .filter-btn:first-child {
        grid-column: span 3;
    }

    .filter-btn {
        padding: 8px 6px;
        font-size: 0.65rem;
    }

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

    .status-actions .status-btn:first-child {
        grid-column: span 1;
    }

    .status-btn {
        padding: 16px;
        font-size: 0.9rem;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .status-badge {
        font-size: 0.6rem;
        padding: 4px 8px;
    }
}

/* Safe area padding for notched devices */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Touch feedback */
@media (hover: none) {

    .user-card:hover,
    .filter-btn:hover,
    .status-btn:hover,
    .nav-btn:hover {
        transform: none;
    }

    .user-card:active {
        background: var(--bg-card-hover);
        transform: scale(0.98);
    }

    .filter-btn:active,
    .status-btn:active,
    .nav-btn:active {
        transform: scale(0.95);
    }
}

/* ==================== NEW PHASE 2 STYLES ==================== */

/* Search and Filter Bar */
.search-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.dept-select {
    min-width: 150px;
    padding: 12px 36px 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.dept-select:hover {
    border-color: var(--primary);
    background-color: var(--bg-card-hover);
}

.dept-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.dept-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

/* Department Badge */
.dept-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* User Status Message */
.user-status-msg {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Avatar with Image */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Notification Button */
.notification-btn {
    position: relative;
}

.notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 300px;
    max-width: calc(100vw - 40px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.view-all-btn {
    color: var(--info);
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 500;
}

.view-all-btn:hover {
    text-decoration: underline;
}

.mark-read-btn {
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-size: 0.75rem;
    cursor: pointer;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item.unread {
    background: rgba(99, 102, 241, 0.1);
}

.notif-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.notif-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.notif-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Toast Notifications */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* PWA Install Banner */
#pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

#pwa-install-banner.show {
    transform: translateY(0);
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.install-banner-icon {
    font-size: 2rem;
}

.install-banner-text {
    display: flex;
    flex-direction: column;
}

.install-banner-text strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.install-banner-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.install-btn-dismiss {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.install-btn-add {
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ==================== THEME SELECTOR ==================== */

.theme-btn {
    padding: 6px 10px;
    font-size: 1.1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.theme-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.theme-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 360px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.theme-modal-overlay.show .theme-modal {
    transform: scale(1);
}

.theme-modal h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: center;
}

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

.theme-option {
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.theme-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 2px var(--primary);
}

.theme-color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-option-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.theme-modal-close {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Mode Toggle */
.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: var(--radius);
}

.mode-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-toggle-label.active {
    color: var(--primary);
}

.mode-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-toggle.light::after {
    left: calc(100% - 22px);
}

.mode-toggle:hover {
    border-color: var(--primary);
}