
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #000000;
    --red: #dc2626;
    --magenta: #f43f5e;
    --green: #22c55e;
    --amber: #f59e0b;
    --violet: #a855f7;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-gray: #9ca3af;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-dark);
    color: #fff;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Scanline effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0.03) 2px
    );
    z-index: 9999;
}

/* Sidebar */
.sidebar {
    width: 240px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo-area {
    padding: 0 20px 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(220, 38, 38, 0.1);
    border-left-color: var(--red);
    color: #fff;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-profile {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 2px;
}

.user-status {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

/* Main content */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    height: 100vh;
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input::placeholder {
    color: var(--text-gray);
}

.search-input:focus {
    border-color: var(--red);
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-gray);
    transition: color 0.2s;
}

.notification-bell:hover {
    color: #fff;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--magenta);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border: 1px solid var(--glass-border);
}

/* Metric cards */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: scale(1.01);
}

.metric-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.metric-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
}

.metric-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green);
}

.metric-change.negative {
    background: rgba(244, 63, 94, 0.2);
    color: var(--magenta);
}

.sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin-top: 16px;
}

.spark-bar {
    flex: 1;
    background: var(--red);
    border-radius: 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.spark-bar:hover {
    opacity: 1;
}

/* Charts row */
.charts-row {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

/* Revenue chart */
.revenue-chart {
    position: relative;
    height: 300px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.grid-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
}

.axis-label {
    fill: var(--text-gray);
    font-size: 11px;
    font-family: 'IBM Plex Mono', monospace;
}

.area-path {
    fill: url(#gradient);
    stroke: var(--red);
    stroke-width: 2;
}

/* Traffic donut */
.traffic-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 300px;
}

.donut-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        var(--red) 0% 35%,
        var(--violet) 35% 63%,
        var(--amber) 63% 85%,
        var(--magenta) 85% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.donut-hole {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.donut-total {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.donut-label {
    font-size: 12px;
    color: var(--text-gray);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Data table */
.table-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    margin-bottom: 30px;
}

.table-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--red);
    font-weight: 600;
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'IBM Plex Mono', monospace;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green);
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--amber);
}

.status-failed {
    background: rgba(244, 63, 94, 0.2);
    color: var(--magenta);
}

/* Bottom row */
.bottom-row {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 20px;
}

/* Bar chart */
.bar-chart-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.bar-chart-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 120px;
    font-size: 13px;
    color: var(--text-gray);
    text-align: right;
}

.bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--red);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-percent {
    width: 50px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--red);
}

/* City list */
.city-list-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.city-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.city-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.city-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.city-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}

.city-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-name {
    font-size: 13px;
    color: var(--text-gray);
}

.city-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #fff;
}

.city-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 8px;
}

.city-bar {
    height: 100%;
    background: var(--red);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 1200px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .main-content {
        margin-left: 60px;
    }
    .logo-text,
    .nav-item span,
    .user-info {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 16px;
    }
    .metrics-row {
        grid-template-columns: 1fr;
    }
}
</style>
