/* GeekyMonitor v5 — extracted stylesheet */

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

/* ── Base ── */
body {
  background: #0c0b0a;
  color: #f5f0eb;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 12px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Utility ── */
.hidden { display: none !important; }

.c-green  { color: #4ade80; }
.c-amber  { color: #fbbf24; }
.c-red    { color: #ef4444; }
.c-muted  { color: #9a9490; }
.c-dim    { color: #6b6460; }

/* ── Dots ── */
.dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-g { background: #4ade80; box-shadow: 0 0 4px #4ade8066; }
.dot-a { background: #fbbf24; box-shadow: 0 0 4px #fbbf2466; }
.dot-r { background: #ef4444; box-shadow: 0 0 4px #ef444466; }

.cdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

/* ── Header bar ── */
.hbar {
  background: #111010;
  border-bottom: 1px solid #222;
  padding: 0 24px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.logo {
  font-size: 14px;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  letter-spacing: -0.4px;
}

.logo-icon {
  width: 26px;
  height: 26px;
  background: oklch(55% 0.18 250);
  border-radius: 5px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* ── Nav tabs ── */
.tab {
  padding: 0 18px;
  height: 42px;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #6b6460;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: #f5f0eb;
  border-bottom-color: oklch(62% 0.15 250);
}
.tab:hover:not(.active) { color: #9a9490; }

/* ── Forecast strip ── */
.fstrip {
  background: #100e00;
  border-bottom: 1px solid #2a2200;
  padding: 5px 24px;
  font-size: 11px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-shrink: 0;
}
.fstrip-label {
  color: #6b5e00;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Quick actions bar ── */
.qbar {
  background: #0f0e0d;
  border-top: 1px solid #1e1c1a;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.qbar-label {
  font-size: 9px;
  color: #403c39;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 4px;
  white-space: nowrap;
}
.qbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 5px;
  border: 1px solid #2a2826;
  background: #141210;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  color: #c4bdb6;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.qbtn:hover { border-color: #4a4440; color: #f5f0eb; }
.qbtn:disabled { opacity: 0.5; cursor: not-allowed; }
.qbtn.loading { opacity: 0.7; cursor: wait; }

.badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.badge-green  { background: #0d1a0f; color: #4ade80; }
.badge-amber  { background: #1c1500; color: #fbbf24; }
.badge-blue   { background: #0d1422; color: oklch(72% 0.15 250); }
.badge-red    { background: #1a0808; color: #ef4444; }
.badge-purple { background: #120d1a; color: #a78bfa; }

.qdivider { width: 1px; height: 24px; background: #1e1c1a; flex-shrink: 0; }

/* ── Content area ── */
.content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* ── Tab panels ── */
.view { display: none; flex: 1; overflow: hidden; flex-direction: column; }
.view.active { display: flex; }

/* ══════════════════════════════════════════
   OVERVIEW
══════════════════════════════════════════ */
.overview {
  flex: 1;
  overflow-y: auto;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-card {
  background: #111010;
  border: 1px solid #1e1c1a;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.server-card:hover          { border-color: oklch(62% 0.15 250 / 0.35); }
.server-card.selected       { border-color: oklch(62% 0.15 250 / 0.6); }

.sc-head {
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 230px repeat(6, 1fr) 210px;
  align-items: center;
  border-bottom: 1px solid #1a1817;
}

.sc-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sc-name span {
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
}
.sc-sub {
  font-size: 10px;
  color: #4a4440;
  padding-left: 15px;
  margin-top: 2px;
}

.metric-col {
  text-align: center;
  border-left: 1px solid #1a1817;
  padding: 4px 8px;
}
.metric-col .lbl {
  font-size: 9px;
  color: #4a4440;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.metric-col .val {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.metric-col .sub {
  font-size: 9px;
  color: #4a4440;
  margin-top: 3px;
}
.metric-col .bar {
  height: 2px;
  background: #1e1c1a;
  border-radius: 1px;
  margin-top: 5px;
}

.spark-col {
  border-left: 1px solid #1a1817;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spark-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spark-lbl {
  font-size: 9px;
  color: #4a4440;
  width: 22px;
}

.sc-containers {
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ct {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #0c0b0a;
  border-radius: 4px;
  border: 1px solid #1a1817;
}
.ct .cn  { font-size: 10px; color: #9a9490; }
.ct .cpu { font-size: 9px; color: #6b6460; }

.tag   { font-size: 8px; padding: 1px 4px; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.tag-c { background: #0d1a0f; color: #2a5a30; }
.tag-s { background: #1a1817; color: #4a4440; }

.ct-section {
  font-size: 9px;
  color: #403c39;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 2px;
}

/* add-server row */
.add-server-row {
  background: #0f0e0d;
  border: 1px dashed #1e1c1a;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 11px;
  color: #403c39;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, color 0.15s;
}
.add-server-row:hover { border-color: #4a4440; color: #9a9490; }

/* ══════════════════════════════════════════
   DETAIL VIEW
══════════════════════════════════════════ */
.drilldown {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr 1fr 280px;
  overflow: hidden;
}

.dd-col {
  border-right: 1px solid #1a1817;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.dd-col:last-child { border-right: none; }

.col-hdr {
  padding: 9px 16px;
  font-size: 9px;
  color: #403c39;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #1a1817;
  position: sticky;
  top: 0;
  background: #0c0b0a;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

/* Server sidebar items */
.srv-item {
  padding: 10px 16px;
  border-bottom: 1px solid #111;
  cursor: pointer;
  flex-shrink: 0;
}
.srv-item.active { background: #141210; }
.srv-item:hover:not(.active) { background: #0f0e0d; }

.si-name {
  font-size: 12px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}
.si-sub { font-size: 10px; color: #4a4440; padding-left: 14px; }

.si-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  margin-top: 7px;
}
.si-s {
  background: #0c0b0a;
  border-radius: 3px;
  padding: 3px 5px;
  text-align: center;
}
.si-sl { font-size: 8px; color: #4a4440; }
.si-sv { font-size: 11px; font-weight: 700; }

/* Container rows */
.ctr {
  padding: 7px 16px;
  border-bottom: 1px solid #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ctr:hover { background: #0f0e0d; }
.ctr-l { display: flex; align-items: center; gap: 7px; }
.ctr-name { font-size: 11px; color: #c4bdb6; }
.ctr-r { display: flex; gap: 10px; font-size: 10px; color: #6b6460; }

/* Disk rows */
.disk-r {
  padding: 8px 16px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.disk-lbl {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 10px;
}
.disk-bar {
  height: 3px;
  background: #1e1c1a;
  border-radius: 2px;
}
.disk-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: oklch(62% 0.15 250);
}
.disk-bar-fill.warn  { background: #fbbf24; }
.disk-bar-fill.crit  { background: #ef4444; }

/* Chart area */
.chart-area {
  padding: 12px 16px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.chart-lbl {
  font-size: 10px;
  color: #6b6460;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chart-lbl strong { color: #f5f0eb; font-size: 11px; }
.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.chart-axis span { font-size: 10px; color: #4a4440; }

/* Events & recommendations */
.evt {
  padding: 7px 16px;
  border-bottom: 1px solid #111;
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.evt-t {
  color: #4a4440;
  font-size: 10px;
  white-space: nowrap;
  min-width: 52px;
  padding-top: 1px;
}
.evt-m { color: #9a9490; font-size: 11px; line-height: 1.4; }

.rec {
  padding: 12px 16px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.rec-h {
  font-size: 11px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  color: #f5f0eb;
  margin-bottom: 4px;
}
.rec p { font-size: 11px; color: #9a9490; line-height: 1.6; }
.rec-a {
  font-size: 10px;
  color: oklch(55% 0.12 150);
  margin-top: 6px;
  cursor: pointer;
}
.rec-a:hover { color: oklch(65% 0.14 150); }

.section-div {
  padding: 6px 16px;
  font-size: 9px;
  color: #403c39;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #111;
  border-top: 1px solid #111;
  background: #0c0b0a;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
}

/* ══════════════════════════════════════════
   LOG VIEW
══════════════════════════════════════════ */
.log-view {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.log-col {
  border-right: 1px solid #1a1817;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.log-col:last-child { border-right: none; }

.log-hdr {
  padding: 9px 16px;
  font-size: 9px;
  color: #403c39;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #1a1817;
  background: #0c0b0a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.log-filter {
  display: flex;
  gap: 6px;
  padding: 7px 16px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.log-ftag {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 3px;
  background: #1a1817;
  color: #6b6460;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.log-ftag.active {
  background: #141210;
  color: #f5f0eb;
  border-color: #2a2826;
}
.log-ftag:hover:not(.active) { color: #9a9490; }

.log-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  font-size: 10px;
}

.log-line {
  padding: 2px 16px;
  display: flex;
  gap: 10px;
  line-height: 1.5;
}
.log-line:hover { background: #111010; }

.log-ts  { color: #403c39; white-space: nowrap; flex-shrink: 0; }
.log-src { color: oklch(62% 0.15 250 / 0.7); white-space: nowrap; flex-shrink: 0; min-width: 100px; }
.log-msg { color: #9a9490; word-break: break-all; }
.log-msg.err  { color: #ef4444; }
.log-msg.warn { color: #fbbf24; }
.log-msg.ok   { color: #4ade80; }
.log-msg.info { color: #c4bdb6; }

/* ══════════════════════════════════════════
   LOGIN OVERLAY
══════════════════════════════════════════ */
#login-overlay {
  position: fixed;
  inset: 0;
  background: #0c0b0a;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-card {
  width: 320px;
  background: #111010;
  border: 1px solid #2a2826;
  border-radius: 10px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.login-brand .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}
.login-brand .logo {
  font-size: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-field label {
  font-size: 10px;
  color: #4a4440;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.login-field input {
  background: #0c0b0a;
  border: 1px solid #2a2826;
  border-radius: 5px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  color: #f5f0eb;
  outline: none;
  transition: border-color 0.15s;
}
.login-field input:focus { border-color: oklch(62% 0.15 250 / 0.6); }

#login-btn {
  background: oklch(40% 0.12 250);
  border: 1px solid oklch(50% 0.15 250);
  border-radius: 5px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 12px;
  color: #f5f0eb;
  cursor: pointer;
  transition: background 0.15s;
}
#login-btn:hover { background: oklch(48% 0.14 250); }
#login-btn:disabled { opacity: 0.5; cursor: wait; }

#login-error {
  font-size: 11px;
  color: #ef4444;
  text-align: center;
}

/* ══════════════════════════════════════════
   CONFIRM OVERLAY
══════════════════════════════════════════ */
#confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
#confirm-overlay.active { display: flex; }

#confirm-card {
  background: #141210;
  border: 1px solid #2a2826;
  border-radius: 8px;
  padding: 24px;
  width: 400px;
}

#confirm-title {
  font-size: 14px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  margin-bottom: 8px;
  color: #f5f0eb;
}

#confirm-message {
  font-size: 12px;
  color: #9a9490;
  margin-bottom: 20px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#confirm-ok {
  background: #1a0a0a;
  border-color: #3a1a1a;
  color: #ef4444;
}
#confirm-ok:hover { border-color: #5a2a2a; }

/* ══════════════════════════════════════════
   AI ANALYSIS OVERLAY
══════════════════════════════════════════ */
#ai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
#ai-overlay.active { display: flex; }

#ai-card {
  background: #141210;
  border: 1px solid #2a2826;
  border-radius: 8px;
  padding: 24px;
  width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.ai-card-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ai-card-hdr span {
  font-size: 14px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  color: #f5f0eb;
}
#ai-close { padding: 4px 10px; }

#ai-result {
  font-size: 12px;
  color: #c4bdb6;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* scrollbar — webkit */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2826; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3632; }
