/* Status Dashboard — secforge Brand Theme */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/poppins-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/poppins-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/poppins-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/poppins-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/poppins-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/poppins-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/poppins-700-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/poppins-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --ok:      #16a34a;
  --warning: #d97706;
  --error:   #dc2626;
  --unknown: #64748b;

  --ok-bg:       #dcfce7;
  --warning-bg:  #fef3c7;
  --error-bg:    #fee2e2;
  --unknown-bg:  #eef2f7;

  --ok-text:      #15803d;
  --warning-text: #92400e;
  --error-text:   #991b1b;
  --unknown-text: #475569;

  --bg:      #F3F5F8;
  --surface: #ffffff;
  --border:  #C8D5DC;
  --text:    #324A6D;
  --dim:     #5a7a94;
  --muted:   #8aabbf;
  --accent:  #247DA8;

  --r: 6px;
}

html { font-size: 13px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  line-height: 1.4;
}

/* ── Layout ─────────────────────────────────────────── */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 20px;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.hdr-inner {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0;
}

.hdr-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.hdr-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.hdr-right {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ok);
}
.dot.status-ok      { background: var(--ok);      box-shadow: 0 0 5px rgba(22,163,74,0.5); }
.dot.status-warning { background: var(--warning);  box-shadow: 0 0 5px rgba(217,119,6,0.5); }
.dot.status-error   { background: var(--error);    box-shadow: 0 0 6px rgba(220,38,38,0.6);
                      animation: blink 1s step-end infinite; }
.dot.status-unknown { background: var(--unknown); }

@keyframes blink { 50% { opacity: 0.2; } }
@keyframes spin { to { transform: rotate(360deg); } }

.overall-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.overall-badge.status-ok      { background: var(--ok-bg);      color: var(--ok-text); }
.overall-badge.status-warning { background: var(--warning-bg); color: var(--warning-text); }
.overall-badge.status-error   { background: var(--error-bg);   color: var(--error-text); }
.overall-badge.status-unknown { background: var(--unknown-bg); color: var(--unknown-text); }

.btn-check-now {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}
.btn-check-now:hover { opacity: 1; color: var(--accent); }
.btn-check-now:disabled { opacity: 0.25; cursor: default; }

/* ── Alert panel ────────────────────────────────────── */

.alert-panel {
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.alert-panel.alert-error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
}
.alert-panel.alert-warning {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
}

.alert-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.alert-error   .alert-title { color: var(--error-text); }
.alert-warning .alert-title { color: var(--warning-text); }

.alert-item {
  font-size: 0.82rem;
  padding: 1px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.alert-host {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 600;
  font-size: 0.8rem;
}
.alert-msg { color: var(--dim); }

/* ── Two-column groups grid ─────────────────────────── */

.groups-grid {
  columns: 2;
  column-gap: 10px;
}

@media (max-width: 600px) {
  .groups-grid { columns: 1; }
}

/* ── Group sections ─────────────────────────────────── */

.group {
  margin-bottom: 10px;
  break-inside: avoid;
}

.group-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 0 4px 2px;
}

.host-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

/* ── Host rows ──────────────────────────────────────── */

.host-row {
  border-bottom: 1px solid var(--border);
}
.host-row:last-child { border-bottom: none; }

.host-row.row-error   { background: #fef2f2; }
.host-row.row-warning { background: #fffbeb; }

.row-main {
  display: grid;
  grid-template-columns: 200px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  min-height: 31px;
}
.host-row:not(.row-error):not(.row-warning):hover .row-main { background: #f8fafc; }
.host-row.row-error:hover   .row-main { background: #fee2e2; }
.host-row.row-warning:hover .row-main { background: #fef3c7; }

.row-name {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-error   .row-name { color: var(--error-text);   font-weight: 700; }
.row-warning .row-name { color: var(--warning-text); font-weight: 600; }

.row-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.row-time {
  font-size: 0.68rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ── Check pills ────────────────────────────────────── */

.pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-ok      { background: var(--ok-bg);      color: var(--ok-text); }
.pill-warning { background: var(--warning-bg); color: var(--warning-text); }
.pill-error   { background: var(--error-bg);   color: var(--error-text); }
.pill-unknown { background: var(--unknown-bg); color: var(--unknown-text); }

/* ── Error detail row ───────────────────────────────── */

.row-detail {
  font-size: 0.75rem;
  padding: 0 12px 5px calc(200px + 20px);
  line-height: 1.3;
}
.row-error   .row-detail { color: var(--error-text); }
.row-warning .row-detail { color: var(--warning-text); }

/* ── Notice banner ──────────────────────────────────── */

.notice-banner {
  background: #e8f4fa;
  border: 1px solid #b3d9ec;
  color: #1C6A91;
  padding: 5px 10px;
  border-radius: var(--r);
  margin-bottom: 10px;
  font-size: 0.78rem;
}
.notice-stale {
  background: #fff8e1;
  border-color: #ffe082;
  color: #7a5c00;
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  padding-top: 10px;
  text-align: right;
}
.footer-note {
  font-size: 0.68rem;
  color: var(--muted);
}
