/* Live Monitor - Dark theme (default) */
:root {
  --sidebar-bg: #1A1C25;
  --main-bg: #20242B;
  --surface: #262D34;
  --surface-hover: #2d353e;
  --border: #3a4149;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --bg: #20242B;
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --success: #22c55e;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.2);
  --info: #3b82f6;
  --info-bg: #3F51B5;
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light theme */
body.theme-light,
.theme-light {
  --sidebar-bg: #f1f5f9;
  --main-bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --primary: #16a34a;
  --primary-hover: #15803d;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #2563eb;
}
body.theme-light .sidebar { border-right: 1px solid var(--border); }
body.theme-light .nav-link { color: #475569; }
body.theme-light .nav-link:hover { background: #e2e8f0; color: var(--text); }
body.theme-light .nav-link.active { background: #e2e8f0; color: var(--text); }

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 15px; color: var(--text); background: var(--main-bg); line-height: 1.5; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; color: #60a5fa; }

/* Login - dark */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--main-bg); }
.login-wrap { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo-img { height: 48px; width: auto; max-width: 220px; display: block; margin: 0 auto; object-fit: contain; }
.login-brand h1 { margin: 12px 0 0; font-size: 24px; color: var(--text); }
.login-card { background: var(--surface); padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); }
.login-card h2 { margin: 0 0 8px; font-size: 22px; color: var(--text); }
.login-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
.login-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] { width: 100%; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; background: var(--main-bg); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
.login-form input::placeholder { color: var(--text-muted); }
.input-wrap { position: relative; margin-bottom: 16px; }
.input-wrap input { width: 100%; padding: 12px 44px 12px 14px; margin-bottom: 0; }
.toggle-password { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 18px; opacity: .7; color: var(--text-muted); }
.form-row { margin-bottom: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; color: var(--text-muted); }
.btn-block { width: 100%; }
.form-error { color: var(--danger); font-size: 14px; margin-bottom: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; font-family: var(--font); cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); text-decoration: none; color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-icon { padding: 6px 10px; font-size: 14px; background: transparent; color: var(--text-muted); border: none; cursor: pointer; text-decoration: none; border-radius: var(--radius-sm); }
.btn-icon:hover { background: var(--surface); color: var(--primary); text-decoration: none; }

/* Admin layout - dark sidebar */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand { padding: 24px; display: flex; align-items: center; flex-shrink: 0; }
.sidebar-brand-link { display: block; text-decoration: none; }
.sidebar-logo { height: 43px; width: auto; max-width: 243px; display: block; object-fit: contain; vertical-align: middle; }
.sidebar-logo--light-theme { display: none; }
body.theme-light .sidebar-logo--dark-theme { display: none; }
body.theme-light .sidebar-logo--light-theme { display: block; }
.logo-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }
.logo-icon { width: 32px; height: 32px; background: transparent; color: var(--text); font-weight: 700; font-size: 16px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; }
.logo-text { font-weight: 600; font-size: 16px; color: var(--text); }
.sidebar-nav { padding: 12px 0; flex: 1; min-height: 0; }
.sidebar-footer {
  flex-shrink: 0;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.nav-section { padding: 12px 24px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--text-muted); text-decoration: none; font-size: 15px; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.nav-link.active { background: var(--surface); color: var(--text); }
.nav-link.active .nav-icon { color: var(--primary); }
.nav-icon { font-size: 18px; opacity: .9; }
.main-content { flex: 1; padding: 24px 32px; overflow-x: auto; background: var(--main-bg); }

/* Page header */
.page-header { margin-bottom: 24px; }
.page-header h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.page-header h1 .title-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.page-sub { margin: 0; color: var(--text-muted); font-size: 14px; }
.flex-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.breadcrumb { margin: 0 0 4px; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--info); }

/* Cards - dark surface */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; margin-bottom: 24px; }
.card h3 { margin: 0 0 16px; font-size: 18px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; }
.card-title-small, .card h3.card-title-small { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 8px; }
.incident-root-cause { font-size: 16px; font-weight: 600; margin: 0; }
.incident-status.resolved { color: var(--success); font-weight: 600; margin: 0 0 4px; }
.incident-status.critical { color: var(--danger); font-weight: 600; margin: 0 0 4px; }
.incident-duration { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.incident-activity-list .activity-item { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 8px; }
.incident-activity-list .activity-item:last-child { border-bottom: none; }
.activity-icon { flex-shrink: 0; }
.activity-icon.ok { color: var(--success); }
.activity-icon.err { color: var(--danger); }
.activity-item .muted { margin-left: auto; font-size: 12px; }

/* SSL certificate */
.monitor-dashboard-ssl { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.monitor-dashboard-ssl.ssl-ok { color: var(--success); }
.monitor-dashboard-ssl.ssl-warning { color: var(--warning, #f59e0b); }
.monitor-dashboard-ssl.ssl-danger { color: var(--danger); }
.monitor-dashboard-ssl.ssl-expired { color: var(--danger); }
.monitor-dashboard-meta.ssl-error { color: var(--danger); }
.ssl-badge { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.ssl-badge.ssl-ok { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.ssl-badge.ssl-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning, #f59e0b); }
.ssl-badge.ssl-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.ssl-badge.ssl-expired { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.ssl-cell.ssl-urgent { color: var(--danger); font-weight: 600; }
.link-right { font-size: 14px; color: var(--info); }

/* KPI row - dark cards */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); position: relative; }
.kpi-icon { font-size: 24px; opacity: .8; }
.kpi-value { display: block; font-size: 28px; font-weight: 700; color: var(--text); margin: 8px 0 4px; }
.kpi-label { font-size: 13px; color: var(--text-muted); }
.kpi-card .badge { position: absolute; top: 12px; right: 12px; font-size: 10px; }
.kpi-up .kpi-value { color: var(--primary); }
.kpi-down .kpi-value { color: var(--danger); }

/* Badges - UptimeRobot style */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-success { background: rgba(34, 197, 94, 0.2); color: var(--primary); }
.badge-danger { background: var(--danger-soft); color: #f87171; }
.badge-warning { background: var(--warning-soft); color: #fbbf24; }
.badge-secondary { background: rgba(156, 163, 175, 0.2); color: var(--text-muted); }
.badge-dns { background: var(--danger-soft); color: #f87171; font-size: 10px; }
.badge-timeout { background: var(--danger-soft); color: #f87171; font-size: 10px; }

/* Status badge neon effect (monitors list) – soft glow */
.badge-status-neon { position: relative; animation: status-glow 3s ease-in-out infinite; }
.badge-status-neon.badge-success { box-shadow: 0 0 8px rgba(34, 197, 94, 0.28), 0 0 14px rgba(34, 197, 94, 0.12); }
.badge-status-neon.badge-danger { box-shadow: 0 0 8px rgba(239, 68, 68, 0.28), 0 0 14px rgba(239, 68, 68, 0.12); }
@keyframes status-glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.92; } }

/* Clickable monitor row */
.table-monitors tbody tr.monitor-row-clickable { cursor: pointer; }
.table-monitors tbody tr.monitor-row-clickable:hover { background: var(--surface-hover); }
.table-monitors tbody tr.monitor-row-clickable a.row-link { position: absolute; inset: 0; z-index: 0; }
.table-monitors tbody tr.monitor-row-clickable td { position: relative; z-index: 1; }
.table-monitors tbody tr.monitor-row-clickable td a[href]:not(.row-link) { position: relative; z-index: 2; }

.monitor-summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.monitor-summary-card { margin-bottom: 0; }
.monitor-summary-value { display: block; margin-top: 8px; font-size: 18px; font-weight: 600; }
.monitor-summary-value .badge { margin-right: 8px; }

/* Monitor show – dashboard block */
.monitor-dashboard { margin-bottom: 24px; }
.monitor-dashboard-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.monitor-dashboard-card { margin-bottom: 0; }
.monitor-dashboard-card-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.monitor-dashboard-status { margin: 0; font-size: 22px; font-weight: 700; }
.monitor-dashboard-status.status-up { color: var(--primary); }
.monitor-dashboard-status.status-down { color: var(--danger); }
.monitor-dashboard-meta { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.monitor-dashboard-big { margin: 0; font-size: 24px; font-weight: 700; color: var(--text); }
.monitor-dashboard-uptime { margin: 0; font-size: 20px; font-weight: 700; color: var(--primary); }
.monitor-dashboard-card.compact .monitor-dashboard-uptime { font-size: 18px; }
.uptime-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.uptime-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }
.monitor-dashboard-card.response-time-card { min-width: 280px; }
.response-time-chart { width: 100%; height: 120px; margin: 8px 0; }
.response-time-svg { display: block; }
.response-time-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.response-time-stat.min { color: var(--primary); }
.response-time-stat.max { color: var(--danger); }
.page-header-actions { display: flex; gap: 10px; align-items: center; }

/* Status dot */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.status-dot.status-up { background: var(--primary); }
.status-dot.status-down { background: var(--danger); }
.status-dot.status-unknown { background: var(--text-muted); }
.status-dot.status-critical { background: var(--danger); }
.status-dot.status-resolved { background: var(--primary); }

/* Tables - dark header like screenshot */
.table-simple, .table-monitors { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-simple th, .table-simple td, .table-monitors th, .table-monitors td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); color: var(--text); }
.table-simple thead, .table-monitors thead { background: var(--surface); }
.table-simple th, .table-monitors th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.table-simple tbody tr:hover, .table-monitors tbody tr:hover { background: rgba(255,255,255,.02); }
.url-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: inline; }
.muted { color: var(--text-muted); font-size: 14px; }
.datetime-with-tz { display: block; }
.datetime-with-tz .tz { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Incident list */
.incident-list { list-style: none; margin: 0; padding: 0; }
.incident-list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.incident-list li:last-child { border-bottom: none; }
.incident-list li a { text-decoration: none; color: inherit; display: block; }
.incident-list li a:hover { text-decoration: none; color: var(--text); }
.table-simple tr.incident-row-clickable { cursor: pointer; }
.table-simple tr.incident-row-clickable:hover { background: var(--surface-hover); }
.incident-monitor { font-weight: 500; color: var(--text); }
.incident-detail { font-size: 13px; color: var(--text-muted); }

/* Forms - dark inputs */
.form-stacked label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; margin-top: 16px; color: var(--text); }
.form-stacked label:first-of-type { margin-top: 0; }
.form-stacked input[type="text"],
.form-stacked input[type="email"],
.form-stacked input[type="url"],
.form-stacked input[type="number"],
.form-stacked input[type="password"],
.form-stacked select { width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; background: var(--main-bg); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
.form-stacked input[type="text"]:focus,
.form-stacked input[type="email"]:focus,
.form-stacked input[type="password"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
.form-stacked .checkbox-label { margin-top: 12px; color: var(--text-muted); }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: rgba(34, 197, 94, 0.15); color: var(--primary); border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-info { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.alert-banner { background: var(--info-bg); color: #fff; padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.alert-banner a { color: #93c5fd; }

/* Dashboard grid */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.dashboard-kpis { flex-wrap: wrap; }
.dashboard-summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dashboard-summary-row .card { margin-bottom: 0; }
.dashboard-uptime-card h3, .dashboard-24h-bar-card h3, .dashboard-response-trend-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.dashboard-24h-bar-card { overflow: visible; }
.dashboard-uptime-item { margin-right: 12px; }
.dashboard-uptime-item strong { color: var(--primary); }
.uptime-bar-segments { display: flex; gap: 2px; margin-top: 8px; height: 24px; overflow: visible; }
.uptime-segment { flex: 1; min-width: 4px; border-radius: 2px; position: relative; }
.uptime-segment::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--surface); color: var(--text); font-size: 12px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; z-index: 10; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.uptime-segment:hover::after { opacity: 1; visibility: visible; }
.sparkline-wrap { width: 100%; height: 40px; margin: 8px 0; }
.dashboard-response-extremes { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.dashboard-response-extremes .stat-min { color: var(--primary); }
.dashboard-response-extremes .stat-max { color: var(--danger); }
.dashboard-attention-card { margin-bottom: 24px; }
.dashboard-attention-card h3 { margin: 0 0 8px; }
.dashboard-attention-list { list-style: none; margin: 0; padding: 0; }
.dashboard-attention-list li { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dashboard-attention-list li:last-child { border-bottom: none; }
.dashboard-attention-list a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.dashboard-attention-list a:hover { color: var(--primary); text-decoration: none; }
.dashboard-attention-list .badge { margin-left: 6px; }

/* Status page (public) - dark */
.status-page { max-width: 900px; margin: 0 auto; padding: 24px; background: var(--main-bg); min-height: 100vh; color: var(--text); }
.status-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.status-header-logo { height: 36px; width: auto; max-width: 160px; object-fit: contain; vertical-align: middle; }
.status-header .btn { margin-left: auto; }
.status-banner { padding: 24px; border-radius: var(--radius); margin-bottom: 24px; text-align: center; }
.status-banner.status-ok { background: var(--primary); color: #fff; }
.status-banner.status-down { background: var(--danger); color: #fff; }
.status-banner-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.status-banner p { margin: 8px 0 0; opacity: .9; font-size: 14px; }
.status-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 24px; }
.status-services { margin-bottom: 24px; }
.status-services .table-simple th,
.status-services .table-simple td { color: var(--text); border-color: var(--border); }

/* Monitors filters */
.monitors-filters-card { margin-bottom: 24px; }
.monitors-filters-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.monitors-filters-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.monitors-filters-row .filter-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.monitors-filters-row .filter-input,
.monitors-filters-row .filter-select { padding: 6px 10px; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); min-width: 120px; }
.monitors-filters-row .filter-input { min-width: 140px; }
.monitors-filters-row .filter-input::placeholder { color: var(--text-muted); }
.monitors-filters-actions { display: flex; gap: 8px; align-items: center; }
.monitors-filters-actions .btn { flex-shrink: 0; }

.bulk-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.bulk-toolbar-label { font-size: 13px; color: var(--text-muted); }
.bulk-toolbar form { display: inline-flex; gap: 8px; }
.bulk-toolbar .btn-danger { color: var(--danger); border-color: var(--danger); }
.bulk-toolbar .btn-danger:hover { background: var(--danger-soft); }
.th-checkbox { width: 36px; }
.td-checkbox { width: 36px; vertical-align: middle; }
.td-checkbox input { cursor: pointer; }
.sort-link { color: var(--text); text-decoration: none; }
.sort-link:hover { color: var(--primary); text-decoration: underline; }
.tags-cell { font-size: 13px; color: var(--text-muted); }
/* Pill-style theme toggle: knob slides left (dark) / right (light), text never under knob */
.theme-toggle-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 200px;
  height: 46px;
  padding: 0 44px 0 44px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.06em;
  color: #fff;
  background: #1a1c25;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.theme-toggle-pill:hover {
  background: #22252e;
  border-color: rgba(255,255,255,0.2);
}
.theme-toggle-pill .theme-toggle-label {
  flex: 1;
  text-align: center;
  min-width: 0;
  z-index: 0;
}
/* Knob: fixed at edges, slides left (dark) ↔ right (light) */
.theme-toggle-pill .theme-toggle-knob {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #1a1c25;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: left .25s ease, right .25s ease;
  z-index: 1;
}
.theme-toggle-pill .theme-toggle-knob #theme-icon {
  font-size: 18px;
  line-height: 1;
}
/* Light: knob on the right edge, label space on the left */
.theme-toggle-pill.theme-toggle-pill--light {
  color: #1a1c25;
  background: #e5e7eb;
  border-color: #d1d5db;
}
.theme-toggle-pill.theme-toggle-pill--light:hover {
  background: #d1d5db;
}
.theme-toggle-pill.theme-toggle-pill--light .theme-toggle-knob {
  left: auto;
  right: 5px;
}
.theme-toggle-pill.theme-toggle-pill--light .theme-toggle-label {
  text-align: center;
}
.incidents-search-card { margin-bottom: 24px; }
.incidents-search-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.incidents-search-form input[type="search"] { padding: 8px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); min-width: 220px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .flex-between { flex-direction: column; align-items: stretch; }
  .page-header .btn { align-self: flex-start; }
}
