/* EveOps Monitor — brand per docs/BRAND-STYLE-GUIDE.md (Eve Hermes repo) */
:root {
  --void: #05070A;
  --surface: rgba(14, 19, 32, 0.72);
  --surface-solid: #0E1320;
  --cyan: #00D9FF;
  --cyan-dim: rgba(0, 217, 255, 0.35);
  --cyan-faint: rgba(0, 217, 255, 0.12);
  --text: #E0E6ED;
  --muted: #8B95A5;
  --faint: #5A6473;
  --good: #26D980;
  --warn: #FFB020;
  --crit: #FF5C6E;
  --radius: 18px;
  --font-display: "Space Grotesk", Inter, Arial, sans-serif;
  --font-body: Inter, Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

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

html, body { min-height: 100%; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ambient layers */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 90vw; height: 60vh; left: 50%; top: -20vh; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,217,255,0.10), transparent 65%);
}

/* brand */
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--cyan);
  position: relative;
  box-shadow: 0 0 18px var(--cyan-dim), inset 0 0 8px var(--cyan-faint);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px; letter-spacing: -0.02em;
}
.brand-name .thin { font-weight: 500; color: var(--cyan); }

.eyebrow {
  font-family: var(--font-body); font-weight: 600;
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted);
}

.muted-line { color: var(--faint); font-size: 12.5px; }

/* glass panel */
.glass {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 217, 255, 0.22);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 0 28px rgba(0, 217, 255, 0.07),
    0 18px 50px rgba(0, 0, 0, 0.5);
}

/* login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  position: relative; z-index: 1; padding: 24px;
}
.login-card {
  width: min(400px, 100%); padding: 36px 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.login-card .eyebrow { margin-top: -6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input {
  background: rgba(5, 7, 10, 0.6);
  border: 1px solid rgba(139, 149, 165, 0.25);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body); font-size: 15px;
}
.field input:focus {
  outline: none;
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px var(--cyan-faint);
}
.btn-cyan {
  background: var(--cyan); color: #04252C;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  border: none; border-radius: 10px; padding: 12px;
  cursor: pointer;
  box-shadow: 0 0 22px var(--cyan-dim);
  transition: filter .15s ease;
}
.btn-cyan:hover { filter: brightness(1.1); }
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid rgba(139, 149, 165, 0.3);
  border-radius: 10px; padding: 8px 16px;
  font-family: var(--font-body); font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.install-btn { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.login-error { color: var(--crit); font-size: 13px; min-height: 1em; }

/* dashboard */
.dash { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 28px 28px 40px; }
.dash-header {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding-bottom: 24px;
}
.header-status { flex: 1; min-width: 200px; }
.fleet-status { color: var(--good); }
.fleet-status.degraded { color: var(--warn); }
.fleet-status.down { color: var(--crit); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 22px;
}
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } }

/* server card */
.card { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 16px; }

.card-head { display: flex; align-items: baseline; gap: 12px; }
.card-name {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  padding: 4px 11px; border-radius: 999px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.status-pill.up { color: var(--good); background: rgba(38, 217, 128, 0.10); }
.status-pill.up .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status-pill.down { color: var(--crit); background: rgba(255, 92, 110, 0.10); }
.status-pill.down .dot { background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.status-pill.paused, .status-pill.pending { color: var(--warn); background: rgba(255, 176, 32, 0.10); }
.status-pill.paused .dot, .status-pill.pending .dot { background: var(--warn); }

.card-sub { display: flex; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 12px; }
.card-sub b { color: var(--muted); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }

/* gauges */
.gauges { display: flex; justify-content: space-between; gap: 8px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.gauge-ring { position: relative; width: 76px; height: 76px; }
.gauge svg { display: block; }
.gauge .track { stroke: rgba(139, 149, 165, 0.15); }
.gauge .arc { transition: stroke-dashoffset .6s ease; }
.gauge .arc.ok { stroke: var(--cyan); filter: drop-shadow(0 0 4px var(--cyan-dim)); }
.gauge .arc.warn { stroke: var(--warn); filter: drop-shadow(0 0 4px rgba(255,176,32,.4)); }
.gauge .arc.crit { stroke: var(--crit); filter: drop-shadow(0 0 4px rgba(255,92,110,.4)); }
.gauge-val {
  font-family: var(--font-mono); font-size: 15px; font-weight: 600;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.gauge-val small { font-size: 10px; color: var(--faint); margin-left: 1px; }
.gauge-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.22em;
  color: var(--muted); text-transform: uppercase; margin-top: 8px;
}

/* sparkline */
.spark-block { display: flex; flex-direction: column; gap: 4px; }
.spark-head { display: flex; justify-content: space-between; align-items: baseline; }
.spark-title { font-size: 10px; font-weight: 600; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; }
.spark-now { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.spark { width: 100%; height: 44px; cursor: crosshair; }
.spark .fill { fill: url(#sparkgrad); }
.spark .line { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .cursor { stroke: rgba(224, 230, 237, 0.35); stroke-width: 1; }
.spark .cursor-dot { fill: var(--cyan); stroke: var(--surface-solid); stroke-width: 2; }
.spark-empty { color: var(--faint); font-size: 11.5px; font-family: var(--font-mono); }

/* footer stats row */
.card-stats { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid rgba(139,149,165,0.12); padding-top: 12px; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat .k { font-size: 9.5px; font-weight: 600; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase; }
.stat .v { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.stat .v .unit { color: var(--faint); font-size: 11px; }

/* tooltip */
.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--surface-solid);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 8px; padding: 6px 10px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.tooltip .t { color: var(--faint); font-size: 10.5px; }

.dash-footer { padding-top: 28px; text-align: center; }
