/* THE JARVIS HUD SKIN — the btop's green heart, the Jarvis's amber soul.
   The palette: the black ground, the green life, the amber money,
   the cyan structure, the red danger, the grey quiet. */

:root {
  --ground: #0d0d0d;
  --panel: #111111;
  --border: #1f1f1f;
  --green: #00e676;
  --amber: #ffb300;
  --cyan: #00bcd4;
  --red: #ff5252;
  --grey: #9e9e9e;
  --dim: #6a6a6a;
  --text: #e0e0e0;
}

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

html {
  background: var(--ground);
}

body {
  background: var(--ground);
  color: var(--text);
  font-family: "JetBrains Mono", "IBM Plex Mono", "DejaVu Sans Mono",
               "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── THE TOP STRIP ─────────────────────────────────────────── */

.strip {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ground);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strip-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 16px;
}

.brand-sub {
  color: var(--dim);
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 11px;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.2s;
}

.pulse-on {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.strip-row2 {
  display: flex;
  gap: 8px;
}

.gauge {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.g-label {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 1px;
}

.g-bar {
  flex: 1;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
}

.g-val {
  color: var(--grey);
  font-size: 12px;
  min-width: 30px;
  text-align: right;
}

/* ── THE PANELS ────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px;
}

.panel-head {
  font-size: 14px;
  font-weight: 400;
  color: var(--cyan);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-title {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 1px;
}

.ph-sub {
  color: var(--dim);
  font-size: 11px;
}

/* ── THE NOW PANEL ─────────────────────────────────────────── */

.now-stream {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.now-row {
  color: var(--grey);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.n-ts {
  color: var(--dim);
}

.n-body {
  color: var(--grey);
}

/* ── THE GPU PANEL ─────────────────────────────────────────── */

.gpu-table {
  margin-bottom: 8px;
}

.gpu-head,
.fills-head {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.gpu-row {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gpu-empty {
  color: var(--dim);
}

.spark-frame {
  border: 1px dashed var(--border);
  border-radius: 2px;
  padding: 14px 8px;
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spark-label {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 1px;
}

/* ── THE RAM PANEL ─────────────────────────────────────────── */

.ram-blocks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.ram-block {
  display: flex;
  align-items: center;
  gap: 6px;
}

.r-label {
  color: var(--cyan);
  font-size: 11px;
  width: 42px;
  letter-spacing: 1px;
}

.r-bar {
  flex: 1;
  height: 8px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.r-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  /* the step 2: the width animates with the real /proc numbers */
}

.r-fill-cyan {
  background: var(--cyan);
}

.r-fill-grey {
  background: var(--grey);
}

.r-val {
  color: var(--grey);
  font-size: 11px;
  min-width: 64px;
  text-align: right;
}

.ram-list {
  font-size: 11px;
}

.ram-empty {
  color: var(--dim);
}

/* ── THE COURTS PANEL ──────────────────────────────────────── */

.courts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.court {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px;
  background: #0f0f0f;
}

.c-head {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.c-cap {
  color: var(--green);
  font-weight: 400;
}

.c-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--grey);
  padding: 1px 0;
}

.c-amber {
  color: var(--amber);
}

/* ── THE FILLS PANEL ───────────────────────────────────────── */

.fills-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fill-row {
  font-size: 12px;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fill-buy {
  color: var(--green);
}

.fill-sell {
  color: var(--red);
}

.fill-empty {
  color: var(--dim);
}

/* ── THE STREAM FOOTER ─────────────────────────────────────── */

.stream {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  color: var(--dim);
}

.stream-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: lowercase;
}

/* ── THE RESPONSIVE SHAPES ─────────────────────────────────── */
/* the one DOM, the three shapes: the phone, the tablet, the laptop */

/* the tablet (the ≥768px): the two-column grid */
@media (min-width: 768px) {
  main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
  }

  #panel-fills {
    grid-column: span 2;
  }

  .strip {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
  }

  .strip-row1 {
    flex: 0 0 auto;
  }

  .strip-row2 {
    flex: 1;
  }
}

/* the laptop (the ≥1280px): the btop's full grid */
@media (min-width: 1280px) {
  main {
    grid-template-columns: 1fr 1fr 1fr;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    gap: 14px;
  }

  #panel-now,
  #panel-gpu,
  #panel-ram {
    grid-column: span 1;
  }

  #panel-courts {
    grid-column: span 1;
  }

  #panel-fills {
    grid-column: span 2;
  }

  .courts {
    flex-direction: row;
  }

  .court {
    flex: 1;
  }
}

/* ── the LAXMI full skeleton's panels (the boss's Nov 24 build) ── */
.web-filter { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; }
.web-filter .w-label { color: #6a6a6a; font-size: 12px; }
.web-filter select { background: #111; color: #00bcd4; border: 1px solid #333;
  padding: 4px 8px; font-family: monospace; font-size: 12px; max-width: 220px; }
.web-table, .src-table, .council-table, .math-table { font-size: 12px; }
.web-head { color: #6a6a6a; border-bottom: 1px solid #222; padding-bottom: 4px;
  margin-bottom: 4px; }
.web-row { padding: 3px 0; border-bottom: 1px solid #161616;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-empty { color: #6a6a6a; }
.v-keep { color: #00e676; font-weight: bold; }
.v-reject { color: #ff5252; }
.v-other { color: #ffb300; }
.w-lane { color: #00bcd4; }
.w-title { color: #d0d0d0; }
.w-reason { color: #8a8a8a; }
.w-country { color: #ffb300; }
.src-summary { font-size: 13px; margin-bottom: 6px; font-weight: bold; }
.courts { flex-wrap: wrap; }
.court { min-width: 30%; }

/* ── the NIGHT panel ── */
.night-timeline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.n-phase { color: #6a6a6a; border: 1px solid #2a2a2a; padding: 3px 8px;
  font-size: 11px; font-family: monospace; border-radius: 3px; }
.n-now { color: #ffb300; border-color: #ffb300;
  animation: n-pulse 2s ease-in-out infinite; }
@keyframes n-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.night-now { color: #d0d0d0; font-size: 13px; margin-bottom: 6px; }
.night-rows { font-size: 12px; }
