:root {
    --bg-dark: #0f172a;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-light: #fff7ed;
    --secondary: #1e293b;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --accent: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --sidebar-width: 280px;
    --border: #e2e8f0;
    --radius: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 2rem 1.25rem;
    z-index: 1000;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: white;
}

.logo-container {
    padding-bottom: 2.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    letter-spacing: -0.025em;
    gap: 0.75rem;
}

.logo-container i {
    color: var(--primary);
    font-size: 1.75rem;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #94a3b8;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-links a i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-links a.active {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Main Content area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
    position: relative;
}

/* Cards & Components */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.025em;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

/* Dashboard Specifics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 0 0 0 100%;
    opacity: 0.5;
    z-index: 0;
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.75rem 0;
    color: var(--secondary);
    letter-spacing: -0.05em;
    position: relative;
    z-index: 1;
}

.stat-card .trend {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--accent); }

/* Monitoring Widgets */
.monitor-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Utility Classes */
.stat-value-premium {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--secondary);
    display: block;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.action-item:hover {
    transform: translateX(4px);
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Badge Fixes */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef9c3; color: #854d0e; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-info { background-color: #e0f2fe; color: #075985; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (max-width: 1200px) {
    .monitor-grid { grid-template-columns: 1fr; }
}

/* Grid Utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .main-wrapper { margin-left: 0; width: 100%; padding: 1rem; }
}



