/* ===== LazerX Global Dashboard Styles ===== */
:root {
    --brand: #2a5ab0;
    --brand-light: #3a6ec0;
    --brand-dark: #1e4490;
}
* { box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body { background: #f5f7fa; margin: 0; padding: 0; min-height: 100vh; color: #393536; }
h1,h2,h3,h4,h5,h6 { margin: 0 0 .5rem 0; font-weight: 600; line-height: 1.2; }

/* Auth */
.auth-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.auth-box { background: #fff; border-radius: 16px; padding: 40px; text-align: center; max-width: 360px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-box img { width: 80px; margin-bottom: 16px; }
.auth-box h2 { color: var(--brand); margin: 0 0 8px; }
.auth-box p { color: #666; margin: 0 0 20px; font-size: 14px; }
.auth-box input { width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; text-align: center; font-size: 20px; letter-spacing: 8px; box-sizing: border-box; }
.auth-box input:focus { border-color: var(--brand); outline: none; }
.auth-box .error { color: #e74c3c; font-size: 13px; margin-top: 8px; display: none; }

/* Header */
.dashboard-header { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; padding: 20px 24px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 100; }
.dashboard-header img { width: 48px; height: 48px; border-radius: 8px; }
.dashboard-header h1 { margin: 0; font-size: 22px; font-weight: 600; }
.dashboard-header .subtitle { font-size: 13px; opacity: 0.8; }
.dashboard-nav { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.center-filter { padding: 8px 16px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.3); font-weight: 600; font-size: 13px; color: #fff; background: rgba(255,255,255,0.15); cursor: pointer; outline: none; }
.center-filter option { color: #333; background: #fff; }
.center-filter:focus { border-color: rgba(255,255,255,0.6); }

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 20px 24px; }
.kpi-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.kpi-card .kpi-label { font-size: 12px; color: #888; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; color: #1a1a2e; margin: 8px 0 0; line-height: 1.3; }
.kpi-card .kpi-unit { font-size: 14px; color: #888; font-weight: 400; }

/* Sections */
.section { background: #fff; border-radius: 12px; margin: 0 24px 20px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.section h3 { margin: 0 0 16px; color: #1a1a2e; font-size: 16px; font-weight: 600; }

/* Center Cards */
.center-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.center-card { border: 1px solid #e8e8e8; border-radius: 12px; padding: 16px; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.center-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.center-card-header { margin-bottom: 12px; }
.center-card-name { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.center-card-city { font-size: 12px; color: #888; margin-top: 2px; }
.center-card-stats { display: flex; flex-direction: column; gap: 6px; }
.center-stat { display: flex; justify-content: space-between; align-items: center; }
.center-stat-label { font-size: 12px; color: #888; }
.center-stat-value { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.center-card-status { position: absolute; top: 0; right: 0; width: 8px; height: 100%; }
.center-card-status.status-green { background: #059669; }
.center-card-status.status-yellow { background: #D97706; }
.center-card-status.status-red { background: #DC3545; }

/* Chart Bars */
.chart-bars { display: flex; flex-direction: column; gap: 12px; }
.chart-bar { display: grid; grid-template-columns: 140px 1fr 50px; gap: 12px; align-items: center; }
.bar-label { font-weight: 600; font-size: 13px; color: #555; }
.bar-wrapper { background: #eee; border-radius: 4px; height: 24px; position: relative; overflow: hidden; }
.bar { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bar-value { text-align: right; font-weight: 600; font-size: 13px; color: #333; }

/* Filters */
.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters-bar select, .filters-bar input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; font-family: 'Inter', sans-serif; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #eee; position: sticky; top: 0; cursor: pointer; white-space: nowrap; }
thead th:hover { color: var(--brand); }
tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
tbody tr:hover { background: #f8f9ff; }

/* Status badges */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.status-confirmed { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff3e0; color: #ef6c00; }
.status-cancelled { background: #ffebee; color: #c62828; }

/* Loading */
.loading { text-align: center; padding: 40px; color: #888; }

/* Refresh indicator */
.refresh-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4caf50; margin-left: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Footer */
.footer { text-align: center; padding: 20px; color: #888; font-size: 13px; }
.footer a { color: var(--brand); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
    .section { margin: 0 12px 12px; padding: 16px; }
    .dashboard-header { flex-wrap: wrap; padding: 16px; }
    .dashboard-header h1 { font-size: 18px; }
    .dashboard-nav { margin-left: 0; width: 100%; }
    .center-filter { width: 100%; }
    .center-cards { grid-template-columns: 1fr; }
    .chart-bar { grid-template-columns: 1fr; gap: 4px; }
    .bar-wrapper { order: 2; }
    .bar-value { order: 3; text-align: left; }
    .filters-bar { flex-direction: column; }
    .filters-bar select, .filters-bar input { width: 100%; }
    table { font-size: 12px; }
    thead th, tbody td { padding: 8px 6px; }
}

@media print {
    .dashboard-header, .footer, .filters-bar, .btn { display: none !important; }
    .section { box-shadow: none; margin: 0 0 16px; break-inside: avoid; }
}
