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

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --border: #2a2d3a;
    --text: #e1e4ed;
    --text-muted: #8b8fa3;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}
.logo { color: var(--primary); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--red); color: #fff; }

/* Hero */
.hero { text-align: center; padding: 5rem 0 3rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.5rem; }
.hero-actions { margin-bottom: 0.5rem; }
.hero-sub { color: var(--text-muted); font-size: 0.85rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 2rem 0 4rem; }
.feature { background: var(--surface); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border); }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--text-muted); font-size: 0.9rem; }

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.auth-form h2 { margin-bottom: 1.5rem; }
.auth-form label { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--text-muted); }
.auth-form label.checkbox { display: flex !important; align-items: flex-start; gap: 0.5rem; cursor: pointer; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text); }
.auth-form label.checkbox input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; width: auto; }
.auth-form label.checkbox .url { color: var(--text-muted); font-size: 0.8rem; }
.auth-form input, .auth-form select, .auth-form textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
}
.auth-form button { width: 100%; margin-top: 0.5rem; }
.auth-form p { margin-top: 1rem; text-align: center; font-size: 0.85rem; }
.auth-form a { color: var(--primary); }
.error { color: var(--red); margin-bottom: 1rem; font-size: 0.9rem; }

/* Dashboard */
.dashboard { padding: 2rem 0; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.empty { color: var(--text-muted); text-align: center; padding: 3rem 0; }

/* Monitor Cards */
.monitor-list { display: flex; flex-direction: column; gap: 0.5rem; }
.monitor-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
}
.monitor-card:hover { border-color: var(--primary); }
.monitor-status { font-size: 1.2rem; }
.monitor-info { flex: 1; }
.monitor-info h3 { font-size: 1rem; }
.monitor-url { color: var(--text-muted); font-size: 0.8rem; }
.monitor-uptime { font-size: 1.1rem; font-weight: 600; }

/* Monitor Detail */
.monitor-detail { padding: 2rem 0; }
.monitor-detail h3 { margin: 2rem 0 1rem; }
.checks-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.checks-table th, .checks-table td {
    padding: 0.5rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.checks-table th { color: var(--text-muted); font-weight: 500; }
.check-down { color: var(--red); }

/* Incidents */
.incident {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--red);
    background: var(--surface);
}
.incident.resolved { border-left-color: var(--green); }

/* Status Page Public */
.status-page { background: var(--bg); min-height: 100vh; padding: 3rem 0; }
.status-banner {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin: 1.5rem 0;
}
.status-banner.all-up { background: #052e16; color: var(--green); }
.status-banner.some-down { background: #451a03; color: var(--yellow); }
.status-desc { color: var(--text-muted); margin-bottom: 1rem; }

.status-monitors { margin: 1.5rem 0; }
.status-monitor {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
}
.status-monitor-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.up { background: var(--green); }
.status-dot.down { background: var(--red); }
.status-label { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); }

/* Uptime Bars (90-day) */
.uptime-bars { display: flex; gap: 1px; height: 28px; }
.bar { flex: 1; border-radius: 2px; min-width: 2px; }
.bar.good { background: var(--green); }
.bar.warn { background: var(--yellow); }
.bar.bad { background: var(--red); }
.bar.no-data { background: var(--border); }

.status-footer { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin-top: 3rem; }

@media (max-width: 640px) {
    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
    .navbar { padding: 1rem; }
}
