/* ============================================
   ULAI STATUS - FULL HD RESPONSIVE DESIGN
   Optimized for 1920×1080 and all screens
   ============================================ */

:root {
    /* Fluid spacing scale using clamp() */
    --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --space-sm: clamp(0.5rem, 1vw, 0.75rem);
    --space-md: clamp(1rem, 1.5vw, 1.5rem);
    --space-lg: clamp(1.5rem, 2.5vw, 2.5rem);
    --space-xl: clamp(2rem, 4vw, 4rem);
    --space-2xl: clamp(3rem, 6vw, 6rem);
    
    /* Fluid typography */
    --text-xs: clamp(0.625rem, 0.7vw, 0.75rem);
    --text-sm: clamp(0.75rem, 0.85vw, 0.875rem);
    --text-base: clamp(0.875rem, 1vw, 1rem);
    --text-lg: clamp(1rem, 1.2vw, 1.125rem);
    --text-xl: clamp(1.125rem, 1.5vw, 1.5rem);
    --text-2xl: clamp(1.25rem, 2vw, 2rem);
    --text-3xl: clamp(1.5rem, 2.5vw, 2.5rem);
    
    /* Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #f8fafc;
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-success: #22c55e;
    --accent-success-bg: #dcfce7;
    --accent-success-text: #166534;
    --accent-success-light: #86efac;
    --accent-danger: #ef4444;
    --accent-danger-bg: #fee2e2;
    --accent-danger-text: #991b1b;
    --accent-danger-light: #fca5a5;
    --accent-warning: #f59e0b;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 6px 12px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.15), 0 12px 24px -4px rgba(0, 0, 0, 0.08);
    
    --radius-sm: clamp(6px, 0.5vw, 8px);
    --radius-md: clamp(8px, 0.75vw, 12px);
    --radius-lg: clamp(12px, 1vw, 16px);
    --radius-xl: clamp(16px, 1.5vw, 24px);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-hover: #475569;
    
    --accent-primary: #60a5fa;
    --accent-primary-hover: #3b82f6;
    --accent-success: #4ade80;
    --accent-success-bg: rgba(74, 222, 128, 0.15);
    --accent-success-text: #4ade80;
    --accent-success-light: rgba(74, 222, 128, 0.3);
    --accent-danger: #f87171;
    --accent-danger-bg: rgba(248, 113, 113, 0.15);
    --accent-danger-text: #f87171;
    --accent-danger-light: rgba(248, 113, 113, 0.3);
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.3), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.4), 0 6px 12px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.5), 0 12px 24px -4px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

/* ============================================
   FULL HD FLUID LAYOUT
   ============================================ */

.app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   NAVBAR - FLUID FULL WIDTH
   ============================================ */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    width: 100%;
    min-height: clamp(60px, 5vw, 80px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-icon {
    width: clamp(36px, 2.5vw, 48px);
    height: clamp(36px, 2.5vw, 48px);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    flex-shrink: 0;
}

.brand-icon svg {
    width: clamp(20px, 1.5vw, 26px);
    height: clamp(20px, 1.5vw, 26px);
}

.brand-name {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tag {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: clamp(10px, 1vw, 14px);
    color: var(--text-tertiary);
    pointer-events: none;
    width: clamp(14px, 1.2vw, 18px);
    height: clamp(14px, 1.2vw, 18px);
}

.search-box input {
    width: clamp(200px, 18vw, 360px);
    padding: clamp(8px, 0.8vw, 12px) clamp(10px, 1vw, 14px) clamp(8px, 0.8vw, 12px) clamp(32px, 2.5vw, 42px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    width: clamp(240px, 22vw, 420px);
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-kbd {
    position: absolute;
    right: clamp(6px, 0.5vw, 10px);
    padding: clamp(1px, 0.2vw, 3px) clamp(4px, 0.4vw, 6px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: clamp(0.625rem, 0.6vw, 0.75rem);
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    pointer-events: none;
}

.theme-toggle {
    width: clamp(34px, 2.5vw, 44px);
    height: clamp(34px, 2.5vw, 44px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.theme-toggle svg {
    width: clamp(16px, 1.2vw, 20px);
    height: clamp(16px, 1.2vw, 20px);
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.4vw, 8px);
    padding: clamp(6px, 0.6vw, 10px) clamp(8px, 0.8vw, 14px);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.refresh-indicator svg {
    width: clamp(12px, 1vw, 16px);
    height: clamp(12px, 1vw, 16px);
}

.refresh-icon {
    animation: spin 2s linear infinite;
    animation-play-state: paused;
}

.refresh-icon.spinning {
    animation-play-state: running;
}

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

/* ============================================
   SYSTEM STATUS BAR - FLUID
   ============================================ */

.system-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    width: 100%;
}

.system-status.operational {
    border-left: clamp(3px, 0.4vw, 5px) solid var(--accent-success);
}

.system-status.incident {
    border-left: clamp(3px, 0.4vw, 5px) solid var(--accent-danger);
}

.status-pulse {
    width: clamp(8px, 0.7vw, 12px);
    height: clamp(8px, 0.7vw, 12px);
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pulse.up {
    background: var(--accent-success);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-success 2s infinite;
}

.status-pulse.down {
    background: var(--accent-danger);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-danger 2s infinite;
}

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

@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 clamp(6px, 0.8vw, 10px) rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.status-text {
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text-primary);
    flex: 1;
}

.status-meta {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ============================================
   SERVICES GRID - RESPONSIVE FLUID
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(300px, 22vw, 420px), 1fr));
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: 0;
    width: 100%;
}

/* Full HD optimization: 4-5 columns at 1920px */
@media (min-width: 1920px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: var(--space-lg);
        padding: var(--space-xl) var(--space-2xl);
    }
}

/* Large screens: 3-4 columns */
@media (min-width: 1440px) and (max-width: 1919px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

/* Medium screens: 2-3 columns */
@media (min-width: 1024px) and (max-width: 1439px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        padding: var(--space-md) var(--space-lg);
    }
}

.service-card.compact {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card.compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(3px, 0.35vw, 5px);
    background: transparent;
    transition: background var(--transition-base);
}

.service-card.compact[data-status="up"]::before {
    background: var(--accent-success);
}

.service-card.compact[data-status="down"]::before {
    background: var(--accent-danger);
}

.service-card.compact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.service-card.compact:active {
    transform: scale(0.98);
}

.service-card.compact.hidden {
    display: none;
}

/* Compact Header */
.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
    gap: var(--space-sm);
}

.compact-identity {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.compact-avatar {
    width: clamp(40px, 3vw, 52px);
    height: clamp(40px, 3vw, 52px);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: var(--text-lg);
    text-transform: uppercase;
    flex-shrink: 0;
}

.compact-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.compact-name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-url {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.4vw, 6px);
    padding: clamp(4px, 0.4vw, 6px) clamp(10px, 0.8vw, 14px);
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.status-pill.up {
    background: var(--accent-success-bg);
    color: var(--accent-success-text);
}

.status-pill.down {
    background: var(--accent-danger-bg);
    color: var(--accent-danger-text);
}

.pill-dot {
    width: clamp(6px, 0.5vw, 8px);
    height: clamp(6px, 0.5vw, 8px);
    border-radius: 50%;
    background: currentColor;
}

.status-pill.up .pill-dot {
    animation: pulse-dot 2s infinite;
}

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

/* Classic Green History Bar */
.compact-history {
    margin-bottom: var(--space-sm);
    flex: 1;
}

.history-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(4px, 0.5vw, 8px);
}

.history-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-range {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
}

.history-bar {
    display: flex;
    gap: clamp(2px, 0.25vw, 4px);
    height: clamp(24px, 2.5vw, 36px);
    align-items: stretch;
}

.history-tick {
    flex: 1;
    min-width: clamp(2px, 0.3vw, 4px);
    border-radius: clamp(2px, 0.25vw, 4px);
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.history-tick.up {
    background-color: var(--accent-success);
    opacity: 0.85;
}

.history-tick.down {
    background-color: var(--accent-danger);
    opacity: 0.9;
}

.history-tick:hover {
    opacity: 1;
    transform: scaleY(1.3);
    z-index: 10;
}

.history-tick:hover::after {
    content: attr(data-time) ' • ' attr(data-status) ' (' attr(data-latency) 'ms)';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--text-inverse);
    padding: clamp(4px, 0.4vw, 6px) clamp(8px, 0.8vw, 12px);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}

/* Compact Footer */
.compact-footer {
    display: flex;
    gap: clamp(16px, 2vw, 32px);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.compact-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.compact-stat-label {
    font-size: clamp(0.625rem, 0.6vw, 0.75rem);
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compact-stat-value {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.compact-stat-value.mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

/* Click Hint */
.click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--border-color);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.click-hint svg {
    width: clamp(12px, 1vw, 14px);
    height: clamp(12px, 1vw, 14px);
}

.service-card.compact:hover .click-hint {
    opacity: 1;
    color: var(--accent-primary);
}

/* ============================================
   MODAL - RESPONSIVE
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: min(900px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-slow);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    gap: var(--space-sm);
}

.modal-identity {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}

.modal-avatar {
    width: clamp(48px, 4vw, 64px);
    height: clamp(48px, 4vw, 64px);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: var(--text-xl);
    text-transform: uppercase;
    flex-shrink: 0;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modal-name {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.modal-url {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 500;
    transition: opacity var(--transition-fast);
    word-break: break-all;
}

.modal-url:hover {
    opacity: 0.8;
}

.modal-actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.btn-copy-modal, .btn-close {
    width: clamp(36px, 3vw, 44px);
    height: clamp(36px, 3vw, 44px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

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

.btn-close:hover {
    background: var(--accent-danger-bg);
    color: var(--accent-danger);
    border-color: var(--accent-danger-light);
}

.btn-copy-modal svg,
.btn-close svg {
    width: clamp(16px, 1.2vw, 20px);
    height: clamp(16px, 1.2vw, 20px);
}

/* Modal Status Row */
.modal-status-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.modal-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(6px, 0.5vw, 8px) clamp(12px, 1vw, 16px);
    border-radius: 9999px;
    font-size: var(--text-sm);
    font-weight: 600;
}

.modal-status-pill.up {
    background: var(--accent-success-bg);
    color: var(--accent-success-text);
}

.modal-status-pill.down {
    background: var(--accent-danger-bg);
    color: var(--accent-danger-text);
}

.modal-uptime-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-uptime-badge svg {
    width: clamp(16px, 1.2vw, 20px);
    height: clamp(16px, 1.2vw, 20px);
    color: var(--accent-success);
}

/* Modal Sections */
.modal-section {
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    gap: var(--space-sm);
}

.section-header h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-meta {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
}

/* Modal History Bar */
.modal-history-bar {
    display: flex;
    gap: clamp(3px, 0.3vw, 5px);
    height: clamp(36px, 3vw, 52px);
    align-items: stretch;
}

.modal-history-bar .history-tick {
    border-radius: clamp(3px, 0.3vw, 5px);
}

.modal-history-bar .history-tick:hover::after {
    font-size: var(--text-sm);
    padding: clamp(6px, 0.5vw, 8px) clamp(10px, 0.8vw, 14px);
}

.history-tooltip-area {
    height: clamp(20px, 2vw, 28px);
    margin-top: var(--space-xs);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    min-height: 20px;
}

/* Modal Stats Grid */
.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 18vw, 280px), 1fr));
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-width: 0;
}

.modal-stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.modal-stat-icon {
    width: clamp(36px, 3vw, 48px);
    height: clamp(36px, 3vw, 48px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-stat-icon svg {
    width: clamp(18px, 1.5vw, 24px);
    height: clamp(18px, 1.5vw, 24px);
}

.modal-stat-icon.latency {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
}

.modal-stat-icon.code {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}

.modal-stat-icon.check {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-success);
}

.modal-stat-icon.avg {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.modal-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.modal-stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.modal-stat-value.mono {
    font-family: var(--font-mono);
    font-size: var(--text-base);
}

/* Chart */
.chart-container {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
    height: clamp(100px, 12vw, 160px);
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    padding: 4px 0;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: clamp(2px, 0.25vw, 4px);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
}

.chart-bar {
    flex: 1;
    min-width: clamp(3px, 0.3vw, 5px);
    border-radius: 3px;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.chart-bar.up {
    background: var(--accent-success);
    opacity: 0.7;
}

.chart-bar.down {
    background: var(--accent-danger);
    opacity: 0.9;
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.1);
}

/* Incident List */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.incident-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--accent-danger-bg);
    border: 1px solid var(--accent-danger-light);
    border-radius: var(--radius-md);
    color: var(--accent-danger-text);
}

.incident-item svg {
    width: clamp(14px, 1.2vw, 18px);
    height: clamp(14px, 1.2vw, 18px);
    flex-shrink: 0;
    margin-top: 2px;
}

.incident-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.incident-time {
    font-size: var(--text-xs);
    font-weight: 600;
    opacity: 0.8;
}

.incident-detail {
    font-size: var(--text-sm);
    font-weight: 500;
    word-break: break-word;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: clamp(40px, 8vw, 100px) var(--space-xl);
    color: var(--text-secondary);
    width: 100%;
}

.empty-icon {
    width: clamp(56px, 6vw, 80px);
    height: clamp(56px, 6vw, 80px);
    margin: 0 auto var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.empty-icon svg {
    width: clamp(32px, 3vw, 48px);
    height: clamp(32px, 3vw, 48px);
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

/* ============================================
   FOOTER - FLUID FULL WIDTH
   ============================================ */

.app-footer {
    margin-top: auto;
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    width: 100%;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.update-time {
    font-weight: 500;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-credit {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   TOAST
   ============================================ */

.toast {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--text-primary);
    color: var(--text-inverse);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 2000;
    max-width: min(400px, 90vw);
    word-break: break-word;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Ultra-wide: 2560px+ (4K monitors) */
@media (min-width: 2560px) {
    :root {
        --space-xl: 5rem;
        --space-2xl: 8rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
    
    .modal-container {
        max-width: 1100px;
    }
}

/* Full HD: 1920px - 2559px */
@media (min-width: 1920px) and (max-width: 2559px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: var(--space-lg);
    }
}

/* Large desktop: 1440px - 1919px */
@media (min-width: 1440px) and (max-width: 1919px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

/* Desktop: 1024px - 1439px */
@media (min-width: 1024px) and (max-width: 1439px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        padding: var(--space-md) var(--space-lg);
    }
    
    .navbar,
    .system-status,
    .app-footer {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        padding: var(--space-md);
    }
    
    .navbar,
    .system-status,
    .app-footer {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .modal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: below 768px */
@media (max-width: 767px) {
    .navbar {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }
    
    .nav-actions {
        width: 100%;
    }
    
    .search-box {
        flex: 1;
    }
    
    .search-box input,
    .search-box input:focus {
        width: 100%;
    }
    
    .system-status {
        padding: var(--space-sm) var(--space-md);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }
    
    .app-footer {
        flex-direction: column;
        text-align: center;
        padding: var(--space-sm) var(--space-md);
    }
    
    .modal-container {
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }
    
    .modal-header,
    .modal-section,
    .modal-stats-grid {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .modal-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-status-row {
        padding: var(--space-sm) var(--space-md);
    }
}

/* Small mobile: below 480px */
@media (max-width: 480px) {
    .compact-header {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .status-pill {
        align-self: flex-start;
    }
    
    .compact-footer {
        gap: var(--space-sm);
    }
    
    .modal-identity {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-actions {
        align-self: flex-start;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.service-card.compact {
    animation: fadeIn 0.35s ease backwards;
}

.service-card.compact:nth-child(1) { animation-delay: 0.04s; }
.service-card.compact:nth-child(2) { animation-delay: 0.08s; }
.service-card.compact:nth-child(3) { animation-delay: 0.12s; }
.service-card.compact:nth-child(4) { animation-delay: 0.16s; }
.service-card.compact:nth-child(5) { animation-delay: 0.20s; }
.service-card.compact:nth-child(6) { animation-delay: 0.24s; }
.service-card.compact:nth-child(7) { animation-delay: 0.28s; }
.service-card.compact:nth-child(8) { animation-delay: 0.32s; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: clamp(6px, 0.5vw, 10px);
    height: clamp(6px, 0.5vw, 10px);
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: clamp(3px, 0.3vw, 5px);
}

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

.modal-container::-webkit-scrollbar {
    width: clamp(8px, 0.6vw, 12px);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}
.brand-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
}