/* Locus Status — Matches main Locus frontend design */

:root {
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --border: #e5e7eb;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --green: #16a34a;
    --red: #dc2626;
    --amber: #d97706;
    --radius: 4px;

    --alert-error-bg: #fef2f2;
    --alert-error-text: #b91c1c;
    --alert-error-border: #fecaca;

    --badge-healthy-bg: #f0fdf4;
    --badge-unhealthy-bg: #fef2f2;
}

html.dark {
    --bg: #030712;
    --bg-subtle: #111827;
    --border: #1f2937;
    --text: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #6b7280;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;

    --alert-error-bg: #450a0a;
    --alert-error-text: #fca5a5;
    --alert-error-border: #7f1d1d;

    --badge-healthy-bg: #052e16;
    --badge-unhealthy-bg: #450a0a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Dashboard */
.dashboard {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 16px;
}
.dash-header {
    text-align: center;
    margin-bottom: 40px;
}
.dash-header h1 { font-size: 28px; font-weight: 700; }
.subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.section { margin-bottom: 32px; }
.section h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* Status card */
.status-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.status-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.status-service { font-size: 16px; font-weight: 500; }
.status-details { display: flex; gap: 32px; }
.stat { display: flex; flex-direction: column; }
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value { font-size: 18px; font-weight: 600; margin-top: 2px; }

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}
.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-badge.healthy { background: var(--badge-healthy-bg); color: var(--green); }
.status-badge.healthy::before { background: var(--green); }
.status-badge.unhealthy { background: var(--badge-unhealthy-bg); color: var(--red); }
.status-badge.unhealthy::before { background: var(--red); }
.status-badge.unknown { background: var(--bg-subtle); color: var(--text-muted); }
.status-badge.unknown::before { background: var(--text-muted); }

/* Chart */
.chart-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
}
.chart-svg { width: 100%; height: auto; }
.chart-svg .grid-line { stroke: var(--border); stroke-width: 0.5; }
.chart-svg .axis-label { fill: var(--text-muted); font-size: 10px; }
.chart-empty { text-align: center; color: var(--text-muted); padding: 40px; }

/* Uptime */
.uptime-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.uptime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.uptime-header h2 { margin-bottom: 0; }
.uptime-pct { font-size: 24px; font-weight: 700; color: var(--green); }
.uptime-bar-container { height: 32px; border-radius: var(--radius); overflow: hidden; }
.uptime-bar-svg { width: 100%; height: 32px; display: block; }
.uptime-legend {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error {
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
    border: 1px solid var(--alert-error-border);
}

.loading { text-align: center; color: var(--text-muted); padding: 40px; }

@media (max-width: 600px) {
    .dashboard { padding: 24px 12px; }
    .status-details { flex-direction: column; gap: 12px; }
}
