:root {
    --primary: #FF6B00;
    --primary-dark: #e05e00;
    --primary-light: #ff8533;
    --sidebar-bg: #1a1a2e;
    --sidebar-width: 240px;
    --topbar-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f9;
    margin: 0;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    background: rgba(255,107,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

.sidebar-nav {
    list-style: none;
    padding: 15px 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: #fff;
    background: rgba(255,107,0,0.15);
    border-left-color: var(--primary);
}

.sidebar-nav li a i { font-size: 18px; }

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-wrapper {
    padding: 25px;
}

/* Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,107,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
}

.stat-card .stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Chart Cards */
.chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.chart-card h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Tables */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-card .card-header {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 15px 20px;
    font-weight: 600;
}

.table-card .table {
    margin-bottom: 0;
}

.table-card .table th {
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.table-card .table td {
    vertical-align: middle;
    font-size: 14px;
}

/* Badges */
.badge-location {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

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

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

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

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

/* Report Page */
.report-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.report-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.report-header h2 { font-weight: 700; margin-bottom: 5px; }
.report-header .report-period { color: rgba(255,255,255,0.7); font-size: 14px; }

.report-section {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

.report-section h5 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-metric {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.report-metric .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.report-metric .metric-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    font-weight: 500;
}

/* Print Report */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-wrapper { padding: 0 !important; }
    .report-container { box-shadow: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Flash messages */
.flash-message {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i { font-size: 48px; margin-bottom: 15px; display: block; }

/* Form improvements */
.form-label { font-weight: 500; font-size: 14px; color: #555; }

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255,107,0,0.15);
}

/* CSV import area */
.csv-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.csv-drop-zone:hover, .csv-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(255,107,0,0.05);
}
