/* PhishPanel admin
   Dark, restrained, Stripe-inspired. Design tokens first, components second. */

:root {
  color-scheme: dark;

  --canvas: #08080a;
  --canvas-soft: #0b0b0e;
  --surface: #0f0f13;
  --surface-2: #141419;
  --surface-3: #1a1a21;
  --surface-input: #0a0a0e;

  --border: #222228;
  --border-soft: #1a1a20;
  --border-strong: #30303a;
  --border-input: #5e5e6c;

  --text: #f1f1f4;
  --text-soft: #c6c6cf;
  --muted: #8d8d9a;
  --faint: #7e7e8b;

  --accent: #a09bff;
  --accent-strong: #655df6;
  --accent-hover: #5a52e8;
  --accent-soft: rgba(124, 118, 255, 0.12);
  --accent-border: rgba(124, 118, 255, 0.32);

  --green: #41d39b;
  --green-soft: rgba(65, 211, 155, 0.1);
  --green-border: rgba(65, 211, 155, 0.26);

  --amber: #e7b45c;
  --amber-soft: rgba(231, 180, 92, 0.1);
  --amber-border: rgba(231, 180, 92, 0.26);

  --red: #f07178;
  --red-soft: rgba(240, 113, 120, 0.1);
  --red-border: rgba(240, 113, 120, 0.26);

  --blue: #7da7ff;
  --blue-soft: rgba(125, 167, 255, 0.1);
  --blue-border: rgba(125, 167, 255, 0.24);

  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 12px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 44px rgba(0, 0, 0, 0.36);

  --sidebar-w: 236px;
  --topbar-h: 56px;
  --content-max: 1380px;

  --font: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.app {
  background:
    radial-gradient(1000px 540px at 78% -14%, rgba(101, 93, 246, 0.075), transparent 62%),
    var(--canvas);
  background-attachment: fixed;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

::selection {
  background: rgba(124, 118, 255, 0.35);
  color: #fff;
}

:where(a, button, input, select, textarea, summary, [tabindex]) {
  scroll-margin-block: 5rem;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2b2b34;
  border: 2px solid var(--canvas);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a46;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-strong);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 140ms var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

.mono {
  font-family: var(--mono);
  font-size: 0.94em;
  letter-spacing: -0.01em;
}

.strong {
  font-weight: 600;
  color: var(--text);
}

.wrap {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.truncate {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.block {
  display: block;
}

.muted {
  color: var(--muted);
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- shell ---------- */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.shell__main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin-left: var(--sidebar-w);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0c0c10 0%, #09090c 100%);
  border-right: 1px solid var(--border);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: var(--topbar-h);
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(145deg, #908aff 0%, #5b52ed 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 10px rgba(91, 82, 237, 0.28);
  color: #fff;
  flex: none;
}

.brand__mark svg {
  width: 18px;
  height: 18px;
}

.brand__name {
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px 20px;
}

.nav-label {
  padding: 14px 10px 6px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.nav-label:first-child {
  padding-top: 4px;
}

.nav-list {
  display: grid;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: background-color 130ms var(--ease), color 130ms var(--ease), border-color 130ms var(--ease);
}

.nav-link .icon {
  width: 15px;
  height: 15px;
  color: var(--faint);
  transition: color 130ms var(--ease);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text-soft);
}

.nav-link:hover .icon {
  color: var(--muted);
}

.nav-link.is-active {
  background: var(--accent-soft);
  border-color: rgba(124, 118, 255, 0.16);
  color: #efefff;
}

.nav-link.is-active .icon {
  color: var(--accent);
}

.sidebar__foot {
  padding: 12px 12px 14px;
  border-top: 1px solid var(--border-soft);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: none;
}

.avatar--sm {
  width: 24px;
  height: 24px;
  font-size: 9.5px;
}

.avatar--lg {
  width: 34px;
  height: 34px;
  font-size: 11.5px;
}

.user-card__text {
  display: grid;
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}

.user-card__text strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card__text span {
  overflow: hidden;
  color: var(--faint);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__close {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.sidebar-backdrop[hidden] {
  display: none;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(12px);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__menu {
  display: none;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11.5px;
  color: var(--faint);
}

.crumbs__root {
  color: var(--faint);
}

.crumbs__sep {
  color: #3a3a44;
}

.crumbs__current {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__time {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topbar__user {
  display: none;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.live-indicator--compact {
  height: 20px;
  padding: 0 7px;
  font-size: 10px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(65, 211, 155, 0.09);
}

.live-dot--muted {
  background: var(--faint);
  box-shadow: none;
}

.live-indicator[data-state="loading"] .live-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(231, 180, 92, 0.09);
  animation: pulse 1.2s ease-in-out infinite;
}

.live-indicator[data-state="error"] .live-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(240, 113, 120, 0.09);
}

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

/* ---------- page ---------- */

.page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 26px clamp(16px, 3vw, 32px) 72px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-head__text {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-title {
  color: var(--text);
  font-size: clamp(22px, 2.1vw, 26px);
  font-weight: 620;
  line-height: 1.16;
  letter-spacing: -0.028em;
}

.page-lede {
  max-width: 72ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text-soft);
}

.back-link .icon {
  width: 13px;
  height: 13px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 120ms var(--ease),
    border-color 120ms var(--ease),
    color 120ms var(--ease),
    transform 80ms var(--ease);
}

.btn .icon {
  width: 14px;
  height: 14px;
}

.btn:hover {
  border-color: #3b3b46;
  background: #1c1c23;
  color: var(--text);
}

.btn:active {
  transform: translateY(0.5px);
}

.btn--primary {
  border-color: #746cff;
  background: var(--accent-strong);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn--primary:hover {
  border-color: #8881ff;
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--text);
}

.btn--danger {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: #ffb3b8;
}

.btn--danger:hover {
  border-color: rgba(240, 113, 120, 0.42);
  background: rgba(240, 113, 120, 0.16);
  color: #ffd0d3;
}

.btn--small {
  height: 27px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
}

.btn--small .icon {
  width: 12px;
  height: 12px;
}

.btn--lg {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  flex: none;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}

.icon-btn .icon {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: auto;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.status-chip .icon {
  width: 13px;
  height: 13px;
}

.status-chip .live-dot {
  width: 5px;
  height: 5px;
}

/* ---------- forms ---------- */

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
}

.field-hint {
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.45;
}

.field-error {
  color: #ff9fa5;
  font-size: 11.5px;
  line-height: 1.45;
}

.input,
.select {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--border-input);
  border-radius: 7px;
  background: var(--surface-input);
  color: var(--text);
  font-size: 12.5px;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.input:hover,
.select:hover {
  border-color: #727280;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 118, 255, 0.14);
}

.input::placeholder {
  color: #7b7b88;
}

.input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(240, 113, 120, 0.1);
}

.input--lg {
  height: 41px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 7px;
}

.input--sm {
  height: 30px;
  font-size: 12px;
}

.input--xs {
  width: 118px;
  height: 27px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11.5px;
}

.input--num {
  width: 82px;
  letter-spacing: 0.06em;
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d8d9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select option {
  background: var(--surface-2);
  color: var(--text);
}

.field--inline {
  min-width: 160px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.queue-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
}

.queue-form__line {
  flex: 1 1 320px;
}

.queue-form .field {
  min-width: 150px;
}

.queue-form .btn {
  margin-bottom: 0;
}

/* ---------- pills / tags ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 520;
  line-height: 1.2;
  white-space: nowrap;
}

.pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  flex: none;
}

.pill--success {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}

.pill--warning {
  border-color: var(--amber-border);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill--danger {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: var(--red);
}

.pill--info {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.pill--muted {
  color: var(--muted);
}

.pill--demo {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

/* ---------- notices / alerts ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.45;
}

.notice .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: none;
}

.notice--success {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: #b9f2d9;
}

.notice--warning {
  border-color: var(--amber-border);
  background: var(--amber-soft);
  color: #f4d9a9;
}

.notice--danger {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: #ffc4c8;
}

.notice--info {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: #c2d5ff;
}

.notice__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: -2px -4px -2px auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  opacity: 0.65;
  flex: none;
}

.notice__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.notice__close .icon {
  width: 13px;
  height: 13px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.alert .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: none;
}

.alert--danger {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: #ffc4c8;
}

/* ---------- layout grids ---------- */

.grid {
  display: grid;
  gap: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 14px;
  align-items: start;
}

.dash-col {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.panel--full {
  margin-top: 14px;
}

.grid--12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.grid--align-start {
  align-items: start;
}

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.stack-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.operator-alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.operator-alerts[hidden] {
  display: none;
}

.operator-alert {
  margin-bottom: 0;
}

.operator-alert__body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.operator-alert__title {
  color: #ffd0d3;
  font-size: 12.5px;
  font-weight: 600;
}

.operator-alert__meta {
  color: #e7aeb1;
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.operator-alert__link {
  width: fit-content;
  margin-top: 2px;
  color: #fff;
  font-size: 11.5px;
  text-decoration: underline;
}

/* ---------- metrics ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  min-width: 0;
  min-height: 108px;
  padding: 14px 15px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 46%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

.metric__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric__label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.metric__glyph {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}

.metric__glyph .icon {
  width: 13px;
  height: 13px;
}

.metric__glyph--green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
}

.metric__glyph--amber {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

.metric__value {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 11px;
  color: var(--text);
  font-size: 29px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.metric__value--text {
  align-items: center;
  min-height: 29px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.metric__unit {
  margin-bottom: 2px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.35;
}

.metrics--compact .metric {
  min-height: 100px;
}

/* ---------- panels ---------- */

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.008);
}

.panel__title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.panel__sub {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

.panel__link {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.panel__link:hover {
  color: var(--accent);
}

.panel__body {
  padding: 15px;
}

.panel__body--flush {
  padding: 0;
}

.panel__footnote {
  padding: 10px 15px 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

.panel--danger {
  border-color: rgba(240, 113, 120, 0.22);
}

.panel--danger .panel__head {
  background: rgba(240, 113, 120, 0.04);
}

.queue-panel {
  margin-bottom: 14px;
}

/* ---------- tables ---------- */

.table-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 2px;
}

.table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.table--sessions {
  min-width: 1060px;
}

.table--jobs {
  min-width: 1120px;
}

.table th {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: #0d0d11;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background-color 100ms var(--ease);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.014);
}

.table .cell-time {
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table .cell-detail {
  max-width: 260px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.table .empty-cell {
  padding: 30px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.skeleton-row td {
  height: 41px;
}

.row-link {
  color: var(--text-soft);
  font-weight: 500;
}

.row-link:hover {
  color: var(--accent);
}

.row-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
}

.stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12px;
}

.country__code {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 18px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* ---------- campaigns ---------- */

.campaign-list {
  display: grid;
}

.campaign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.campaign-row:last-child {
  border-bottom: 0;
}

.campaign-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  flex: none;
}

.campaign-row__main {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.campaign-row__name {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
}

.campaign-row__host {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-row__actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

/* ---------- live feed ---------- */

.feed {
  display: grid;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-top: 1px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.feed-icon .icon {
  width: 12px;
  height: 12px;
}

.feed-icon--success {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}

.feed-icon--info {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.feed-icon--warning {
  border-color: var(--amber-border);
  background: var(--amber-soft);
  color: var(--amber);
}

.feed-icon--danger {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: var(--red);
}

.feed-item__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.feed-item__title {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.feed-item__title strong {
  color: var(--text);
  font-weight: 600;
}

.feed-item__meta {
  overflow: hidden;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-item__link {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.feed-item__link:hover {
  color: var(--accent);
}

.feed-empty {
  padding: 30px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.feed-item--skeleton .feed-item__body {
  gap: 6px;
  padding-top: 2px;
}

/* ---------- gate ---------- */

.gate-list {
  display: grid;
}

.gate-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.gate-item:last-child {
  border-bottom: 0;
}

.gate-item__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.gate-item__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.gate-item__meta {
  color: var(--faint);
  font-size: 10.5px;
}

.gate-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.gate-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

.gate-empty .icon {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
  color: var(--faint);
}

.gate-empty strong {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
}

.gate-empty p {
  max-width: 34ch;
  font-size: 11.5px;
}

.gate-item--skeleton .gate-item__body {
  gap: 6px;
}

/* ---------- skeleton ---------- */

.skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 4px;
  background: #17171d;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.skeleton--text {
  height: 9px;
}

.skeleton--sm {
  height: 7px;
}

.skeleton--value {
  width: 64px;
  height: 27px;
  border-radius: 5px;
}

.skeleton--dot {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  flex: none;
}

.skeleton--pill {
  width: 42px;
  height: 9px;
}

.skeleton--value + [data-value] {
  display: inline;
}

.metric__value [data-value][hidden] {
  display: none;
}

.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }

/* ---------- toolbar / search ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}

.search-field .input {
  padding-left: 31px;
}

.search-field__icon {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field__icon .icon {
  width: 13px;
  height: 13px;
}

.toolbar__count {
  margin-left: auto;
  padding-right: 4px;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- empty state ---------- */

.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
  padding: 44px 20px;
  text-align: center;
}

.empty-state--compact {
  padding: 22px 8px;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--faint);
}

.empty-state__icon .icon {
  width: 17px;
  height: 17px;
}

.empty-state h3 {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.empty-state p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty-state .btn {
  margin-top: 6px;
}

/* ---------- timeline ---------- */

.timeline {
  display: grid;
}

.timeline__item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.timeline__item:last-child {
  border-bottom: 0;
}

.timeline__item::before {
  position: absolute;
  top: 22px;
  bottom: -22px;
  left: 18.5px;
  width: 1px;
  background: var(--border);
  content: "";
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--border-strong);
  flex: none;
}

.timeline__dot--success { background: var(--green); }
.timeline__dot--info { background: var(--blue); }
.timeline__dot--warning { background: var(--amber); }
.timeline__dot--danger { background: var(--red); }

.timeline__body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.timeline__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.timeline__label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
}

.timeline__time {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline__detail {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.timeline > .empty-cell {
  padding: 32px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- credential / detail lists ---------- */

.cred-list {
  display: grid;
}

.cred-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.cred-row:first-child { padding-top: 0; }
.cred-row:last-child { border-bottom: 0; padding-bottom: 0; }

.cred-row dt {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cred-row dd {
  min-width: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.cred-row dd.mono {
  font-family: var(--mono);
}

.detail-list {
  display: grid;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }

.detail-list dt {
  color: var(--faint);
  font-size: 11px;
}

.detail-list dd {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  margin-bottom: 14px;
}

.stat-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}

.stat-list dt {
  color: var(--faint);
  font-size: 11px;
}

.stat-list dd {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stat-list dd span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.summary-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.45;
}

/* ---------- users ---------- */

.user-list {
  display: grid;
}

.user-row {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.user-row:last-child {
  border-bottom: 0;
}

.user-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 11px;
}

.user-row__identity {
  display: grid;
  gap: 1px;
  min-width: 130px;
  flex: 1;
}

.user-row__identity strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row__identity span {
  overflow: hidden;
  color: var(--faint);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row__meta {
  display: grid;
  gap: 1px;
  min-width: 112px;
  color: var(--faint);
  font-size: 10px;
  text-align: right;
}

.user-row__meta time,
.user-row__meta span:last-child {
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.manage {
  margin-left: auto;
}

.manage summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  user-select: none;
}

.manage summary::-webkit-details-marker {
  display: none;
}

.manage__chevron {
  width: 11px;
  height: 11px;
  margin-left: 1px;
  transition: transform 140ms var(--ease);
}

.manage[open] .manage__chevron {
  transform: rotate(180deg);
}

.manage[open] {
  flex: 1 0 100%;
  margin-left: 0;
}

.manage[open] > summary {
  margin-left: auto;
}

.manage__panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.manage__form {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.012);
}

.manage__form .btn {
  justify-self: start;
}

/* ---------- onboarded domains ---------- */

.domain-list {
  display: grid;
}

.domain-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 10px;
  min-width: 0;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.domain-row:last-child {
  border-bottom: 0;
}

.domain-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  flex: none;
}

.domain-row__main {
  display: grid;
  gap: 3px;
  min-width: 150px;
  flex: 1;
}

.domain-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-width: 0;
}

.domain-row__title .row-link {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.45;
}

.domain-row__meta time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dns-result {
  color: var(--muted);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.dns-result--ok {
  color: var(--green);
}

.dns-result--bad {
  color: var(--red);
}

.domain-live-time {
  color: var(--amber);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.domain-live-control .inline-actions {
  flex-wrap: wrap;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--green);
}

.range-row output {
  min-width: 58px;
  color: var(--text-soft);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.domain-live-range {
  margin-top: 16px;
}

.dns-check-form {
  display: inline-flex;
  margin: 0;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.dns-check {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-left: 4px;
}

.dns-check[hidden] {
  display: none;
}

.dns-check-form .btn {
  min-width: 78px;
  gap: 6px;
  white-space: nowrap;
}

.dns-progress {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.dns-progress--error {
  color: var(--red);
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  vertical-align: -1px;
}

.spinner--xs {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

.spinner[hidden],
.dns-progress[hidden] {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.domain-row__actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

.domain-row .manage {
  margin-left: 0;
}

.divider {
  height: 0;
  margin: 16px 0;
  border: 0;
  border-top: 1px solid var(--border-soft);
}

.dns-card {
  display: grid;
  gap: 11px;
}

.dns-card__head {
  display: grid;
  gap: 3px;
}

.dns-card__eyebrow {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dns-card__head strong {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
}

.dns-records {
  display: grid;
  gap: 6px;
}

.dns-record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.015);
}

.dns-record code {
  font-size: 11.5px;
}

.dns-record__arrow {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dns-record .icon-btn {
  margin-left: auto;
}

.setup-steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.setup-step:first-child {
  padding-top: 0;
}

.setup-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.setup-step__num {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  flex: none;
}

.setup-step strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
}

.setup-step p {
  max-width: 78ch;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- settings ---------- */

.setting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}

.setting:first-child { padding-top: 0; }
.setting:last-child { padding-bottom: 0; border-bottom: 0; }

.setting__main {
  min-width: 0;
}

.setting__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.setting__title strong {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
}

.setting__main > p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.setting__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.setting--static .setting__main {
  flex: 1;
}

.danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------- auth ---------- */

.auth {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 20px;
  overflow: hidden;
}

.auth__glow {
  position: absolute;
  top: -300px;
  left: 50%;
  width: 900px;
  height: 620px;
  background: radial-gradient(closest-side, rgba(101, 93, 246, 0.22), transparent 72%);
  transform: translateX(-50%);
  pointer-events: none;
}

.auth__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 25%, transparent 100%);
  pointer-events: none;
}

.auth__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 398px);
}

.brand--auth {
  margin-bottom: 22px;
  padding-left: 2px;
}

.brand--auth .brand__mark {
  width: 28px;
  height: 28px;
}

.auth__card {
  padding: 26px 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 15, 19, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    var(--shadow-2);
  backdrop-filter: blur(14px);
}

.auth__title {
  color: var(--text);
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.auth__lede {
  margin-top: 6px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth__title + .auth-form {
  margin-top: 20px;
}

.auth__card > .alert {
  margin-top: 16px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .btn {
  margin-top: 2px;
}

.auth__demo {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.auth__demo-label {
  margin-bottom: 2px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth__demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.auth__demo-row code {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10.5px;
}

/* ---------- error ---------- */

.error-panel {
  max-width: 560px;
  margin: 8vh auto 0;
  text-align: center;
}

.error-panel__code {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.error-panel .page-title {
  margin-bottom: 8px;
}

.error-panel .page-lede {
  margin-inline: auto;
}

.error-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.error-panel > .btn {
  margin-top: 16px;
}

/* ---------- dialog ---------- */

.dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-2);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.dialog__form {
  padding: 20px;
}

.dialog__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border: 1px solid var(--amber-border);
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
}

.dialog__icon .icon {
  width: 16px;
  height: 16px;
}

.dialog__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dialog__text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.dialog--wide {
  width: min(820px, calc(100vw - 32px));
}

.dialog__card {
  padding: 20px;
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog__desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.cancel-options {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.check-row input {
  margin-top: 2px;
  accent-color: var(--green);
}

.check-row span {
  display: grid;
  gap: 2px;
}

.check-row strong {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
}

.check-row span span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.redirect-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.redirect-preview {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
}

.redirect-preview:has(input:checked) {
  border-color: var(--green-border);
  background: var(--green-soft);
}

.redirect-preview__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
}

.redirect-preview__bar input {
  accent-color: var(--green);
}

.redirect-preview__frame {
  display: block;
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: #fff;
}

.redirect-preview__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.control-stage {
  position: relative;
  height: 420px;
  min-height: 280px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background: #f0f4f9;
}

.control-frame {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  transform-origin: top left;
}

.control-stage__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  color: var(--text-soft);
  font-size: 12px;
  background: rgba(8, 8, 10, 0.78);
  backdrop-filter: blur(2px);
  z-index: 3;
}

.control-stage__empty[hidden] {
  display: none;
}

.control-stage__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 15px;
  color: var(--faint);
  font-size: 10.5px;
}

.control-cursor {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(240, 113, 120, 0.25), 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  will-change: left, top;
  transition: left 70ms linear, top 70ms linear;
}

.control-cursor.is-click {
  animation: cursor-pulse 420ms ease-out;
}

@keyframes cursor-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.9); box-shadow: 0 0 0 7px rgba(240, 113, 120, 0.18); }
  100% { transform: scale(1); }
}

.session-job-controls {
  margin-top: 10px;
}

.session-job-details {
  margin-top: 10px;
}

.icon-btn--danger {
  color: var(--red);
}

.icon-btn--danger:hover {
  border-color: var(--red-border);
  background: var(--red-soft);
}

.control-panel .panel__head {
  border-bottom: 1px solid var(--border-soft);
}

@media (max-width: 760px) {
  .redirect-choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .redirect-preview__frame {
    height: 180px;
  }

  .dialog--wide {
    width: calc(100vw - 24px);
  }
}

/* ---------- toast ---------- */

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #15151a;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: var(--shadow-2);
  animation: toast-in 160ms var(--ease);
  pointer-events: auto;
}

.toast .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--muted);
  flex: none;
}

.toast--success { border-color: var(--green-border); }
.toast--success .icon { color: var(--green); }
.toast--danger { border-color: var(--red-border); }
.toast--danger .icon { color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .col-4 { grid-column: span 5; }
  .col-8 { grid-column: span 7; }
}

@media (max-width: 1080px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--12 > .col-4,
  .grid--12 > .col-5,
  .grid--12 > .col-6,
  .grid--12 > .col-7,
  .grid--12 > .col-8 {
    grid-column: span 12;
  }

  .col-8,
  .col-4 {
    grid-column: span 12;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manage__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .sidebar {
    width: 268px;
    transform: translateX(-100%);
    transition: transform 180ms var(--ease);
    box-shadow: var(--shadow-2);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__close {
    display: inline-flex;
  }

  .shell__main {
    margin-left: 0;
  }

  .topbar__menu {
    display: inline-flex;
  }

  .topbar__user {
    display: inline-flex;
  }

  .topbar {
    padding-inline: 14px;
  }

  .page {
    padding: 20px 16px 60px;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .page-head {
    flex-direction: column;
    gap: 12px;
  }

  .page-actions {
    justify-content: flex-start;
    padding-top: 0;
  }

  .topbar__time {
    display: none;
  }

  .crumbs__root,
  .crumbs__sep {
    display: none;
  }

  .queue-form {
    align-items: stretch;
  }

  .queue-form__line {
    flex-basis: 100%;
  }

  .queue-form .field {
    flex: 1;
  }

  .queue-form .btn {
    flex: 1 0 100%;
  }

  .toolbar {
    align-items: stretch;
  }

  .search-field {
    flex-basis: 100%;
    max-width: none;
  }

  .toolbar__count {
    margin-left: 4px;
  }

  .stat-list {
    grid-template-columns: 1fr;
  }

  .manage__panel {
    grid-template-columns: 1fr;
  }

  .user-row__meta {
    min-width: 0;
    text-align: left;
  }

  .manage {
    margin-left: 0;
  }

  .setting {
    flex-direction: column;
    gap: 9px;
  }

  .setting__actions {
    width: 100%;
  }

  .setting__actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .auth__card {
    padding: 22px;
  }

  .auth__title {
    font-size: 22px;
  }

  .page-title {
    font-size: 22px;
  }

  .campaign-row__actions {
    gap: 0;
  }

  .panel__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .panel__head .pill,
  .panel__head .live-indicator {
    align-self: flex-start;
  }

  .cred-row,
  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cred-row dt {
    padding-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .skeleton::after {
    display: none;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .btn,
  .input,
  .select,
  .panel,
  .metric,
  .pill,
  .domain-mark,
  .dns-record,
  .setup-step__num {
    border-color: ButtonText;
  }

  .live-dot {
    background: Highlight;
  }
}
