/* ==========================================================================
   Meridian Status Page - Premium Dark Theme
   Inspired by Linear, Vercel, and Stripe status pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Deep Navy Theme */
    --bg-primary: #0A0E1A;
    --bg-secondary: #0F1629;
    --bg-card: #141B2D;
    --bg-card-hover: #1A2340;
    --bg-elevated: #1E2A45;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Text */
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;
    --text-muted: #4B5563;

    /* Accent Colors */
    --accent-primary: #6366F1;
    --accent-primary-hover: #818CF8;
    --accent-secondary: #8B5CF6;

    /* Status Colors */
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --success-glow: rgba(16, 185, 129, 0.4);

    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --warning-glow: rgba(245, 158, 11, 0.4);

    --error: #EF4444;
    --error-soft: rgba(239, 68, 68, 0.15);
    --error-glow: rgba(239, 68, 68, 0.4);

    --info: #3B82F6;
    --info-soft: rgba(59, 130, 246, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10B981 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

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

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

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

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

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

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

/* --------------------------------------------------------------------------
   Background Effects
   -------------------------------------------------------------------------- */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(16, 185, 129, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-4);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    opacity: 0.9;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.status-indicator.running {
    background: var(--success-soft);
    color: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.status-indicator.degraded {
    background: var(--warning-soft);
    color: var(--warning);
    box-shadow: 0 0 20px var(--warning-glow);
}

.status-indicator.offline,
.status-indicator.error {
    background: var(--error-soft);
    color: var(--error);
    box-shadow: 0 0 20px var(--error-glow);
}

.status-indicator.loading {
    background: var(--info-soft);
    color: var(--info);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    position: relative;
}

.status-indicator.running .status-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   Hero Status Card
   -------------------------------------------------------------------------- */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.hero-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkmark {
    width: 56px;
    height: 56px;
}

.checkmark-circle {
    stroke: var(--success);
    stroke-width: 2;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: circle-draw 0.6s ease-out forwards;
}

.checkmark-check {
    stroke: var(--success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: check-draw 0.3s ease-out 0.4s forwards;
}

@keyframes circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes check-draw {
    to { stroke-dashoffset: 0; }
}

.hero-icon.warning .checkmark-circle,
.hero-icon.warning .checkmark-check {
    stroke: var(--warning);
}

.hero-icon.error .checkmark-circle,
.hero-icon.error .checkmark-check {
    stroke: var(--error);
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

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

.uptime-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-1);
}

.uptime-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.uptime-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--success);
}

/* --------------------------------------------------------------------------
   Metrics Grid
   -------------------------------------------------------------------------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

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

/* --------------------------------------------------------------------------
   Card Base Styles
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.card-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--info-soft);
    color: var(--info);
    border-radius: var(--radius-md);
}

.card-icon.basis-icon {
    background: var(--success-soft);
    color: var(--success);
}

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

.card-icon.health-icon {
    background: var(--success-soft);
    color: var(--success);
}

.card-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}

.strategy-tag {
    font-size: 0.625rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    background: var(--success-soft);
    color: var(--success);
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.strategy-tag.secondary {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   Metric Display
   -------------------------------------------------------------------------- */
.metric-large {
    margin-bottom: var(--space-4);
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    transition: color var(--transition-base);
}

.metric-value.mono {
    font-family: var(--font-mono);
}

.metric-value.positive {
    color: var(--success);
}

.metric-value.negative {
    color: var(--error);
}

.metric-value.flash {
    animation: value-flash 0.5s ease-out;
}

@keyframes value-flash {
    0% {
        background: rgba(99, 102, 241, 0.3);
        border-radius: 4px;
    }
    100% {
        background: transparent;
    }
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Sparkline
   -------------------------------------------------------------------------- */
.sparkline-container {
    height: 40px;
    opacity: 0.7;
}

.sparkline-container canvas {
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   Metric Bar (Basis Spread Visualization)
   -------------------------------------------------------------------------- */
.metric-bar {
    margin-top: var(--space-2);
}

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

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

.bar-fill.basis-fill {
    background: linear-gradient(90deg, var(--success) 0%, var(--warning) 70%, var(--error) 100%);
}

.bar-threshold {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.bar-threshold::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -2px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.threshold-label {
    color: var(--success);
}

.threshold-label.warning {
    color: var(--warning);
}

/* --------------------------------------------------------------------------
   Funding Direction Indicator
   -------------------------------------------------------------------------- */
.funding-indicator {
    margin-top: var(--space-2);
}

.funding-direction {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.direction-arrow {
    font-size: 1.25rem;
    font-weight: 600;
}

.funding-direction.positive .direction-arrow {
    color: var(--success);
}

.funding-direction.negative .direction-arrow {
    color: var(--error);
}

.direction-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Health Gauge (Circular)
   -------------------------------------------------------------------------- */
.health-gauge {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.gauge-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

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

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

.gauge-fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1s ease-out, stroke var(--transition-base);
}

.gauge-fill.warning {
    stroke: var(--warning);
}

.gauge-fill.critical {
    stroke: var(--error);
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-value {
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
}

.health-legend {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

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

.legend-dot.healthy {
    background: var(--success);
}

.legend-dot.warning {
    background: var(--warning);
}

.legend-dot.critical {
    background: var(--error);
}

/* --------------------------------------------------------------------------
   Components Card
   -------------------------------------------------------------------------- */
.components-card {
    grid-column: 1 / -1;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

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

.component {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.component:hover {
    border-color: var(--border-default);
    background: var(--bg-elevated);
}

.component-status {
    flex-shrink: 0;
}

.component-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.component.running .component-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
}

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

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

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

.component-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.component-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Activity Timeline
   -------------------------------------------------------------------------- */
.activity-card {
    grid-column: 1 / -1;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-height: 200px;
    overflow-y: auto;
    padding-right: var(--space-2);
}

.timeline::-webkit-scrollbar {
    width: 4px;
}

.timeline::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
}

.timeline::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding-left: var(--space-2);
    position: relative;
    animation: fade-slide-in 0.3s ease-out;
}

@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 16px;
    bottom: -12px;
    width: 1px;
    background: var(--border-subtle);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--bg-card);
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.timeline-item.success .timeline-marker {
    background: var(--success);
}

.timeline-item.warning .timeline-marker {
    background: var(--warning);
}

.timeline-item.error .timeline-marker {
    background: var(--error);
}

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

.timeline-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) 0 var(--space-4);
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.update-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.refresh-countdown {
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    left: var(--space-6);
    max-width: 400px;
    margin-left: auto;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--error);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(120%);
    opacity: 0;
    transition: all var(--transition-spring);
    z-index: 1000;
}

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

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--error);
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
}

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

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

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

/* --------------------------------------------------------------------------
   Loading States
   -------------------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-elevated) 0%,
        var(--bg-card-hover) 50%,
        var(--bg-elevated) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .container {
        padding: var(--space-3);
    }

    .header {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .logo-section {
        flex-direction: column;
    }

    .hero-card {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
    }

    .uptime-badge {
        align-items: center;
    }

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

    .footer {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }

    .footer-center {
        order: -1;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .card {
        padding: var(--space-4);
    }

    .hero-card {
        padding: var(--space-4);
    }

    .gauge-ring {
        width: 100px;
        height: 100px;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .bg-gradient,
    .bg-grid,
    .toast {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

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