/* ═══════════════════════════════════════════════════════════
   ATLAS — Enhanced Analytics
   Theater view · Sparklines · Live feed · Kill-chain
   Wraps existing .analytics structure, adds new sections.
   ═══════════════════════════════════════════════════════════ */

/* ── THEATER: all directions at once ─────────────────── */
.atx-theater {
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.atx-theater__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 242, 255, 0.12);
}
.atx-theater__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 242, 255, 0.9);
  text-shadow: 0 0 6px rgba(0, 242, 255, 0.35);
}
.atx-theater__window {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px 8px;
  border: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 2px;
}

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

.atx-row {
  display: grid;
  grid-template-columns: 14px 38px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  background: rgba(255, 255, 255, 0.015);
}
.atx-row:hover {
  background: rgba(0, 242, 255, 0.06);
  border-color: rgba(0, 242, 255, 0.2);
}
.atx-row.is-active {
  background: rgba(0, 242, 255, 0.1);
  border-color: var(--dir-color, rgba(0, 242, 255, 0.4));
}
.atx-row.is-hot {
  border-color: var(--dir-color, #ff2a2a) !important;
  box-shadow: 0 0 12px rgba(255, 42, 42, 0.28);
  animation: atx-hot-pulse 1.8s ease-in-out infinite;
}
@keyframes atx-hot-pulse {
  50% { box-shadow: 0 0 18px rgba(255, 42, 42, 0.55); }
}

.atx-row__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dir-color);
  box-shadow: 0 0 5px var(--dir-color), 0 0 10px var(--dir-color);
}

.atx-row__short {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--dir-color);
  text-shadow: 0 0 4px var(--dir-color);
}

.atx-row__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.atx-row__label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.atx-row__bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.atx-row__bar-fill {
  height: 100%;
  background: var(--dir-color);
  box-shadow: 0 0 6px var(--dir-color);
  transition: width 0.4s ease-out;
  width: 0;
}

.atx-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 52px;
}
.atx-row__count {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 242, 255, 0.2);
  line-height: 1;
}
.atx-row__trend {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}
.atx-row__trend.up   { color: #ff6a6a; text-shadow: 0 0 5px rgba(255, 106, 106, 0.5); }
.atx-row__trend.down { color: #7dffbf; text-shadow: 0 0 5px rgba(125, 255, 191, 0.4); }
.atx-row__trend.flat { color: rgba(255, 255, 255, 0.35); }

/* ── METRIC cards enhancement: sparkline + trend ─────── */
.analytics__metric {
  position: relative;
}
.atx-spark {
  margin-top: 6px;
  width: 100%;
  height: 22px;
  display: block;
  overflow: visible;
}
.atx-spark path {
  fill: none;
  stroke: var(--ui-accent, rgba(0, 242, 255, 0.92));
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(0, 242, 255, 0.5));
}
.atx-spark__area {
  fill: rgba(0, 242, 255, 0.12);
  stroke: none;
}
.analytics__metric--alert .atx-spark path {
  stroke: var(--c-amber, #ffd23f);
  filter: drop-shadow(0 0 3px rgba(255, 210, 63, 0.5));
}
.analytics__metric--alert .atx-spark__area {
  fill: rgba(255, 210, 63, 0.14);
}

.atx-trend-inline {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.atx-trend-inline.up   { color: #ff6a6a; background: rgba(255, 106, 106, 0.15); border: 1px solid rgba(255, 106, 106, 0.35); }
.atx-trend-inline.down { color: #7dffbf; background: rgba(125, 255, 191, 0.15); border: 1px solid rgba(125, 255, 191, 0.35); }
.atx-trend-inline.flat { color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }

/* ── LIVE FEED of new targets ─────────────────────────── */
.atx-feed {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 210, 63, 0.3);
  background: rgba(255, 210, 63, 0.04);
  border-radius: 8px;
}
.atx-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 210, 63, 0.25);
}
.atx-feed__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffd23f;
  text-shadow: 0 0 6px rgba(255, 210, 63, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
}
.atx-feed__title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd23f;
  box-shadow: 0 0 6px #ffd23f;
  animation: atx-feed-pulse 1.6s ease-in-out infinite;
}
@keyframes atx-feed-pulse {
  50% { opacity: 0.3; }
}
.atx-feed__count {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  color: rgba(255, 210, 63, 0.8);
}

.atx-feed__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.atx-feed__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid rgba(255, 210, 63, 0.55);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.atx-feed__item:hover {
  background: rgba(255, 210, 63, 0.08);
  border-left-color: #ffd23f;
}
.atx-feed__cat {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atx-feed__time {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  color: rgba(255, 210, 63, 0.7);
  flex-shrink: 0;
}
.atx-feed__empty {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}

/* ── KILL-CHAIN: destroyed counter ────────────────────── */
.atx-kchain {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(125, 255, 191, 0.3);
  background: rgba(125, 255, 191, 0.04);
  border-radius: 8px;
}
.atx-kchain__head {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7dffbf;
  text-shadow: 0 0 6px rgba(125, 255, 191, 0.35);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(125, 255, 191, 0.25);
}
.atx-kchain__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.atx-kchain__cell {
  text-align: center;
  padding: 6px 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.atx-kchain__label {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3px;
}
.atx-kchain__value {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.atx-kchain__cell--destroyed .atx-kchain__value {
  color: #7dffbf;
  text-shadow: 0 0 6px rgba(125, 255, 191, 0.55);
}
.atx-kchain__cell--pct .atx-kchain__value {
  color: rgba(0, 242, 255, 0.92);
}

/* Mobile tweaks */
@media (max-width: 980px) {
  .atx-theater, .atx-feed, .atx-kchain {
    padding: 8px 10px;
  }
  .atx-row {
    grid-template-columns: 12px 34px 1fr auto;
    gap: 6px;
    padding: 5px 6px;
  }
  .atx-row__count { font-size: 12px; }
  .atx-row__label { font-size: 9px; }
}
