:root {
    /* Color Palette */
    --bg-dark: #0A0A0A;
    --panel-bg: rgba(20, 20, 20, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #FFFFFF;
    --text-muted: #A1A1A1;
    --accent-color: #0D8ABC;
    --accent-glow: rgba(13, 138, 188, 0.4);
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Spacing & Radii */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtle background grid */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

/* Base Glassmorphism Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    margin: var(--spacing-md);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--spacing-md);
    height: calc(100vh - 48px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-lg);
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.nav-item.active {
    color: var(--text-main);
    background: rgba(13, 138, 188, 0.15);
    border: 1px solid rgba(13, 138, 188, 0.3);
}

.nav-item i {
    width: 20px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    border-top: 1px solid var(--panel-border);
    padding-top: var(--spacing-md);
}

.client-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--panel-border);
}

.client-info {
    display: flex;
    flex-direction: column;
}

.client-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.client-plan {
    font-size: 0.8rem;
    color: var(--accent-color);
}

.logout-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: var(--danger);
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-lg);
}

.top-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.top-header .subtitle {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 138, 188, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 138, 188, 0.5);
    background: #0ea5e9;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* Stat Cards */
.stat-card {
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.uptime {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.traffic {
    background: rgba(13, 138, 188, 0.1);
    color: var(--accent-color);
}

.stat-icon.security {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 4px 0;
}

.trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive { color: var(--success); }
.trend.neutral { color: var(--text-muted); }

/* Content Sections */
.content-section {
    padding: var(--spacing-md);
    grid-column: span 3;
}

@media (min-width: 1024px) {
    .maintenance-log { grid-column: span 2; }
    .traffic-overview { grid-column: span 1; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.date-range {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.view-all {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.view-all:hover { opacity: 0.8; }

/* Timeline */
.timeline {
    list-style: none;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--panel-border);
}

.timeline-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    z-index: 1;
}

.timeline-icon.success { border-color: var(--success); color: var(--success); }
.timeline-icon.warning { border-color: var(--warning); color: var(--warning); }

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    flex-grow: 1;
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.timeline-content h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mock Bar Chart */
.mock-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding-top: var(--spacing-md);
    border-bottom: 1px solid var(--panel-border);
}

.bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 30px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    background: rgba(13, 138, 188, 0.3);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease, background 0.3s ease;
    cursor: pointer;
}

.bar:hover, .bar.active {
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.bar-container span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: auto;
        height: auto;
        margin: var(--spacing-sm);
        position: static;
    }
    
    .main-content {
        padding: var(--spacing-sm);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        grid-column: 1;
    }
}
