:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent-blue: #38bdf8;
    --accent-green: #22c55e;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-white);
    min-height: 100vh;
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px;
}
.logo i { color: var(--accent-blue); text-shadow: 0 0 15px var(--accent-blue); }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
    border-left: 3px solid var(--accent-blue);
}

.sidebar nav a:hover i {
    text-shadow: 0 0 15px var(--accent-blue);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

h1 { margin: 0 0 8px 0; font-size: 1.8rem; letter-spacing: -0.5px; }

.sub-header {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.clock {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.infra-stats {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.card {
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.card i { font-size: 2.5rem; }
.icon-blue { color: var(--accent-blue); }
.icon-orange { color: var(--accent-orange); }
.icon-red { color: var(--accent-red); }
.icon-green { color: var(--accent-green); }

.card-data h3 { margin: 0; font-size: 0.9rem; color: var(--text-gray); font-weight: 400; }
.card-data p { margin: 5px 0 0 0; font-size: 1.8rem; font-weight: 700; }

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-container, .table-container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
}

.chart-container h3, .table-container h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Table styling */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { text-align: left; padding: 12px 15px; color: var(--text-gray); border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 600; }
td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; }

tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Progress Bar */
.progress-bg { background: rgba(0,0,0,0.3); width: 100px; height: 6px; border-radius: 3px; display: inline-block; margin-right: 10px; vertical-align: middle; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease-out; }

/* Status Colors */
.text-red { color: var(--accent-red); font-weight: 600; }
.text-orange { color: var(--accent-orange); font-weight: 600; }
.text-green { color: var(--accent-green); font-weight: 600; }

/* Alerts */
#alerts-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.alert-toast {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--text-white);
    padding: 16px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }