* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-open {
    overflow: hidden;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c2c2c;
    color: #fff;
    padding: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-decline,
.btn-accept {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-decline {
    background-color: transparent;
    color: #fff;
    border: 1px solid #666;
}

.btn-decline:hover {
    background-color: #444;
}

.btn-accept {
    background-color: #007bff;
    color: #fff;
}

.btn-accept:hover {
    background-color: #0056b3;
}

.cookie-banner.hidden {
    display: none;
}

/* Header */
.header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 20px;
    font-weight: bold;
}

.logo-sub {
    font-size: 12px;
    opacity: 0.9;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-center h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.header-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    cursor: pointer;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Container */
.container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 70px;
    transition: transform 0.3s ease;
    z-index: 999;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    padding: 0 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    min-height: 44px; /* Better touch target for mobile */
    -webkit-tap-highlight-color: transparent;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-item:hover {
    background-color: #f5f5f5;
    color: #8b5cf6;
}

.nav-item.active {
    background-color: #f5f5f5;
    color: #8b5cf6;
    border-left-color: #8b5cf6;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    padding-bottom: 120px;
    transition: margin-left 0.3s ease;
}

/* Time Filter */
.time-filter {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.time-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.time-filter h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.company-logo-link {
    display: inline-block;
    transition: transform 0.3s, opacity 0.3s;
}

.company-logo-link:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.company-logo {
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.filter-controls {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-input-group label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.date-input-wrapper {
    position: relative;
}

.date-input {
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 180px;
    cursor: pointer;
    min-height: 44px; /* Better touch target for mobile */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.date-input-wrapper i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.btn-quick-filter,
.btn-apply {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    height: 42px;
    min-height: 44px; /* Better touch target for mobile */
    -webkit-tap-highlight-color: transparent;
}

.btn-quick-filter {
    background-color: #f5f5f5;
    color: #666;
}

.btn-quick-filter:hover {
    background-color: #e5e5e5;
}

.btn-apply {
    background-color: #007bff;
    color: white;
}

.btn-apply:hover {
    background-color: #0056b3;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-icon.pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-value.purple {
    color: #8b5cf6;
}

.stat-value.pink {
    color: #ec4899;
}

.stat-value.green {
    color: #10b981;
}

.stat-value.red {
    color: #ef4444;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.chart-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.chart-card canvas {
    max-height: 300px;
    height: 300px !important;
}

@media (max-width: 768px) {
    .chart-card canvas {
        height: 250px !important;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .chart-card canvas {
        height: 200px !important;
        max-height: 200px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Show hamburger menu */
    .menu-toggle {
        display: block;
    }
    
    /* Hide logo text on mobile */
    .logo-text {
        display: none;
    }
    
    /* Sidebar mobile styles */
    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        width: 280px;
        transform: translateX(-100%);
        z-index: 999;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Main content adjustment */
    .main-content {
        padding: 20px 15px;
        padding-bottom: 120px;
        width: 100%;
    }
    
    .header {
        padding: 12px 20px;
    }
    
    .header-center h1 {
        font-size: 18px;
    }
    
    .header-right {
        gap: 12px;
    }
    
    .header-icon,
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .date-input-group {
        width: 100%;
    }
    
    .date-input {
        width: 100%;
    }
    
    .btn-quick-filter,
    .btn-apply {
        width: 100%;
    }
    
    .time-filter {
        padding: 20px;
    }
    
    .time-filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .time-filter h2 {
        font-size: 16px;
        margin: 0;
    }
    
    .company-logo {
        max-height: 40px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-card h3 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .chart-card canvas {
        max-height: 250px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-content p {
        font-size: 13px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }
    
    .btn-decline,
    .btn-accept {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 15px;
    }
    
    .header-center h1 {
        font-size: 16px;
    }
    
    .logo-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        padding: 15px 10px;
        padding-bottom: 100px;
    }
    
    .summary-cards {
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-content {
        width: 100%;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .time-filter {
        padding: 15px;
    }
    
    .chart-card {
        padding: 15px;
    }
    
    .chart-card canvas {
        max-height: 200px;
    }
    
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-content p {
        font-size: 12px;
    }
    
    .btn-decline,
    .btn-accept {
        padding: 8px 15px;
        font-size: 13px;
    }
}

