/* ---------------------------------------------------------------------
   Design tokens — shared accent palette, unchanged from what docs/
   dashboard diagrams already use, so nothing looks inconsistent across
   pages. New tokens (surfaces, borders) are additive, for depth/polish.
   --------------------------------------------------------------------- */
:root {
  --ztr-cyan: #0dcaf0;
  --ztr-purple: #a970ff;
  --ztr-green: #20c997;
  --ztr-orange: #fd7e14;
  --ztr-surface: #0d0f11;
  --ztr-surface-2: #131619;
  --ztr-border: #23262b;
  --ztr-border-hover: #3a3f47;
  --ztr-text-dim: #8d949c;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Bootstrap's .bg-dark utility (class specificity) would otherwise beat a
   bare `body{}` rule — this needs the extra element selector to win. */
body.bg-dark {
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(13, 202, 240, 0.09), transparent 60%),
    radial-gradient(ellipse 45% 40% at 92% 15%, rgba(169, 112, 255, 0.07), transparent 60%),
    #08090b;
  background-attachment: fixed, fixed, fixed;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, .navbar-brand, .display-4, .display-5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.navbar-brand {
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ztr-logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.ztr-logo-mark-sm {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#dashNav .list-group-item,
#adminNav .list-group-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}

#dashNav .list-group-item.active,
#adminNav .list-group-item.active {
  box-shadow: inset 3px 0 0 0 var(--ztr-cyan);
}

#dashNav .dash-nav-sub {
  padding-left: 2rem;
  font-size: 0.85rem;
  color: #adb5bd;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--ztr-text-dim);
  transition: color 0.15s ease;
}

#dashNav .list-group-item.active .nav-icon,
#adminNav .list-group-item.active .nav-icon {
  color: var(--ztr-cyan);
}

#dashNav .dash-nav-sub .nav-icon {
  width: 14px;
  height: 14px;
}

/* Panel switch — a small enter animation instead of an instant cut,
   re-triggered via a forced reflow in dashboard.js/admin.js each time. */
.dash-panel.panel-enter,
.admin-panel.panel-enter {
  animation: panelEnter 0.35s ease;
}

@keyframes panelEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Table rows — a little life on hover instead of Bootstrap's flat default */
.table-hover > tbody > tr {
  transition: background-color 0.15s ease;
}

.table-hover > tbody > tr[data-id],
tr.ticket-row {
  cursor: pointer;
}

/* Status badges — a soft pulsing dot on anything actively "open"/pending,
   so the queue reads as alive rather than a static label. */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  position: relative;
  top: -1px;
}

.status-dot.pulse {
  animation: statusPulse 1.7s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.55; }
}

/* Ticket status badges — a small meaningful icon (alert/clock/check)
   instead of a plain dot, same pulse animation as status-dot for "open". */
.status-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  position: relative;
  top: -1px;
}

.status-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}

.status-icon.pulse {
  animation: statusPulse 1.7s ease-in-out infinite;
}

/* Support ticket thread */
.ticket-thread {
  max-height: 380px;
  overflow-y: auto;
}

.ticket-msg {
  border: 1px solid var(--ztr-border);
  background: var(--ztr-surface-2);
  border-radius: 0.6rem;
  padding: 0.7rem 1rem;
}

.ticket-msg-admin {
  border-color: rgba(13, 202, 240, 0.3);
  background: rgba(13, 202, 240, 0.06);
}

.dns-metadata-caret {
  display: inline-block;
  transition: transform 0.15s ease;
}

[data-bs-toggle="collapse"][aria-expanded="true"] .dns-metadata-caret {
  transform: rotate(90deg);
}

pre {
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------------------------------------------------------------------
   Buttons — subtle gradient + glow-on-hover, sitewide (every primary CTA
   benefits, not just the homepage).
   --------------------------------------------------------------------- */
.btn {
  transition: transform 0.15s ease, box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd, var(--ztr-cyan));
  border: none;
}

.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 8px 28px -8px rgba(13, 202, 240, 0.55);
  transform: translateY(-1px);
}

.btn-outline-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(255, 255, 255, 0.15);
}

/* ---------------------------------------------------------------------
   Scroll-reveal utility (public/js/reveal.js toggles .is-visible via
   IntersectionObserver; falls back to visible if unsupported/no-JS).
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Homepage hero network diagram — same visual language as the dashboard's
   route diagram (public/js/routes.js), simplified to a static illustration.
   --------------------------------------------------------------------- */
.hero-net-card {
  border: 1px solid var(--ztr-border);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 2rem 1rem 1.5rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-net {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: max-content;
  margin: 0 auto;
}

.hero-net-wrap {
  overflow-x: auto;
}

.hero-net-node {
  flex: 0 0 auto;
  width: 88px;
  text-align: center;
  animation: heroNetFloat 4.5s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

@keyframes heroNetFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-net-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin: 0 auto 0.6rem;
  border: 2px solid var(--c, #6c757d);
  background: color-mix(in srgb, var(--c, #6c757d) 16%, #16181b);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #6c757d) 10%, transparent),
              0 0 22px -4px color-mix(in srgb, var(--c, #6c757d) 65%, transparent);
}

.hero-net-node.dashed .hero-net-icon {
  border-style: dashed;
}

.hero-net-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e9ecef;
}

.hero-net-sub {
  font-size: 0.66rem;
  color: var(--ztr-text-dim);
}

.hero-net-line {
  flex: 1 1 40px;
  min-width: 26px;
  height: 3px;
  margin-top: 27px;
  border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, var(--c, #6c757d) 0 7px, transparent 7px 15px);
  background-size: 22px 3px;
  animation: heroNetFlow 1s linear infinite;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c, #6c757d) 70%, transparent));
}

@keyframes heroNetFlow {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -22px 0;
  }
}

.hero-net-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ztr-text-dim);
  margin-top: 1.25rem;
}

.hero-net-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* ---------------------------------------------------------------------
   Privacy pillar + scenario cards (homepage) — glass surface, lift +
   glow on hover so the grid doesn't feel static.
   --------------------------------------------------------------------- */
.pillar-card,
.scenario-card {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.35rem;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.pillar-card:hover,
.scenario-card:hover {
  transform: translateY(-5px);
  border-color: var(--ztr-border-hover);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.65);
}

/* Homepage SSH demo — same card treatment as .hero-net-card (border,
   surface gradient, soft shadow), sized for a video instead of the hop
   diagram. */
.video-showcase-card {
  border: 1px solid var(--ztr-border);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 0.6rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.video-showcase-card video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  background: rgba(13, 202, 240, 0.12);
}

.scenario-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------------------
   Pricing — plan cards + comparison table (public/js/pricing.js renders
   both from the live /api/v1/billing/plans response, so numbers here
   never drift from what a card shows).
   --------------------------------------------------------------------- */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.75rem 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.plan-card:hover {
  transform: translateY(-5px);
  border-color: var(--ztr-border-hover);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.65);
}

.plan-card.featured {
  border-color: rgba(13, 202, 240, 0.45);
  box-shadow: 0 0 0 1px rgba(13, 202, 240, 0.15), 0 20px 45px -20px rgba(13, 202, 240, 0.25);
}

.plan-ribbon {
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #08090b;
  background: var(--ztr-cyan);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.plan-audience {
  min-height: 2.7em;
}

.plan-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
}

.plan-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ztr-text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.plan-check {
  color: var(--ztr-green);
  font-weight: 700;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.plan-compare-table {
  --bs-table-bg: transparent;
}

.plan-compare-table th,
.plan-compare-table td {
  border-bottom: 1px solid var(--ztr-border);
  padding: 0.85rem 1rem;
}

.plan-compare-table thead th {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  border-bottom: 2px solid var(--ztr-border-hover);
}

.plan-compare-table tbody tr:last-child th,
.plan-compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------------------------------------------------------------------
   Stat row (homepage) — punchy number callouts, deliberately NOT another
   node diagram, so the page doesn't repeat the hero visual.
   --------------------------------------------------------------------- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}

.stat-item {
  text-align: center;
  min-width: 150px;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px color-mix(in srgb, var(--sc, var(--ztr-cyan)) 55%, transparent);
}

.stat-label {
  color: var(--ztr-text-dim);
  font-size: 0.92rem;
  max-width: 190px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Account panel — glowing identity header + icon-driven settings cards.
   --------------------------------------------------------------------- */
.account-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  border: 1px solid var(--ztr-border);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.account-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 90% at 0% 0%, rgba(13, 202, 240, 0.14), transparent 60%),
    radial-gradient(ellipse 45% 80% at 100% 100%, rgba(169, 112, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.account-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.25), rgba(169, 112, 255, 0.25));
  border: 2px solid rgba(13, 202, 240, 0.5);
  color: #f5f6f7;
  box-shadow: 0 0 0 5px rgba(13, 202, 240, 0.08), 0 0 30px -6px rgba(13, 202, 240, 0.55);
}

.account-name {
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.account-card {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.5rem;
  height: 100%;
}

.card-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ztr-text-dim);
  margin-bottom: 1.1rem;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ztr-border);
}

.field-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.field-row:first-child {
  padding-top: 0;
}

.field-icon {
  width: 34px;
  height: 34px;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(13, 202, 240, 0.08);
  color: var(--ztr-cyan);
}

.field-body {
  flex: 1;
  min-width: 0;
}

.field-label {
  color: var(--ztr-text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.field-verified {
  display: flex;
  align-items: center;
  font-size: 0.76rem;
  color: var(--ztr-text-dim);
  margin-top: 0.15rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 0.55rem;
  border: 1px solid var(--ztr-border);
  background: transparent;
  color: var(--ztr-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--ztr-border-hover);
  color: #f5f6f7;
  background: rgba(255, 255, 255, 0.03);
}

.icon-btn.copied {
  color: var(--ztr-green);
  border-color: var(--ztr-green);
  background: rgba(32, 201, 151, 0.1);
}

/* Compact square icon variant of a plain Bootstrap outline button — keeps
   the btn-outline-* color semantics (info/warning/light/danger etc.) for
   at-a-glance action typing, just swaps the label for an icon + a title
   attribute for the hover tooltip instead of visible text. */
.btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
}

/* Alternating section tint — subtle, lets the body's ambient gradient
   still show through, used instead of hard border-bottom dividers. */
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

/* Section eyebrow — small uppercase pill label above a heading */
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ztr-cyan);
  background: rgba(13, 202, 240, 0.1);
  border: 1px solid rgba(13, 202, 240, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* Numbered step badge — small colored circle, same "pick a color per item"
   language as pillar-icon/hero-net-icon, for a flowing step-by-step card
   instead of forcing equal-height grid columns around uneven content. */
.step-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--c, var(--ztr-cyan));
  background: color-mix(in srgb, var(--c, var(--ztr-cyan)) 16%, var(--ztr-surface));
  color: #f5f6f7;
}

.step-item + .step-item {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ztr-border);
}

/* Admin revenue chart bars — grown in via JS after insertion (see admin.js) */
.rev-bar {
  transition: height 0.6s ease, y 0.6s ease;
}

/* ---------------------------------------------------------------------
   Auth pages (register/login) — a real card instead of a bare form
   floating on the page background, plus a context panel on register
   explaining what an account actually gets you.
   --------------------------------------------------------------------- */
.auth-card {
  border: 1px solid var(--ztr-border);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 100% 0%, rgba(13, 202, 240, 0.08), transparent 60%);
  pointer-events: none;
}

.auth-card > * {
  position: relative;
}

.auth-context-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-context-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.auth-context-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(13, 202, 240, 0.1);
  color: var(--ztr-cyan);
}

.auth-context-item h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.input-group-text.auth-input-icon {
  background: var(--ztr-surface-2);
  border-color: var(--ztr-border);
  color: var(--ztr-text-dim);
  width: 42px;
  justify-content: center;
}

.pw-strength-track {
  height: 4px;
  border-radius: 999px;
  background: var(--ztr-border);
  overflow: hidden;
  margin-top: 0.5rem;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pw-strength-label {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  min-height: 1.1em;
}

/* --------------------------------------------------------------------
   /network — world map. Real country borders (Natural Earth data,
   simplified), colored per-country from /api/v1/network/coverage — see
   network.ejs. Base fill is a muted surface tone; highlighted classes
   are added by that page's own script, never hardcoded here.
   -------------------------------------------------------------------- */
.network-worldmap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.network-worldmap path {
  /* Was --ztr-surface-2, nearly invisible against the page's own dark
     gradient background -- bumped up so uncovered countries still read
     as landmass instead of disappearing into the background. */
  fill: var(--ztr-border-hover);
  stroke: var(--ztr-surface);
  stroke-width: 0.4;
  transition: fill 0.15s ease;
}
.network-worldmap path:hover {
  fill: var(--ztr-text-dim);
}
.network-worldmap path.nm-hl-entry {
  fill: var(--ztr-green);
}
.network-worldmap path.nm-hl-exit {
  fill: var(--ztr-orange);
}
.network-worldmap path.nm-hl-entry.nm-hl-exit {
  fill: var(--ztr-purple);
}

/* --------------------------------------------------------------------
   Admin → Threat Actors panel (see public/js/admin-threats.js). Map,
   per-day chart, top lists and a scrollable table, all driven by one
   filter state. Self-contained: everything is scoped under .thr.
   -------------------------------------------------------------------- */
.thr {
  --thr-hot: #ff5468;
  --thr-hot-soft: rgba(255, 84, 104, 0.16);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.thr-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.thr-kpi {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 0.9rem 1.1rem;
}
.thr-kpi-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #f5f6f7;
}
.thr-kpi-num small { font-size: 0.9rem; color: var(--ztr-text-dim); margin-left: 1px; }
.thr-kpi-label {
  color: var(--ztr-text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}
.thr-kpi.is-live .thr-kpi-num { color: var(--thr-hot); }
.thr-kpi.is-warn .thr-kpi-num { color: var(--ztr-orange); }
.thr-ok { color: var(--ztr-green); }

.thr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 1rem;
}
.thr-grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 991px) {
  .thr-grid, .thr-grid-even { grid-template-columns: minmax(0, 1fr); }
}

.thr-card {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: var(--ztr-surface-2);
  padding: 1rem 1.1rem;
  min-width: 0;
}
.thr-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.thr-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cfd4da;
}
.thr-card-note { font-size: 0.72rem; color: var(--ztr-text-dim); }

/* World map */
.thr-map-card { padding-bottom: 0.9rem; }
.thr-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 560;
  border-radius: 0.5rem;
  background: #0b0e13 url('/img/world-map.svg') center / 100% 100% no-repeat;
  overflow: hidden;
}
.thr-dot {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  padding: 0;
  border: 1px solid rgba(255, 150, 160, 0.85);
  border-radius: 50%;
  background: var(--thr-hot-soft);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.thr-dot::after {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--thr-hot);
}
.thr-dot.live::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--thr-hot);
  animation: thrPing 2.2s ease-out infinite;
}
.thr-dot:hover, .thr-dot.hot, .thr-dot:focus-visible {
  transform: scale(1.35);
  background: rgba(255, 84, 104, 0.35);
  border-color: #fff;
  z-index: 3;
  outline: none;
}
.thr-dot.active {
  border-color: var(--ztr-cyan);
  background: rgba(13, 202, 240, 0.25);
  z-index: 2;
}
.thr-dot.active::after { background: var(--ztr-cyan); }
@keyframes thrPing {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}
.thr-map-tip {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--ztr-border-hover);
  border-radius: 0.4rem;
  background: rgba(13, 15, 17, 0.96);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
}
.thr-map-tip[hidden] { display: none; }
.thr-map-tip span { color: var(--ztr-text-dim); }
.thr-map-tip.flip-x { transform: translate(calc(-100% + 14px), calc(-100% - 14px)); }
.thr-map-tip.flip-y { transform: translate(-50%, 18px); }
.thr-map-tip.flip-x.flip-y { transform: translate(calc(-100% + 14px), 18px); }

/* Bans-per-day chart */
.thr-day-chart { width: 100%; height: auto; display: block; }
.thr-grid-line { stroke: var(--ztr-border); stroke-width: 1; stroke-dasharray: 2 4; }
.thr-axis { fill: var(--ztr-text-dim); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.thr-day { cursor: pointer; }
.thr-day-hit { fill: transparent; }
.thr-day-bar {
  fill: var(--thr-hot);
  opacity: 0.8;
  transform-box: fill-box;
  transform-origin: bottom;
  animation: thrGrow 0.5s ease backwards;
  transition: opacity 0.15s ease, fill 0.15s ease;
}
.thr-day:hover .thr-day-bar { opacity: 1; }
.thr-day.active .thr-day-bar { fill: var(--ztr-cyan); opacity: 1; }
@keyframes thrGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Top lists */
.thr-bars { display: flex; flex-direction: column; gap: 0.15rem; }
.thr-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 2.6rem;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.3rem 0.45rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #dfe3e7;
  font-size: 0.8rem;
  text-align: left;
  transition: background-color 0.15s ease;
}
.thr-bar-row:hover { background: rgba(255, 255, 255, 0.05); }
.thr-bar-row.active { background: rgba(13, 202, 240, 0.12); }
.thr-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-bar-label em { font-style: normal; color: var(--ztr-text-dim); font-size: 0.7rem; margin-left: 0.25rem; }
.thr-bar-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.thr-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--thr-hot);
  transform-origin: left;
  animation: thrGrowX 0.5s ease backwards;
}
.thr-bar-row.active .thr-bar-fill { background: var(--ztr-cyan); }
.thr-bar-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--ztr-text-dim); }
@keyframes thrGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Toolbar + filter pills */
.thr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.thr-search { flex: 1 1 260px; min-width: 200px; }
.thr-sort { width: auto; }
.thr-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.thr-chip {
  padding: 0.22rem 0.7rem;
  border: 1px solid var(--ztr-border);
  border-radius: 999px;
  background: transparent;
  color: var(--ztr-text-dim);
  font-size: 0.78rem;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.thr-chip:hover { color: #f5f6f7; border-color: var(--ztr-border-hover); }
.thr-chip.active { color: #06141a; background: var(--ztr-cyan); border-color: var(--ztr-cyan); font-weight: 600; }
.thr-active { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: -0.4rem; }
.thr-active:empty { display: none; }
.thr-pill {
  padding: 0.15rem 0.6rem;
  border: 1px solid rgba(13, 202, 240, 0.45);
  border-radius: 999px;
  background: rgba(13, 202, 240, 0.1);
  color: #bfeefa;
  font-size: 0.75rem;
}
.thr-pill:hover { background: rgba(13, 202, 240, 0.2); }
.thr-pill-clear { border-color: var(--ztr-border-hover); background: transparent; color: var(--ztr-text-dim); }

/* Scrollable table */
.thr-scroll {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: var(--ztr-surface);
}
.thr-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #181b20;
  box-shadow: 0 1px 0 var(--ztr-border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ztr-text-dim);
  white-space: nowrap;
}
.thr-clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-cc {
  display: inline-block;
  padding: 0 0.35rem;
  border: 1px solid var(--ztr-border-hover);
  border-radius: 0.3rem;
  font-size: 0.65rem;
  color: var(--ztr-text-dim);
  vertical-align: 1px;
}
.thr-new { animation: thrFresh 3s ease-out; }
@keyframes thrFresh { from { background: var(--thr-hot-soft); } to { background: transparent; } }
.thr-foot { margin-top: -0.4rem; }

@media (prefers-reduced-motion: reduce) {
  .thr-dot.live::before, .thr-day-bar, .thr-bar-fill, .thr-new { animation: none; }
}

/* --------------------------------------------------------------------
   Admin → Visitors panel (public/js/admin-visitors.js). Reuses the .thr-*
   building blocks from the Threat Actors panel above (cards, KPI tiles,
   bar lists, chips) — these are the extras: the combined chart, and cool
   colours instead of the threat red, since these are the good guys.
   -------------------------------------------------------------------- */
.vis .thr-bar-fill { background: var(--ztr-cyan); }
.vis .thr-bar-row.active .thr-bar-fill { background: var(--ztr-green); }
.vis .thr-bar-row { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) 4.4rem; }
.vis .thr-bar-row:disabled { cursor: default; opacity: 1; }
.vis .thr-bar-row:disabled:hover { background: transparent; }
.vis .thr-bar-count { white-space: nowrap; }
.vis-active { margin: 0; flex: 0 1 auto; }
.vis .thr-toolbar { margin-bottom: 0; }

.vis-kpi-sub { font-size: 0.72rem; color: var(--ztr-text-dim); margin-top: 0.2rem; }
.vis-kpi-text { font-size: 1.15rem; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.vis-up { color: var(--ztr-green); }
.vis-down { color: var(--ztr-orange); }

.vis-legend { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--ztr-text-dim); }
.vis-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 0.6rem; }
.vis-key:first-child { margin-left: 0; }
.vis-key-views { background: rgba(13, 202, 240, 0.45); }
.vis-key-visitors { background: var(--ztr-green); border-radius: 50%; }

.vis-chart { width: 100%; height: auto; display: block; }
.vis-bar {
  fill: rgba(13, 202, 240, 0.4);
  transform-box: fill-box;
  transform-origin: bottom;
  animation: thrGrow 0.5s ease backwards;
}
.vis-line { fill: none; stroke: var(--ztr-green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vis-area { fill: rgba(32, 201, 151, 0.1); }
.vis-dot { fill: var(--ztr-green); stroke: var(--ztr-surface-2); stroke-width: 1; }
.vis-hit { fill: transparent; }
.vis-guide { stroke: var(--ztr-border-hover); stroke-width: 1; opacity: 0; transition: opacity 0.1s ease; }
.vis-col:hover .vis-guide { opacity: 1; }
.vis-foot { line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .vis-bar { animation: none; }
}

/* --------------------------------------------------------------------
   Admin → Platform Wallets (public/js/admin-platform-wallets.js).
   A treasury overview: status tiles on top, then a Solana section and a
   Bitcoin & Ethereum section. Everything is scoped under .pw; colours come
   from the shared --ztr-* tokens plus a status set (ok / warn / bad / off).
   -------------------------------------------------------------------- */
.pw {
  --pw-warn: #ffc14d;
  --pw-bad: #ff5468;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pw-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pw-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.pw-sub { margin: 0.3rem 0 0; color: var(--ztr-text-dim); font-size: 0.92rem; }

/* Status pills — the dot AND the word carry the state, never colour alone */
.pw-pill {
  --c: var(--ztr-text-dim);
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.2rem 0.65rem 0.2rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: color-mix(in srgb, var(--c) 78%, #ffffff);
}
.pw-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}
.pw-pill.ok { --c: var(--ztr-green); }
.pw-pill.warn { --c: var(--pw-warn); }
.pw-pill.bad { --c: var(--pw-bad); }
.pw-pill.off { --c: var(--ztr-text-dim); }
.pw-pill.live::before { animation: pwPulse 2.4s ease-in-out infinite; }
@keyframes pwPulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 6%, transparent); } }

/* Status tiles */
.pw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 0.95rem; }
.pw-tile {
  --tint: var(--ztr-cyan);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.6rem; min-height: 136px;
  padding: 1.05rem 1.15rem 1.1rem;
  border: 1px solid var(--ztr-border); border-radius: 0.95rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pw-tile::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 20%, transparent), transparent);
}
.pw-tile:hover { border-color: var(--ztr-border-hover); }
.pw-tile.ok { --tint: var(--ztr-green); }
.pw-tile.warn { --tint: var(--pw-warn); }
.pw-tile.bad { --tint: var(--pw-bad); }
.pw-tile.off { --tint: var(--ztr-text-dim); }
.pw-tile-top { display: flex; align-items: center; gap: 0.6rem; position: relative; z-index: 1; }
.pw-tile-icon {
  width: 30px; height: 30px; border-radius: 0.65rem; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--tint) 15%, transparent); color: var(--tint);
}
.pw-tile-icon img { width: 18px; height: 18px; }
.pw-eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ztr-text-dim); }
.pw-value {
  position: relative; z-index: 1; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.85rem; font-weight: 700;
  line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #f5f6f7;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pw-value.text { font-size: 1.35rem; }
.pw-value small { font-size: 0.8rem; font-weight: 500; color: var(--ztr-text-dim); margin-left: 0.3rem; letter-spacing: 0; }
.pw-tile-foot { position: relative; z-index: 1; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.pw-muted { font-size: 0.78rem; color: var(--ztr-text-dim); }

/* Sections */
.pw-section-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.pw-section-icon { width: 38px; height: 38px; border-radius: 0.75rem; display: grid; place-items: center; flex-shrink: 0; background: rgba(13, 202, 240, 0.1); color: var(--ztr-cyan); }
.pw-section-icon img { width: 22px; height: 22px; }
.pw-section-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.15rem; font-weight: 600; margin: 0; }
.pw-section-desc { margin: 0.15rem 0 0; color: var(--ztr-text-dim); font-size: 0.84rem; max-width: 68ch; }
.pw-section-rule { flex: 1; height: 1px; min-width: 24px; background: linear-gradient(90deg, var(--ztr-border), transparent); }
.pw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
@media (max-width: 1199px) { .pw-grid { grid-template-columns: minmax(0, 1fr); } }

/* Cards */
.pw-card {
  border: 1px solid var(--ztr-border); border-radius: 0.95rem; padding: 1.3rem 1.35rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  transition: border-color 0.2s ease;
}
.pw-card:hover { border-color: var(--ztr-border-hover); }
.pw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.pw-card-title { display: flex; align-items: center; gap: 0.65rem; font-weight: 600; font-size: 1rem; margin: 0; }
.pw-card-title img { width: 26px; height: 26px; }
.pw-note { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.8rem; line-height: 1.5; color: var(--ztr-text-dim); }
.pw-note svg { flex-shrink: 0; margin-top: 0.1rem; }
.pw-note.warn { color: color-mix(in srgb, var(--pw-warn) 70%, #ffffff); }
.pw-note code { color: #e6c2f5; background: transparent; padding: 0; }

.pw-col { display: flex; flex-direction: column; }
.pw-push { padding-top: 1.1rem; }

/* Cost list — small label/value rows */
.pw-kv { display: grid; gap: 0; margin: 0.2rem 0 0; border: 1px solid var(--ztr-border); border-radius: 0.75rem; overflow: hidden; }
.pw-kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.85rem; font-size: 0.82rem; }
.pw-kv > div + div { border-top: 1px solid var(--ztr-border); }
.pw-kv dt { margin: 0; font-weight: 400; color: var(--ztr-text-dim); }
.pw-kv dd { margin: 0; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pw-kv dd small { font-weight: 500; color: var(--ztr-text-dim); margin-left: 0.2rem; }

/* Balance + gauge */
.pw-balance { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 2.3rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.pw-balance small { font-size: 0.95rem; font-weight: 500; color: var(--ztr-text-dim); margin-left: 0.35rem; letter-spacing: 0; }
.pw-gauge { --c: var(--ztr-green); position: relative; margin: 1.1rem 0 0.4rem; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.pw-gauge.warn { --c: var(--pw-warn); }
.pw-gauge.bad { --c: var(--pw-bad); }
.pw-gauge-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--c) 60%, transparent); transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pw-gauge-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.4); }
.pw-gauge-legend { position: relative; height: 1rem; margin-bottom: 0.9rem; font-size: 0.7rem; color: var(--ztr-text-dim); }
.pw-gauge-legend span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.pw-gauge-legend span:first-child { left: 0; transform: none; }

/* Address chip */
.pw-addr {
  display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.28rem 0.3rem 0.28rem 0.7rem;
  border: 1px solid var(--ztr-border); border-radius: 0.65rem; background: rgba(255, 255, 255, 0.035);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; color: #cfd4da;
}
.pw-addr-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-addr.full { display: flex; align-items: flex-start; }
.pw-addr.full .pw-addr-text { white-space: normal; word-break: break-all; padding: 0.1rem 0; }
.pw-copy {
  width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 0.5rem;
  background: transparent; color: var(--ztr-text-dim); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.pw-copy:hover { background: rgba(13, 202, 240, 0.14); color: var(--ztr-cyan); }
.pw-copy.done { color: var(--ztr-green); }
.pw-copy:focus-visible, .pw-btn:focus-visible, .pw-add-toggle:focus-visible { outline: 2px solid var(--ztr-cyan); outline-offset: 2px; }

/* Buttons */
.pw-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.8rem; border-radius: 0.6rem; cursor: pointer;
  border: 1px solid var(--ztr-border-hover); background: transparent; color: #cfd4da; font-size: 0.8rem; font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pw-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pw-btn.primary { border-color: color-mix(in srgb, var(--ztr-cyan) 50%, transparent); color: var(--ztr-cyan); }
.pw-btn.primary:hover { background: rgba(13, 202, 240, 0.12); }
.pw-btn.ok { border-color: color-mix(in srgb, var(--ztr-green) 50%, transparent); color: var(--ztr-green); }
.pw-btn.ok:hover { background: rgba(32, 201, 151, 0.12); }
.pw-btn.danger { border-color: color-mix(in srgb, var(--pw-bad) 45%, transparent); color: var(--pw-bad); }
.pw-btn.danger:hover { background: rgba(255, 84, 104, 0.12); }
.pw-btn:disabled { opacity: 0.55; cursor: default; }

/* Destination wallets */
.pw-wallets { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.1rem; }
.pw-wallet {
  display: flex; align-items: center; gap: 0.95rem; padding: 0.85rem 1rem;
  border: 1px solid var(--ztr-border); border-radius: 0.8rem; background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pw-wallet:hover { border-color: var(--ztr-border-hover); }
.pw-wallet.active {
  border-color: color-mix(in srgb, var(--ztr-green) 48%, var(--ztr-border));
  background: linear-gradient(90deg, color-mix(in srgb, var(--ztr-green) 10%, transparent), transparent 75%);
}
.pw-radio { position: relative; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ztr-border-hover); }
.pw-wallet.active .pw-radio { border-color: var(--ztr-green); }
.pw-wallet.active .pw-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--ztr-green); box-shadow: 0 0 10px var(--ztr-green); }
.pw-wallet-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.pw-wallet-label { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; flex-wrap: wrap; }
.pw-wallet-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
@media (max-width: 575px) { .pw-wallet { flex-wrap: wrap; } .pw-wallet-actions { width: 100%; justify-content: flex-end; } }

/* Add-wallet drawer */
.pw-add-toggle {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.7rem; cursor: pointer;
  border: 1px dashed var(--ztr-border-hover); border-radius: 0.8rem; background: transparent; color: var(--ztr-text-dim); font-size: 0.85rem;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.pw-add-toggle:hover, .pw-add-toggle[aria-expanded='true'] { border-color: var(--ztr-cyan); color: var(--ztr-cyan); background: rgba(13, 202, 240, 0.05); }
.pw-form { display: grid; gap: 0.8rem; padding: 1.1rem 0.15rem 0.2rem; }
.pw-form label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ztr-text-dim); margin-bottom: 0.3rem; }
.pw-form .form-control { background: rgba(255, 255, 255, 0.04); border-color: var(--ztr-border); }
.pw-form .form-control:focus { border-color: var(--ztr-cyan); background: rgba(13, 202, 240, 0.05); box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.15); }

/* Coin cards */
.pw-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; padding: 1.1rem 0; margin-bottom: 0.2rem; border-top: 1px solid var(--ztr-border); border-bottom: 1px solid var(--ztr-border); }
.pw-stat-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ztr-text-dim); margin-bottom: 0.25rem; }
.pw-stat-value { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pw-stat-value small { font-size: 0.78rem; font-weight: 500; color: var(--ztr-text-dim); margin-left: 0.25rem; }
.pw-stat-sub { font-size: 0.76rem; color: var(--ztr-text-dim); margin-top: 0.1rem; }
.pw-check { margin-top: 1.1rem; }
.pw-check .pw-eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.pw-detect { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; font-size: 0.8rem; color: var(--ztr-text-dim); }

/* Empty / error states and loading shimmer */
.pw-empty { display: grid; place-items: center; gap: 0.5rem; padding: 1.6rem 1rem; text-align: center; color: var(--ztr-text-dim); font-size: 0.86rem; border: 1px dashed var(--ztr-border); border-radius: 0.8rem; }
.pw-empty strong { color: #dfe3e7; font-weight: 600; }
.pw-skel { border-radius: 0.5rem; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: pwShimmer 1.4s ease-in-out infinite; }
@keyframes pwShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .pw-pill.live::before, .pw-skel { animation: none; }
  .pw-gauge-fill, .pw-tile, .pw-card { transition: none; }
}

/* --------------------------------------------------------------------
   Admin shell — top bar and sidebar stay put while the page scrolls
   (public/js/admin-layout.js measures the bar height and sidebar box).
   The sidebar's column stays in the layout as an empty spacer, so the main
   content never shifts; only the nav list inside it is pinned.
   -------------------------------------------------------------------- */
body.admin-shell { padding-top: var(--admin-topbar-h, 57px); }

.admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030; /* Bootstrap's fixed-top level: above the page, below modals (1055) and toasts (1080) */
}

@media (min-width: 992px) {
  #adminNav {
    position: fixed;
    top: calc(var(--admin-topbar-h, 57px) + 1.5rem); /* the page's own top padding, below the bar */
    left: 0.75rem; /* refined to the exact column box by admin-layout.js */
    width: calc(16.6667vw - 1.5rem);
    max-height: calc(100vh - var(--admin-topbar-h, 57px) - 3rem);
    overflow-y: auto; /* a short window scrolls the nav itself, never hides items */
    overscroll-behavior: contain;
    z-index: 1020;
  }
}

/* ---------------------------------------------------------------------
   About page — role cards, "who sees what" matrix, supporting bits.
   Same accent palette and surface treatment as the homepage cards.
   --------------------------------------------------------------------- */
.about-title {
  text-wrap: balance;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}

.about-role {
  height: 100%;
  border: 1px solid var(--ztr-border);
  border-top: 2px solid var(--c);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--ztr-surface-2)), var(--ztr-surface));
  padding: 1.35rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-role:hover {
  transform: translateY(-5px);
  border-color: var(--ztr-border-hover);
  border-top-color: var(--c);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.65);
}

.about-role-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.about-role-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}

.about-role-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.2;
}

.about-role-sub {
  color: var(--ztr-text-dim);
  font-size: 0.8rem;
}

.about-sees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.about-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.about-chip.yes {
  color: #ffc14d;
  background: rgba(255, 193, 77, 0.1);
  border-color: rgba(255, 193, 77, 0.3);
}

.about-chip.no {
  color: var(--ztr-green);
  background: rgba(32, 201, 151, 0.1);
  border-color: rgba(32, 201, 151, 0.28);
}

.about-matrix {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  overflow-x: auto;
}

.about-matrix-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  align-items: center;
  gap: 0.75rem;
  min-width: 420px;
  padding: 0.85rem 1.1rem;
}

.about-matrix-row + .about-matrix-row {
  border-top: 1px solid var(--ztr-border);
}

.about-matrix-head {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ztr-text-dim);
}

.about-matrix-row:not(.about-matrix-head) > div:first-child {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.about-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.6rem;
  background: var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent);
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.about-list li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--ztr-text-dim);
  font-size: 0.95rem;
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ztr-cyan);
}

.about-list strong {
  color: #f5f6f7;
  font-weight: 600;
}

.about-note {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.35rem;
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .about-role,
  .about-role:hover {
    transition: none;
    transform: none;
  }
}

/* ---------------------------------------------------------------------
   Downloads page — release card, install block with OS tabs, steps.
   Same accent palette and surface treatment as the homepage cards.
   --------------------------------------------------------------------- */
.dl-release,
.dl-install,
.dl-apps {
  border: 1px solid var(--ztr-border);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.6rem;
}

.dl-release {
  border-top: 2px solid var(--ztr-cyan);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ztr-cyan) 6%, var(--ztr-surface-2)), var(--ztr-surface));
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.7);
}

.dl-release-top {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.dl-release-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ztr-cyan);
  background: rgba(13, 202, 240, 0.1);
  border: 1px solid rgba(13, 202, 240, 0.28);
}

.dl-release-main {
  flex: 1;
  min-width: 200px;
}

.dl-release-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ztr-text-dim);
}

.dl-release-version {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
}

.dl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.dl-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: var(--ztr-cyan);
  background: rgba(13, 202, 240, 0.1);
  border: 1px solid rgba(13, 202, 240, 0.25);
  white-space: nowrap;
}

.dl-chip-quiet {
  color: var(--ztr-text-dim);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--ztr-border);
}

.dl-release-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.dl-sha {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.3rem;
  padding: 0.55rem 0.7rem 0.55rem 0.9rem;
  border: 1px solid var(--ztr-border);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
}

.dl-sha-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ztr-text-dim);
  flex-shrink: 0;
}

.dl-sha-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: #d5d9de;
  background: none;
}

.dl-details > summary {
  cursor: pointer;
  color: var(--ztr-text-dim);
  font-size: 0.85rem;
  list-style-position: inside;
}

.dl-details > summary:hover {
  color: #f5f6f7;
}

.dl-details > summary:focus-visible {
  outline: 2px solid var(--ztr-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.dl-code {
  position: relative;
}

.dl-code pre {
  margin: 0;
  padding: 0.95rem 3.2rem 0.95rem 1.1rem;
  background: #050607;
  border: 1px solid var(--ztr-border);
  border-radius: 0.6rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #e6e9ec;
}

.dl-code .dl-code-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: #050607;
}

.dl-tabs {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--ztr-border);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
}

.dl-tab {
  border: 0;
  background: transparent;
  color: var(--ztr-text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.95rem;
  border-radius: 0.45rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.dl-tab:hover {
  color: #f5f6f7;
}

.dl-tab[aria-selected='true'] {
  color: #08090b;
  background: var(--ztr-cyan);
}

.dl-tab:focus-visible {
  outline: 2px solid var(--ztr-cyan);
  outline-offset: 2px;
}

.dl-step {
  height: 100%;
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.2rem;
}

.dl-old {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
}

.dl-old-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.7rem 1rem;
}

.dl-old-row + .dl-old-row {
  border-top: 1px solid var(--ztr-border);
}

@media (max-width: 575.98px) {
  .dl-release,
  .dl-install,
  .dl-apps {
    padding: 1.2rem;
  }
  .dl-release-cta {
    width: 100%;
    justify-content: center;
  }
  .dl-sha-label {
    display: none;
  }
}

/* ---------------------------------------------------------------------
   Dashboard — Keys & Routes panels. Cards instead of tables, a mini hop
   path per route, and a stepped add-key flow. Same palette and surface
   treatment as the other dashboard panels.
   --------------------------------------------------------------------- */
.kr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.kr-head p {
  max-width: 52ch;
}

.kr-head-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kr-summary {
  font-size: 0.82rem;
  color: var(--ztr-text-dim);
  white-space: nowrap;
}

.kr-count {
  color: #f5f6f7;
  font-weight: 600;
}

.kr-ok {
  color: var(--ztr-green);
}

.kr-warn {
  color: #ffc14d;
}

.kr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
}

.kr-loading {
  grid-column: 1 / -1;
  padding: 2rem 0;
  color: var(--ztr-text-dim);
  font-size: 0.9rem;
}

.kr-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.15rem 1.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kr-card.route-row {
  cursor: pointer;
}

.kr-card.route-row:hover,
.kr-card.route-row:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ztr-border-hover);
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.7);
  outline: none;
}

.kr-card.route-row:focus-visible {
  border-color: var(--ztr-cyan);
}

.kr-card.is-pending {
  border-style: dashed;
}

.kr-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.kr-card-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c, var(--ztr-cyan));
  background: color-mix(in srgb, var(--c, var(--ztr-cyan)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--ztr-cyan)) 32%, transparent);
}

.kr-card-titleblock {
  flex: 1;
  min-width: 0;
}

.kr-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kr-card-sub {
  font-size: 0.76rem;
  color: var(--ztr-text-dim);
  margin-top: 0.1rem;
}

.kr-pill {
  --c: var(--ztr-text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
}

.kr-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

.kr-pill.ok { --c: var(--ztr-green); }
.kr-pill.warn { --c: #ffc14d; }
.kr-pill.off { --c: var(--ztr-text-dim); }

.kr-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: #c3c8ce;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kr-key .kr-mono {
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ztr-border);
}

.kr-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ztr-border);
}

.kr-when {
  font-size: 0.76rem;
  color: var(--ztr-text-dim);
}

.kr-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  border: 1px solid var(--ztr-border);
  background: transparent;
  color: var(--ztr-text-dim);
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.kr-icon-btn:hover,
.kr-icon-btn:focus-visible {
  color: #ff7a8a;
  border-color: rgba(255, 84, 104, 0.5);
  background: rgba(255, 84, 104, 0.08);
  outline: none;
}

.kr-path {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.1rem 0;
}

.kr-hop {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ztr-purple);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ztr-purple) 20%, transparent);
}

.kr-hop.entry {
  background: var(--ztr-cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ztr-cyan) 22%, transparent);
}

.kr-hop.exit {
  background: var(--ztr-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ztr-green) 22%, transparent);
}

.kr-link {
  flex: 1 1 0;
  min-width: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--ztr-border-hover), var(--ztr-border-hover));
}

.kr-path-lg .kr-hop {
  width: 16px;
  height: 16px;
}

.kr-path-lg .kr-link {
  height: 3px;
}

.kr-path-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ztr-text-dim);
  margin-top: -0.35rem;
}

.kr-exit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.kr-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.kr-exit-country {
  font-weight: 600;
  font-size: 0.88rem;
}

.kr-exit-addr {
  flex: 1;
  min-width: 0;
  text-align: right;
  color: var(--ztr-text-dim);
}

.kr-reason {
  font-size: 0.78rem;
  color: #ffc14d;
  background: rgba(255, 193, 77, 0.08);
  border: 1px solid rgba(255, 193, 77, 0.25);
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
}

.kr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.kr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  font-size: 0.74rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: #c3c8ce;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ztr-border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kr-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--ztr-border-hover);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.015);
}

.kr-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ztr-cyan);
  background: rgba(13, 202, 240, 0.08);
  border: 1px solid rgba(13, 202, 240, 0.25);
}

.kr-form {
  border: 1px solid var(--ztr-border);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, var(--ztr-surface-2), var(--ztr-surface));
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
}

.kr-step {
  display: flex;
  gap: 1rem;
}

.kr-step + .kr-step {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--ztr-border);
}

.kr-step-body {
  flex: 1;
  min-width: 0;
}

.kr-step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0.15rem 0 0.35rem;
}

.kr-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  border: 1px solid var(--ztr-border);
  border-radius: 0.55rem;
  background: #050607;
}

.kr-code code {
  font-size: 0.82rem;
  color: #e6e9ec;
  background: none;
}

.kr-nonce {
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(13, 202, 240, 0.3);
  border-radius: 0.6rem;
  background: rgba(13, 202, 240, 0.05);
}

.kr-nonce-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.kr-nonce-value {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  color: #e6e9ec;
  background: none;
}

.kr-nonce-meta {
  margin-top: 0.4rem;
  font-size: 0.76rem;
  color: var(--ztr-text-dim);
}

@media (max-width: 575.98px) {
  .kr-head-actions {
    width: 100%;
    justify-content: space-between;
  }
  .kr-form {
    padding: 1.1rem;
  }
  .kr-step {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kr-card,
  .kr-card.route-row:hover {
    transition: none;
    transform: none;
  }
}

/* ---------------------------------------------------------------------
   Dashboard — Address aliases + Alias lookup. Reuses the .kr-* cards and
   pills above; this adds the per-address groups and the lookup result.
   --------------------------------------------------------------------- */
.kr-pill.bad { --c: #ff5468; }

.kr-bad {
  color: #ff5468;
}

.al-help {
  border: 1px solid var(--ztr-border);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 1.2rem;
}

.al-help > summary {
  cursor: pointer;
  padding: 0.8rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c3c8ce;
  list-style-position: inside;
}

.al-help > summary:hover {
  color: #f5f6f7;
}

.al-help > summary:focus-visible {
  outline: 2px solid var(--ztr-cyan);
  outline-offset: -2px;
  border-radius: 0.75rem;
}

.al-help-body {
  padding: 0.4rem 1.1rem 1.2rem;
}

.al-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #b4bac1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--ztr-border);
  border-radius: 0.6rem;
  background: rgba(255, 193, 77, 0.05);
}

.al-note strong {
  color: #ffc14d;
  font-weight: 600;
}

.al-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr));
  gap: 1rem;
}

.al-group {
  min-width: 0;
}

.al-group-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.al-rows {
  display: flex;
  flex-direction: column;
}

.al-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--ztr-border);
}

.al-main {
  flex: 1 1 150px;
  min-width: 0;
}

.al-row .kr-icon-btn {
  padding: 0.35rem 0.5rem;
}

.al-row .kr-icon-btn span {
  display: none;
}

.al-domain {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.al-domain-text {
  min-width: 0;
  font-size: 0.82rem;
  color: #e6e9ec;
}

.al-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: var(--ztr-text-dim);
}

.al-label {
  color: #c3c8ce;
}

.al-row.is-expired .al-domain-text {
  color: var(--ztr-text-dim);
  text-decoration: line-through;
}

.al-search {
  display: flex;
  gap: 0.6rem;
  max-width: 560px;
}

.al-search .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.al-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}

.al-service {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--ztr-border);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.3);
}

.al-service-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.al-raw > summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--ztr-text-dim);
}

.al-raw > summary:hover {
  color: #f5f6f7;
}

.al-raw .dl-code pre {
  max-height: 320px;
  overflow: auto;
}

@media (max-width: 575.98px) {
  /* a long summary line shouldn't push the header button off-screen */
  .kr-head-actions {
    flex-wrap: wrap;
  }
  .kr-summary {
    white-space: normal;
  }
  .al-groups {
    grid-template-columns: minmax(0, 1fr);
  }
  .al-search {
    flex-direction: column;
  }
}

/* Route cards: exit address shown as 45.x.x.10 until clicked. */
.kr-ip {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  text-decoration: underline dotted rgba(141, 148, 156, 0.6);
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

.kr-ip:hover,
.kr-ip:focus-visible {
  color: #f5f6f7;
  outline: none;
}

.kr-ip:focus-visible {
  text-decoration-color: var(--ztr-cyan);
}

.kr-ip.is-revealed {
  color: var(--ztr-cyan);
  text-decoration-style: solid;
}
