:root {
    --brown-primary: #8B6F47;
    --brown-light: #A68B5B;
    --brown-dark: #6B5435;
    --brown-secondary: #9B7F57;
    --brown-bg: #F5F0E8;
    --brown-cloud: #E8DDD0;
    --brown-text: #4A3A2A;
    --brown-accent: #C9A882;
    --white: #FFFFFF;
    --shadow: rgba(139, 111, 71, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #FFFFFF;
    color: var(--brown-text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header & Navigation */
.navbar {
    background: #87CEEB;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #FFFFFF;
    gap: 1rem;
}

.brand-icon {
    font-size: 2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFFFFF;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-dropdown + .nav-link {
    margin-left: 0;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.nav-dropdown-toggle svg {
    transition: transform 0.3s ease;
}

.nav-dropdown-toggle.dropdown-active svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0;
    margin: 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
}

.nav-dropdown-menu.dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: 0.5rem 0;
    max-height: 500px;
}

.nav-dropdown-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #1E40AF;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-dropdown-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #1E40AF;
    border-left-color: #2563EB;
    padding-left: 1.5rem;
}

.btn-login, .btn-logout {
    background: #FFFFFF;
    color: #2563EB;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-login:hover, .btn-logout:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* PWA Install Button */
.btn-pwa-install {
    background: rgba(0, 255, 255, 0.1);
    color: #00FFFF;
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

.btn-pwa-install:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.btn-pwa-install:active {
    transform: translateY(0);
}

.pwa-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-icon svg {
    width: 100%;
    height: 100%;
}

.pwa-text {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn-pwa-install .pwa-text {
        display: none;
    }
    
    .btn-pwa-install {
        padding: 0.75rem;
        border-radius: 50%;
        width: 2.5rem;
        height: 2.5rem;
        justify-content: center;
    }
    
    .pwa-icon {
        font-size: 1.3rem;
    }
}

.logout-form {
    margin: 0;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
    width: 100%;
    box-sizing: border-box;
    background: #FFFFFF;
}

.main-content .dashboard-container {
    margin: 0;
    padding: 0;
    max-width: none;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

.card-title {
    font-size: 1.5rem;
    color: var(--brown-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--brown-primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background: var(--brown-cloud);
    color: var(--brown-text);
}

.btn-secondary:hover {
    background: var(--brown-accent);
}

.btn-success {
    background: #5A8B5A;
    color: var(--white);
}

.btn-danger {
    background: #B85A5A;
    color: var(--white);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--brown-text);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--brown-cloud);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--brown-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
}

.table thead {
    background: var(--brown-primary);
    color: var(--white);
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--brown-cloud);
}

.table tbody tr:hover {
    background: var(--brown-cloud);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--brown-primary) 0%, var(--brown-light) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Home Page */
.home-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow);
    margin: 2rem 0;
}

.home-title {
    font-size: 3rem;
    color: var(--brown-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--brown-light);
    margin-bottom: 2rem;
}

.home-description {
    font-size: 1.1rem;
    color: var(--brown-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: #87CEEB;
    color: #FFFFFF;
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.alert-danger {
    background: #FFEBEE;
    border-color: #F44336;
    color: #C62828;
}

.alert-warning {
    background: #FFF3E0;
    border-color: #FF9800;
    color: #E65100;
}

.alert-info {
    background: #E3F2FD;
    border-color: #2196F3;
    color: #1565C0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: nowrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-menu.mobile-menu-open {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        margin: 0;
        border-radius: 0;
    }
    
    .nav-dropdown {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        margin: 0;
        border-radius: 0;
    }
    
    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.05);
        max-height: 0;
        overflow: hidden;
    }
    
    .nav-dropdown-menu.dropdown-open {
        padding-top: 0;
        padding-bottom: 0;
        max-height: 500px;
    }
    
    .nav-dropdown-link {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.625rem 1rem 0.625rem 2rem;
        margin: 0;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
    }
    
    .nav-dropdown-link:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        padding-left: 2rem;
        border-left: none;
    }
    
    .btn-login, .btn-logout {
        margin-top: 0.5rem;
        border-radius: 0;
    }
    
    .btn-pwa-install {
        margin-top: 0.5rem;
        border-radius: 0;
    }
    
    .btn-login, .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    .btn-pwa-install {
        width: 100%;
        justify-content: center;
    }

    .home-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 0 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--brown-cloud);
    border-top: 4px solid var(--brown-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    margin: 1rem 0;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
    transition: margin-right 0.3s ease;
}

.dashboard-title {
    font-size: 2rem;
    color: #2563EB;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F9FF 100%);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
}

.metric-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.clickable-metric-card {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.clickable-metric-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25);
}

.clickable-metric-card:active {
    transform: translateY(-4px) scale(1.01);
}

.clickable-metric-card .metric-label {
    position: relative;
}

.clickable-metric-card .metric-label::after {
    content: ' →';
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: 0.5rem;
}

.clickable-metric-card:hover .metric-label::after {
    opacity: 1;
}

.metric-card.purple {
    background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
}

.metric-card.purple::before {
    background: linear-gradient(180deg, #A855F7 0%, #9333EA 100%);
}

.metric-card.green {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.metric-card.green::before {
    background: linear-gradient(180deg, #10B981 0%, #059669 100%);
}

.metric-card.yellow {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.metric-card.yellow::before {
    background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
}

.metric-card.brown {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.metric-card.brown::before {
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
}

.metric-icon {
    font-size: 2.5rem;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1E40AF;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #64748B;
    font-weight: 500;
}

/* Small Metrics */
.metrics-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card-small {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.metric-card-small:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}

.metric-card-small.green {
    border-left: 4px solid #10B981;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

.metric-card-small.blue {
    border-left: 4px solid #3B82F6;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.metric-card-small.orange {
    border-left: 4px solid #F59E0B;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.metric-card-small.brown {
    border-left: 4px solid #6366F1;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}

.metric-icon-small {
    font-size: 1.5rem;
}

.metric-content-small {
    flex: 1;
}

.metric-label-small {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.metric-value-small {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1E40AF;
}

/* Managed Sections */
.managed-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.managed-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.managed-section:hover {
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    border-color: #93C5FD;
}

.managed-units-section {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E2E8F0;
}

.section-icon {
    font-size: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    color: #1E40AF;
    font-weight: 600;
    margin: 0;
}

.section-list {
    margin-bottom: 1.5rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.list-item:hover {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-color: #93C5FD;
    transform: translateX(5px);
}

.list-item:last-child {
    border-bottom: none;
}

.edit-icon {
    font-size: 1.25rem;
    text-decoration: none;
    color: #3B82F6;
    transition: transform 0.3s ease;
}

.edit-icon:hover {
    color: #2563EB;
    transform: scale(1.2);
}

.item-content {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #1E40AF;
    margin-bottom: 0.25rem;
}

.item-subtitle {
    font-size: 0.85rem;
    color: #64748B;
}

.item-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.25rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: #E8F5E9;
    color: #2E7D32;
}

.capacity {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

.item-icon {
    font-size: 1.5rem;
}

.view-all-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--white);
}

.view-all-btn.yellow {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
}

.view-all-btn.yellow:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.view-all-btn.brown {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #FFFFFF;
}

.view-all-btn.brown:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}



.sidebar-section {
    margin-bottom: 2rem;
    position: relative;
    pointer-events: auto;
    z-index: 1;
}

.sidebar-section:first-child {
    padding-top: 0.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-user {
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E2E8F0;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1E40AF;
    margin-bottom: 0.25rem;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: #3B82F6;
    margin-bottom: 1rem;
    font-weight: 500;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-icon {
    font-size: 1.25rem;
    color: #3B82F6;
}

.user-name {
    font-weight: 600;
    color: #1E40AF;
}

.sidebar-user-role {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 1rem;
    font-weight: 500;
}

.role-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--brown-primary) 0%, var(--brown-light) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.sidebar-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563EB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #DBEAFE;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.sidebar-link:hover {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.sidebar-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-container {
        flex-direction: column;
    }

    .managed-sections {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid-small {
        grid-template-columns: 1fr;
    }
}

/* Form Page Styles */
.form-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-return {
    background: #6c757d;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-return:hover {
    background: #5a6268;
    transform: translateX(-4px);
}

.form-title-section {
    flex: 1;
    text-align: center;
}

.form-main-title {
    font-size: 2rem;
    color: var(--brown-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--brown-light);
}

.form-content-wrapper {
    display: flex;
    gap: 2rem;
}

.form-main-content {
    flex: 1;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.form-section-header {
    background: var(--brown-primary);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-header-icon {
    font-size: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--brown-cloud);
}

.form-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    font-size: 1.5rem;
}

.section-title h3 {
    font-size: 1.25rem;
    color: var(--brown-primary);
    margin: 0;
    font-weight: 600;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--brown-text);
    font-weight: 500;
}

.label-icon {
    font-size: 1.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--brown-cloud);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--brown-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--brown-light);
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--brown-text);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.btn-submit {
    flex: 1;
    background: var(--brown-primary);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-cancel {
    flex: 1;
    background: #6c757d;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.25rem;
}

.form-info-text {
    text-align: center;
    color: var(--brown-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Employee Registration Table */
.employee-registration-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
}

.employee-registration-table thead {
    background: var(--brown-primary);
    color: var(--white);
}

.employee-registration-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.employee-registration-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--brown-cloud);
}

.employee-registration-table tbody tr:hover {
    background: var(--brown-cloud);
}

.form-control-table {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--brown-cloud);
    border-radius: 4px;
    font-size: 0.9rem;
}

.status-icon {
    font-size: 1.5rem;
}

/* Geolocation Page */
.geolocation-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.leaflet-map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
}

.geofence-list-section {
    background: var(--brown-cloud);
    border-radius: 12px;
    padding: 1.5rem;
}

.geofence-list {
    margin-bottom: 1.5rem;
}

.geofence-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow);
}

.geofence-info {
    flex: 1;
}

.geofence-info strong {
    display: block;
    color: var(--brown-primary);
    margin-bottom: 0.5rem;
}

.geofence-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--brown-light);
}

.btn-edit-geofence {
    background: var(--brown-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-edit-geofence:hover {
    background: var(--brown-dark);
}

.btn-add-geofence {
    width: 100%;
    background: var(--brown-primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-geofence:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .geolocation-container {
        grid-template-columns: 1fr;
    }

    .form-row-two {
        grid-template-columns: 1fr;
    }

    .form-content-wrapper {
        flex-direction: column;
    }
}

/* Enhanced Dashboard Styling */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E2E8F0;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header > div:first-child {
    flex: 1;
    min-width: 0;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: #64748B;
    margin-top: 0.5rem;
}

.dashboard-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1E40AF;
    font-weight: 600;
    border: 1px solid #93C5FD;
    white-space: nowrap;
    flex-shrink: 0;
}

.date-icon {
    font-size: 1.25rem;
}

/* Enhanced Metric Cards */
.enhanced-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.enhanced-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25);
}

.metric-card-bg {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.enhanced-card:hover .metric-card-bg {
    opacity: 1;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

.trend-icon {
    font-size: 1rem;
}

.enhanced-small-card {
    transition: all 0.3s ease;
    border-left-width: 4px;
}

.enhanced-small-card:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px var(--shadow);
}

.metric-description {
    font-size: 0.75rem;
    color: var(--brown-light);
    margin-top: 0.25rem;
}

/* Quick Stats Row */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-stat-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F9FF 100%);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #E2E8F0;
}

.quick-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
    border-color: #3B82F6;
    background: linear-gradient(135deg, #FFFFFF 0%, #DBEAFE 100%);
}

.quick-stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    color: #FFFFFF;
}

.quick-stat-info {
    flex: 1;
}

.quick-stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1E40AF;
    margin-bottom: 0.25rem;
}

.quick-stat-label {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

/* Enhanced Sections */
.enhanced-section {
    background: linear-gradient(135deg, var(--white) 0%, #fafafa 100%);
    border: 1px solid var(--brown-cloud);
    transition: all 0.3s ease;
}

.enhanced-section:hover {
    box-shadow: 0 8px 30px var(--shadow);
    border-color: var(--brown-accent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--brown-cloud);
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-badge {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.view-all-link {
    color: var(--brown-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: var(--brown-dark);
    transform: translateX(4px);
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 2rem;
}

.section-title-main {
    font-size: 1.5rem;
    color: var(--brown-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-action-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.quick-action-card:hover::before {
    left: 100%;
}

.quick-action-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 35px var(--shadow);
}

.action-primary {
    border-left: 4px solid #2196F3;
}

.action-primary:hover {
    border-color: #1976D2;
    background: linear-gradient(135deg, #E3F2FD 0%, var(--white) 100%);
}

.action-secondary {
    border-left: 4px solid #9C27B0;
}

.action-secondary:hover {
    border-color: #7B1FA2;
    background: linear-gradient(135deg, #F3E5F5 0%, var(--white) 100%);
}

.action-success {
    border-left: 4px solid #4CAF50;
}

.action-success:hover {
    border-color: #388E3C;
    background: linear-gradient(135deg, #E8F5E9 0%, var(--white) 100%);
}

.action-warning {
    border-left: 4px solid #FF9800;
}

.action-warning:hover {
    border-color: #F57C00;
    background: linear-gradient(135deg, #FFF3E0 0%, var(--white) 100%);
}

.action-info {
    border-left: 4px solid #00BCD4;
}

.action-info:hover {
    border-color: #0097A7;
    background: linear-gradient(135deg, #E0F7FA 0%, var(--white) 100%);
}

.action-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brown-cloud);
    border-radius: 12px;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 0.25rem;
}

.action-description {
    font-size: 0.85rem;
    color: var(--brown-light);
}

.action-arrow {
    font-size: 1.5rem;
    color: var(--brown-primary);
    transition: transform 0.3s ease;
}

.quick-action-card:hover .action-arrow {
    transform: translateX(6px);
}

/* Status Card */
.status-card-section {
    margin-bottom: 2rem;
}

.status-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--brown-cloud) 100%);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 30px var(--shadow);
    border: 2px solid var(--brown-cloud);
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow);
}

.status-card.checked-in {
    border-left: 6px solid #4CAF50;
    background: linear-gradient(135deg, #E8F5E9 0%, var(--white) 100%);
}

.status-card.checked-out {
    border-left: 6px solid #FF9800;
    background: linear-gradient(135deg, #FFF3E0 0%, var(--white) 100%);
}

.status-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 15px var(--shadow);
}

.status-content {
    flex: 1;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 0.5rem;
}

.status-details {
    font-size: 1rem;
    color: var(--brown-light);
}

.status-action-btn {
    padding: 0.75rem 2rem;
    background: var(--brown-primary);
    color: var(--white);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.status-action-btn:hover {
    background: var(--brown-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--shadow);
}

.status-action-btn.primary {
    background: #4CAF50;
}

.status-action-btn.primary:hover {
    background: #388E3C;
}

/* Recent Activity */
.recent-activity-section {
    margin-bottom: 2rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--brown-cloud);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 15px var(--shadow);
    border-color: var(--brown-accent);
}

.activity-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brown-cloud);
    border-radius: 12px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 0.5rem;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--brown-light);
}

.duration-badge {
    background: var(--brown-primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Enhancements */
@media (max-width: 1200px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-date {
        width: 100%;
        justify-content: center;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .dashboard-header > div:first-child {
        width: 100%;
    }
    
    .dashboard-header > div:first-child > div {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.9rem;
    }
    
    .dashboard-date {
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    
    .date-icon {
        font-size: 1rem;
    }
    
    .sidebar-toggle-btn {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .sidebar-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .sidebar-toggle-btn {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .sidebar-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .quick-stats-row {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .status-card {
        flex-direction: column;
        text-align: center;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--brown-cloud);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--brown-text);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--brown-primary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--brown-cloud);
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--brown-primary);
    color: var(--white);
    border-color: var(--brown-primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.pagination-btn.active {
    background: var(--brown-primary);
    color: var(--white);
    border-color: var(--brown-primary);
    font-weight: 600;
    cursor: default;
}

.pagination-btn.disabled {
    background: var(--brown-cloud);
    color: var(--brown-light);
    border-color: var(--brown-cloud);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--brown-light);
}

.pagination-page-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-page-size label {
    color: var(--brown-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination-page-size select {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--brown-cloud);
    background: var(--white);
    color: var(--brown-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pagination-page-size select:hover {
    border-color: var(--brown-primary);
}

.pagination-page-size select:focus {
    outline: none;
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
    }

    .pagination-page-size {
        width: 100%;
        justify-content: center;
    }
}

/* User Filter Styles */
.users-filter-container {
    background: var(--brown-cloud);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.users-filter-form {
    width: 100%;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    align-items: end;
}

@media (min-width: 1400px) {
    .filter-row {
        grid-template-columns: 2.5fr 1.2fr 1.2fr 1.2fr 1fr auto;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .filter-row {
        grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown-text);
}

.filter-input,
.filter-select {
    padding: 0.75rem;
    border: 2px solid var(--brown-cloud);
    border-radius: 8px;
    background: var(--white);
    color: var(--brown-text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.filter-input::placeholder {
    color: var(--brown-light);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: fit-content;
    white-space: nowrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }

    .filter-btn {
        flex: 1;
    }
}

/* Attendance Form Styles */
.attendance-form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.attendance-form-container .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--brown-primary);
}

.label-icon {
    font-size: 1.2rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--brown-light);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--brown-cloud);
}

.btn-submit {
    background: linear-gradient(135deg, var(--brown-primary) 0%, var(--brown-secondary) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(139, 69, 19, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 69, 19, 0.3);
}

.btn-cancel {
    background: white;
    color: var(--brown-primary);
    border: 2px solid var(--brown-primary);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: var(--brown-cloud);
}

.btn-icon {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .form-row-two {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* Current Date/Time Display */
#currentDateTime {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#currentDateTime:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#currentDate {
    font-size: 0.9rem;
    color: var(--brown-text);
    display: block;
    margin-bottom: 0.25rem;
}

#currentTime {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brown-primary);
    display: block;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    #currentDateTime {
        min-width: auto;
        width: 100%;
        margin-top: 1rem;
    }
    
    .card-title {
        width: 100%;
    }
}

/* Login Page Styles - Blue and White Mobile App Theme */
.login-page-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #00BFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00BFFF;
    z-index: 0;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.login-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.login-greeting {
    font-size: 2rem;
    font-weight: 700;
    color: #2563EB;
    margin: 0 0 0.5rem 0;
}

.login-subtitle {
    color: #3B82F6;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .form-control {
    padding: 1rem 3rem 1rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    color: #1F2937;
}

.login-form .form-control::placeholder {
    color: #9CA3AF;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-icon {
    position: absolute;
    right: 1rem;
    width: 20px;
    height: 20px;
    color: #3B82F6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.login-remember {
    margin-bottom: 1.5rem;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #6B7280;
    font-size: 0.9rem;
}

.remember-me-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3B82F6;
}

.btn-login-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: #3B82F6;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-bottom: 1rem;
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: #2563EB;
}

.btn-login-submit:active {
    transform: translateY(0);
}

.login-footer-links {
    text-align: center;
    margin-bottom: 1.5rem;
}

.forgot-password-link {
    color: #3B82F6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #2563EB;
    text-decoration: underline;
}

.login-pwa-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-pwa-section #pwa-install-button {
    width: 100%;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3B82F6;
}

.login-pwa-section #pwa-install-button:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pwa-icon {
    width: 20px;
    height: 20px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #DC2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.text-danger {
    color: #DC2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 768px) {
    .login-page-wrapper {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-greeting {
        font-size: 1.75rem;
    }

    .circle-top-right {
        width: 150px;
        height: 150px;
        top: -75px;
        right: -75px;
    }

    .circle-top-right-small {
        width: 80px;
        height: 80px;
        top: 10px;
        right: 20px;
    }

    .circle-bottom-left {
        width: 200px;
        height: 200px;
        bottom: -100px;
        left: -100px;
    }
}

.login-hero-section {
    background: linear-gradient(135deg, var(--brown-primary) 0%, var(--brown-dark) 100%);
    color: var(--white);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 20s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.login-brand {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.login-brand-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-brand-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.login-brand-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    font-weight: 300;
}

.login-hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.login-feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.5rem;
}

.login-form-section {
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 450px;
}

.login-form-title {
    font-size: 2rem;
    color: var(--brown-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-form-subtitle {
    color: var(--brown-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--brown-text);
    margin-bottom: 0.5rem;
}

.login-form .form-control {
    padding: 0.875rem 1rem;
    border: 2px solid var(--brown-cloud);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

.login-remember {
    margin-bottom: 2rem;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--brown-text);
    font-size: 0.95rem;
}

.remember-me-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brown-primary);
}

.btn-login-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--brown-primary) 0%, var(--brown-secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 111, 71, 0.4);
}

.btn-login-submit:active {
    transform: translateY(0);
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.login-pwa-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--brown-cloud);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-pwa-section #pwa-install-button {
    width: 100%;
    justify-content: center;
}
}

.btn-login-submit:hover .btn-arrow {
    transform: translateX(5px);
}

.label-icon {
    font-size: 1.1rem;
}

@media (max-width: 968px) {
    .login-landing-container {
        grid-template-columns: 1fr;
        margin: 1rem;
    }

    .login-hero-section {
        padding: 3rem 2rem;
        min-height: auto;
    }

    .login-brand-title {
        font-size: 2.5rem;
    }

    .login-form-section {
        padding: 3rem 2rem;
    }

    .login-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .login-feature-item {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .login-hero-section {
        padding: 2rem 1.5rem;
    }

    .login-brand-icon {
        font-size: 3rem;
    }

    .login-brand-title {
        font-size: 2rem;
    }

    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .login-features {
        flex-direction: column;
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 6px;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-primary {
    background-color: var(--brown-primary);
    color: white;
}

