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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --danger-color: #dc2626;
    --danger-dark: #b91c1c;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --info-color: #0ea5e9;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f1f5f9;
    --tab-inactive: #64748b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #94a3b8;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-light: #cbd5e1;
    --border-color: #334155;
    --hover-bg: #334155;
    --tab-inactive: #94a3b8;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dropdown-menu {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .user-menu-toggle:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .tab.active {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.navbar {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-color);
}

.user-menu-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.user-menu-toggle:active,
.user-menu.active .user-menu-toggle {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(0);
}

.user-avatar {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
}

.user-name {
    color: var(--text-color);
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.user-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 320px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.user-menu.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px 12px 0 0;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar {
    font-size: 2.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.dropdown-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.dropdown-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-section {
    padding: 0.5rem 0;
}

.dropdown-section-title {
    padding: 0.75rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-radius: 6px;
    margin: 0 0.5rem;
}

.dropdown-item:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.dropdown-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    padding-left: calc(1.25rem - 3px);
}

.dropdown-item.active .dropdown-icon {
    transform: scale(1.15);
}

.dropdown-item.active:hover {
    background: rgba(59, 130, 246, 0.2);
}

.dropdown-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown-item-danger {
    color: var(--danger-color);
}

.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

[data-theme="dark"] .dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    padding-bottom: 2rem;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.login-info p {
    margin: 0.25rem 0;
}

.clock-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 2rem;
}

.current-time {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.current-date {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-transform: capitalize;
}

.lunch-timer {
    background: #3b82f6;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.lunch-timer-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lunch-timer-display {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.lunch-alert {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.lunch-timer.blink {
    animation: blink-red 1s ease-in-out infinite;
}

@keyframes blink-red {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.8);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.clock-form {
    margin-top: 1.5rem;
}

.entries-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.entries-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    position: relative;
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary.active {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    font-weight: 600;
}

.btn-secondary.active:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

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

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    margin-right: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.table-responsive {
    overflow-x: auto;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.entries-table th {
    background-color: var(--bg-color);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.entries-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.entries-table tbody tr:hover {
    background-color: var(--bg-color);
}

.entries-table tfoot {
    font-weight: bold;
    background-color: var(--bg-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-active {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

.admin-filters {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-filters h2 {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.report-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.report-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.report-header h3 {
    margin-bottom: 0.5rem;
}

.report-header p {
    color: var(--text-light);
}

.total-hours {
    margin-top: 1rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.report-actions {
    margin-top: 2rem;
    text-align: center;
}

.no-data-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--text-light);
}

.users-summary {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.users-summary h2 {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .current-time {
        font-size: 2rem;
    }

    .current-date {
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .entries-table {
        font-size: 0.875rem;
    }

    .entries-table th,
    .entries-table td {
        padding: 0.5rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .clock-card,
    .entries-section,
    .admin-filters,
    .report-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar h1 {
        font-size: 1.2rem;
    }

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

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .current-time {
        font-size: 1.75rem;
    }
}

.view-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    color: var(--tab-inactive);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tab:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    border-color: var(--primary-color);
}

.tab.active:hover {
    background: var(--primary-light);
}

.hours-summary {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.hours-summary h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.card-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.daily-hours-section,
.weekly-hours-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.daily-hours-section h3,
.weekly-hours-section h3 {
    margin-bottom: 1.5rem;
}

.daily-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.daily-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
}

.daily-card.today {
    border-color: var(--primary-color);
    background: #dbeafe;
}

.day-name {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.day-hours {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .view-tabs {
        flex-direction: row;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .daily-hours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dashboard Statistics */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-icon.info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-color);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--text-color);
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Progress Bar */
.progress-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-label {
    font-weight: 600;
    color: var(--text-color);
}

.progress-value {
    font-weight: bold;
    color: var(--primary-color);
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.progress-time-display {
    margin-top: 1rem;
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.progress-current-time {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.progress-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-detail strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Work Duration Counter */
.work-duration-card {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 2rem;
}

[data-theme="dark"] .work-duration-card {
    background: linear-gradient(135deg, #1e40af, #0c4a6e);
}

.work-duration-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.work-duration-time {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.work-duration-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Table Filters */
.table-filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-color);
}

/* Badge Enhancements */
.badge-admin {
    background-color: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.badge-user {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

[data-theme="dark"] .badge-admin {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

[data-theme="dark"] .badge-user {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Modal Improvements */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Smooth Transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar,
.clock-card,
.entries-section,
.admin-filters,
.report-section,
.hours-summary,
.daily-hours-section,
.weekly-hours-section,
.users-summary,
.login-card {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--card-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* User Cards (Admin) */
.user-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

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

.user-card.card-active {
    border-color: var(--success-color);
    background: rgba(22, 163, 74, 0.05);
}

.user-card.card-lunch {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.user-card.card-lunch-caution {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.user-card.card-lunch-warning {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

.user-card.card-lunch-overtime {
    border-color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
    animation: pulse-danger 2s ease-in-out infinite;
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-online {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.status-lunch {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.status-lunch-caution,
.status-lunch-warning,
.status-lunch-overtime {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Dark Mode Specific Fixes */
[data-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #22c55e;
}

[data-theme="dark"] .alert-error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid #06b6d4;
}

[data-theme="dark"] .lunch-timer {
    background: #1e40af;
}

[data-theme="dark"] .badge-active {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-warning {
    background-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    font-weight: 600;
}

[data-theme="dark"] .badge-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .badge-info {
    background-color: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

[data-theme="dark"] .badge-secondary {
    background-color: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

[data-theme="dark"] .daily-card.today {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .entries-table th {
    background-color: var(--bg-color);
}

[data-theme="dark"] .entries-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

[data-theme="dark"] .entries-table tfoot {
    background-color: var(--bg-color);
}

[data-theme="dark"] .summary-card {
    background: var(--border-color);
}

[data-theme="dark"] .daily-card {
    background: var(--border-color);
}

[data-theme="dark"] .stat-icon.primary {
    background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .stat-icon.success {
    background: rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .stat-icon.warning {
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .stat-icon.info {
    background: rgba(6, 182, 212, 0.2);
}

[data-theme="dark"] .progress-bar-container {
    background: var(--border-color);
}

/* Utility Classes for Colors */
.text-muted {
    color: var(--text-light);
}

.text-danger {
    color: var(--danger-color);
    font-weight: bold;
}

.lunch-time-display {
    display: inline-block;
}

[data-theme="dark"] .lunch-time-display small {
    color: var(--text-light) !important;
}

.hours-total-small {
    font-size: 0.875rem;
}

[data-theme="dark"] .hours-total-small {
    color: var(--text-light) !important;
}

.text-small {
    font-size: 0.75rem;
}

.text-xs {
    font-size: 0.8125rem;
}

.user-badge-you {
    color: var(--text-light);
    font-size: 0.875rem;
}

.user-created-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

.modal-subtitle {
    margin: 5px 0 0 0;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.form-section-title {
    margin: 0 0 10px 0;
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 600;
}

.logout-link-container {
    text-align: center;
    margin-top: 20px;
}

.logout-link {
    color: var(--text-light);
    font-size: 0.875rem;
    text-decoration: none;
}

.logout-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Card Component */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.card h2, .card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: var(--bg-color);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table tbody tr:hover {
    background: var(--bg-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Tabs Component */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.tabs .tab {
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.95rem;
    color: var(--tab-inactive);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.tabs .tab:hover {
    color: var(--text-color);
    background: var(--hover-bg);
    border-color: var(--border-color);
}

.tabs .tab.active {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tabs .tab.active:hover {
    background: var(--primary-light);
}

[data-theme="dark"] .tabs .tab.active {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tab-content {
    display: none;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Data Table Enhancement */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: var(--bg-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Utility Classes for Common Inline Styles */
.inline-form {
    display: inline;
}

.flex-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.flex-end {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.flex-gap {
    display: flex;
    gap: 0.5rem;
}

.form-flex-1 {
    flex: 1;
    min-width: 200px;
}

.form-flex-2 {
    flex: 2;
    min-width: 300px;
}

.mb-card {
    margin-bottom: 1rem;
}

.ml-badge {
    margin-left: 0.5rem;
}

.mt-info {
    margin-top: 1rem;
}

/* Details/Summary Styling */
details summary {
    cursor: pointer;
    color: var(--primary-color);
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details pre {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
    font-size: 0.75rem;
    overflow-x: auto;
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    /* Dropdown menu on mobile */
    .dropdown-menu {
        position: fixed;
        top: auto;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-height: 70vh;
    }

    .user-menu-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 1.25rem;
    }

    .dropdown-arrow {
        font-size: 0.6rem;
    }

    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }

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

    .work-duration-time {
        font-size: 2.5rem;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .table, .data-table {
        font-size: 0.875rem;
    }

    .table th, .data-table th,
    .table td, .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0.4rem;
    }

    .tabs .tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .view-tabs .tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}
