* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #111827;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Top Bar Styles */
.top-bar {
    background: rgba(250, 249, 245, 1);
    height: 60px;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-radius: 0 0 12px 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
}


.top-bar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logout-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* Controls bar inside Kokpit */
.controls-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 150px;
    margin-top: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #374151;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.months-menu {
    min-width: 200px;
}

.toggle-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #ffffff;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: #f3f4f6;
    border-color: rgba(37, 150, 190, 0.3);
}

.toggle-btn.active {
    background: rgba(37, 150, 190, 1);
    color: #ffffff;
    border-color: rgba(37, 150, 190, 1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #3b82f6;
}

.navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3b82f6;
}

.nav-link.active {
    background: #3b82f6;
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    padding: 2rem;
    grid-row: 2;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - 120px);
}

.grid-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.grid-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.grid-item p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.chart-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-container {
    flex: 1;
    overflow: auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 0;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.employee-table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
}

.employee-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

.employee-table tbody tr:hover {
    background: #f8fafc;
}

.employee-table tbody tr:last-child td {
    border-bottom: none;
}

/* Page switching */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.page-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.table-container-full {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1f2937;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-radius: 6px;
        margin-bottom: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-content h2 {
        font-size: 2rem;
    }
    
    .main-content p {
        font-size: 1rem;
    }
}

/* App layout with left sidebar */
.app-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 60px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(135deg, rgba(250, 249, 245, 1) 0%, rgba(250, 249, 245, 0.95) 100%);
    color: #111827;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    border-radius: 0 12px 12px 0;
    position: relative;
    grid-row: 2;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, rgba(250, 249, 245, 1) 0%, rgba(250, 249, 245, 0.8) 100%);
    border-radius: 0 12px 0 0;
    z-index: -1;
}

.sidebar-nav {
    position: sticky;
    top: 60px;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    gap: 0.75rem;
}

.menu-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.menu-icon-fallback {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.menu-link:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
}

.menu-link.active {
    background: rgba(37, 150, 190, 1);
    color: #ffffff;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        bottom: 0;
        width: 220px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        padding: 1rem;
    }
}