/* ==========================================================================
   Modern CasaOS-Inspired Server Monitor Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Main Color Palette (Slate Dark) */
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    
    /* Card Design System */
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-border-hover: rgba(59, 130, 246, 0.25);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --card-glow-accent: 0 0 20px rgba(59, 130, 246, 0.15);
    
    /* Accent & Status Colors */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #ef4444;
    --accent-cyan: #06b6d4;
    
    /* Typography Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Layout Constants */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 76px;
    --header-height: 70px;
    --border-radius-xl: 20px;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    /* Animation Defaults */
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Globals */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Page Layout Shell */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Navigation (Left) */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--card-border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 20px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    color: #ffffff;
    font-size: 16px;
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.sidebar-nav-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* Hide scrollbar for nav container */
.sidebar-nav-container::-webkit-scrollbar {
    display: none;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.menu-item a i {
    font-size: 16px;
}

.menu-item:hover a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.menu-item.active a {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.05);
}

.menu-item.active a i {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.4));
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Main Panel Layout */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    padding: 20px 30px;
    transition: var(--transition-smooth);
}

/* Top Navigation Bar */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.header-title p {
    font-size: 12px;
    color: var(--text-secondary);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-stats-group {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    font-size: 12px;
}

.meta-stat {
    display: flex;
    flex-direction: column;
}

.meta-stat-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.meta-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.connection-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    font-size: 11px;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-rose);
    box-shadow: 0 0 6px var(--accent-rose);
}

.status-dot.online {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 2s infinite;
}

/* UI Action Button */
.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 14px;
}

/* Dashboard Views */
.dashboard-view {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.dashboard-view.active {
    display: block;
}

/* Glassmorphic Cards (CasaOS style) */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-xl);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--card-glow-accent);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    font-size: 16px;
    color: var(--accent-blue);
}

/* Home Overview Layout Grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Mini sparklines in cards */
.sparkline-container {
    width: 100%;
    height: 45px;
    margin-top: 14px;
}

/* Gauge details layout */
.stat-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-num-box {
    display: flex;
    flex-direction: column;
}

.stat-num-val {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stat-num-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.gauge-canvas-wrapper {
    width: 64px;
    height: 64px;
}

/* Progress indicator bars */
.progress-container {
    margin-top: 12px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-details-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.stat-details-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stat-details-label {
    color: var(--text-secondary);
}

.stat-details-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Temperature Card Colors */
.temp-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.temp-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.temp-yellow {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.temp-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-rose);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Service Status grid */
.services-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.service-mini-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.service-mini-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-mini-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-mini-icon-box i {
    font-size: 14px;
}

.service-mini-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.service-mini-status.online {
    background: var(--accent-emerald);
    box-shadow: 0 0 6px var(--accent-emerald);
}

.service-mini-status.offline {
    background: var(--accent-rose);
    box-shadow: 0 0 6px var(--accent-rose);
}

.service-mini-name {
    font-size: 13px;
    font-weight: 600;
}

.service-mini-value {
    font-size: 11px;
    color: var(--text-muted);
}

/* Detailed views styling */
.view-header {
    margin-bottom: 20px;
}

.big-chart-card {
    margin-bottom: 20px;
}

.large-chart-wrapper {
    height: 320px;
    width: 100%;
}

.cores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.core-mini-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.core-title {
    font-size: 11px;
    color: var(--text-muted);
}

.core-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.core-val {
    font-size: 13px;
    font-weight: 700;
}

/* Storage Table details */
.fs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.fs-table th, .fs-table td {
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
}

.fs-table th {
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    font-weight: 500;
}

.fs-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.fs-table tr:last-child td {
    border-bottom: none;
}

/* Docker container list CasaOS style */
.docker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.docker-card {
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition-smooth);
}

.docker-card:hover {
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.06);
}

.docker-c-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.docker-c-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.docker-c-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.08);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
}

.docker-c-name {
    font-size: 14px;
    font-weight: 600;
}

.docker-c-image {
    font-size: 11px;
    color: var(--text-muted);
}

.docker-c-status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
    text-transform: uppercase;
}

.docker-c-status-badge.running {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.docker-c-status-badge.stopped {
    background: rgba(239, 68, 68, 0.08);
    color: var(--accent-rose);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.docker-c-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.docker-stat-item {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 8px;
}

.docker-stat-lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.docker-stat-val {
    font-size: 14px;
    font-weight: 700;
}

.docker-c-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.docker-c-actions {
    display: flex;
    gap: 4px;
}

.docker-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition-smooth);
}

.docker-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.docker-action-btn.play:hover { color: var(--accent-emerald); border-color: rgba(16, 185, 129, 0.2); }
.docker-action-btn.stop:hover { color: var(--accent-rose); border-color: rgba(239, 68, 68, 0.2); }
.docker-action-btn.restart:hover { color: var(--accent-purple); border-color: rgba(139, 92, 246, 0.2); }
.docker-action-btn.logs:hover { color: var(--accent-blue); border-color: rgba(59, 130, 246, 0.2); }

.docker-c-port {
    font-size: 11px;
    color: var(--text-muted);
}

/* Logs Aggregator UI */
.logs-console-card {
    background: #020617;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
}

.logs-toolbar {
    background: #090d16;
    padding: 10px 16px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.logs-filters {
    display: flex;
    gap: 8px;
}

.logs-select, .logs-input {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.logs-input {
    width: 180px;
}

.logs-select:focus, .logs-input:focus {
    border-color: var(--accent-blue);
}

.logs-screen {
    flex-grow: 1;
    overflow-y: auto;
    padding: 14px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.5;
    background: #020617;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-line {
    word-break: break-all;
    white-space: pre-wrap;
}

.log-line.system { color: #cbd5e1; }
.log-line.error { color: #fca5a5; }
.log-line.warning { color: #fde047; }
.log-line.success { color: #86efac; }
.log-line.info { color: #93c5fd; }
.log-line.docker { color: #67e8f9; }
.log-line.db { color: #fcd34d; }

/* Settings form styling */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group select {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.04);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
}

.checkbox-group input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}

.checkbox-group label {
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

/* Toast Notifications Drawer */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    min-width: 280px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: var(--transition-smooth);
}

.toast.removing {
    animation: toastSlideOut 0.25s forwards;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-body {
    flex-grow: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.toast-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    transition: var(--transition-smooth);
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.green { border-color: rgba(16, 185, 129, 0.2); }
.toast.green .toast-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }

.toast.yellow { border-color: rgba(245, 158, 11, 0.2); }
.toast.yellow .toast-icon { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }

.toast.red { border-color: rgba(239, 68, 68, 0.2); }
.toast.red .toast-icon { background: rgba(239, 68, 68, 0.1); color: var(--accent-rose); }

/* Settings Drawer/Overlay for Offline Configuration */
.offline-panel {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.offline-panel.active {
    display: flex;
}

/* Skeleton Loading Screens */
.skeleton-loader {
    width: 100%;
    height: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 37%, rgba(255,255,255,0.02) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 37%, rgba(255,255,255,0.02) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

/* Keyframe Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideIn {
    from { transform: translateX(100%) translateY(0); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: var(--sidebar-collapsed-width);
    }
    .sidebar-logo .logo-text,
    .sidebar .menu-item span,
    .sidebar-footer span {
        display: none;
    }
    .sidebar-logo {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    .menu-item a {
        justify-content: center;
        padding: 10px;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}

@media (max-width: 992px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-meta {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none; /* Can implement slide-drawer on mobile later */
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
}

/* ==========================================================================
   Atlas Monitor Auth Screen Styling
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.login-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.login-box {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.login-logo {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.login-logo h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 4px 0 0 0;
    color: #fff;
}
.login-logo p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.login-error {
    color: var(--accent-rose);
    font-size: 12px;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: left;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
