/* ============================================
   LOVABLE-INSPIRED DARK THEME
   Modern, Clean, Beautiful Dark Design System
   ============================================ */

/* ==================== DESIGN TOKENS ==================== */
:root {
    /* Background colors - Deep dark layers */
    --bg-primary: #0c0c0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;
    --bg-card: #16161f;
    --bg-card-hover: #1e1e2a;
    --bg-sidebar: rgba(12, 12, 15, 0.9);
    --bg-input: #0f0f14;
    --bg-gradient-start: #0f0c29;
    --bg-gradient-end: #302b63;
    
    /* Border colors */
    --border-primary: rgba(255, 255, 255, 0.06);
    --border-secondary: rgba(255, 255, 255, 0.04);
    --border-focus: #a78bfa;
    
    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;
    
    /* Primary Accent - Lovable Purple/Blue for Dark */
    --accent-primary: #a78bfa;
    --accent-primary-dark: #8b5cf6;
    --accent-primary-light: #c4b5fd;
    --accent-primary-bg: rgba(167, 139, 250, 0.1);
    
    /* Accent Colors - Brighter for dark mode */
    --accent-blue: #60a5fa;
    --accent-green: #34d399;
    --accent-red: #f87171;
    --accent-orange: #fbbf24;
    --accent-purple: #c084fc;
    --accent-pink: #f472b6;
    --accent-teal: #2dd4bf;
    
    /* Gradients - Brighter for dark */
    --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    --gradient-secondary: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --gradient-success: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    --gradient-warning: linear-gradient(135deg, #fbbf24 0%, #fcd34d 100%);
    --gradient-danger: linear-gradient(135deg, #f87171 0%, #fca5a5 100%);
    --gradient-blue: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    --gradient-purple: linear-gradient(135deg, #c084fc 0%, #d8b4fe 100%);
    
    /* Status colors - Glowing */
    --status-up: #34d399;
    --status-down: #f87171;
    --status-warning: #fbbf24;
    --status-paused: #71717a;
    
    /* Chart colors */
    --chart-line: #a78bfa;
    --chart-fill: rgba(167, 139, 250, 0.15);
    
    /* Glass Morphism - Dark */
    --glass-bg: rgba(22, 22, 31, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Shadows - Darker */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
    
    /* Glow Effects - Brighter */
    --glow-primary: 0 0 28px rgba(167, 139, 250, 0.35);
    --glow-success: 0 0 28px rgba(52, 211, 153, 0.35);
    --glow-danger: 0 0 28px rgba(248, 113, 113, 0.35);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Border radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    /* Spacing */
    --sidebar-width: 260px;
}

/* ==================== BASE STYLES ==================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(244, 114, 182, 0.05), transparent),
        radial-gradient(ellipse 40% 60% at 0% 50%, rgba(96, 165, 250, 0.05), transparent);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== SIDEBAR LAYOUT ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-primary);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Modern Logo */
.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

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

.sidebar-logo-text {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.sidebar-logo-easy {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-accent {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    margin: 0.125rem 0.75rem;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    position: relative;
}

.nav-item:hover {
    color: var(--text-secondary);
    background: rgba(167, 139, 250, 0.08);
}

.nav-item.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 4px 14px rgba(167, 139, 250, 0.3);
}

.nav-item i {
    width: 20px;
    font-size: 1rem;
    opacity: 0.85;
    text-align: center;
}

.nav-item.active i {
    opacity: 1;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-secondary);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f0f14;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-width: 0;
}

/* ==================== TOP HEADER BAR ==================== */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 2rem;
    border-bottom: 1px solid var(--border-secondary);
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: var(--accent-primary-bg);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    outline: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    min-width: 0;
    flex: 1 1 auto;
}

.breadcrumb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.breadcrumb-item {
    color: var(--text-tertiary);
}

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

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    min-width: 0;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    border-color: rgba(167, 139, 250, 0.2);
    box-shadow: var(--shadow-md), 0 0 20px rgba(167, 139, 250, 0.1);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 1;
}

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

.stat-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.stat-dot.blue { background: var(--accent-blue); box-shadow: 0 0 8px rgba(96, 165, 250, 0.5); }
.stat-dot.green { background: var(--accent-green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
.stat-dot.red { background: var(--accent-red); box-shadow: 0 0 8px rgba(248, 113, 113, 0.5); }
.stat-dot.purple { background: var(--accent-purple); box-shadow: 0 0 8px rgba(192, 132, 252, 0.5); }

.stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.stat-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.stat-card:hover .stat-arrow {
    transform: translateX(2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-value-small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-change.positive { color: var(--accent-green); }
.stat-change.negative { color: var(--accent-red); }
.stat-change.neutral { color: var(--text-secondary); }

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* ==================== BOLD COLORED STAT CARDS ==================== */
.stat-card-colored {
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    color: white;
    min-height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
    box-sizing: border-box;
}

.stat-card-colored:hover {
    transform: translateY(-3px);
    filter: brightness(1.12);
}

.stat-card-colored::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.stat-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.stat-card-green {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.stat-card-red {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

.stat-card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.stat-card-purple {
    background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.stat-card-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    z-index: 1;
}

.stat-card-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    min-width: 0;
}

.stat-card-number {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    min-width: 0;
}

.stat-card-sub {
    font-size: 0.6875rem;
    opacity: 0.7;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

/* ==================== DASHBOARD GRID LAYOUT ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* ==================== ADMIN DASHBOARD ==================== */
.admin-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.admin-action-card {
    margin-bottom: 1.5rem;
}

.admin-actions-grid {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.admin-actions-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-actions-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-action-form {
    display: contents;
}

.admin-action-btn {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: normal;
    line-height: 1.25;
}

.admin-action-btn i {
    flex: 0 0 auto;
}

.admin-status-row,
.admin-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-secondary);
}

.admin-status-row-last {
    border-bottom: 0;
}

.admin-status-row span,
.admin-list-row span {
    min-width: 0;
}

.admin-list-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-secondary);
}

.dashboard-panel-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-panel-title i {
    color: var(--accent-primary);
    font-size: 0.875rem;
}

.dashboard-panel-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Status Distribution Chart */
.status-chart-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
}

.status-chart-wrapper {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    position: relative;
}

.status-chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

.status-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.up { background: var(--status-up); }
.legend-dot.down { background: var(--status-down); }
.legend-dot.paused { background: var(--status-paused); }

.legend-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    flex: 1;
}

.legend-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Uptime by Type Bars */
.type-bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.type-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

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

.type-bar-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.type-bar-label i {
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

.type-bar-value {
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.type-bar-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.type-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.type-bar-fill.blue { background: linear-gradient(90deg, #60a5fa, #93c5fd); }
.type-bar-fill.purple { background: linear-gradient(90deg, #c084fc, #d8b4fe); }
.type-bar-fill.orange { background: linear-gradient(90deg, #fbbf24, #fde68a); }
.type-bar-fill.green { background: linear-gradient(90deg, #34d399, #6ee7b7); }

/* Recent Activity Panel */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-secondary);
    transition: background var(--transition-fast);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--bg-tertiary);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.activity-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.activity-dot.up {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

.activity-dot.down {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-description {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.125rem;
}

.activity-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Sidebar Search Box */
.sidebar-search {
    padding: 0 1rem 0.75rem;
}

.sidebar-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    font-size: 0.8125rem;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

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

.sidebar-search-input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-input);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.sidebar-search-wrapper {
    position: relative;
}

.sidebar-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

/* Responsive dashboard grid */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .admin-actions-grid-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .stat-card-colored {
        min-height: auto;
        padding: 1rem;
        gap: 0.75rem;
        width: 100%;
    }

    .stat-card-number {
        font-size: 1.25rem;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .admin-actions-grid-three,
    .admin-actions-grid-two {
        grid-template-columns: 1fr;
    }

    .admin-status-row,
    .admin-list-row {
        align-items: flex-start;
    }
}

/* ==================== CHARTS & PANELS ==================== */
.section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ==================== LEADERBOARD / LISTS ==================== */
.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.leaderboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

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

.leaderboard-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-period {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.leaderboard-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.leaderboard-rank {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.leaderboard-rank.gold { 
    background: linear-gradient(135deg, #fbbf24, #f59e0b); 
    color: #0f0f14;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}
.leaderboard-rank.silver { 
    background: linear-gradient(135deg, #94a3b8, #64748b); 
    color: white; 
}
.leaderboard-rank.bronze { 
    background: linear-gradient(135deg, #f97316, #ea580c); 
    color: white; 
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-badge {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

.leaderboard-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.leaderboard-unit {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

/* ==================== MONITOR LIST ==================== */
.monitor-list-container {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 1.5rem;
}

.monitor-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-tertiary);
}

.monitor-list-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.monitor-list-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-card);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

.monitor-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-card);
    position: relative;
}

.monitor-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-success);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.monitor-row:last-child {
    border-bottom: none;
}

.monitor-row:hover {
    background: var(--bg-card-hover);
}

.monitor-row:hover::before {
    opacity: 1;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.status-indicator.up { 
    background: var(--status-up); 
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.status-indicator.down { 
    background: var(--status-down); 
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
    animation: pulse-down 2s infinite;
}

.status-indicator.paused { 
    background: var(--status-paused); 
}

@keyframes pulse-down {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

.monitor-info {
    flex: 1;
    min-width: 0;
}

.monitor-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.type-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-badge.web { 
    background: rgba(96, 165, 250, 0.15); 
    color: var(--accent-blue); 
}
.type-badge.heartbeat { 
    background: rgba(192, 132, 252, 0.15); 
    color: var(--accent-purple); 
}
.type-badge.tcp { 
    background: rgba(251, 191, 36, 0.15); 
    color: var(--accent-orange); 
}
.type-badge.ping { 
    background: rgba(52, 211, 153, 0.15); 
    color: var(--accent-green); 
}

.monitor-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.monitor-url {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.monitor-context {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
}

.monitor-context.down-context {
    color: var(--accent-red);
}

/* Monitor Metrics */
.monitor-metric {
    text-align: right;
    min-width: 80px;
}

.metric-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.metric-value.good { color: var(--accent-green); }
.metric-value.warn { color: var(--accent-orange); }
.metric-value.bad { color: var(--accent-red); }

.metric-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

.status-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 75px;
    text-align: center;
}

.status-badge.up { 
    background: rgba(52, 211, 153, 0.15); 
    color: #34d399; 
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.status-badge.down { 
    background: rgba(248, 113, 113, 0.15); 
    color: #f87171; 
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.status-badge.paused { 
    background: rgba(113, 113, 122, 0.15); 
    color: #a1a1aa; 
    border: 1px solid rgba(113, 113, 122, 0.2);
}

.edit-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.edit-btn:hover {
    background: var(--accent-primary-bg);
    color: var(--accent-primary);
    transform: scale(1.05);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #0f0f14;
    border: none;
    box-shadow: 0 4px 14px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.45);
    transform: translateY(-1px);
    color: #0f0f14;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

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

.btn-secondary:focus, .btn-secondary:active {
    background: var(--accent-primary-bg);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Button color variants */
.btn-blue, .btn-primary {
    background: var(--gradient-blue);
    border: none;
    color: #0f0f14;
}

.btn-green, .btn-success {
    background: var(--gradient-success);
    border: none;
    color: #0f0f14;
}

.btn-red, .btn-danger {
    background: var(--gradient-danger);
    border: none;
    color: #0f0f14;
}

.btn-purple {
    background: var(--gradient-purple);
    border: none;
    color: #0f0f14;
}

.btn-teal {
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    border: none;
    color: #0f0f14;
}

.btn-pink {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    border: none;
    color: #0f0f14;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

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

/* ==================== DROPDOWN ==================== */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 180px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--accent-primary-bg);
    color: var(--accent-primary);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-divider {
    border-color: var(--border-primary);
    margin: 0.375rem 0;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
}

.empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #0f0f14;
    box-shadow: var(--glow-primary);
    position: relative;
    z-index: 1;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    position: relative;
    z-index: 1;
}

.empty-state p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Empty state color variants */
.empty-icon.blue { background: var(--gradient-blue); }
.empty-icon.pink { background: linear-gradient(135deg, #f472b6, #ec4899); }
.empty-icon.purple { background: var(--gradient-purple); }
.empty-icon.teal { background: linear-gradient(135deg, #2dd4bf, #14b8a6); }

.empty-state-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.5rem auto;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full, 9999px);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: all var(--transition-fast);
}

.feature-chip:hover {
    background: var(--accent-primary-bg);
    border-color: rgba(167, 139, 250, 0.25);
    color: var(--accent-primary);
}

.feature-chip:hover i {
    color: var(--accent-primary);
}

.feature-chip i {
    color: var(--accent-blue);
    font-size: 0.625rem;
    width: 14px;
    text-align: center;
}

.feature-chip span {
    line-height: 1;
}

/* ==================== LANDING PAGE (NO SIDEBAR) ==================== */
.landing-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-secondary);
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    gap: 1rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}

.landing-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: var(--glow-primary);
    flex: 0 0 36px;
}

.landing-logo-text {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-logo-svg {
    color: var(--accent-primary);
}

.footer-logo {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 0 0 auto;
    min-width: 0;
}

.landing-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.landing-nav-link:hover {
    color: var(--accent-primary);
}

.landing-hero {
    padding: 6rem 2rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.landing-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

.landing-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0 0 2rem;
    line-height: 1.7;
}

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.landing-features {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: rgba(167, 139, 250, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(167, 139, 250, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feature-icon.blue { background: rgba(96, 165, 250, 0.15); color: var(--accent-blue); }
.feature-icon.green { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.feature-icon.purple { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple); }
.feature-icon.orange { background: rgba(251, 191, 36, 0.15); color: var(--accent-orange); }

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ==================== LOGIN PAGE ==================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(244, 114, 182, 0.08), transparent);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(22, 22, 31, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f0f14;
    font-size: 1.5rem;
    box-shadow: var(--glow-primary);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .chart-grid,
    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal);
    }

    .sidebar.open + .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 1rem;
        min-width: 0;
    }

    .top-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 0.75rem 1rem;
        gap: 0.625rem;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .breadcrumb {
        gap: 0.375rem;
    }

    .breadcrumb-dot,
    .breadcrumb-item,
    .breadcrumb-separator {
        display: none;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .theme-switcher {
        margin-right: 0;
    }

    .theme-switcher-btn {
        width: 40px;
        height: 40px;
        padding: 0 !important;
    }

    .theme-switcher-btn .theme-name,
    .theme-switcher-btn::after {
        display: none;
    }

    .theme-switcher-btn i {
        margin-right: 0 !important;
    }

    .header-actions > .btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .header-actions > .btn span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .monitor-row {
        display: grid;
        grid-template-columns: 10px 32px minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .monitor-info {
        grid-column: 3 / 5;
        min-width: 0;
    }

    .monitor-name-row {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .monitor-name {
        overflow-wrap: anywhere;
        line-height: 1.25;
    }

    .monitor-url {
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: none;
        line-height: 1.35;
    }

    .monitor-context {
        display: flex;
    }
    
    .monitor-metric {
        grid-column: 1 / -1;
        min-width: 0;
        text-align: left;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-secondary);
        border-radius: var(--radius-md);
        padding: 0.55rem 0.65rem;
    }

    .metric-value,
    .metric-label {
        display: block;
        white-space: nowrap;
    }

    .metric-value {
        font-size: 0.8125rem;
    }

    .metric-label {
        font-size: 0.5625rem;
    }

    .status-badge {
        grid-column: 1 / 4;
        justify-self: start;
    }

    .edit-btn {
        grid-column: 4;
        justify-self: end;
    }
    
    .landing-hero h1 {
        font-size: 2.25rem;
    }
    
    .landing-features-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-cta {
        flex-direction: column;
    }
    
    .monitor-list-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
        padding: 0.85rem 1rem;
    }

    .monitor-list-header > div:first-child {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .monitor-list-count {
        margin-left: 0;
    }

    .monitor-list-header .header-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.5rem;
    }

    .monitor-list-header .header-actions .dropdown,
    .monitor-list-header .header-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .monitor-list-header .header-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0.375rem 0.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-panel-header {
        gap: 0.75rem;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .status-chart-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .content-wrapper .container,
    .content-wrapper .container-fluid {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    .content-wrapper h1,
    .content-wrapper h2,
    .content-wrapper h3 {
        overflow-wrap: anywhere;
    }

    .content-wrapper > .d-flex,
    .content-wrapper .container-fluid > .d-flex,
    .content-wrapper .card-header > .d-flex,
    .content-wrapper .admin-card-header,
    .content-wrapper .leaderboard-header {
        align-items: flex-start !important;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .content-wrapper .card-header .input-group,
    .content-wrapper .admin-card-header .input-group {
        width: 100% !important;
        min-width: 0;
    }

    .content-wrapper .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper .table {
        min-width: 680px;
    }

    .content-wrapper .btn-group {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .content-wrapper .btn-group > .btn,
    .content-wrapper .btn-group > form,
    .content-wrapper .btn-group > form > .btn {
        border-radius: var(--radius-sm) !important;
    }

    .content-wrapper .btn,
    .content-wrapper .form-control,
    .content-wrapper .form-select,
    .content-wrapper textarea {
        min-width: 0;
    }

    .modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }
}

@media (max-width: 640px) {
    .landing-nav {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .landing-logo {
        gap: 0.5rem;
    }

    .landing-logo-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        border-radius: var(--radius-sm);
    }

    .landing-logo-text {
        font-size: 1rem;
        max-width: 150px;
    }

    .landing-nav-links {
        gap: 0.5rem;
    }

    .landing-nav-feature {
        display: none;
    }

    .theme-toggle-btn {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px;
        border-radius: var(--radius-md) !important;
    }

    .landing-nav-signin {
        font-size: 0.8125rem;
    }

    .landing-nav-cta {
        display: none;
    }

    .footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .landing-logo-text {
        max-width: 150px;
    }

    .top-header {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .sidebar-toggle,
    .theme-switcher-btn,
    .header-actions > .btn {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .content-wrapper {
        padding: 0.875rem;
    }

    .monitor-row {
        grid-template-columns: 10px 32px minmax(0, 1fr) 36px;
        gap: 0.625rem;
        padding: 0.875rem;
    }

    .monitor-list-title {
        margin-bottom: 0.25rem;
    }

    .monitor-list-count {
        display: inline-flex;
        margin-left: 0;
    }

    .create-title {
        font-size: 1.45rem;
    }

    .create-section-header,
    .create-section-body,
    .monitor-type-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .create-toggle-row {
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ==================== CREATE MONITOR PAGE ==================== */
.create-monitor-page {
    max-width: 800px;
    margin: 0 auto;
}

.create-header {
    margin-bottom: 2rem;
}

.create-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    transition: color var(--transition-fast);
}

.create-back-link:hover {
    color: var(--accent-primary);
}

.create-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
    letter-spacing: -0.02em;
}

.create-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.create-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.create-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-tertiary);
}

.create-section-number {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f0f14;
    flex-shrink: 0;
}

.create-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.create-section-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0;
}

.create-section-body {
    padding: 1.5rem;
}

/* Monitor type grid */
.monitor-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.625rem;
    padding: 1.25rem 1.5rem;
}

.monitor-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.125rem 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.monitor-type-option:hover {
    border-color: rgba(167, 139, 250, 0.3);
    background: var(--accent-primary-bg);
}

.monitor-type-option.selected {
    border-color: var(--accent-primary);
    background: var(--accent-primary-bg);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.monitor-type-radio {
    display: none;
}

.monitor-type-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.monitor-type-icon.blue { background: rgba(96, 165, 250, 0.15); color: var(--accent-blue); }
.monitor-type-icon.purple { background: rgba(192, 132, 252, 0.15); color: var(--accent-purple); }
.monitor-type-icon.orange { background: rgba(251, 191, 36, 0.15); color: var(--accent-orange); }
.monitor-type-icon.green { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.monitor-type-icon.red { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); }

.monitor-type-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.monitor-type-desc {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

/* Toggle rows for notifications */
.create-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
}

.create-toggle-row:not(:last-child) {
    border-bottom: 1px solid var(--border-secondary);
}

.create-toggle-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.create-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.create-toggle-icon.green {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

.create-toggle-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.create-toggle-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
    overflow-wrap: anywhere;
}

/* Submit area */
.create-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
}

@media (max-width: 768px) {
    .monitor-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .create-submit {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    .create-submit .btn {
        width: 100%;
    }
}

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

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-secondary);
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-logo i {
    color: var(--accent-green);
}

/* ==================== BOOTSTRAP OVERRIDES ==================== */
.card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-xl) !important;
}

.card-header {
    background-color: var(--bg-tertiary) !important;
    border-bottom-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.card-body {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.card-footer {
    background-color: var(--bg-tertiary) !important;
    border-top-color: var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.card-text {
    color: var(--text-secondary) !important;
}

.card-title {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* Table */
.table {
    color: var(--text-primary) !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: var(--bg-tertiary);
    --bs-table-hover-bg: var(--bg-card-hover);
}

.table-hover tbody tr:hover {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

.table thead th {
    border-bottom-color: var(--border-primary) !important;
    color: var(--text-muted) !important;
    background-color: var(--bg-tertiary) !important;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table td, .table th {
    border-color: var(--border-primary) !important;
    padding: 0.875rem 1rem;
}

/* Modal */
.modal-content {
    background-color: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom-color: var(--border-primary) !important;
    background: var(--bg-tertiary) !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
}

.modal-footer {
    border-top-color: var(--border-primary) !important;
    background: var(--bg-tertiary) !important;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}

.modal-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Form elements */
.form-control, .form-select {
    background-color: var(--bg-input) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-lg) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.form-text {
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert {
    border-radius: var(--radius-lg) !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
    font-weight: 500;
}

.alert-success {
    background: rgba(52, 211, 153, 0.15) !important;
    color: #34d399 !important;
}

.alert-danger {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #f87171 !important;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
}

.alert-info {
    background: rgba(96, 165, 250, 0.15) !important;
    color: #60a5fa !important;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.375em 0.65em;
    border-radius: var(--radius-full);
}

.badge.bg-primary { background: var(--gradient-primary) !important; color: #0f0f14 !important; }
.badge.bg-success { background: var(--gradient-success) !important; color: #0f0f14 !important; }
.badge.bg-danger { background: var(--gradient-danger) !important; color: #0f0f14 !important; }
.badge.bg-warning { background: var(--gradient-warning) !important; color: #0f0f14 !important; }
.badge.bg-info { background: var(--gradient-blue) !important; color: #0f0f14 !important; }
.badge.bg-secondary { background: var(--bg-tertiary) !important; color: var(--text-secondary) !important; }

/* Text utilities */
.text-primary { color: var(--accent-primary) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-warning { color: var(--accent-orange) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Background utilities */
.bg-light { background-color: var(--bg-tertiary) !important; }
.bg-white { background-color: var(--bg-card) !important; }

/* Border */
.border { border-color: var(--border-primary) !important; }

/* HR */
hr {
    border-color: var(--border-primary);
    opacity: 1;
}

/* List group */
.list-group-item {
    background-color: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.list-group-item:hover {
    background-color: var(--bg-card-hover) !important;
}

/* Pagination */
.page-link {
    background-color: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-lg) !important;
    margin: 0 0.125rem;
}

.page-link:hover {
    background-color: var(--bg-card-hover) !important;
    color: var(--accent-primary) !important;
}

.page-item.active .page-link {
    background: var(--gradient-primary) !important;
    border-color: transparent !important;
    color: #0f0f14 !important;
}

.page-item.disabled .page-link {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

/* Code */
pre.bg-light, pre {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

code {
    background-color: var(--bg-tertiary);
    color: var(--accent-pink);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-xs);
    font-size: 0.875em;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Nav tabs */
.nav-tabs {
    border-bottom-color: var(--border-primary);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border-color: transparent;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nav-tabs .nav-link:hover {
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.nav-tabs .nav-link.active {
    background: var(--bg-card) !important;
    border-color: var(--border-primary) var(--border-primary) var(--bg-card) !important;
    color: var(--text-primary);
    font-weight: 600;
}

/* Progress bar */
.progress {
    background: var(--bg-tertiary) !important;
    border-radius: var(--radius-full);
    height: 8px;
}

/* Accordion */
.accordion-item {
    background: var(--bg-card) !important;
    border-color: var(--border-primary) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.accordion-button {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: var(--bg-card-hover) !important;
    color: var(--accent-primary) !important;
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    background: var(--bg-card) !important;
    color: var(--text-secondary);
}

/* Form check */
.form-check-input {
    background-color: var(--bg-input);
    border-color: var(--border-primary);
    border-radius: var(--radius-xs);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

/* Input group */
.input-group-text {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary);
    font-weight: 700;
}

/* Links */
a {
    color: var(--accent-primary);
    text-decoration: none;
}

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

/* Spinner */
.spinner-border, .spinner-grow {
    color: var(--accent-primary);
}

/* ==================== FAVICON STYLES ==================== */
.monitor-favicon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favicon-img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    object-fit: contain;
    background: var(--bg-tertiary);
}

.favicon-fallback {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.details-favicon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-favicon .favicon-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
}

.details-favicon .favicon-fallback {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    font-size: 1.25rem;
}

/* ==================== SECURITY AUDIT ==================== */
.security-scan-details {
    overflow-x: hidden;
}

.security-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.security-count-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.security-count-grid > div,
.security-count-list > div,
.security-detail-row {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.security-count-grid > div {
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.security-count-grid strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

.security-count-grid span,
.security-count-list span,
.security-detail-row span,
.finding-meta-grid span {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.security-count-list {
    display: grid;
    gap: 0.5rem;
}

.security-count-list > div,
.security-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
}

.security-action-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--border-primary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
}

.security-action-item + .security-action-item {
    margin-top: 0.75rem;
}

.security-action-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 700;
}

.security-action-content,
.security-finding-body {
    min-width: 0;
}

.security-action-content p,
.finding-detail-block p {
    color: var(--text-secondary);
}

.security-action-link {
    justify-self: end;
}

.security-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.security-findings-list {
    display: grid;
    gap: 1rem;
}

.security-finding {
    border: 1px solid var(--border-primary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    padding: 1rem;
    scroll-margin-top: 5rem;
}

.security-finding-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-secondary);
}

.security-finding-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.finding-detail-block {
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.finding-detail-block strong {
    display: block;
    margin-bottom: 0.35rem;
}

.finding-detail-block p:last-child {
    margin-bottom: 0;
}

.security-code-block {
    display: block;
    max-width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.finding-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.finding-meta-grid > div {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card-hover);
}

.finding-meta-grid strong,
.finding-meta-grid a {
    display: block;
    overflow-wrap: anywhere;
}

.severity-critical {
    border-left-color: var(--accent-red);
}

.severity-high {
    border-left-color: var(--accent-orange);
}

.severity-medium {
    border-left-color: var(--accent-blue);
}

.severity-low {
    border-left-color: var(--text-muted);
}

.severity-info {
    border-left-color: var(--accent-teal);
}

@media (max-width: 640px) {
    .security-count-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-action-item,
    .security-finding-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .security-action-link,
    .security-finding-actions {
        justify-self: stretch;
        justify-content: stretch;
    }

    .security-action-link .btn,
    .security-finding-actions .btn {
        width: 100%;
    }

    .security-detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

/* ==================== SECURITY DASHBOARD FLOW ==================== */
.monitor-metrics-strip {
    display: contents;
}

.security-dashboard {
    display: grid;
    gap: 1.25rem;
}

.security-dashboard-hero,
.security-empty-panel,
.security-section,
.security-activity-panel {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.security-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.5rem;
    overflow: hidden;
}

.security-hero-copy {
    min-width: 0;
}

.security-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.security-dashboard-hero h1 {
    max-width: 760px;
    margin: 0.55rem 0 0.75rem;
    color: var(--text-primary);
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.08;
}

.security-dashboard-hero p,
.security-empty-panel p,
.security-section-header p,
.security-flow-card p,
.security-existing-card p,
.security-monitor-main p {
    color: var(--text-secondary);
}

.security-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.security-coverage-card {
    display: grid;
    align-content: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.security-coverage-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.security-coverage-card strong {
    color: var(--text-primary);
    font-size: 2.4rem;
    line-height: 1;
}

.security-coverage-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.security-coverage-bar {
    height: 0.55rem;
    overflow: hidden;
    border-radius: var(--radius-full);
    background: var(--bg-input);
}

.security-coverage-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient-primary);
}

.security-kpi-grid,
.security-flow-grid,
.security-monitor-grid,
.security-existing-grid,
.security-activity-grid {
    display: grid;
    gap: 1rem;
}

.security-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.security-kpi-card,
.security-flow-card,
.security-existing-card,
.security-monitor-card {
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.security-kpi-card {
    padding: 1rem;
    border-left: 4px solid var(--accent-primary);
}

.security-kpi-card.critical { border-left-color: var(--accent-red); }
.security-kpi-card.high { border-left-color: var(--accent-orange); }
.security-kpi-card.medium { border-left-color: var(--accent-blue); }
.security-kpi-card.scans { border-left-color: var(--accent-green); }

.security-kpi-card span,
.security-monitor-meta span,
.security-activity-row span {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.security-kpi-card strong {
    display: block;
    margin: 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    line-height: 1;
}

.security-kpi-card small {
    color: var(--text-secondary);
}

.security-flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.security-flow-card {
    padding: 1rem;
}

.security-flow-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-full);
    background: var(--accent-primary-bg);
    color: var(--accent-primary);
    font-weight: 800;
}

.security-flow-card h3,
.security-existing-card h3,
.security-monitor-card h3,
.security-section h2,
.security-activity-panel h2 {
    margin: 0;
    color: var(--text-primary);
}

.security-flow-card h3,
.security-existing-card h3,
.security-monitor-card h3 {
    font-size: 1rem;
}

.security-flow-card p,
.security-existing-card p,
.security-monitor-main p {
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.security-section,
.security-empty-panel,
.security-activity-panel {
    padding: 1rem;
}

.security-empty-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.security-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.security-section-header.compact {
    margin-bottom: 0.75rem;
}

.security-monitor-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.security-monitor-card {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
}

.security-monitor-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    min-width: 0;
}

.security-monitor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.security-monitor-icon.critical { color: var(--accent-red); background: rgba(239, 68, 68, 0.1); }
.security-monitor-icon.high { color: var(--accent-orange); background: rgba(245, 158, 11, 0.1); }
.security-monitor-icon.medium { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.security-monitor-icon.low { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }

.security-monitor-title-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.security-status-pill,
.security-priority-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.security-status-pill.ready,
.security-status-pill.completed {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.security-status-pill.running,
.security-status-pill.queued {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.security-status-pill.failed {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.security-monitor-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.security-monitor-meta > div {
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.security-monitor-meta strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risk-text-critical { color: var(--accent-red) !important; }
.risk-text-high { color: var(--accent-orange) !important; }
.risk-text-medium { color: var(--accent-blue) !important; }
.risk-text-low { color: var(--accent-green) !important; }
.risk-text-unknown { color: var(--text-secondary) !important; }

.security-scan-chip-row,
.security-monitor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.security-scan-chip-row span {
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.security-existing-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.security-existing-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    min-width: 0;
    padding: 1rem;
}

.security-existing-card > div {
    min-width: 0;
}

.security-activity-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.security-activity-list {
    display: grid;
    gap: 0.55rem;
}

.security-activity-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.security-activity-row > div {
    min-width: 0;
}

.security-activity-row strong,
.security-activity-row span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-activity-row.link-row {
    color: inherit;
}

.security-empty-text {
    margin: 0;
    color: var(--text-secondary);
}

.security-toast {
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

@media (max-width: 768px) {
    .monitor-row {
        grid-template-columns: 8px 28px minmax(0, 1fr) 30px;
        align-items: center;
        gap: 0.32rem 0.5rem;
        padding: 0.5rem 0.65rem;
    }

    .monitor-favicon,
    .favicon-fallback {
        width: 28px;
        height: 28px;
    }

    .favicon-img {
        width: 20px;
        height: 20px;
    }

    .monitor-info {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .monitor-name-row {
        flex-wrap: nowrap;
        gap: 0.3rem;
        min-width: 0;
        margin-bottom: 0.1rem;
    }

    .type-badge {
        padding: 0.15rem 0.35rem;
        font-size: 0.55rem;
        letter-spacing: 0;
    }

    .monitor-name {
        overflow: hidden;
        font-size: 0.875rem;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .monitor-url {
        display: none;
    }

    .monitor-context {
        display: none;
    }

    .monitor-metrics-strip {
        display: grid;
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .monitor-metrics-strip .monitor-metric {
        grid-column: auto;
        min-width: 0;
        min-height: 30px;
        padding: 0.25rem 0.3rem;
        text-align: center;
        border-radius: var(--radius-md);
    }

    .monitor-metrics-strip .metric-value {
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .monitor-metrics-strip .metric-label {
        margin-top: 0.08rem;
        font-size: 0.46rem;
        letter-spacing: 0;
    }

    .status-badge {
        display: none;
    }

    .edit-btn {
        grid-column: 4;
        grid-row: 1;
        justify-self: end;
        width: 28px;
        height: 28px;
    }

    .security-dashboard-hero,
    .security-activity-grid {
        grid-template-columns: 1fr;
    }

    .security-kpi-grid,
    .security-flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-empty-panel,
    .security-section-header,
    .security-existing-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .security-monitor-grid,
    .security-existing-grid {
        grid-template-columns: 1fr;
    }

    .security-monitor-title-row,
    .security-monitor-actions,
    .security-hero-actions {
        align-items: stretch;
    }

    .security-monitor-actions .btn,
    .security-hero-actions .btn,
    .security-empty-panel .btn,
    .security-existing-card .btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .security-dashboard-hero,
    .security-section,
    .security-empty-panel,
    .security-activity-panel {
        padding: 0.85rem;
    }

    .security-dashboard-hero h1 {
        font-size: 1.55rem;
    }

    .security-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .security-kpi-card {
        padding: 0.8rem;
    }

    .security-monitor-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .security-monitor-meta > div {
        padding: 0.5rem;
    }

    .security-monitor-meta strong {
        font-size: 0.82rem;
    }

    .security-activity-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .security-toast {
        right: 12px;
        left: 12px;
        min-width: 0;
    }
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    flex: 1;
}
