/* stato.css — sezione Stato ("il Battito"): hero ECG, card menti attive,
   quota, prossimo risveglio, kill switch. Riferimento: mockup stato.html. */

.stato-screen { max-width: 720px; margin: 0 auto; }

.stato-hd {
  padding: 18px 18px 12px;
  background: linear-gradient(180deg, #16121f, #0d0d12);
}
.stato-hd-t { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.4px; }
.stato-hd-s { font-size: 12px; color: rgba(255, 255, 255, 0.4); margin-top: 2px; }

.stato-body {
  padding: 14px;
  display: flex; flex-direction: column; gap: 13px;
}
.stato-loading { text-align: center; color: var(--text-dim); font-size: 13.5px; padding: 32px; }
.stato-muted { font-size: 12.5px; color: rgba(255, 255, 255, 0.4); }

/* ===== Card generica ===== */
.card {
  background: #15151c;
  border: 1px solid #24242e;
  border-radius: 16px;
  padding: 14px;
}
.card-lab {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.33); font-weight: 700; margin-bottom: 10px;
}

/* ===== Hero "il Battito" ===== */
.hero {
  background: linear-gradient(150deg, #1d1733, #141019);
  border: 1px solid #2c2740;
  border-radius: 18px;
  padding: 15px;
  display: flex; align-items: center; gap: 14px;
}
.hero-av { width: 62px; height: 62px; flex-shrink: 0; }
.hero-txt { flex: 1; min-width: 0; }
.hero-st { font-size: 15px; font-weight: 800; color: #fff; }
.hero-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.ecg {
  margin-top: 9px; height: 34px;
  border-radius: 8px; background: #0c0c11; overflow: hidden;
}
/* La linea ECG scorre verso sinistra via SMIL <animateTransform> (vedi
   js/sezioni/stato.js): è il battito di Horologio, deve scorrere sempre.
   SMIL non è soggetto a prefers-reduced-motion — con risparmio energetico
   o "rimuovi animazioni" attivi un'animazione CSS si fermerebbe, qui no. */

/* ===== Righe "cosa gira ora" ===== */
.rrow {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.rrow:last-child { border-bottom: none; padding-bottom: 0; }
.rav {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; position: relative;
}
.rav::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: 50%; border: 2px solid var(--c, #7c3aed); opacity: 0.6;
}
.rinfo { flex: 1; min-width: 0; }
.rname { font-size: 13px; font-weight: 700; color: #f0f0f3; }
.rwhat {
  font-size: 11px; color: var(--text-dim); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prog { display: flex; gap: 3px; margin-top: 5px; }
.prog i {
  width: 16px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.prog i.on { background: var(--c, #7c3aed); }

/* ===== Quota ===== */
.qtop {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.qpct { font-size: 20px; font-weight: 800; color: #fff; }
.qnote { font-size: 11px; color: rgba(255, 255, 255, 0.33); }
.qbar {
  height: 9px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.qfill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  transition: width 400ms ease;
}
.qsub { font-size: 10.5px; color: rgba(255, 255, 255, 0.27); margin-top: 7px; }

/* ===== Prossimo risveglio ===== */
.card.wake { display: flex; align-items: center; gap: 11px; }
.wake-ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(251, 191, 36, 0.09);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.wake-txt { flex: 1; min-width: 0; }
.wake-t { font-size: 14px; font-weight: 800; color: #fff; }
.wake-s { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.wake-r { font-size: 11px; color: #fbbf24; font-weight: 700; flex-shrink: 0; }

/* ===== Kill switch ===== */
.pause-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.33);
  border-radius: 14px; padding: 13px;
  color: #f7a8c8; font-size: 13.5px; font-weight: 800;
  cursor: pointer;
}
.pause-btn:hover { background: rgba(236, 72, 153, 0.18); }

/* ===== Sottosistema A Fase 1a -- PC live ===== */
.card.pc-card { padding: 13px 14px; }
.pc-card .card-lab { display: flex; align-items: center; gap: 8px; }
.pc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  background: #94a3b8;
}
.pc-dot.on  { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
.pc-dot.off { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.pc-row { font-size: 12.5px; color: rgba(255, 255, 255, 0.78); margin-top: 6px; }
.pc-status { font-weight: 700; }
.pc-angelo { color: rgba(255, 255, 255, 0.6); }
.pc-bar {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px; font-size: 11px;
}
.pc-bar-l { width: 32px; color: rgba(255, 255, 255, 0.45); font-weight: 700; }
.pc-bar-tr {
  flex: 1; height: 7px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.pc-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #22d3ee, #34d399);
  transition: width 400ms ease;
}
.pc-bar-v {
  width: 110px; text-align: right; color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}
.pc-bar-v small { color: rgba(255, 255, 255, 0.35); font-size: 10px; margin-left: 4px; }
.pc-meta {
  margin-top: 9px; padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 10.5px; color: rgba(255, 255, 255, 0.4);
}

/* ===== Log runner ===== */
.card.log-card { padding: 12px 14px; }
.log-body {
  margin: 8px 0 0;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 8px;
  padding: 9px 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  max-height: 220px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
}

/* ===== Fase 1b -- screenshot del desktop ===== */
.pc-shot-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  aspect-ratio: 16 / 10;
  min-height: 110px;
}
.pc-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0a0a;
}
.pc-shot-badge {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
}
.pc-shot-badge.stale {
  background: rgba(239, 68, 68, 0.7);
  color: #fff;
}
.pc-shot-toggle {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  border: 0;
  border-radius: 4px;
  font-size: 10px;
  padding: 3px 8px;
  cursor: pointer;
  font-weight: 700;
}
.pc-shot-toggle:hover { background: rgba(239, 68, 68, 0.6); color: #fff; }
.pc-shot-toggle.off { background: rgba(34, 197, 94, 0.6); color: #fff; }
.pc-shot-toggle.off:hover { background: rgba(34, 197, 94, 0.85); }
.pc-shot-pending {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}
.pc-shot-wrap.pc-shot-empty { background: rgba(255, 255, 255, 0.03); }
.pc-shot-wrap.pc-shot-off { background: rgba(15, 23, 42, 0.6); }

/* ===== Fase 2 -- bottone Apri sessione Guacamole ===== */
.pc-control {
  margin-top: 11px;
  width: 100%;
  background: linear-gradient(90deg, #22d3ee, #7c3aed);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 11px;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.pc-control:hover { filter: brightness(1.1); }
