/* ═══════════════════════════════════════════════════════════════════════════
   Securost Status — Design System
   Inspiré de securost.com : dark navy header, white cards, orange accent
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  --navy:       #0d0d0d;
  --navy-800:   #141414;
  --navy-700:   #1e1e1e;
  --blue:       #1d4ed8;
  --blue-light: #3b82f6;
  --red:        #c41919;
  --red-dark:   #a01515;
  --red-light:  #e02424;

  --up:         #16a34a;
  --up-bg:      #dcfce7;
  --up-ring:    #86efac;
  --degraded:   #d97706;
  --degraded-bg:#fef3c7;
  --degraded-ring:#fcd34d;
  --down:       #dc2626;
  --down-bg:    #fee2e2;
  --down-ring:  #fca5a5;
  --maintenance:#7c3aed;
  --maintenance-bg:#ede9fe;
  --maintenance-ring:#c4b5fd;
  --unknown:    #94a3b8;
  --unknown-bg: #f1f5f9;

  --bg:         #f1f5f9;
  --card:       #ffffff;
  --border:     #e2e8f0;
  --text:       #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 2px rgba(0,0,0,.06);

  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Header public ──────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: #fff; opacity: .9; }
.logo img.logo-img {
  height: 38px;
  width: auto;
  display: block;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.logo-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}
.logo-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  display: block;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.2;
}
.logo-wrap { line-height: 1.1; }
.header-nav { display: flex; align-items: center; gap: 12px; }

.header-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
}
.header-status-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
.header-status-pill .pill-dot { animation: pulse-green 2s ease-in-out infinite; }
.header-status-pill .pill-dot.dot-issue { background: #ef4444; animation: pulse-down 1.5s ease-in-out infinite; }

.btn-outline-light {
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
  letter-spacing: .02em;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.3);
  color: #fff;
  text-decoration: none;
}

/* ─── Status banner ──────────────────────────────────────────────────────── */
.status-banner {
  padding: 40px 0 32px;
  text-align: center;
}
.status-banner-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.banner-up    .status-banner-icon { background: var(--up-bg);    color: var(--up); }
.banner-degraded .status-banner-icon { background: var(--degraded-bg); color: var(--degraded); }
.banner-down  .status-banner-icon { background: var(--down-bg);  color: var(--down); }

.status-banner h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.status-banner p {
  color: var(--text-muted);
  font-size: 15px;
}
.refresh-info {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}
#last-updated { font-weight: 600; color: var(--text-muted); }

/* ─── Section headings ───────────────────────────────────────────────────── */
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ─── Probe card ─────────────────────────────────────────────────────────── */
.probe-group { margin-bottom: 32px; }
.probe-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.probe-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.probe-card:hover { box-shadow: var(--shadow); }

.probe-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}
.probe-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.probe-card-header .probe-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}
.probe-card-header .probe-type {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.probe-card-header .probe-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.probe-card-header .probe-uptime {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 60px;
  text-align: right;
}
.probe-chevron {
  color: var(--text-light);
  transition: transform .2s;
  font-size: 12px;
}
.probe-card.open .probe-chevron { transform: rotate(180deg); }

/* uptime blocks (90 days) */
.uptime-blocks {
  display: flex;
  gap: 2px;
  padding: 0 18px 14px;
  align-items: flex-end;
}
.uptime-block {
  flex: 1;
  height: 28px;
  border-radius: 3px;
  cursor: default;
  transition: opacity .1s;
  position: relative;
}
.uptime-block:hover { opacity: .8; }
.uptime-block.block-up          { background: var(--up); }
.uptime-block.block-degraded    { background: var(--degraded); }
.uptime-block.block-down        { background: var(--down); }
.uptime-block.block-maintenance { background: var(--maintenance); }
.uptime-block.block-unknown     { background: var(--border); }

.uptime-legend {
  display: flex;
  justify-content: space-between;
  padding: 0 18px 4px;
  font-size: 11px;
  color: var(--text-light);
}

/* probe detail (expanded) */
.probe-detail {
  display: none;
  border-top: 1px solid var(--border);
}
.probe-card.open .probe-detail { display: block; }

.probe-detail-inner {
  padding: 16px 18px 18px;
}
.probe-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.probe-stat-item { text-align: center; }
.probe-stat-item .stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.probe-stat-item .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.chart-container {
  position: relative;
  height: 120px;
  width: 100%;
}

/* ─── Status badges ──────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; }
.status-up          { color: var(--up);          background: var(--up-bg);          border: 1px solid var(--up-ring); }
.status-degraded    { color: var(--degraded);    background: var(--degraded-bg);    border: 1px solid var(--degraded-ring); }
.status-down        { color: var(--down);        background: var(--down-bg);        border: 1px solid var(--down-ring); }
.status-maintenance { color: var(--maintenance); background: var(--maintenance-bg); border: 1px solid var(--maintenance-ring); }
.status-unknown     { color: var(--text-muted);  background: var(--unknown-bg);     border: 1px solid var(--border); }

.dot-up          { background: var(--up); }
.dot-degraded    { background: var(--degraded); }
.dot-down        { background: var(--down); box-shadow: 0 0 0 3px var(--down-bg); }
.dot-maintenance { background: var(--maintenance); }
.dot-unknown     { background: var(--unknown); }

/* pulse animation for down */
@keyframes pulse-down {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
  50%       { box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}
.dot-down { animation: pulse-down 1.5s ease-in-out infinite; }

/* ─── Incidents timeline ─────────────────────────────────────────────────── */
.incidents-section { margin-bottom: 40px; }
.incident-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.incident-card.type-maintenance {
  border-left: 4px solid var(--maintenance);
}
.incident-card.type-incident {
  border-left: 4px solid var(--down);
}
.incident-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.incident-title {
  font-weight: 700;
  font-size: 16px;
  flex: 1;
}
.incident-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-investigating { background: #fee2e2; color: #dc2626; }
.badge-identified    { background: #fef3c7; color: #d97706; }
.badge-monitoring    { background: #dbeafe; color: #1d4ed8; }
.badge-resolved      { background: #dcfce7; color: #16a34a; }
.badge-scheduled     { background: #ede9fe; color: #7c3aed; }

.incident-time {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.incident-updates { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.incident-update {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
}
.incident-update::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: -4px;
  width: 1px;
  background: var(--border);
}
.incident-update:last-child::before { display: none; }
.update-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 4px;
  border: 2px solid var(--card);
  outline: 1px solid var(--border);
}
.update-body { flex: 1; }
.update-time {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.update-msg { font-size: 14px; }

/* ─── Maintenance banner ─────────────────────────────────────────────────── */
.maintenance-banner {
  background: var(--maintenance-bg);
  border: 1px solid var(--maintenance-ring);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.maintenance-banner .icon { font-size: 18px; color: var(--maintenance); flex-shrink: 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  margin-top: 56px;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer a { color: rgba(255,255,255,.55); transition: color .15s; }
.site-footer a:hover { color: #fff; text-decoration: none; }

.footer-top {
  padding: 40px 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.4);
  max-width: 280px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; }

.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom .copy {
  font-size: 12px;
  color: rgba(255,255,255,.3);
}
.footer-bottom .footer-links {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.footer-red-bar {
  height: 3px;
  background: var(--red);
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ─── Loading spinner ────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--blue-light);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Skeleton loader ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 4px;
}
@keyframes shimmer { to { background-position: -400% 0; } }

/* ─── Tooltip ────────────────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
  cursor: default;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 10;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── Admin layout ───────────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--navy);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--red);
  flex-shrink: 0;
}
.admin-sidebar-logo {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.admin-sidebar-logo .logo { font-size: 15px; }
.sidebar-nav { padding: 12px 8px; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
  margin-bottom: 2px;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-nav a.active { background: var(--red); color: #fff; }
.sidebar-nav .nav-icon { width: 18px; text-align: center; opacity: .9; }
.sidebar-sep {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 12px;
}
.sidebar-bottom {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.admin-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-topbar h1 {
  font-size: 18px;
  font-weight: 700;
}
.admin-topbar .breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-topbar .breadcrumb a { color: var(--text-muted); }
.admin-topbar .breadcrumb a:hover { color: var(--text); }

.admin-main {
  padding: 28px;
  flex: 1;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2, .card-header h3 {
  font-size: 15px;
  font-weight: 600;
}
.card-body { padding: 20px; }

/* ─── Stat cards (dashboard) ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-card .value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.stat-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card.ok    .value { color: var(--up); }
.stat-card.warn  .value { color: var(--degraded); }
.stat-card.crit  .value { color: var(--down); }
.stat-card.info  .value { color: var(--blue); }

/* ─── Table ──────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead tr { background: var(--bg); }
th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.td-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.col-1 { grid-template-columns: 1fr; }
.form-grid.col-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
label .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}
input[type=text], input[type=email], input[type=password],
input[type=number], input[type=url], input[type=datetime-local],
select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 36px; }

.form-help { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--down); }

/* toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--up); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger  { background: var(--down-bg); color: var(--down); border: 1px solid var(--down-ring); }
.btn-danger:hover { background: var(--down); color: #fff; }
.btn-success { background: var(--up-bg);   color: var(--up);   border: 1px solid var(--up-ring); }
.btn-success:hover { background: var(--up); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1a45c0; color: #fff; }

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-success { background: var(--up-bg);       border: 1px solid var(--up-ring);          color: #166534; }
.alert-danger   { background: var(--down-bg);     border: 1px solid var(--down-ring);        color: #991b1b; }
.alert-warning  { background: var(--degraded-bg); border: 1px solid var(--degraded-ring);    color: #92400e; }
.alert-info     { background: #dbeafe;            border: 1px solid #93c5fd;                 color: #1e40af; }

/* ─── Admin login ────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .logo-icon {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  font-size: 22px;
}
.login-logo h1 { font-size: 20px; font-weight: 700; }
.login-logo p { font-size: 13px; color: var(--text-muted); }
.login-form .form-group { margin-bottom: 16px; }
.login-form .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-10px);
  transition: transform .2s;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── Misc ───────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.ml-auto { margin-left: auto; }
.mt-4  { margin-top: 16px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.d-none { display: none; }
.w-100 { width: 100%; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { width: 100%; height: 56px; bottom: auto; position: relative; overflow: visible; }
  .admin-sidebar-logo { padding: 10px 16px; border-bottom: none; }
  .sidebar-nav { display: none; }
  .admin-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .probe-card-header { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .probe-stats { flex-wrap: wrap; gap: 12px; }
  .stats-grid  { grid-template-columns: 1fr; }
}
