/* ============================================
   Server Manager - Vercel/Linear Inspired Design
   Rich Dark Theme with Vibrant Accents
   ============================================ */

/* ===========================================
   1. Design Tokens - Rich Color Palette
   =========================================== */
:root {
    /* Background Colors - Rich darks */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-elevated: #18181b;
    --bg-hover: #1f1f23;
    --bg-active: #27272a;

    /* Accent Colors - Vibrant */
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);

    /* Text Colors */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;

    /* Border Colors */
    --border-default: #27272a;
    --border-hover: #3f3f46;
    --border-accent: rgba(59, 130, 246, 0.5);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.3);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Layout */
    --nav-width: 260px;
    --nav-width-collapsed: 72px;
    --header-height: 60px;
    --mobile-nav-height: 64px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================
   Light Theme Override
   =========================================== */
body.light-theme {
    /* Background Colors - Light mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-elevated: #f3f4f6;
    --bg-hover: #e5e7eb;
    --bg-active: #d1d5db;

    /* Text Colors - Light mode */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;

    /* Border Colors - Light mode */
    --border-default: #e5e7eb;
    --border-hover: #d1d5db;
    --border-accent: rgba(59, 130, 246, 0.5);

    /* Shadows - Light mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.15);

    /* Gradients - Light mode adjustments */
    --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.02) 100%);
}

/* ===========================================
   2. Reset & Base
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ===========================================
   3. Typography
   =========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================================
   4. Buttons
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm), 0 0 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: var(--shadow-md), 0 0 30px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-error);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* ===========================================
   5. Cards - Clean with Accent Borders
   =========================================== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-accent {
    border-top: 2px solid var(--accent-primary);
}

.card-accent-success {
    border-top: 2px solid var(--accent-success);
}

.card-accent-warning {
    border-top: 2px solid var(--accent-warning);
}

.card-accent-error {
    border-top: 2px solid var(--accent-error);
}

.card-gradient {
    background: var(--gradient-card);
    border-color: rgba(59, 130, 246, 0.2);
}

.card-interactive {
    cursor: pointer;
}

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

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    color: var(--accent-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-primary);
}

/* ===========================================
   6. Stats Cards - Colorful
   =========================================== */
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before { background: var(--gradient-primary); }
.stat-card.green::before { background: var(--gradient-success); }
.stat-card.orange::before { background: var(--gradient-warm); }
.stat-card.purple::before { background: var(--gradient-cool); }

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

.stat-card.blue .stat-card-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.stat-card.green .stat-card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.stat-card.orange .stat-card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.stat-card.purple .stat-card-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card-sub {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ===========================================
   7. Progress Bars - Gradient
   =========================================== */
.progress {
    height: 8px;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.blue { background: var(--gradient-primary); }
.progress-bar.green { background: var(--gradient-success); }
.progress-bar.orange { background: var(--accent-warning); }
.progress-bar.red { background: var(--accent-error); }

/* ===========================================
   8. Forms
   =========================================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 40px;
}

.form-input-icon .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox & Switch */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    cursor: pointer;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.switch input:checked + .switch-slider {
    background: var(--accent-primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

/* ===========================================
   9. Chips & Badges
   =========================================== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.chip-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    border-color: rgba(59, 130, 246, 0.3);
}

.chip-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border-color: rgba(16, 185, 129, 0.3);
}

.chip-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.chip-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-error);
    border-color: rgba(239, 68, 68, 0.3);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--accent-error);
    color: white;
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
}

.status-dot.offline {
    background: var(--text-muted);
}

.status-dot.warning {
    background: var(--accent-warning);
    box-shadow: 0 0 8px var(--accent-warning);
}

.status-dot.error {
    background: var(--accent-error);
    box-shadow: 0 0 8px var(--accent-error);
}

/* ===========================================
   10. Tables
   =========================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
}

.table td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-default);
}

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

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table-mono td {
    font-family: var(--font-mono);
    font-size: 13px;
}

/* ===========================================
   11. Tabs
   =========================================== */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

.tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===========================================
   12. Navigation - Sidebar
   =========================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--nav-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-default);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-item .icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
}

/* Server List in Sidebar */
.server-list {
    padding: 8px 0;
}

.server-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.server-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.server-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
}

.server-item .status-dot {
    flex-shrink: 0;
}

.server-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.server-item:hover .server-item-actions {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-default);
}

/* ===========================================
   13. Top Header
   =========================================== */
.main-content {
    flex: 1;
    margin-left: var(--nav-width);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    padding: 0 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
}

.menu-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===========================================
   14. Page Content
   =========================================== */
.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

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

.page-actions {
    display: flex;
    gap: 8px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ===========================================
   15. Modal/Dialog
   =========================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-base);
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 201;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-backdrop.open .modal {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-default);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===========================================
   16. Empty States
   =========================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-tertiary);
    max-width: 400px;
    margin-bottom: 20px;
}

/* ===========================================
   17. Toast/Snackbar
   =========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
    z-index: 300;
    opacity: 0;
    transition: all var(--transition-base);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success { border-left: 3px solid var(--accent-success); }
.toast-error { border-left: 3px solid var(--accent-error); }
.toast-warning { border-left: 3px solid var(--accent-warning); }

/* ===========================================
   18. Chat UI
   =========================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    max-height: calc(100vh - var(--header-height));
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    scroll-behavior: smooth;
}

.chat-message {
    max-width: 80%;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
}

.chat-message-user {
    background: var(--gradient-primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
}

.chat-message-assistant {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    margin-right: auto;
    border-bottom-left-radius: var(--radius-sm);
}

.chat-input-container {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    resize: none;
    min-height: 52px;
    max-height: 200px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Image/File Preview Container */
.image-preview-container {
    display: flex;
    padding: 8px 24px;
    background: var(--bg-secondary);
    max-width: 900px;
    margin: 0 auto;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 150px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.file-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    max-width: 300px;
}

.file-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 11px;
    color: var(--text-tertiary);
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-error);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.file-preview-wrapper .remove-image-btn {
    position: static;
    flex-shrink: 0;
}

/* ===========================================
   18b. Chat Messages - Bubble Style
   =========================================== */

/* Chat messages container */
#chatMessages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    max-width: 100%;
    overflow-x: hidden;
}

/* Base message bubble */
.message {
    display: flex;
    flex-direction: column;
    max-width: min(85%, 700px);
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: var(--shadow-sm);
    animation: messageSlideIn 0.3s ease-out;
}

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

/* User messages - right aligned, gradient bubble */
.message.user {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 6px;
    margin-left: auto;
}

.message.user .message-content {
    color: white;
}

/* AI messages - left aligned, elevated bubble */
.message.ai {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-bottom-left-radius: 6px;
    margin-right: auto;
}

/* AI badge */
.message.ai .ai-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gradient-cool);
    color: white;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
    width: fit-content;
}

/* System messages - centered, subtle */
.message.system {
    align-self: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    max-width: min(90%, 500px);
    text-align: center;
}

/* Error messages */
.message.error {
    align-self: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-error);
    font-size: 13px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    max-width: min(90%, 500px);
}

/* Success messages */
.message.success {
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
    max-width: min(90%, 700px);
}

.message.success .message-content {
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: pre-wrap;
}

/* Result messages */
.message.result {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    max-width: min(90%, 700px);
}

.message.result .message-content {
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: pre-wrap;
}

/* AI thinking indicator */
.message.ai-thinking {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
}

.message.ai-thinking::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Message content */
.message .message-content {
    color: var(--text-primary);
    word-break: break-word;
}

.message .message-content pre {
    background: var(--bg-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    border: 1px solid var(--border-default);
}

.message .message-content code {
    background: rgba(139, 92, 246, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-secondary);
}

.message .message-content .code-block {
    background: var(--bg-primary);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 12px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    border: 1px solid var(--border-default);
    white-space: pre-wrap;
    word-break: break-all;
}

/* Server badge in messages */
.message .message-server {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Command approval card in AI messages */
.command-approval-card {
    margin-top: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.command-header {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
}

.command-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

.command-code {
    padding: 14px 16px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    background: transparent;
    color: var(--accent-success);
    white-space: pre-wrap;
    word-break: break-all;
    border: none;
}

.command-actions {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    flex-wrap: wrap;
}

.command-server-select {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.command-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Chat input area improvements */
.chat-input-area {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    padding: 16px 20px;
}

.chat-input-form {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    min-height: 48px;
    max-height: 200px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    resize: none;
    transition: border-color var(--transition-fast);
}

#messageInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#messageInput::placeholder {
    color: var(--text-muted);
}

/* Image preview container in chat input */
#imagePreviewContainer {
    max-width: 900px;
    margin: 0 auto 12px auto;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

/* Chat header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
}

#chatTitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===========================================
   18c. Chat Responsive Design
   =========================================== */

/* Tablet */
@media (max-width: 1024px) {
    #chatMessages {
        padding: 16px;
        gap: 14px;
    }

    .message {
        max-width: min(90%, 600px);
        padding: 12px 16px;
        font-size: 14px;
    }

    .chat-input-form {
        padding: 0 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    #chatMessages {
        padding: 12px;
        gap: 12px;
    }

    .message {
        max-width: 92%;
        padding: 11px 14px;
        font-size: 14px;
        border-radius: 16px;
    }

    .message.user {
        border-bottom-right-radius: 4px;
    }

    .message.ai {
        border-bottom-left-radius: 4px;
    }

    .message.system {
        font-size: 12px;
        padding: 8px 14px;
    }

    .message .ai-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .message .message-content pre,
    .message .message-content .code-block {
        padding: 10px 12px;
        font-size: 12px;
    }

    .command-approval-card {
        margin-top: 10px;
    }

    .command-code {
        font-size: 12px;
        padding: 10px 12px;
    }

    .command-actions {
        flex-direction: column;
        gap: 8px;
    }

    .command-server-select {
        width: 100%;
    }

    .command-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .chat-input-area {
        padding: 12px;
    }

    #messageInput {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 10px 14px;
    }

    .chat-header {
        padding: 12px 16px;
    }

    #chatTitle {
        font-size: 15px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    #chatMessages {
        padding: 10px;
        gap: 10px;
    }

    .message {
        max-width: 95%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .message .message-content pre,
    .message .message-content .code-block {
        font-size: 11px;
        padding: 8px 10px;
    }
}

/* ===========================================
   19. Terminal
   =========================================== */
.terminal-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
}

.terminal-header {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.terminal-wrapper {
    flex: 1;
    background: #0d0d0d;
    padding: 8px;
}

/* ===========================================
   20. Mobile Bottom Nav
   =========================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    z-index: 100;
}

.bottom-nav-items {
    display: flex;
    height: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.bottom-nav-item .icon {
    font-size: 22px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--accent-primary);
}

/* ===========================================
   21. Loading States
   =========================================== */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================================
   22. Responsive
   =========================================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    .app-layout {
        height: 100vh;
        overflow: hidden;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        height: 100vh;
        padding-bottom: var(--mobile-nav-height);
    }

    .menu-toggle {
        display: flex;
    }

    .bottom-nav {
        display: block;
    }

    .page-content {
        padding: 16px;
        padding-bottom: calc(16px + var(--mobile-nav-height));
        height: calc(100vh - var(--header-height) - var(--mobile-nav-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .chat-container,
    .terminal-container {
        height: calc(100vh - var(--header-height) - var(--mobile-nav-height));
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .page-content {
        padding: 12px;
        padding-bottom: calc(12px + var(--mobile-nav-height));
    }

    .top-header {
        padding: 0 12px;
    }

    .page-title {
        font-size: 16px;
    }

    .server-indicator {
        padding: 4px 10px;
        font-size: 12px;
    }

    /* Ensure minimum touch targets */
    .btn, .md-button, .md-filled-button, .md-outlined-button, .md-tonal-button {
        min-height: 40px;
    }

    .btn-sm, .md-button-sm {
        min-height: 36px;
    }

    /* Better form inputs on mobile */
    .form-input, .md-text-field-input, .md-select {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Tabs scrollable on tiny screens */
    .tabs, .md-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .tab, .md-tab {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Cards with less padding */
    .card-body, .md-card-body {
        padding: 16px;
    }

    .card-header, .md-card-header {
        padding: 12px 16px;
    }

    /* Modal full width on mobile */
    .modal {
        width: 95%;
        max-height: 85vh;
    }
}

/* ===========================================
   23. Utilities
   =========================================== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-error { color: var(--accent-error); }

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-elevated { background: var(--bg-elevated); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden { display: none !important; }

/* Scrim for mobile sidebar */
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-base);
}

.scrim.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===========================================
   24. MD3 Compatibility Classes (for templates)
   =========================================== */

/* Button compatibility */
.md-button,
.md-filled-button,
.md-outlined-button,
.md-text-button,
.md-tonal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    white-space: nowrap;
}

.md-filled-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm), 0 0 20px rgba(59, 130, 246, 0.2);
}

.md-filled-button:hover:not(:disabled) {
    box-shadow: var(--shadow-md), 0 0 30px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.md-outlined-button,
.md-tonal-button {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.md-outlined-button:hover:not(:disabled),
.md-tonal-button:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.md-text-button {
    background: transparent;
    color: var(--text-secondary);
}

.md-text-button:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.md-button:disabled,
.md-filled-button:disabled,
.md-outlined-button:disabled,
.md-tonal-button:disabled,
.md-text-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Card compatibility */
.md-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.md-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.md-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.md-card-body {
    padding: 20px;
}

/* Chip compatibility */
.md-chip,
.md-chip-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.md-chip-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border-color: rgba(16, 185, 129, 0.3);
}

.md-chip-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.md-chip-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-error);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Form compatibility */
.md-text-field {
    margin-bottom: 16px;
}

.md-text-field-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.md-text-field-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.md-text-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Table compatibility */
.md-data-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

.md-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.md-data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
}

.md-data-table td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-default);
}

/* Tabs compatibility */
.md-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

.md-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.md-tab.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.md-tab-content {
    display: none;
}

.md-tab-content.active {
    display: block;
}

/* Dialog compatibility */
.md-dialog-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.md-dialog-container.open {
    opacity: 1;
    visibility: visible;
}

.md-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 201;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.md-dialog-container.open .md-dialog {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.md-dialog-headline {
    font-size: 18px;
    font-weight: 600;
}

.md-dialog-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.md-dialog-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-default);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Toast/Snackbar compatibility */
.md-snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
    z-index: 300;
    opacity: 0;
    transition: all var(--transition-base);
}

.md-snackbar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Empty state compatibility */
.md-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

/* Status dot compatibility */
.md-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.md-status-dot.online {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
}

.md-status-dot.offline {
    background: var(--text-muted);
}

/* Spinner compatibility */
.md-progress-circular {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Nav compatibility */
.md-nav-drawer {
    width: var(--nav-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-base);
}

.md-nav-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.md-nav-drawer-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.md-nav-drawer-item.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.md-nav-drawer-section-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
}

.md-top-app-bar {
    height: var(--header-height);
    padding: 0 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.md-top-app-bar-headline {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.md-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    z-index: 100;
}

.md-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.md-bottom-nav-item:hover,
.md-bottom-nav-item.active {
    color: var(--accent-primary);
}

.md-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-base);
}

.md-scrim.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.md-icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-icon-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Button size variants */
.md-button-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.md-button-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* Select dropdown styling */
.md-select {
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    min-width: 150px;
    transition: all var(--transition-fast);
}

.md-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.md-select:hover {
    border-color: var(--border-hover);
}

.md-app-content {
    flex: 1;
    margin-left: var(--nav-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Server item compatibility */
.md-server-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.md-server-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.md-server-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
}

.md-server-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.md-server-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.md-server-item:hover .md-server-actions {
    opacity: 1;
}

/* Stat card compatibility */
.md-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.md-stat-card-title {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.md-stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

/* Checkbox compatibility */
.md-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.md-checkbox-input { display: none; }

.md-checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-hover);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.md-checkbox-input:checked + .md-checkbox-box {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.md-checkbox-checkmark {
    color: white;
    font-size: 14px;
    opacity: 0;
}

.md-checkbox-input:checked + .md-checkbox-box .md-checkbox-checkmark {
    opacity: 1;
}

.md-checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Fix for nav items with icons */
.nav-item .material-symbols-rounded,
.md-nav-drawer-item .material-symbols-rounded,
.md-bottom-nav-item .material-symbols-rounded,
.server-item .material-symbols-rounded {
    font-size: 20px;
}

/* Ensure proper layout for app */
.md-app {
    display: flex;
    min-height: 100vh;
}

/* Nav rail for tablet (hidden by default, shown at tablet breakpoint) */
.md-nav-rail {
    display: none;
}

@media (max-width: 768px) {
    .md-nav-drawer {
        transform: translateX(-100%);
    }

    .md-nav-drawer.open {
        transform: translateX(0);
    }

    .md-app-content {
        margin-left: 0;
    }

    .md-bottom-nav {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar, .md-nav-drawer {
        width: var(--nav-width-collapsed);
    }

    .sidebar-logo span:not(.sidebar-logo-icon),
    .md-nav-drawer .md-nav-drawer-item-label,
    .nav-item span:not(.icon):not(.material-symbols-rounded),
    .nav-section-title,
    .md-nav-drawer-section-header {
        display: none;
    }

    .main-content, .md-app-content {
        margin-left: var(--nav-width-collapsed);
    }
}

/* Desktop: full sidebar */
@media (min-width: 1025px) {
    .sidebar, .md-nav-drawer {
        transform: translateX(0);
    }

    .main-content, .md-app-content {
        margin-left: var(--nav-width);
    }
}

/* ===========================================
   25. GLASSMORPHISM EFFECTS
   =========================================== */

/* Glass Card - Frosted glass effect for cards */
.glass-card {
    background: rgba(24, 24, 27, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.glass-card:hover {
    background: rgba(24, 24, 27, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 12px -2px rgba(0, 0, 0, 0.4),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Glass Panel - For larger sections */
.glass-panel {
    background: rgba(17, 17, 19, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.4),
        0 8px 10px -6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Frosted Glass Modal */
.modal.glass-modal,
.md-dialog.glass-modal {
    background: rgba(24, 24, 27, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal.glass-modal .modal-header,
.md-dialog.glass-modal .modal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ===========================================
   26. MICRO-ANIMATIONS
   =========================================== */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.4);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    animation: shimmer 2s linear infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Loading Skeleton Animation */
.skeleton-loading {
    background: linear-gradient(
        90deg,
        var(--bg-elevated) 0%,
        var(--bg-hover) 20%,
        var(--bg-active) 40%,
        var(--bg-hover) 60%,
        var(--bg-elevated) 80%,
        var(--bg-elevated) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
}

/* Button Hover Lift Effect */
.btn-lift,
.btn.btn-lift {
    transition: all var(--transition-fast);
}

.btn-lift:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow:
        0 10px 20px -5px rgba(0, 0, 0, 0.4),
        0 6px 10px -3px rgba(0, 0, 0, 0.3);
}

.btn-lift:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 5px 10px -3px rgba(0, 0, 0, 0.3),
        0 3px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Card Hover Glow Effect */
.card-glow,
.card.card-glow {
    transition: all var(--transition-base);
}

.card-glow:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.card-glow.glow-success:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow:
        0 0 20px rgba(16, 185, 129, 0.2),
        0 0 40px rgba(16, 185, 129, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.card-glow.glow-warning:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow:
        0 0 20px rgba(245, 158, 11, 0.2),
        0 0 40px rgba(245, 158, 11, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.card-glow.glow-error:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow:
        0 0 20px rgba(239, 68, 68, 0.2),
        0 0 40px rgba(239, 68, 68, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

/* ===========================================
   27. NEW COMPONENT STYLES
   =========================================== */

/* Score Gauge - Circular Progress Indicator */
.score-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-gauge-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-gauge-bg {
    fill: none;
    stroke: var(--bg-active);
    stroke-width: 8;
}

.score-gauge-progress {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease-out;
}

.score-gauge-progress.success { stroke: var(--accent-success); }
.score-gauge-progress.warning { stroke: var(--accent-warning); }
.score-gauge-progress.error { stroke: var(--accent-error); }

.score-gauge-value {
    position: absolute;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-gauge-label {
    position: absolute;
    bottom: -8px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Severity Badge */
.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.severity-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.severity-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.severity-badge.critical::before { background: #ef4444; }

.severity-badge.high {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.severity-badge.high::before { background: #f97316; }

.severity-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.severity-badge.medium::before { background: #f59e0b; }

.severity-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.severity-badge.low::before { background: #10b981; }

.severity-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.severity-badge.info::before { background: #3b82f6; }

/* Timeline - Vertical Timeline for Events */
.timeline {
    position: relative;
    padding-left: 24px;
}

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

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
}

.timeline-item.success::before { border-color: var(--accent-success); }
.timeline-item.warning::before { border-color: var(--accent-warning); }
.timeline-item.error::before { border-color: var(--accent-error); }

.timeline-item-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-item-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Diff Viewer - Code Diff with Red/Green Highlighting */
.diff-viewer {
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 13px;
}

.diff-viewer-header {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.diff-viewer-filename {
    font-weight: 500;
    color: var(--text-primary);
}

.diff-viewer-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.diff-viewer-stats .additions {
    color: var(--accent-success);
}

.diff-viewer-stats .deletions {
    color: var(--accent-error);
}

.diff-viewer-content {
    overflow-x: auto;
}

.diff-line {
    display: flex;
    line-height: 1.6;
    min-height: 24px;
}

.diff-line-number {
    width: 50px;
    padding: 0 8px;
    text-align: right;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-default);
    user-select: none;
    flex-shrink: 0;
}

.diff-line-content {
    flex: 1;
    padding: 0 12px;
    white-space: pre;
}

.diff-line.addition {
    background: rgba(16, 185, 129, 0.1);
}
.diff-line.addition .diff-line-content::before {
    content: '+';
    color: var(--accent-success);
    margin-right: 8px;
}

.diff-line.deletion {
    background: rgba(239, 68, 68, 0.1);
}
.diff-line.deletion .diff-line-content::before {
    content: '-';
    color: var(--accent-error);
    margin-right: 8px;
}

.diff-line.context .diff-line-content::before {
    content: ' ';
    margin-right: 8px;
}

/* Status Pill - Small Status Indicators */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.status-pill.inactive {
    background: rgba(113, 113, 122, 0.15);
    color: var(--text-muted);
}

.status-pill.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.status-pill.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-error);
}

.status-pill.processing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.status-pill.processing::before {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Progress Ring - SVG Circular Progress */
.progress-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--bg-active);
}

.progress-ring-progress {
    fill: none;
    stroke: var(--accent-primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-progress.success { stroke: var(--accent-success); }
.progress-ring-progress.warning { stroke: var(--accent-warning); }
.progress-ring-progress.error { stroke: var(--accent-error); }

.progress-ring-text {
    position: absolute;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Small progress ring */
.progress-ring.sm {
    width: 32px;
    height: 32px;
}
.progress-ring.sm .progress-ring-text {
    font-size: 10px;
}

/* Medium progress ring */
.progress-ring.md {
    width: 48px;
    height: 48px;
}
.progress-ring.md .progress-ring-text {
    font-size: 12px;
}

/* Large progress ring */
.progress-ring.lg {
    width: 80px;
    height: 80px;
}
.progress-ring.lg .progress-ring-text {
    font-size: 16px;
}

/* Cost Bar - Horizontal Bar for Budget Progress */
.cost-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.cost-bar-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.cost-bar-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.cost-bar-track {
    height: 8px;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.cost-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.cost-bar-fill.warning {
    background: var(--accent-warning);
}

.cost-bar-fill.danger {
    background: var(--accent-error);
}

.cost-bar-fill.success {
    background: var(--gradient-success);
}

.cost-bar-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.cost-bar-marker {
    font-size: 11px;
    color: var(--text-muted);
}

/* Dependency Node - For Dependency Graph */
.dependency-node {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dependency-node:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.dependency-node.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
}

.dependency-node-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-active);
    color: var(--accent-primary);
    font-size: 14px;
}

.dependency-node-name {
    font-weight: 500;
}

.dependency-node-version {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.dependency-node.outdated {
    border-color: rgba(245, 158, 11, 0.4);
}
.dependency-node.outdated .dependency-node-icon {
    color: var(--accent-warning);
}

.dependency-node.vulnerable {
    border-color: rgba(239, 68, 68, 0.4);
}
.dependency-node.vulnerable .dependency-node-icon {
    color: var(--accent-error);
}

/* Dependency Graph Container */
.dependency-graph {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
}

/* ===========================================
   28. DARK/LIGHT THEME
   =========================================== */

/* Light Theme Variables */
[data-theme="light"] {
    /* Background Colors - Light */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-elevated: #f3f4f6;
    --bg-hover: #e5e7eb;
    --bg-active: #d1d5db;

    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;

    /* Border Colors */
    --border-default: #e5e7eb;
    --border-hover: #d1d5db;
    --border-accent: rgba(59, 130, 246, 0.5);

    /* Shadows - Lighter for light mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.2);

    /* Gradient adjustments */
    --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.02) 100%);
}

/* Light theme specific overrides */
[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .glass-panel {
    background: rgba(249, 250, 251, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal.glass-modal,
[data-theme="light"] .md-dialog.glass-modal {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .skeleton-loading {
    background: linear-gradient(
        90deg,
        #f3f4f6 0%,
        #e5e7eb 20%,
        #d1d5db 40%,
        #e5e7eb 60%,
        #f3f4f6 80%,
        #f3f4f6 100%
    );
    background-size: 200% 100%;
}

[data-theme="light"] .diff-viewer {
    background: #fafafa;
}

[data-theme="light"] .diff-line.addition {
    background: rgba(16, 185, 129, 0.08);
}

[data-theme="light"] .diff-line.deletion {
    background: rgba(239, 68, 68, 0.08);
}

/* Smooth theme transition */
body,
.sidebar,
.main-content,
.card,
.modal,
.btn,
.form-input {
    transition:
        background-color var(--transition-slow),
        border-color var(--transition-slow),
        color var(--transition-slow),
        box-shadow var(--transition-slow);
}

/* ===========================================
   29. KEYBOARD SHORTCUT HINTS
   =========================================== */

/* Keyboard Key Styling */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 0 var(--border-default);
}

.kbd + .kbd {
    margin-left: 4px;
}

/* Keyboard combination separator */
.kbd-separator {
    margin: 0 4px;
    color: var(--text-muted);
    font-size: 11px;
}

/* Shortcut Hint - Small Shortcut Indicator */
.shortcut-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
}

.shortcut-hint .kbd {
    height: 20px;
    min-width: 20px;
    font-size: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 4px;
}

/* Shortcut hint in buttons/menu items */
.nav-item .shortcut-hint,
.btn .shortcut-hint {
    margin-left: auto;
    opacity: 0.7;
}

/* ===========================================
   30. ENHANCED NAVIGATION
   =========================================== */

/* Collapsible Sidebar Sections */
.nav-section-collapsible {
    margin-bottom: 8px;
}

.nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-section-toggle:hover {
    color: var(--text-secondary);
}

.nav-section-toggle-icon {
    font-size: 16px;
    transition: transform var(--transition-fast);
}

.nav-section-collapsible.collapsed .nav-section-toggle-icon {
    transform: rotate(-90deg);
}

.nav-section-content {
    overflow: hidden;
    max-height: 500px;
    transition: max-height var(--transition-slow);
}

.nav-section-collapsible.collapsed .nav-section-content {
    max-height: 0;
}

/* Breadcrumb Styling */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--accent-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 12px;
}

/* Command Palette / Quick Search Modal */
.command-palette {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.3);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.command-palette.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.command-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 299;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.command-palette-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-default);
}

.command-palette-icon {
    color: var(--text-muted);
    font-size: 20px;
}

.command-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.command-palette-input::placeholder {
    color: var(--text-muted);
}

.command-palette-shortcut {
    display: flex;
    gap: 4px;
}

.command-palette-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.command-palette-group {
    margin-bottom: 8px;
}

.command-palette-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
}

.command-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.command-palette-item:hover,
.command-palette-item.selected {
    background: var(--bg-hover);
}

.command-palette-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 16px;
}

.command-palette-item-content {
    flex: 1;
}

.command-palette-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.command-palette-item-description {
    font-size: 12px;
    color: var(--text-tertiary);
}

.command-palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-default);
    font-size: 12px;
    color: var(--text-muted);
}

.command-palette-hints {
    display: flex;
    gap: 16px;
}

.command-palette-hint {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===========================================
   31. DATA VISUALIZATION
   =========================================== */

/* Chart Container Improvements */
.chart-container {
    position: relative;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
}

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

.chart-container-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container-legend {
    display: flex;
    gap: 16px;
}

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

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

.chart-legend-dot.primary { background: var(--accent-primary); }
.chart-legend-dot.success { background: var(--accent-success); }
.chart-legend-dot.warning { background: var(--accent-warning); }
.chart-legend-dot.error { background: var(--accent-error); }
.chart-legend-dot.secondary { background: var(--accent-secondary); }

.chart-container-body {
    position: relative;
    min-height: 200px;
}

.chart-container-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* Heatmap Cell - For Usage Heatmaps */
.heatmap {
    display: grid;
    gap: 2px;
}

.heatmap-row {
    display: flex;
    gap: 2px;
}

.heatmap-cell {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--bg-active);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.2);
    z-index: 1;
}

/* Heatmap intensity levels */
.heatmap-cell.level-0 { background: var(--bg-elevated); }
.heatmap-cell.level-1 { background: rgba(59, 130, 246, 0.2); }
.heatmap-cell.level-2 { background: rgba(59, 130, 246, 0.4); }
.heatmap-cell.level-3 { background: rgba(59, 130, 246, 0.6); }
.heatmap-cell.level-4 { background: rgba(59, 130, 246, 0.8); }
.heatmap-cell.level-5 { background: var(--accent-primary); }

/* Success-based heatmap */
.heatmap.success .heatmap-cell.level-1 { background: rgba(16, 185, 129, 0.2); }
.heatmap.success .heatmap-cell.level-2 { background: rgba(16, 185, 129, 0.4); }
.heatmap.success .heatmap-cell.level-3 { background: rgba(16, 185, 129, 0.6); }
.heatmap.success .heatmap-cell.level-4 { background: rgba(16, 185, 129, 0.8); }
.heatmap.success .heatmap-cell.level-5 { background: var(--accent-success); }

.heatmap-labels {
    display: flex;
    gap: 2px;
    font-size: 10px;
    color: var(--text-muted);
}

.heatmap-label {
    width: 14px;
    text-align: center;
}

.heatmap-tooltip {
    position: absolute;
    padding: 6px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

/* Sparkline Container */
.sparkline {
    display: inline-flex;
    align-items: flex-end;
    gap: 1px;
    height: 24px;
    padding: 2px 0;
}

.sparkline-bar {
    width: 3px;
    background: var(--accent-primary);
    border-radius: 1px;
    transition: height var(--transition-fast);
}

.sparkline-bar:hover {
    background: var(--accent-primary-hover);
}

.sparkline.success .sparkline-bar { background: var(--accent-success); }
.sparkline.warning .sparkline-bar { background: var(--accent-warning); }
.sparkline.error .sparkline-bar { background: var(--accent-error); }

/* Sparkline with line instead of bars */
.sparkline-line {
    position: relative;
    height: 24px;
    width: 100px;
}

.sparkline-line svg {
    width: 100%;
    height: 100%;
}

.sparkline-line-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sparkline-line-area {
    fill: url(#sparkline-gradient);
}

/* Mini Stats with Sparkline */
.mini-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-stat-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-stat-change.positive {
    color: var(--accent-success);
}

.mini-stat-change.negative {
    color: var(--accent-error);
}

/* ===========================================
   32. ADDITIONAL UTILITIES
   =========================================== */

/* Stagger animations for lists */
.stagger-list > *:nth-child(1) { animation-delay: 0ms; }
.stagger-list > *:nth-child(2) { animation-delay: 50ms; }
.stagger-list > *:nth-child(3) { animation-delay: 100ms; }
.stagger-list > *:nth-child(4) { animation-delay: 150ms; }
.stagger-list > *:nth-child(5) { animation-delay: 200ms; }
.stagger-list > *:nth-child(6) { animation-delay: 250ms; }
.stagger-list > *:nth-child(7) { animation-delay: 300ms; }
.stagger-list > *:nth-child(8) { animation-delay: 350ms; }
.stagger-list > *:nth-child(9) { animation-delay: 400ms; }
.stagger-list > *:nth-child(10) { animation-delay: 450ms; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .bottom-nav,
    .command-palette,
    .modal-backdrop {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    body {
        background: white;
        color: black;
    }

    .card,
    .glass-card,
    .glass-panel {
        border: 1px solid #ccc;
        box-shadow: none;
        backdrop-filter: none;
    }
}

/* ===========================================
   Image Modal - Full Screen Preview
   =========================================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease;
}

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

.image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.image-modal-close:hover {
    background: var(--accent-error);
    transform: scale(1.1);
}

/* ===========================================
   Chat Images - Inline Display
   =========================================== */
.message-image {
    margin-top: 12px;
    max-width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.message-image img {
    display: block;
    width: 100%;
    max-width: 400px;
    max-height: 350px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    object-fit: contain;
    background: var(--bg-primary);
}

.message-image img:hover {
    opacity: 0.9;
}

/* Images in user messages */
.message.user .message-image img {
    max-width: 300px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Images in AI messages */
.message.ai .message-image img,
.message.assistant .message-image img {
    border: 1px solid var(--border-default);
    max-width: 350px;
    max-height: 350px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message.ai .message-image img:hover,
.message.assistant .message-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Assistant message styling (same as AI) */
.message.assistant {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
}

/* ===========================================
   Screenshot Display
   =========================================== */
.screenshot-message {
    max-width: min(90%, 800px) !important;
    padding: 14px !important;
}

.screenshot-wrapper {
    margin-top: 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
}

.screenshot-image {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: block;
    background: var(--bg-primary);
}

.screenshot-image:hover {
    opacity: 0.95;
}

.screenshot-caption {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    gap: 8px;
}

.screenshot-caption::before {
    content: '📷';
}

/* ===========================================
   Image Preview in Chat Input
   =========================================== */
#imagePreviewContainer {
    display: none;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
}

.image-preview-wrapper,
.file-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    position: relative;
}

.image-preview-wrapper img {
    max-height: 80px;
    max-width: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.file-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-preview-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.file-preview-size {
    font-size: 12px;
    color: var(--text-tertiary);
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--accent-error);
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.remove-image-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Mobile optimizations for images */
@media (max-width: 768px) {
    .message-image img {
        max-width: 100%;
        max-height: 250px;
    }

    .message.user .message-image img {
        max-width: 100%;
    }

    .screenshot-message {
        max-width: 95% !important;
        padding: 10px !important;
    }

    .screenshot-image {
        max-height: 300px;
    }

    .screenshot-caption {
        font-size: 11px;
        padding: 8px 12px;
    }

    .image-modal-content img {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .image-modal-close {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 10001;
    }
}

@media (max-width: 480px) {
    .message-image img {
        max-height: 200px;
    }

    .screenshot-image {
        max-height: 250px;
    }
}

/* ===========================================
   28. NEBULAOPS OVERHAUL - UI/UX IMPROVEMENTS
   =========================================== */

/* ----------------------------------------
   28.1 Focus & Accessibility Styles
   ---------------------------------------- */

/* Focus-visible ring for all interactive elements */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

.btn:focus-visible,
.md-button:focus-visible,
.md-filled-button:focus-visible,
.md-outlined-button:focus-visible,
.nav-item:focus-visible,
.server-item:focus-visible,
.form-input:focus-visible,
.md-text-field-input:focus-visible,
.md-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Icon button focus (larger touch target) */
.btn-icon:focus-visible,
.md-icon-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Card focus for keyboard navigation */
.card:focus-visible,
.md-card:focus-visible,
.server-card:focus-visible {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Tab focus */
.tab:focus-visible,
.md-tab:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 16px;
}

/* ----------------------------------------
   28.2 Enhanced Skeleton Loaders
   ---------------------------------------- */

/* Base shimmer animation */
@keyframes shimmerPulse {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Skeleton base */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        var(--bg-elevated) 0%,
        var(--bg-hover) 20%,
        var(--bg-active) 40%,
        var(--bg-hover) 60%,
        var(--bg-elevated) 80%,
        var(--bg-elevated) 100%
    );
    background-size: 200% 100%;
    animation: shimmerPulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* Skeleton stat card */
.skeleton-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-stat-card .skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.skeleton-stat-card .skeleton-label {
    width: 80px;
    height: 14px;
}

.skeleton-stat-card .skeleton-value {
    width: 100px;
    height: 28px;
}

.skeleton-stat-card .skeleton-bar {
    width: 100%;
    height: 8px;
    margin-top: 8px;
}

/* Skeleton server card */
.skeleton-server-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.skeleton-server-card .skeleton-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.skeleton-server-card .skeleton-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.skeleton-server-card .skeleton-name {
    flex: 1;
    height: 18px;
}

.skeleton-server-card .skeleton-stats {
    height: 12px;
    width: 60%;
}

/* Skeleton table row */
.skeleton-table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-default);
}

.skeleton-table-row .skeleton-cell {
    height: 16px;
}

.skeleton-table-row .skeleton-cell-sm {
    width: 60px;
}

.skeleton-table-row .skeleton-cell-md {
    width: 120px;
}

.skeleton-table-row .skeleton-cell-lg {
    flex: 1;
}

/* Skeleton list item */
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-default);
}

.skeleton-list-item .skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-list-item .skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-list-item .skeleton-line-1 {
    height: 16px;
    width: 70%;
}

.skeleton-list-item .skeleton-line-2 {
    height: 12px;
    width: 40%;
}

/* ----------------------------------------
   28.3 Status Indicator Pulse Animations
   ---------------------------------------- */

/* Online status pulse */
@keyframes statusPulseOnline {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* Warning status pulse */
@keyframes statusPulseWarning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
}

/* Error status pulse */
@keyframes statusPulseError {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Status dot with pulse animation */
.status-dot.pulse {
    animation: statusPulseOnline 2s ease-in-out infinite;
}

.status-dot.online.pulse {
    animation: statusPulseOnline 2s ease-in-out infinite;
}

.status-dot.warning.pulse {
    animation: statusPulseWarning 2s ease-in-out infinite;
}

.status-dot.error.pulse {
    animation: statusPulseError 2s ease-in-out infinite;
}

/* Connection status badge with animation */
.connection-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}

.connection-status-badge.connected {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.connection-status-badge.connecting {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}

.connection-status-badge.disconnected {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-error);
}

.connection-status-badge .retry-count {
    font-size: 11px;
    opacity: 0.8;
}

/* Real-time update indicator */
.realtime-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.realtime-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: statusPulseOnline 2s ease-in-out infinite;
}

/* ----------------------------------------
   28.4 Modern Card Hover Effects
   ---------------------------------------- */

/* Card with hover lift and glow */
.card-hover-lift {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 12px 24px -8px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.15);
}

/* Card with gradient accent bar on hover */
.card-accent-hover {
    position: relative;
    overflow: hidden;
}

.card-accent-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-accent-hover:hover::before {
    transform: scaleX(1);
}

/* Server card enhanced hover */
.server-card-enhanced {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.server-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.server-card-enhanced:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: var(--bg-elevated);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.server-card-enhanced:hover::before {
    opacity: 1;
}

.server-card-enhanced.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.server-card-enhanced.active::before {
    opacity: 1;
}

/* ----------------------------------------
   28.5 Button Loading States
   ---------------------------------------- */

/* Button with spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-secondary.btn-loading::after,
.btn-ghost.btn-loading::after,
.md-outlined-button.btn-loading::after {
    border-color: rgba(59, 130, 246, 0.3);
    border-top-color: var(--accent-primary);
}

/* ----------------------------------------
   28.6 Terminal Enhancements
   ---------------------------------------- */

/* macOS-style terminal header */
.terminal-header-macos {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #323232 0%, #2a2a2a 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s;
}

.terminal-dot:hover {
    opacity: 0.8;
}

.terminal-dot.red {
    background: linear-gradient(180deg, #ff5f57 0%, #e64940 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.terminal-dot.yellow {
    background: linear-gradient(180deg, #febc2e 0%, #e6a623 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.terminal-dot.green {
    background: linear-gradient(180deg, #28c840 0%, #24b33a 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.terminal-title-bar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
}

.terminal-actions {
    display: flex;
    gap: 8px;
}

/* Terminal copy button */
.terminal-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.terminal-copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

/* Terminal search bar */
.terminal-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.terminal-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.terminal-search-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Scrollback indicator */
.terminal-scrollback {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    transform: translateY(10px);
}

.terminal-scrollback.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal-scrollback:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
}

/* ----------------------------------------
   28.7 Mobile Touch Improvements
   ---------------------------------------- */

/* Touch-friendly minimum sizes (44px) */
@media (max-width: 768px) {
    .btn,
    .md-button,
    .nav-item,
    .server-item,
    .bottom-nav-item {
        min-height: 44px;
    }

    .btn-icon,
    .md-icon-button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Touch action area for cards */
    .card-interactive,
    .server-card,
    .server-card-enhanced {
        min-height: 48px;
    }

    /* Larger checkboxes/radios */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
    }
}

/* Bottom sheet modal for mobile */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    max-height: 90vh;
    overflow-y: auto;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 12px;
}

.bottom-sheet-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
}

.bottom-sheet-title {
    font-size: 18px;
    font-weight: 600;
}

.bottom-sheet-content {
    padding: 20px;
}

/* Swipe gesture indicator */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.5;
}

.swipe-indicator.left {
    left: 8px;
}

.swipe-indicator.right {
    right: 8px;
}

/* ----------------------------------------
   28.8 Toast/Notification System
   ---------------------------------------- */

/* Toast container */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: calc(var(--mobile-nav-height) + 16px);
        right: 16px;
        left: 16px;
    }
}

/* Enhanced toast styles */
.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease;
}

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

.toast-notification.toast-exit {
    animation: toastSlideOut 0.2s ease forwards;
}

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

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.toast-notification.success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.toast-notification.error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-error);
}

.toast-notification.warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.toast-notification.info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

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

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ----------------------------------------
   28.9 Live View Page Styles
   ---------------------------------------- */

/* Live view container */
.live-view-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    background: #000;
}

@media (max-width: 768px) {
    .live-view-container {
        height: calc(100vh - var(--header-height) - var(--mobile-nav-height));
    }
}

/* Live view header */
.live-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    flex-wrap: wrap;
}

.live-view-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ef4444;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: statusPulseError 1.5s ease-in-out infinite;
}

.live-view-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.live-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-control-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FPS slider */
.fps-slider {
    width: 120px;
    height: 4px;
    appearance: none;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.fps-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.fps-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.fps-value {
    min-width: 32px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Quality dropdown */
.quality-select {
    padding: 6px 28px 6px 10px;
    font-size: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
}

/* Live view screen */
.live-view-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.live-view-screen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.live-view-screen.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
}

/* Live view placeholder */
.live-view-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
}

.live-view-placeholder .icon {
    font-size: 64px;
    color: var(--text-muted);
}

.live-view-placeholder-text {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Live view stats bar */
.live-view-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    font-size: 12px;
}

.live-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-stat-label {
    color: var(--text-tertiary);
}

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

.live-stat-value.good {
    color: var(--accent-success);
}

.live-stat-value.warning {
    color: var(--accent-warning);
}

.live-stat-value.bad {
    color: var(--accent-error);
}

/* ----------------------------------------
   28.10 Page Transition Loading
   ---------------------------------------- */

/* Top loading bar */
.page-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 9999;
    overflow: hidden;
}

.page-loading-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.page-loading-bar.loading::before {
    width: 90%;
    animation: loadingBarPulse 2s ease-in-out infinite;
}

.page-loading-bar.complete::before {
    width: 100%;
}

@keyframes loadingBarPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Fullscreen loading overlay */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.page-loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.page-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-loading-text {
    font-size: 14px;
    color: var(--text-secondary);
}
