:root {
  --bg: #0c0c0f;
  --bg-elevated: rgba(18, 18, 24, 0.72);
  --panel: rgba(28, 28, 33, 0.48);
  --panel-solid: rgba(28, 28, 33, 0.72);
  --panel-hover: rgba(37, 37, 44, 0.62);
  --border: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(139, 92, 246, 0.32);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --charcoal: #16161a;
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warn: #f59e0b;
  --danger: #ef4444;
  --nav-h: 64px;
  --glass-blur: blur(18px) saturate(1.3);
  --glass-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.1) inset,
    0 18px 50px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: #0c0c0f;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/* Dark scrollbars (Windows/WebKit) — kill bright white track/arrows */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.45) rgba(12, 12, 15, 0.9);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(12, 12, 15, 0.95);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 999px;
  border: 2px solid rgba(12, 12, 15, 0.95);
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.65);
}
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
*::-webkit-scrollbar-corner {
  background: rgba(12, 12, 15, 0.95);
}

/* —— Shared ambient (login + dashboard) —— */
#ens-ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.ens-bg,
.login-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 18% 22%, rgba(139, 92, 246, 0.45), transparent 60%),
    radial-gradient(ellipse 50% 40% at 82% 78%, rgba(91, 33, 182, 0.4), transparent 58%),
    radial-gradient(ellipse 40% 35% at 70% 18%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(ellipse 35% 30% at 30% 85%, rgba(109, 40, 217, 0.22), transparent 55%),
    linear-gradient(165deg, #0c0c0f 0%, #121018 50%, #0e0c14 100%);
}
.ens-orb,
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.7;
  animation: orb-float 18s ease-in-out infinite;
}
.ens-orb.a, .login-orb.a {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  left: -6%;
  top: 8%;
  background: rgba(139, 92, 246, 0.55);
}
.ens-orb.b, .login-orb.b {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  right: -8%;
  bottom: 5%;
  background: rgba(76, 29, 149, 0.55);
  animation-delay: -7s;
  animation-duration: 22s;
}
.ens-orb.c, .login-orb.c {
  width: min(28vw, 240px);
  height: min(28vw, 240px);
  left: 45%;
  top: 55%;
  background: rgba(167, 139, 250, 0.28);
  animation-delay: -12s;
  animation-duration: 16s;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -4%) scale(1.05); }
  66% { transform: translate(-2%, 3%) scale(0.96); }
}
#plexus {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
  .ens-orb, .login-orb { animation: none; }
}

/* Client brand stage: crisp full logo on dark stage (no muddy blur) */
.client-brand-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 58%, rgba(120, 22, 22, 0.28), transparent 68%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(90, 40, 120, 0.12), transparent 55%),
    linear-gradient(168deg, #07070b 0%, #101014 52%, #08080c 100%);
}
/* Soft color bloom from logo palette vars */
.client-brand-glow {
  position: absolute;
  left: 50%;
  top: 72%;
  width: min(70vw, 720px);
  height: min(36vh, 300px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, color-mix(in srgb, var(--brand-a, #c83232) 28%, transparent), transparent 72%),
    radial-gradient(ellipse 45% 40% at 58% 48%, color-mix(in srgb, var(--brand-b, #d4a030) 18%, transparent), transparent 70%);
  filter: blur(32px);
  opacity: 0.95;
}
.client-brand-mark {
  position: absolute;
  left: 50%;
  top: 72%;
  width: min(52vw, 520px);
  height: min(28vh, 220px);
  transform: translate(-50%, -50%);
  background-image: var(--client-brand-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.96;
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.6));
}
/* Dim only under nav/stats strip + footer; open stage for the logo */
.client-brand-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 11, 0.88) 0%, rgba(7, 7, 11, 0.55) 12%, rgba(7, 7, 11, 0.12) 28%, rgba(7, 7, 11, 0.05) 55%, rgba(7, 7, 11, 0.45) 86%, rgba(7, 7, 11, 0.88) 100%);
}
body.has-client-brand #ens-ambient,
body.has-client-brand .ens-bg,
body.has-client-brand .ens-orb,
body.has-client-brand #plexus {
  opacity: 0;
}
body.has-client-brand .topnav {
  background: rgba(8, 8, 12, 0.9);
  border-bottom-color: color-mix(in srgb, var(--brand-a, #8b5cf6) 28%, transparent);
}
body.has-client-brand footer.site-footer {
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}
body.has-client-brand .stat,
body.has-client-brand .panel {
  background: rgba(12, 12, 18, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: color-mix(in srgb, var(--brand-a, #fff) 18%, rgba(255, 255, 255, 0.08));
}
body.has-client-brand .btn-primary {
  background: var(--accent);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 35%, transparent);
}
body.has-client-brand .nav-links a.active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: #fff;
}
/* Client home: no workspace card — logo owns the stage under the stats */
body.is-client-home #client-grid,
body.is-client-home #client-workspaces-title {
  display: none !important;
}
body.is-client-home .wrap {
  min-height: calc(100vh - var(--nav-h, 64px));
}
body.is-client-home .client-brand-mark {
  top: auto;
  bottom: 5.75rem; /* sit above Secured by ENS */
  width: min(38vw, 340px);
  height: min(16vh, 120px);
  transform: translate(-50%, 0);
  opacity: 0.9;
}
body.is-client-home .client-brand-glow {
  top: auto;
  bottom: 4.5rem;
  width: min(52vw, 460px);
  height: min(22vh, 170px);
  transform: translate(-50%, 0);
}
@media (max-width: 720px) {
  .client-brand-mark,
  body.is-client-home .client-brand-mark {
    width: min(58vw, 260px);
    height: min(14vh, 96px);
    top: auto;
    bottom: 5.25rem;
    transform: translate(-50%, 0);
    opacity: 0.9;
  }
  .client-brand-glow,
  body.is-client-home .client-brand-glow {
    top: auto;
    bottom: 4.25rem;
    width: min(70vw, 320px);
    height: min(18vh, 130px);
    transform: translate(-50%, 0);
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-shell > .wrap:not(.fullbleed) {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.topnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.25rem;
  background: rgba(12, 12, 15, 0.55);
  border-bottom: 1px solid var(--border-accent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.brand-lockup {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: inherit; flex-shrink: 0;
  max-width: min(280px, 42vw);
}
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(260px, 46vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.25));
}
.nav-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #ddd6fe;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.35rem 0.65rem; border-radius: 999px;
  backdrop-filter: blur(8px);
}

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1; justify-content: center; flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.88rem; font-weight: 600;
  padding: 0.5rem 0.85rem; border-radius: 10px;
  transition: 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.45);
}
.nav-links a.nav-signups {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
  font-weight: 700;
}
.nav-links a.nav-signups:hover {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.28);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.65);
}
.nav-links a.nav-signups.active {
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.34);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.75);
}
.nav-links a.nav-reports {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.4);
  font-weight: 700;
}
.nav-links a.nav-reports:hover {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.24);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.6);
}
.nav-links a.nav-reports.active {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.32);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.7);
}
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 52px;
}
.nav-support-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(28, 28, 33, 0.45);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-support-btn:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.nav-support-btn.is-active {
  color: #ede9fe;
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}
.nav-support-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.nav-support-label { line-height: 1; }
.nav-support-btn .nav-unread-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.2rem;
  margin-left: 0;
}

/* —— User / settings dropdown —— */
.nav-user-menu {
  position: relative;
  z-index: 120;
}
.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.4rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(28, 28, 33, 0.45);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-user-trigger:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.nav-user-menu.is-open .nav-user-trigger {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}
.nav-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: #ede9fe;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.22), transparent 45%),
    linear-gradient(145deg, rgba(139, 92, 246, 0.95), rgba(88, 28, 135, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-user-avatar.has-logo {
  padding: 3px;
  background: rgba(10, 10, 14, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.nav-user-avatar.has-logo img,
.nav-dd-account-icon.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}
.nav-dd-account-icon.has-logo {
  padding: 3px;
  background: rgba(10, 10, 14, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  border-radius: 50%;
}
.nav-user-chevron {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 0.15rem;
  color: #a1a1aa;
  transition: transform 0.22s ease, color 0.2s ease;
}
.nav-user-chevron svg { width: 14px; height: 14px; display: block; }
.nav-user-menu.is-open .nav-user-chevron {
  transform: rotate(180deg);
  color: #ddd6fe;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(276px, calc(100vw - 1.5rem));
  padding: 0.45rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 22, 28, 0.62);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.1) inset,
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(139, 92, 246, 0.08);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: top right;
}
.nav-user-menu.is-open .nav-user-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-dd-account {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.75rem 0.75rem;
}
.nav-dd-account-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.28);
  flex-shrink: 0;
}
.nav-dd-account-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a1a1aa;
  margin-bottom: 0.2rem;
}
.nav-dd-account-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.nav-dd-account-meta strong {
  font-size: 0.9rem;
  font-weight: 650;
  color: #f4f4f5;
}
.nav-dd-role {
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}
.nav-dd-username {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #71717a;
}
.nav-dd-divider {
  height: 1px;
  margin: 0.15rem 0.55rem 0.35rem;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}
.nav-dd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #e4e4e7;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dd-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fafafa;
}
.nav-dd-item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.55);
}
.nav-dd-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}
.nav-dd-danger {
  color: #fca5a5;
}
.nav-dd-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}
.nav-dd-danger .nav-dd-icon { color: #f87171; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.25rem 3.5rem; width: 100%; }
.wrap.wide { max-width: 1400px; }
.wrap.fullbleed {
  max-width: none; padding: 0; flex: 1; display: flex; flex-direction: column; min-height: 0;
}

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(139, 92, 246, 0.2);
}
.page-header p { color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 0.95rem; border-radius: 10px; font-size: 0.88rem;
  font-weight: 600; text-decoration: none; border: 1px solid var(--border);
  background: rgba(28, 28, 33, 0.55);
  color: var(--text); transition: 0.15s ease;
  cursor: pointer; font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn:hover { background: var(--panel-hover); border-color: rgba(167, 139, 250, 0.35); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: transparent; color: white; backdrop-filter: none; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-success { background: var(--success); border-color: transparent; color: white; backdrop-filter: none; }
.btn-danger { background: transparent; border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,0.12); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem; margin-bottom: 1.5rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border-accent);
  border-radius: 16px; padding: 1rem 1.15rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.stat .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 1.45rem; font-weight: 700; margin-top: 0.3rem; color: #fafafa; }
.stat .value.value-ok { color: #34d399; }
.stat .value.value-warn { color: #fbbf24; }
.stat .value.value-bad { color: #f87171; }

.dash-panel {
  background: var(--panel);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.dash-panel[hidden] { display: none !important; }
.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-panel-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.dash-attention-list {
  display: grid;
  gap: 0.55rem;
}
.dash-attention-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.dash-attention-row .node-dot { width: 0.55rem; height: 0.55rem; }
.dash-attention-main { min-width: 0; }
.dash-attention-main strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-attention-main small {
  color: var(--muted);
  font-size: 0.78rem;
}
.dash-attention-side {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}
.dash-attention-row {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-attention-row:hover {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(139, 92, 246, 0.08);
}
.page-header h1 {
  letter-spacing: -0.02em;
}
.page-header p {
  max-width: 42rem;
}

h2.section-title {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #c4b5fd; margin-bottom: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 1.25rem; position: relative; overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  color: inherit; display: flex; flex-direction: column;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.card:hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.16) inset,
    0 20px 55px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(139, 92, 246, 0.12);
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--client-color, var(--accent));
  box-shadow: 0 0 18px var(--client-color, var(--accent));
}
.card-top { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.85rem; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); display: grid; place-items: center;
  font-weight: 700; font-size: 1rem; color: var(--client-color, var(--accent));
  border: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
  object-fit: cover;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 14px; }
.avatar.avatar-img,
.avatar.avatar-round {
  border-radius: 50%;
  padding: 3px;
  overflow: hidden;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}
.avatar.sm {
  width: 32px; height: 32px; font-size: 0.72rem; border-radius: 50%;
}
.avatar.avatar-img.sm { width: 32px; height: 32px; }
.tenant-name-cell {
  display: inline-flex; align-items: center; gap: 0.65rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; }
.card .slug { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.card p.desc { color: var(--muted); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.card-actions {
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.card-actions .btn { flex: 1; min-width: 110px; font-size: 0.8rem; padding: 0.5rem 0.7rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border-accent);
  border-radius: 18px; padding: 1.35rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.panel h2 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.panel-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.1rem; }
.panels { display: grid; gap: 1.1rem; }
.panels.two { grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 900px) { .panels.two { grid-template-columns: 1fr; } }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 12, 15, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.45) rgba(12, 12, 15, 0.95);
}
.table-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.table-wrap::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.table-wrap::-webkit-scrollbar-track {
  background: rgba(12, 12, 15, 0.95);
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.45);
  border-radius: 999px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.8rem 0.95rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
th {
  color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(139, 92, 246, 0.06);
}
tr:last-child td { border-bottom: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.65rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
input, textarea, select {
  width: 100%;
  background: rgba(12, 12, 15, 0.55);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem; font: inherit;
}
textarea {
  min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem; line-height: 1.5; resize: vertical;
}
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.empty, .error, .notice {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 14px; padding: 1.5rem; text-align: center; color: var(--muted);
  backdrop-filter: blur(12px);
}
.empty.small { padding: 1rem; font-size: 0.9rem; }
.error { border-style: solid; border-color: rgba(239,68,68,0.35); color: #fca5a5; }
.notice { border-style: solid; text-align: left; }
.notice.ok { border-color: rgba(16,185,129,0.35); color: #6ee7b7; }
.notice.bad { border-color: rgba(239,68,68,0.35); color: #fca5a5; }

.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 1rem; font-size: 0.9rem; }
.back-link:hover { color: var(--text); }
.client-header {
  background: var(--panel);
  border: 1px solid var(--border-accent);
  border-radius: 18px;
  padding: 1.35rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.client-header-main { display: flex; align-items: center; gap: 1rem; }
.client-meta { color: var(--muted); margin-top: 0.35rem; font-size: 0.9rem; }
.deploy-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.status-box {
  background: rgba(12, 12, 15, 0.4); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem; margin-bottom: 1rem;
}
.status-row { display: flex; align-items: center; gap: 0.65rem; font-size: 0.92rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.status-dot.running { background: var(--warn); animation: pulse 1s infinite; }
.status-dot.ready { background: var(--success); }
.status-dot.failed { background: var(--danger); }
@keyframes pulse { 50% { opacity: 0.45; } }
.progress-track {
  margin-top: 0.75rem; height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 999px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 35%; background: linear-gradient(90deg, #a78bfa, #8b5cf6);
  border-radius: 999px; animation: slide 1.2s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}
.checklist { list-style: none; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.checklist li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.job-list { display: grid; gap: 0.65rem; }
.job-item {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.88rem;
  background: rgba(12, 12, 15, 0.35);
}
.job-item .meta { color: var(--muted); font-size: 0.8rem; }
.hidden { display: none !important; }
code { font-family: ui-monospace, monospace; font-size: 0.85em; }
footer.site-footer {
  position: static;
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  padding: 2.25rem 1rem 1.5rem;
  width: 100%;
  max-width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Embedded Headplane frame */
.embed-frame {
  flex: 1; width: 100%; border: 0; min-height: calc(100vh - var(--nav-h));
  background: rgba(11, 18, 32, 0.85);
}
.embed-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.7rem 1rem;
  background: rgba(12, 12, 15, 0.55);
  border-bottom: 1px solid var(--border-accent);
  backdrop-filter: blur(14px);
  font-size: 0.86rem; color: var(--muted); flex-wrap: wrap;
}
.embed-toolbar-left { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.embed-toolbar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.back-link.inline { margin: 0; }
.toolbar-sep { opacity: 0.45; }
.toolbar-meta { color: var(--muted); font-size: 0.8rem; }
.card.card-link {
  text-decoration: none; cursor: pointer;
}
.card.card-link:hover { transform: translateY(-2px); }
.card-footer-hint {
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--muted);
}
.pill {
  background: var(--accent-soft); color: #ddd6fe;
  padding: 0.25rem 0.55rem; border-radius: 999px; font-weight: 600; font-size: 0.74rem;
}

/* —— Live node telemetry —— */
.telemetry-badge {
  display: inline-flex;
  margin-top: 0.45rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.28);
  white-space: nowrap;
}
.device-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.node-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.node-status-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.12rem;
}
.node-status-text strong {
  font-size: 0.86rem;
  font-weight: 650;
}
.node-last-seen {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.node-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.node-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: node-pulse 1.6s ease-out infinite;
}
.node-dot.offline {
  background: #78716c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.node-dot.rto {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: rto-pulse 1.1s ease-out infinite;
}
@keyframes node-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 10px 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes rto-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 12px 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Subnet path / latency monitor */
.path-monitor {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 1.6rem;
  font-variant-numeric: tabular-nums;
}
.path-monitor.is-idle { color: var(--muted); font-size: 0.85rem; }
.path-latency {
  font-size: 0.86rem;
  font-weight: 700;
  color: #86efac;
  letter-spacing: 0.01em;
}
.path-target {
  font-size: 0.7rem;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.path-monitor.is-rto {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.12);
}
.path-rto-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: rto-pulse 1.1s ease-out infinite;
}
.path-rto-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f87171;
  white-space: nowrap;
}
.devices-live-table td { vertical-align: middle; }
#devices-table-host {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 1.25rem 2.5rem;
}

/* -- Audit Logs (admin) -- */
.audit-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1.1rem 1.25rem 0.85rem;
}
.audit-toolbar-sticky {
  position: sticky;
  top: var(--nav-h, 64px);
  z-index: 40;
  background: rgba(18, 18, 24, 0.92);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.audit-toolbar-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.audit-clear-btn {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  color: #fecaca !important;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.audit-clear-btn:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}
.audit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.audit-toggle input {
  accent-color: #22c55e;
  width: 1rem;
  height: 1rem;
}
.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  flex: 1;
  min-width: 280px;
}
.audit-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 140px;
}
.audit-filter-field span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.audit-filter-field select,
.audit-filter-field input[type="search"],
.audit-filter-field input {
  background: rgba(12, 12, 15, 0.55);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
}
.audit-filter-field select:focus,
.audit-filter-field input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.audit-search-field { flex: 1; min-width: 220px; }
.audit-meta {
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 0.35rem;
}
.audit-loader {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.audit-loader.is-active { opacity: 1; }
.audit-loader-bar {
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.85), transparent);
  transform: translateX(-120%);
}
.audit-loader.is-active .audit-loader-bar {
  animation: audit-slide 1.05s ease-in-out infinite;
}
@keyframes audit-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.audit-table-wrap {
  border-radius: 0 0 14px 14px;
  max-height: min(70vh, 820px);
  overflow: auto;
}
.audit-table {
  width: 100%;
  border-collapse: collapse;
}
.audit-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(22, 22, 28, 0.96);
  backdrop-filter: blur(8px);
}
.audit-table td { vertical-align: middle; }
.audit-row { transition: background 0.18s ease; }
.audit-row:hover td { background: rgba(255, 255, 255, 0.035); }

.audit-row.audit-level-error td { background: rgba(239, 68, 68, 0.08); }
.audit-row.audit-level-error:hover td { background: rgba(239, 68, 68, 0.14); }
.audit-row.audit-level-warn td { background: rgba(245, 158, 11, 0.07); }
.audit-row.audit-level-warn:hover td { background: rgba(245, 158, 11, 0.12); }
.audit-row.audit-level-info td { background: rgba(59, 130, 246, 0.05); }
.audit-row.audit-level-info:hover td { background: rgba(59, 130, 246, 0.1); }
.audit-row.audit-level-debug td { background: rgba(161, 161, 170, 0.04); color: #a1a1aa; }
.audit-row.audit-level-debug:hover td { background: rgba(161, 161, 170, 0.08); }

.audit-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.audit-level-badge.audit-level-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.55);
}
.audit-level-badge.audit-level-warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
}
.audit-level-badge.audit-level-info {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
}
.audit-level-badge.audit-level-debug {
  color: #d4d4d8;
  background: rgba(113, 113, 122, 0.22);
  border-color: rgba(161, 161, 170, 0.35);
}

.audit-ip {
  font-size: 0.84rem;
  color: #e4e4e7;
  background: rgba(12, 12, 15, 0.45);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.audit-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #e4e4e7;
  font-size: 0.88rem;
  cursor: help;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
}
.audit-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  white-space: nowrap;
}
.audit-status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.audit-status-badge.audit-status-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}
.audit-status-badge.audit-status-error::before {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.audit-status-badge.audit-status-warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}
.audit-status-badge.audit-status-warn::before {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.audit-status-badge.audit-status-info {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}
.audit-status-badge.audit-status-info::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.audit-status-badge.audit-status-debug {
  color: #d4d4d8;
  background: rgba(113, 113, 122, 0.16);
  border-color: rgba(161, 161, 170, 0.3);
}
.audit-status-badge.audit-status-debug::before {
  background: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.16);
}
.audit-empty-state {
  text-align: center;
  padding: 2.75rem 1rem !important;
}
.audit-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.audit-empty-sub {
  font-size: 0.88rem;
  color: var(--muted);
}
/* Login page uses shared ambient; keep card layout helpers */
body.login-glass {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-x: hidden;
}
.login-card {
  width: min(400px, 100%);
  position: relative;
  z-index: 1;
  padding: 2.15rem 1.85rem 1.75rem;
  border-radius: 22px;
  background: rgba(28, 28, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.12) inset,
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.65rem;
}
.login-brand img { height: 52px; width: auto; }
.login-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
  font-weight: 600;
}
.btn-block { width: 100%; }
.login-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #a1a1aa;
  margin: 0 0 0.4rem;
}
.login-card .field { margin-bottom: 1rem; }
.login-card input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(12, 12, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 0.75rem 0.9rem;
  color: #f4f4f5;
  font: inherit;
  font-size: 0.95rem;
}
.login-card input:focus {
  outline: none;
  background: rgba(12, 12, 15, 0.72);
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
/* Keep dark theme when browser autofill paints the field white/yellow */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus,
.login-card input:-webkit-autofill:active {
  -webkit-text-fill-color: #f4f4f5 !important;
  caret-color: #f4f4f5;
  border: 1px solid rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 0 1000px rgba(12, 12, 15, 0.92) inset !important;
  transition: background-color 99999s ease-in-out 0s;
}
.login-card button {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.login-error {
  display: none;
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 0.88rem;
}
.login-error.show { display: block; }
.login-foot {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.78rem;
  color: #71717a;
}

/* —— Admin system picker (VPN vs MikroTik) —— */
body.systems-pick {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}
.systems-wrap {
  width: min(720px, 100%);
  text-align: center;
}
.systems-brand img {
  height: 52px;
  width: auto;
  margin-bottom: 1.25rem;
}
.systems-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.systems-sub {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
  color: var(--muted, #a1a1aa);
  font-size: 0.95rem;
  line-height: 1.45;
}
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.systems-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .systems-grid-3 { grid-template-columns: 1fr; }
  .systems-grid { grid-template-columns: 1fr; }
}
.system-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.system-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #ddd6fe;
}
.system-tag-vip {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}
.nav-tier-group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.18rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}
.nav-tier-group .nav-tier {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.78;
}
.nav-tier-group .nav-tier.active {
  opacity: 1;
  background: rgba(139, 92, 246, 0.28);
  color: #ede9fe;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35);
}
.nav-tier-group .nav-tier-vip.active {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.4);
}
.system-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.45rem;
  padding: 1.25rem 1.2rem 1.3rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 26, 0.72);
  color: inherit;
  cursor: pointer;
  font: inherit;
  backdrop-filter: blur(14px);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.system-card:hover {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(28, 28, 36, 0.88);
  transform: translateY(-2px);
}
.system-card:focus-visible {
  outline: none;
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}
.system-card-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  margin-bottom: 0.25rem;
}
.system-card-icon svg { width: 1.25rem; height: 1.25rem; }
.system-card-label {
  font-size: 1.05rem;
  font-weight: 650;
}
.system-card-desc {
  font-size: 0.84rem;
  color: var(--muted, #a1a1aa);
  line-height: 1.4;
}
.systems-foot {
  margin-top: 1.35rem;
  display: flex;
  justify-content: center;
}
@media (max-width: 640px) {
  .systems-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topnav { height: auto; flex-wrap: wrap; padding: 0.75rem 1rem; }
  .nav-links { order: 3; width: 100%; justify-content: flex-start; }
  .nav-links a { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
  .ens-orb, .login-orb { filter: blur(48px); }
}

/* —— Network Routes & ACLs (Tailscale-style controls) —— */
.page-header-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }

.net-acl-card { position: relative; overflow: hidden; }
.net-acl-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.15rem;
}
.net-kicker {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #c4b5fd; margin-bottom: 0.35rem; font-weight: 600;
}
.net-mode-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem; border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7; font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.net-mode-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
  animation: net-pulse 1.6s ease-out infinite;
}
.net-acl-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem; margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .net-acl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.net-stat {
  background: rgba(12, 12, 15, 0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 0.85rem 0.95rem;
}
.net-stat .label {
  display: block; color: var(--muted); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem;
}
.net-stat strong { font-size: 1.05rem; font-weight: 700; color: #fafafa; }
.net-rule-list {
  list-style: none; display: grid; gap: 0.45rem;
  margin: 0; padding: 0;
}
.net-rule-list li {
  position: relative; padding: 0.55rem 0.75rem 0.55rem 1.85rem;
  border-radius: 10px; background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: #d4d4d8; font-size: 0.88rem; line-height: 1.45;
}
.net-rule-list li::before {
  content: ""; position: absolute; left: 0.75rem; top: 0.85rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px rgba(139,92,246,0.45);
}

.net-routes-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.net-routes-meta { color: var(--muted); font-size: 0.85rem; }
.net-routes-table-wrap { margin-top: 0.25rem; }
.net-routes-table td { vertical-align: middle; }
.net-col-toggle { width: 140px; text-align: right; }
.net-routes-table th.net-col-toggle { text-align: right; }
.net-client-cell, .net-device-cell, .net-server-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.net-client-cell strong, .net-device-cell strong { font-size: 0.92rem; }
.net-sub { color: var(--muted); font-size: 0.75rem; }
.net-server-edit {
  display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap;
}
.net-server-name-input {
  min-width: 10rem; max-width: 16rem; flex: 1 1 10rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  color: var(--text, #f4f4f5);
  font-size: 0.9rem; font-weight: 600;
}
.net-server-name-input:focus {
  outline: none;
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.net-server-name-input::placeholder { color: rgba(161,161,170,0.85); font-weight: 500; }
.net-server-hint {
  color: var(--muted); font-size: 0.78rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.net-server-save {
  padding: 0.32rem 0.7rem !important;
  font-size: 0.78rem !important;
  white-space: nowrap;
}
.net-route-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem; color: #e4e4e7;
  background: rgba(255,255,255,0.04); padding: 0.22rem 0.45rem; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.net-empty { color: var(--muted); text-align: center; padding: 1.4rem 1rem !important; }

.net-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.65rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.net-badge-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.net-badge-active {
  color: #6ee7b7; background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
}
.net-badge-active .net-badge-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.22);
  animation: net-pulse 1.5s ease-out infinite;
}
.net-badge-pending {
  color: #fcd34d; background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.32);
}
.net-badge-pending .net-badge-dot { background: var(--warn); }
.net-badge-suspended {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.net-badge-expired {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.route-switch {
  display: inline-flex; align-items: center; justify-content: flex-end;
  gap: 0.55rem; cursor: pointer; user-select: none;
}
.route-switch input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.route-switch-track {
  position: relative; width: 44px; height: 26px; border-radius: 999px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.14);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}
.route-switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #f4f4f5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.18s ease;
}
.route-switch input:checked + .route-switch-track {
  background: rgba(16,185,129,0.55);
  border-color: rgba(16,185,129,0.65);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.route-switch input:checked + .route-switch-track .route-switch-thumb {
  transform: translateX(18px);
}
.route-switch input:disabled + .route-switch-track { opacity: 0.55; }
.route-switch-label {
  min-width: 1.6rem; font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.route-switch input:checked ~ .route-switch-label { color: #6ee7b7; }
.route-switch:hover .route-switch-track { border-color: rgba(167,139,250,0.45); }

/* Client accordion for subnet routes */
.net-accordion { display: grid; gap: 0.65rem; margin-top: 0.35rem; }
.net-acc-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(12,12,15,0.35);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.net-acc-item.is-open {
  border-color: rgba(139,92,246,0.35);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.12), 0 10px 28px rgba(0,0,0,0.22);
}
.net-acc-header {
  width: 100%; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.95rem 1.05rem; background: transparent; border: 0;
  color: inherit; cursor: pointer; text-align: left; font: inherit;
}
.net-acc-header:hover { background: rgba(255,255,255,0.03); }
.net-acc-chevron {
  width: 10px; height: 10px; border-right: 2px solid #a1a1aa; border-bottom: 2px solid #a1a1aa;
  transform: rotate(-45deg); transition: transform 0.18s ease; flex-shrink: 0; margin-left: 0.15rem;
}
.net-acc-item.is-open .net-acc-chevron { transform: rotate(45deg); margin-top: -2px; }
.net-acc-title { display: flex; flex-direction: column; gap: 0.12rem; flex: 1; min-width: 0; }
.net-acc-title strong { font-size: 0.98rem; font-weight: 650; }
.net-acc-counts { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.net-acc-chip {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  color: #d4d4d8; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.net-acc-chip-active {
  color: #6ee7b7; background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.28);
}
.net-acc-chip-pending {
  color: #fcd34d; background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.28);
}
.net-acc-body { padding: 0 0.85rem 0.85rem; }
.net-acc-body[hidden] { display: none !important; }
@media (max-width: 700px) {
  .net-acc-header { flex-wrap: wrap; }
  .net-acc-counts { width: 100%; justify-content: flex-start; padding-left: 1.4rem; }
}

@keyframes net-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.notice {
  padding: 0.75rem 0.95rem; border-radius: 12px; font-size: 0.9rem;
  border: 1px solid var(--border); background: rgba(28,28,33,0.65);
}
.notice.ok {
  border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.1); color: #a7f3d0;
}
.notice.bad {
  border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.1); color: #fecaca;
}
.notice.hidden { display: none; }

.nav-unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.1rem; height: 1.1rem; padding: 0 0.3rem;
  border-radius: 999px;
  background: #ef4444; color: #fff;
  font-size: 0.65rem; font-weight: 700; line-height: 1;
}
.nav-unread-badge.hidden { display: none; }
@media (max-width: 700px) {
  .nav-support-label { display: none; }
  .nav-support-btn { padding: 0.42rem 0.55rem; }
}

/* —— Support chat —— */
.support-wrap { max-width: 1180px; }
.support-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
  min-height: min(72vh, 760px);
}
.support-shell.has-inbox {
  grid-template-columns: minmax(240px, 300px) 1fr;
}
.support-inbox {
  border-right: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.support-inbox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.support-inbox-meta { color: var(--muted); font-size: 0.8rem; }
.support-thread-list {
  overflow: auto; flex: 1; padding: 0.45rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.support-thread-item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.support-thread-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.support-thread-item.is-active {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.28);
}
.support-thread-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.support-thread-preview {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.support-unread-badge {
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.support-chat {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.support-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.support-status-pill {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem; border-radius: 999px;
  color: #6ee7b7; background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.28);
}
.support-status-pill.is-closed {
  color: #fca5a5; background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.28);
}
.support-messages {
  flex: 1; overflow: auto; padding: 1.1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(139,92,246,0.08), transparent 55%),
    rgba(0,0,0,0.12);
}
.support-empty {
  color: var(--muted); text-align: center;
  padding: 2.2rem 1rem; font-size: 0.92rem;
}
.support-msg {
  max-width: min(78%, 520px);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.support-msg.is-mine { align-self: flex-end; }
.support-msg.is-theirs { align-self: flex-start; }
.support-msg-meta {
  display: flex; gap: 0.65rem; align-items: baseline;
  font-size: 0.72rem; color: var(--muted);
}
.support-msg.is-mine .support-msg-meta { justify-content: flex-end; }
.support-msg-body {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 0.94rem;
  white-space: pre-wrap; word-break: break-word;
  border: 1px solid rgba(255,255,255,0.08);
}
.support-msg.is-theirs .support-msg-body {
  background: rgba(28,28,33,0.85);
  border-top-left-radius: 6px;
}
.support-msg.is-mine .support-msg-body {
  background: rgba(139,92,246,0.28);
  border-color: rgba(167,139,250,0.28);
  border-top-right-radius: 6px;
}
.support-msg-image {
  display: block; padding: 0; border: none; background: transparent; cursor: zoom-in;
  border-radius: 12px; overflow: hidden;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
.support-msg-image img {
  display: block; width: 100%; max-height: 240px; object-fit: cover;
}
.support-compose {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.85rem 1rem 1rem;
  background: rgba(12,12,15,0.35);
  position: relative;
}
.support-compose-row {
  display: flex; align-items: flex-end; gap: 0.5rem;
}
.support-icon-btn {
  width: 2.5rem; height: 2.5rem; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0; cursor: pointer;
}
#support-input {
  flex: 1; resize: none; min-height: 2.5rem; max-height: 140px;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  font: inherit; line-height: 1.4;
}
#support-input:focus {
  outline: none;
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.support-hint { margin-top: 0.55rem; font-size: 0.78rem; }
.support-emoji-picker {
  position: absolute; left: 1rem; bottom: calc(100% - 0.35rem);
  width: min(320px, calc(100% - 2rem));
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.2rem;
  padding: 0.55rem;
  border-radius: 14px;
  background: rgba(22,22,28,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 5;
}
.support-emoji-picker.hidden { display: none; }
.support-emoji-item {
  border: none; background: transparent; cursor: pointer;
  font-size: 1.25rem; line-height: 1;
  padding: 0.35rem; border-radius: 8px;
}
.support-emoji-item:hover { background: rgba(255,255,255,0.08); }
.support-preview {
  position: relative; display: inline-block; margin-bottom: 0.55rem;
}
.support-preview.hidden { display: none; }
.support-preview img {
  display: block; max-height: 96px; max-width: 180px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
}
.support-preview-clear {
  position: absolute; top: -0.35rem; right: -0.35rem;
  width: 1.6rem; height: 1.6rem; padding: 0 !important;
  border-radius: 999px !important;
}
.support-lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.support-lightbox.hidden { display: none; }
.support-lightbox img {
  max-width: min(960px, 100%); max-height: 90vh;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.support-lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(20,20,24,0.85); color: #fff;
  cursor: pointer; font-size: 1rem;
}
@media (max-width: 860px) {
  .support-shell.has-inbox { grid-template-columns: 1fr; }
  .support-inbox {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height: 220px;
  }
}
