:root {
  /* Cacciatore.sk & Invytrade.sk Red + Black Palette */
  --bg: #060708;
  --bg-elevated: #0d0f12;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --line: rgba(255, 255, 255, 0.14);
  --line-red: rgba(255, 52, 61, 0.48);
  --text: #f4f1ed;
  --muted: rgba(244, 241, 237, 0.66);
  --muted-dim: rgba(244, 241, 237, 0.42);
  --red: #c81b21;
  --red-invy: #b11c0d;
  --red-hot: #ff343d;
  --red-dark: #871016;
  --red-soft: rgba(200, 27, 33, 0.18);
  --steel: #9fb7c8;
  --amber: #f0b23c;
  --amber-soft: rgba(240, 178, 60, 0.16);
  --online: #22c55e;
  --online-soft: rgba(34, 197, 94, 0.16);
  --unknown: #c084fc;
  --unknown-soft: rgba(192, 132, 252, 0.16);
  --radius: 8px;
  --font-sans: "Noto Sans", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

.text-right {
  text-align: right;
}

.muted {
  color: var(--muted);
}

.red-text {
  color: var(--red-hot);
}

/* Cacciatore.sk Noise & Red Aurora */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 190px 190px;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  filter: blur(95px);
  opacity: 0.16;
  animation: drift 16s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  left: -12vw;
  top: -12vw;
  background: var(--red-hot);
}

.aurora span:nth-child(2) {
  right: -14vw;
  top: 22vh;
  background: var(--red-invy);
  animation-delay: -6s;
}

.aurora span:nth-child(3) {
  left: 25vw;
  bottom: -22vw;
  background: #4a0b0e;
  opacity: 0.25;
  animation-delay: -10s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, -3vh, 0) scale(1.1); }
}

/* Tags & Buttons (Cacciatore.sk style) */
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.34rem 0.72rem;
  border: 1px solid var(--line-red);
  border-radius: 999px;
  color: var(--red-hot);
  background: rgba(200, 27, 33, 0.12);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag.tag-subtle {
  border-color: var(--line);
  color: var(--steel);
  background: rgba(255, 255, 255, 0.045);
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--line-red);
  background: rgba(255, 255, 255, 0.08);
}

.btn.primary {
  color: #fff;
  border-color: rgba(255, 52, 61, 0.55);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 0 32px rgba(200, 27, 33, 0.28);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--red-hot), var(--red));
  box-shadow: 0 0 42px rgba(255, 52, 61, 0.42);
}

.btn.btn-sm {
  min-height: 36px;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
}

.btn.btn-full {
  width: 100%;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= LOGIN SCREEN ================= */
.login-screen {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red-hot);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 20, 24, 0.94), rgba(8, 9, 11, 0.96));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.65), 0 0 45px rgba(200, 27, 33, 0.16);
  backdrop-filter: blur(20px);
  padding: 2.2rem 2rem;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.login-brand h1 {
  margin: 0.35rem 0 0;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.login-lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.field-input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 7, 8, 0.85);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--red-hot);
  box-shadow: 0 0 0 3px rgba(200, 27, 33, 0.22);
}

.pin-input {
  letter-spacing: 0.35em;
  font-size: 1.1rem;
  font-weight: 800;
}

.login-error {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--red-hot);
  background: rgba(200, 27, 33, 0.18);
  color: #fecaca;
  font-size: 0.85rem;
  font-weight: 600;
}

.login-footer-hint {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted-dim);
  text-align: center;
}

/* ================= TOP NAVIGATION HEADER ================= */
.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0.85rem;
  z-index: 30;
  margin: 0.85rem clamp(1rem, 3vw, 2.2rem) 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 7, 8, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: 1px solid rgba(255, 52, 61, 0.6);
  box-shadow: 0 0 24px rgba(200, 27, 33, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 0.04em;
}

.brand-text strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(200, 27, 33, 0.32), rgba(135, 16, 22, 0.22));
  border-color: var(--line-red);
  box-shadow: 0 0 24px rgba(200, 27, 33, 0.2);
}

.nav-badge {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.header-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.status-dot.dot-ok {
  background: var(--online);
  box-shadow: 0 0 10px var(--online);
}

.status-dot.dot-warn {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.status-dot.dot-err {
  background: var(--red-hot);
  box-shadow: 0 0 10px var(--red-hot);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.32rem 0.4rem 0.32rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.8rem;
}

.user-name {
  font-weight: 700;
  color: var(--text);
}

.btn-logout {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 52, 61, 0.4);
  border-radius: 5px;
  background: rgba(200, 27, 33, 0.16);
  color: #fecaca;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-logout:hover {
  background: var(--red);
  color: #fff;
}

/* ================= MAIN CONTENT CONTAINER ================= */
.content-container {
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: 1.8rem clamp(1rem, 3vw, 2.2rem) 3.5rem;
  flex: 1;
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  padding: 1.4rem 1.5rem;
}

/* Alerts */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.alert-item {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.alert-warning {
  background: var(--amber-soft);
  border: 1px solid rgba(240, 178, 60, 0.45);
  color: #fde68a;
}

.alert-error {
  background: var(--red-soft);
  border: 1px solid var(--line-red);
  color: #fecaca;
}

/* Hero Overview Panel */
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red-hot);
  border-radius: var(--radius);
  background:
    radial-gradient(480px circle at 10% 15%, rgba(200, 27, 33, 0.22), transparent 70%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  padding: 1.65rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.65rem, 2.8vw, 2.4rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  text-shadow: 0 0 36px rgba(200, 27, 33, 0.25);
}

.hero-lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 65ch;
}

.hero-quick-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.quick-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* 4 KPI Cards on Overview */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-red);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 0 0 28px rgba(200, 27, 33, 0.16);
}

.kpi-index {
  color: var(--red-hot);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.kpi-label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.kpi-value {
  margin: 0.55rem 0 0.4rem;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  word-break: break-all;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.card-jump {
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red-hot);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.card-jump:hover {
  text-decoration: underline;
}

/* Compact Phones List on Overview */
.section-card {
  margin-top: 1.4rem;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head-row h1,
.section-head-row h2,
.usb-hub-header h3 {
  margin: 0.4rem 0 0;
}

.compact-phones-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.compact-phone-row {
  display: grid;
  grid-template-columns: auto 1.4fr 1fr 1fr 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-hot);
  border-radius: var(--radius);
  background: rgba(6, 7, 8, 0.65);
}

.compact-port-tag {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
}

/* ================= 30-PORT USB CHARGING HUB VISUALIZER (A1 - A30) ================= */
.usb-hub-chassis {
  margin-bottom: 1.6rem;
  background: linear-gradient(160deg, #111317, #07080a);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.usb-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.usb-hub-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: #050607;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.usb-port-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0e12;
  transition: all 0.2s ease;
}

.usb-port-slot.is-occupied {
  border-color: var(--red-hot);
  background: rgba(200, 27, 33, 0.14);
  box-shadow: 0 0 18px rgba(255, 52, 61, 0.22);
}

.usb-port-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.usb-socket {
  width: 44px;
  height: 16px;
  border-radius: 3px;
  background: #020203;
  border: 1px solid #2b303c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Red USB tongue inside every port — matching the 30-port hub photo */
.usb-tongue {
  width: 32px;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(90deg, #9e1419, #e1242b);
  opacity: 0.55;
}

.usb-port-slot.is-occupied .usb-tongue {
  background: linear-gradient(90deg, #ff343d, #ff6b6b);
  opacity: 1;
  box-shadow: 0 0 8px #ff343d;
}

.usb-port-status {
  font-size: 0.65rem;
  color: var(--muted-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.usb-port-slot.is-occupied .usb-port-status {
  color: #fecaca;
  font-weight: 700;
}

/* ================= DETAILED PHONE CARDS & PILLARS ================= */
.legend-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.76rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-online { background: var(--online); }
.dot-delayed { background: var(--amber); }
.dot-offline { background: var(--red-hot); }
.dot-unknown { background: var(--unknown); }

.phones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
}

.phone-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phone-card.phone-online { border-top: 3px solid var(--online); }
.phone-card.phone-delayed { border-top: 3px solid var(--amber); }
.phone-card.phone-offline { border-top: 3px solid var(--red-hot); }
.phone-card.phone-unknown { border-top: 3px solid var(--unknown); }

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.phone-index-label {
  font-size: 0.74rem;
  color: var(--red-hot);
  font-weight: 800;
  text-transform: uppercase;
}

.phone-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.metric-tile {
  background: rgba(6, 7, 8, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}

.metric-tile-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.metric-tile-value {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-word;
}

.metric-tile-sub {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted-dim);
}

.subpanel {
  background: rgba(6, 7, 8, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.subpanel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.subpanel-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.benchmarks-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.benchmark-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
}

.benchmark-name {
  font-size: 0.76rem;
  font-weight: 700;
}

.benchmark-pool-raw {
  font-size: 0.68rem;
  color: var(--muted-dim);
}

.benchmark-val {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: var(--red-hot);
  word-break: break-all;
}

/* Badges & Copy buttons */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-red {
  background: var(--red-soft);
  color: var(--red-hot);
  border: 1px solid var(--line-red);
}

.badge-ok {
  background: var(--online-soft);
  color: var(--online);
}

.badge-warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-danger {
  background: var(--red-soft);
  color: var(--red-hot);
}

.badge-unknown {
  background: var(--unknown-soft);
  color: var(--unknown);
}

.badge-neutral,
.badge-muted,
.badge-info {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}

.address-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-copy {
  background: rgba(200, 27, 33, 0.16);
  color: #fecaca;
  border: 1px solid var(--line-red);
  border-radius: 5px;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--red);
  color: #fff;
}

/* Financial Pillars & Tables */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.25rem;
}

.pillar-card {
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-hot);
  font-weight: 800;
}

.card-title {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.primary-amount-box {
  background: rgba(6, 7, 8, 0.75);
  border: 1px solid var(--line-red);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
}

.amount-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.amount-value {
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  word-break: break-all;
}

.balance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.breakdown-name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
}

.breakdown-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--muted-dim);
}

.breakdown-val {
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.unavailable-box {
  background: rgba(6, 7, 8, 0.65);
  border: 1px dashed var(--line-red);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin: 0.4rem 0 1rem;
}

.unavailable-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.unavailable-desc {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.card-footnote {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.74rem;
  color: var(--muted-dim);
  margin-bottom: 0;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(6, 7, 8, 0.8);
}

/* Meta & Config Grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.meta-kv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.kv-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.kv-value {
  margin-top: 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.chain-block-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(6, 7, 8, 0.75);
  border-radius: var(--radius);
  border: 1px solid var(--line-red);
}

.block-number {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--red-hot);
}

.block-age-text {
  font-size: 0.84rem;
  color: var(--muted);
}

/* QA Chips */
.qa-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chip {
  background: rgba(6, 7, 8, 0.75);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-red);
}

.chip-active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border-color: var(--red-hot);
  box-shadow: 0 0 20px rgba(200, 27, 33, 0.35);
}

.app-footer {
  margin: 0 clamp(1rem, 3vw, 2.2rem) 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted-dim);
}

@media (max-width: 960px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .compact-phone-row {
    grid-template-columns: 1fr 1fr;
  }

  .usb-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .phones-grid,
  .phone-metrics-grid,
  .benchmarks-list,
  .meta-kv-row,
  .compact-phone-row {
    grid-template-columns: 1fr;
  }

  .usb-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Kurz ACU (CoinGecko) */
.price-box { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.price-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.price-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-val { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.price-chg { font-size: 0.78rem; color: var(--muted); }
.price-chg.up { color: #4cc38a; }
.price-chg.down { color: #ff6b70; }
.price-stale { color: #f0b429; }

/* Epocha – odpočítavanie */
.epoch-card { margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.epoch-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.epoch-number { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; line-height: 1.05; margin-top: 6px; }
.epoch-countdown { font-size: clamp(1.1rem, 3.2vw, 1.6rem); font-variant-numeric: tabular-nums; color: var(--text); }
.epoch-countdown.waiting { color: #f0b429; }
.epoch-bar { height: 12px; border-radius: 999px; background: var(--surface-strong); overflow: hidden; border: 1px solid var(--line); }
.epoch-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--red-invy), var(--red)); border-radius: 999px; transition: width 1s linear; }
.epoch-bar.stale .epoch-bar-fill { background: #8a7a3a; }
.epoch-end { font-size: 0.95rem; }
.epoch-source { font-size: 0.78rem; color: var(--muted-dim); }
.epoch-explain { margin: 6px 0 0; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }
.epoch-fine { margin: 0; font-size: 0.78rem; color: var(--muted-dim); line-height: 1.4; }
.epoch-reward-notice { padding: 8px 12px; border-radius: 10px; border: 1px solid #4cc38a; color: #4cc38a; font-size: 0.9rem; }

/* Graf vývoja kurzu */
.chart-card { margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chart-title { margin: 6px 0 0; font-size: 1.25rem; }
.chart-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-btn { background: transparent; border: 0; color: var(--muted); padding: 7px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { color: var(--text); background: var(--surface); }
.seg-btn.active { background: var(--red); color: #fff; }
.chart-stats { display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; }
.chart-stat { display: flex; flex-direction: column; gap: 2px; }
.chart-stat .k { font-size: 0.72rem; color: var(--muted-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.chart-stat .v { font-size: 1.05rem; font-weight: 600; }
.chart-stat .v.up { color: #4cc38a; }
.chart-stat .v.down { color: #ff6b70; }
.chart-wrap { position: relative; height: 280px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,0.25); touch-action: pan-y; }
.chart-wrap svg { width: 100%; height: 100%; display: block; }
.chart-line { fill: none; stroke: var(--red); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-area { fill: rgba(200, 27, 33, 0.16); stroke: none; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.chart-ylab { position: absolute; left: 8px; font-size: 0.7rem; color: var(--muted-dim); pointer-events: none; }
.chart-ylab.top { top: 6px; }
.chart-ylab.bot { bottom: 6px; }
.chart-xlabs { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted-dim); }
.chart-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted-dim); pointer-events: none; }
.chart-dot { position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; transform: translateY(-50%); }
.chart-tip { position: absolute; top: 8px; padding: 6px 9px; border-radius: 8px; background: rgba(13,15,18,0.95); border: 1px solid var(--line); font-size: 0.78rem; pointer-events: none; white-space: nowrap; z-index: 2; }
.chart-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; pointer-events: none; text-align: center; padding: 0 16px; }
.chart-msg.hidden { display: none; }

/* ================= HUB-STYLE LAYOUT: SIDEBAR + TOPBAR ================= */
.app-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.app-shell.hidden { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
  display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 0.8rem 1rem;
  border-right: 1px solid var(--line); background: rgba(6, 7, 8, 0.92); backdrop-filter: blur(14px);
}
.side-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.side-nav .nav-link { width: 100%; justify-content: flex-start; gap: 0.7rem; padding: 0.65rem 0.8rem; }
.side-nav .nav-link span:not(.nav-badge) { flex: 1; text-align: left; }
.nav-ico { width: 18px; height: 18px; flex: none; }
.nav-group { padding: 1.1rem 0.8rem 0.3rem; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-dim); font-weight: 800; }
.sidebar-foot { font-size: 0.7rem; color: var(--muted-dim); padding: 0.6rem 0.8rem 0; border-top: 1px solid var(--line); line-height: 1.5; }
.sidebar-backdrop { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: 0.7rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--line); background: rgba(6, 7, 8, 0.85); backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.topbar-title { margin: 0; font-size: 1.25rem; font-weight: 800; }
.burger { display: none; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 10px; font-size: 1.2rem; padding: 0.3rem 0.65rem; cursor: pointer; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 272px; height: auto; transform: translateX(-102%); transition: transform 0.22s ease; }
  .app-shell.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.7); }
  .app-shell.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 35; }
  .burger { display: inline-block; }
}

/* ================= SÚHRN ÚČTU ================= */
.summary-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.3rem; padding: 1.3rem 1.5rem; }
.sum-item { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; align-items: flex-start; }
.sum-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.sum-value { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.sum-unit { color: var(--muted); font-weight: 700; font-size: 0.6em; }
.sum-muted { color: var(--muted); font-size: clamp(1.2rem, 3vw, 1.8rem); }
.sum-sub { font-size: 0.8rem; color: var(--muted-dim); }
.chip-link { background: transparent; border: 1px solid var(--line-red); color: #ff8b90; border-radius: 999px; padding: 0.25rem 0.8rem; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.chip-link:hover { background: var(--red); color: #fff; }
@media (max-width: 760px) { .summary-bar { grid-template-columns: 1fr; } }

/* ================= STAV TELEFÓNOV / STAKINGU ================= */
.status-card { margin-bottom: 1.3rem; }
.status-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.status-tiles { display: grid; grid-template-columns: 1fr 1fr; }
.status-tile { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-tile:nth-child(2n) { border-right: 0; }
.status-tile:nth-child(n+3) { border-bottom: 0; }
.status-tile strong { font-size: 2rem; line-height: 1; }
.k { font-size: 0.82rem; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 0.35rem; }
.status-map { padding: 1rem 1.1rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.7rem; }
.map-squares { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.sq { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid; background: transparent; }
.sq-ok { border-color: #4cc38a; }
.sq-delay { border-color: #f0b429; }
.sq-err { border-color: #ff5b62; }
.sq-unknown { border-color: #8d8f94; }
.sq-deploy { border-color: #8b7bff; }
.map-squares .sq { width: 22px; height: 22px; border-radius: 5px; border-width: 3px; cursor: default; }
.map-squares .sq.is-deploy { background: rgba(139, 123, 255, 0.55); }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; font-size: 0.74rem; color: var(--muted-dim); }
.map-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.status-warmup { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.staking-empty { color: var(--muted); padding: 1.2rem 0.2rem; font-size: 0.95rem; line-height: 1.5; }
.staking-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.staking-stat { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.staking-stat .v { font-size: 1.4rem; font-weight: 800; overflow-wrap: anywhere; }
.staking-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem 1.5rem; font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; }
.staking-kv b { color: var(--text); }
@media (max-width: 760px) { .status-grid { grid-template-columns: 1fr; } .status-map { border-left: 0; border-top: 1px solid var(--line); } }

/* doladenie: farba názvu značky (nie modrý odkaz), zostatok v súhrne */
.brand, .brand:visited { color: var(--text); }
.brand-text strong { color: var(--text); }
.sum-value { font-size: clamp(1.35rem, 2.6vw, 2rem); }
.sum-value .sum-unit { white-space: nowrap; }

/* ===== jednotné farby stavov (mapa stavov + USB Hub) ===== */
.st-online { --st: var(--online); }
.st-delayed { --st: var(--amber); }
.st-offline { --st: var(--red-hot); }
.st-unknown { --st: var(--unknown); }
.sq-ok { border-color: var(--online); }
.sq-delay { border-color: var(--amber); }
.sq-err { border-color: var(--red-hot); }
.sq-unknown { border-color: var(--unknown); }
.dep-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4aa3ff; box-shadow: 0 0 6px rgba(74, 163, 255, 0.7); }
.map-port {
  position: relative; width: 46px; height: 36px; border: 2px solid var(--st); border-radius: 8px;
  background: color-mix(in srgb, var(--st) 16%, transparent); color: var(--text); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 800; padding: 0;
}
.map-port:hover { background: color-mix(in srgb, var(--st) 34%, transparent); }
.map-port.is-deploy::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #4aa3ff; }
.map-hint { font-size: 0.72rem; color: var(--muted-dim); }
.usb-port-slot.is-occupied { border-color: var(--st, var(--red-hot)); background: color-mix(in srgb, var(--st, var(--red-hot)) 12%, #0c0e12); box-shadow: 0 0 18px color-mix(in srgb, var(--st, var(--red-hot)) 28%, transparent); }
.usb-port-slot.is-occupied .usb-tongue { background: var(--st, var(--red-hot)); box-shadow: 0 0 8px var(--st, var(--red-hot)); opacity: 1; }
.usb-port-slot.is-occupied .usb-socket { border-color: var(--st, #2b303c); }
.usb-port-slot.is-occupied .usb-port-status { color: var(--muted); font-weight: 600; font-size: 0.6rem; }
.usb-port-slot.is-deploy .usb-port-label::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #4aa3ff; }
.usb-port-slot.is-flash { animation: usbFlash 1.6s ease; }
@keyframes usbFlash { 0%, 100% { transform: none; } 20%, 60% { transform: scale(1.06); box-shadow: 0 0 0 3px var(--st, var(--red-hot)); } }
.usb-port-name {
  max-width: 100%; background: transparent; border: 0; padding: 0; cursor: pointer; font: inherit;
  font-size: 0.72rem; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.usb-port-name.is-empty { color: var(--muted-dim); font-weight: 600; text-decoration: underline dotted; }
.usb-port-name:hover { color: #fff; }
.usb-name-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.72rem; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-red); background: #05060a; color: var(--text); }
.port-name { display: block; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 0.72rem; color: var(--text); }
.legend-tip { color: var(--muted-dim); font-size: 0.78rem; }
