/* ============================================================
   UptimePulse — Dark Modern CSS
   ============================================================ */

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

:root {
    --bg-base:      #0b1120;
    --bg-surface:   #111827;
    --bg-card:      #1a2234;
    --bg-card-hover:#1e2a42;
    --bg-input:     #0f172a;
    --border:       rgba(255,255,255,0.08);
    --border-focus: #3b82f6;

    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;

    --accent:   #3b82f6;
    --accent-h: #2563eb;
    --green:    #10b981;
    --red:      #ef4444;
    --yellow:   #f59e0b;

    --sidebar-w:  240px;
    --topbar-h:   64px;
    --radius:     10px;
    --radius-sm:  6px;
    --shadow:     0 4px 24px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
}

html { font-size: 15px; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Layout ──────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}
.logo-icon { font-size: 1.4rem; }

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); text-decoration: none; }
.nav-item.active { background: rgba(59,130,246,0.15); color: var(--accent); }
.nav-icon { font-size: 1rem; width: 1.2rem; text-align: center; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0;
}
.user-name  { font-size: 0.85rem; font-weight: 600; }
.user-email { font-size: 0.75rem; color: var(--text-muted); }
.btn-logout {
    display: block;
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(239,68,68,0.1);
    color: var(--red);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition);
}
.btn-logout:hover { background: rgba(239,68,68,0.2); text-decoration: none; }

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.top-bar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    position: sticky; top: 0;
    z-index: 50;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    display: block; width: 20px; height: 2px;
    background: var(--text-secondary); border-radius: 2px;
    transition: background var(--transition);
}
.page-title { flex: 1; font-size: 1.1rem; font-weight: 600; }
.live-indicator {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: var(--text-muted);
}
.pulse-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ── Content Body ────────────────────────────────────────── */
.content-body {
    flex: 1;
    padding: 2rem;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-form { max-width: 860px; }
.mt-4 { margin-top: 1.5rem; }

/* ── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition);
}
.stat-card:hover { border-color: rgba(59,130,246,0.3); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon-total { background: rgba(99,102,241,0.15); }
.stat-icon-up    { background: rgba(16,185,129,0.15); }
.stat-icon-down  { background: rgba(239,68,68,0.15); }
.stat-icon-rt    { background: rgba(59,130,246,0.15); }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ── Grid ────────────────────────────────────────────────── */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Monitor List (dashboard) ────────────────────────────── */
.monitor-list { }
.monitor-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition);
}
.monitor-row:last-child { border-bottom: none; }
.monitor-row:hover { background: var(--bg-card-hover); text-decoration: none; }
.monitor-row-status { flex-shrink: 0; }
.monitor-row-info { flex: 1; min-width: 0; }
.monitor-row-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-row-url  { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.rt-small { font-size: 0.78rem; color: var(--text-muted); }

/* ── Status Dots ─────────────────────────────────────────── */
.status-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot-lg { width: 16px; height: 16px; }
.status-up      { background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.status-down    { background: var(--red);   box-shadow: 0 0 8px rgba(239,68,68,0.5);  }
.status-pending { background: var(--yellow); }

.status-text { margin-left: 6px; font-size: 0.85rem; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-up      { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-down    { background: rgba(239,68,68,0.15);  color: var(--red);   }
.badge-pending { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-ssl     { background: rgba(59,130,246,0.15); color: var(--accent); }
.badge-domain  { background: rgba(139,92,246,0.15); color: #a78bfa; }

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

/* ── Uptime bars ─────────────────────────────────────────── */
.uptime-badge {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green);
}
.mini-bar {
    width: 80px; height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.mini-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.uptime-pct { font-size: 0.85rem; font-weight: 700; }
.uptime-bar-wrap { display: flex; flex-direction: column; gap: 4px; }

.fill-up   { background: var(--green); }
.fill-warn { background: var(--yellow); }
.fill-down { background: var(--red); }

.text-up   { color: var(--green) !important; }
.text-warn { color: var(--yellow) !important; }
.text-down { color: var(--red) !important; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.table-link { color: var(--text-primary); font-weight: 600; }
.table-link:hover { color: var(--accent); text-decoration: none; }
.url-cell { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.8rem; }
.fw-bold { font-weight: 600; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ── Action buttons ──────────────────────────────────────── */
.action-btns { display: flex; gap: 4px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }

.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.btn-danger-ghost { background: transparent; color: var(--red); border-color: transparent; padding: 0.3rem 0.5rem; }
.btn-danger-ghost:hover { background: rgba(239,68,68,0.1); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.78rem; }

/* ── Incidents ───────────────────────────────────────────── */
.incident-list { }
.incident-row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.incident-row:last-child { border-bottom: none; }
.incident-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.incident-name   { font-weight: 600; font-size: 0.9rem; }
.incident-status { font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.incident-status.open     { background: rgba(239,68,68,0.15); color: var(--red); }
.incident-status.resolved { background: rgba(16,185,129,0.15); color: var(--green); }
.incident-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 1rem; }
.incident-msg  { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; background: rgba(0,0,0,0.2); padding: 6px 10px; border-radius: var(--radius-sm); font-family: monospace; }

/* ── Monitor Hero ────────────────────────────────────────── */
.monitor-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.monitor-hero-left { display: flex; align-items: center; gap: 1rem; }
.monitor-hero-right { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.monitor-status-large { display: flex; align-items: center; gap: 1rem; }
.monitor-status-large h2 { font-size: 1.3rem; font-weight: 700; }
.monitor-url-link { font-size: 0.85rem; color: var(--text-muted); }
.monitor-url-link:hover { color: var(--accent); }

/* ── Uptime Grid ─────────────────────────────────────────── */
.uptime-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.uptime-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.uptime-label      { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.uptime-pct-large  { font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 10px; }
.uptime-bar-full   { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.uptime-bar-fill-full { height: 100%; border-radius: 3px; transition: width 0.6s; }

/* ── Period tabs ─────────────────────────────────────────── */
.period-tabs { display: flex; gap: 4px; }
.period-tab {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all var(--transition);
}
.period-tab:hover { color: var(--text-primary); text-decoration: none; }
.period-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Chart ───────────────────────────────────────────────── */
.chart-container {
    padding: 1.5rem;
    height: 280px;
    position: relative;
}

/* ── Info Cards ──────────────────────────────────────────── */
.info-cards-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.info-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex: 1; min-width: 200px;
}
.info-card-ok   { background: rgba(16,185,129,0.05); border-color: rgba(16,185,129,0.2); }
.info-card-warn { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.3); }
.info-card-icon  { font-size: 1.5rem; }
.info-card-title { font-size: 0.78rem; color: var(--text-muted); }
.info-card-val   { font-size: 0.9rem; font-weight: 600; }

/* ── Forms ───────────────────────────────────────────────── */
.form-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; }
.form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    width: 100%;
    transition: border-color var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--border-focus); }
.form-control::placeholder { color: var(--text-muted); }
.form-hint { font-size: 0.78rem; color: var(--text-muted); }
.required { color: var(--red); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

.form-check-group { }
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.telegram-info {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
}

.code-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* ── Auth ────────────────────────────────────────────────── */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-container { width: 100%; max-width: 420px; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-app-name { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0 0.25rem; }
.auth-tagline { color: var(--text-muted); font-size: 0.875rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-link { text-align: center; font-size: 0.875rem; color: var(--text-muted); }
.auth-link a { color: var(--accent); }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ── Status Page ─────────────────────────────────────────── */
.status-body { background: var(--bg-base); padding: 0; }
.status-page { max-width: 860px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.status-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    padding: 1.25rem 0;
    position: sticky; top: 0; z-index: 10;
}
.status-header-inner { max-width: 860px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.status-logo { font-size: 1rem; font-weight: 700; }
.status-overall { font-size: 0.9rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; }
.overall-up   { background: rgba(16,185,129,0.15); color: var(--green); }
.overall-down { background: rgba(239,68,68,0.15);  color: var(--red);   }

.status-body-inner { padding: 0; }
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.status-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; flex-wrap: wrap; gap: 1rem; }
.status-monitor-info { display: flex; align-items: center; gap: 1rem; }
.status-monitor-name { font-size: 1.1rem; font-weight: 700; }
.status-monitor-url  { font-size: 0.82rem; color: var(--text-muted); }
.status-monitor-rt   { text-align: right; }
.rt-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.rt-value { font-size: 1.1rem; font-weight: 700; }

.status-uptime-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.status-uptime-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.status-uptime-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.status-uptime-val   { font-size: 2rem; font-weight: 700; }

.status-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.status-chart-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1.25rem; }

.status-incidents h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.status-incident {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}
.status-incident-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.status-incident-dur { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.status-incident-msg { font-size: 0.82rem; color: var(--text-secondary); font-family: monospace; background: rgba(0,0,0,0.2); padding: 4px 8px; border-radius: 4px; }
.status-no-incidents { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2rem; text-align: center; color: var(--text-muted); }
.status-footer { text-align: center; padding: 2rem 0 0; font-size: 0.8rem; color: var(--text-muted); }

/* ── Sidebar overlay for mobile ──────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid  { grid-template-columns: repeat(2, 1fr); }
    .uptime-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 240px; }

    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    .sidebar-overlay.open { display: block; }

    .main-content { margin-left: 0; }
    .hamburger { display: flex; }

    .top-bar { padding: 0 1rem; }
    .content-body { padding: 1rem; }

    .stats-grid   { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .grid-2col    { grid-template-columns: 1fr; }
    .uptime-grid  { grid-template-columns: 1fr 1fr; }
    .form-grid    { grid-template-columns: 1fr; }
    .status-uptime-grid { grid-template-columns: 1fr 1fr; }

    .monitor-hero { flex-direction: column; align-items: flex-start; }
    .monitor-hero-right { flex-direction: row; flex-wrap: wrap; }

    .action-btns { flex-wrap: wrap; }
    .url-cell { max-width: 100px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .uptime-grid { grid-template-columns: 1fr; }
    .status-uptime-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .form-actions { flex-direction: column; }
}
