/* views/data-center.ejs — NOC/misijų valdymo stiliaus telemetrijos vitrina.
   Sąmoningai NE Chart.js/stačiakampių diagramų stilius (tas jau naudojamas
   /idejos/statistika) - čia statuso indikatoriai, žurnalo eilutės, juostelės. */

.dc-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.dc-header {
  margin-bottom: 3rem;
  border-left: 2px solid #333;
  padding-left: 2rem;
}

.dc-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.dc-header h1 {
  font-size: 1.2rem;
  font-weight: 200;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #fff;
}

.dc-back {
  font-family: monospace;
  font-size: 0.75rem;
  color: #666;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
}
.dc-back:hover { color: #4ade80; }

.dc-header p {
  color: #666;
  margin-top: 0.8rem;
  font-family: monospace;
  font-size: 0.8rem;
}

/* --- EMPTY STATE --- */
.dc-empty {
  text-align: center;
  padding: 5rem 1.5rem;
  border: 1px dashed #222;
  color: #666;
  font-family: monospace;
}
.dc-empty-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fbbf24;
  margin: 0 auto 1.5rem;
  animation: dc-pulse 1.8s ease-in-out infinite;
}
.dc-empty p { font-size: 0.85rem; letter-spacing: 1px; margin: 0.4rem 0; }
.dc-empty-sub { color: #444 !important; font-size: 0.75rem !important; }

/* --- ENGINE STATUS CARDS --- */
.dc-engines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.dc-engine-card {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  padding: 1.75rem;
}

.dc-engine-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1a1a1a;
}

.dc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
  flex-shrink: 0;
}
.dc-dot.ok { background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: dc-pulse 2.4s ease-in-out infinite; }
.dc-dot.warn { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; animation: dc-pulse 1.6s ease-in-out infinite; }
.dc-dot.down { background: #f87171; box-shadow: 0 0 8px #f87171; animation: dc-pulse 1s ease-in-out infinite; }

.dc-engine-name {
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #fff;
  flex: 1;
}

.dc-engine-state {
  font-family: monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #666;
}

.dc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* 2026-09-08: naudojama Saugiklių aktyvumo / Skaitinių teiginių panelėse - kintantis
   elementų skaičius (2 arba 4), tad responsive auto-fit vietoj fiksuoto 1fr 1fr. */
.dc-metrics-3 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1.5rem;
}

.dc-metric {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dc-metric-label {
  font-family: monospace;
  font-size: 0.62rem;
  color: #555;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dc-metric-value {
  font-family: monospace;
  font-size: 1.15rem;
  color: #eee;
  font-weight: 300;
}

/* --- GENERIC PANEL --- */
.dc-panel {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.dc-panel-head {
  font-family: monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #4ade80;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
}

.dc-panel-sub {
  color: #444;
  letter-spacing: 0;
  text-transform: none;
}

/* --- PROVIDER BARS --- */
.dc-provider-bars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dc-provider-row {
  display: grid;
  grid-template-columns: 110px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
  font-family: monospace;
  font-size: 0.7rem;
}

.dc-provider-name { color: #999; letter-spacing: 1px; }

.dc-provider-track {
  background: #161616;
  height: 6px;
  overflow: hidden;
}

.dc-provider-fill {
  height: 100%;
  background: #4ade80;
  transition: width 0.6s ease;
}

.dc-provider-pct { color: #666; text-align: right; }

.dc-empty-note {
  color: #444;
  font-family: monospace;
  font-size: 0.75rem;
}

/* --- ACTIVITY LOG --- */
.dc-log {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dc-log-row {
  display: grid;
  grid-template-columns: 90px 46px 78px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid #161616;
  font-family: monospace;
  font-size: 0.68rem;
}
.dc-log-row:last-child { border-bottom: none; }

.dc-log-time { color: #555; }

.dc-log-engine {
  padding: 1px 6px;
  border: 1px solid #262626;
  text-align: center;
  color: #888;
  letter-spacing: 0.5px;
}
.dc-log-engine.primary { color: #60a5fa; border-color: #1e3a5f; }
.dc-log-engine.evolution { color: #c084fc; border-color: #3b1e5f; }

.dc-log-era { color: #666; }

.dc-log-detail { color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-log-detail .err { color: #f87171; }
.dc-log-detail .provider { color: #4ade80; }
.dc-log-detail .score { color: #666; }

.dc-log-status { text-align: right; }
.dc-log-status.ok { color: #4ade80; }
.dc-log-status.fail { color: #f87171; }

/* --- CROSSLINK --- */
.dc-crosslink {
  text-align: center;
  padding-top: 1rem;
}
.dc-crosslink a {
  font-family: monospace;
  font-size: 0.75rem;
  color: #555;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
.dc-crosslink a:hover { color: #4ade80; }

@keyframes dc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 640px) {
  /* Vienoje eilutėje data+variklis+era+detalė+statusas tiesiog netilpdavo -
     tiekėjo/balų tekstas nusikirsdavo pusėje žodžio (ypač evoliucijos eilutėms
     su keliais tiekėjais iš eilės). Vietoj kovos dėl vietos vienoje eilutėje -
     detalė perkeliama į savo, pilno pločio eilutę apačioje, kad niekada
     nereikėtų jos kirpti. */
  .dc-log-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "time engine status"
      "detail detail detail";
    column-gap: 0.5rem;
    row-gap: 0.35rem;
  }
  .dc-log-time { grid-area: time; }
  .dc-log-engine { grid-area: engine; }
  .dc-log-status { grid-area: status; justify-self: end; }
  .dc-log-detail {
    grid-area: detail;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .dc-log-era { display: none; }
  .dc-metrics { grid-template-columns: 1fr 1fr; }
  .dc-provider-row { grid-template-columns: 80px 1fr 40px; }
}
