

:root {
  --bg-0:        #07070d;
  --bg-1:        #0c0c18;
  --bg-2:        #11111e;

  --surface:     rgba(255, 255, 255, 0.04);
  --surface-2:   rgba(255, 255, 255, 0.06);
  --surface-hi:  rgba(255, 255, 255, 0.085);
  --border:      rgba(255, 255, 255, 0.08);
  --border-hi:   rgba(255, 255, 255, 0.14);

  --text:        #ecedf3;
  --text-soft:   #c4c6d0;
  --text-mute:   #8388a0;
  --text-dim:    #5b6076;

  --violet:      #a78bfa;
  --violet-2:    #818cf8;
  --indigo:      #6366f1;
  --emerald:     #34d399;
  --emerald-2:   #10b981;
  --amber:       #fbbf24;
  --rose:        #fb7185;
  --red:         #f87171;
  --red-2:       #ef4444;

  --grad-accent: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
  --grad-text:   linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);

  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow:      0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:   0 24px 48px -12px rgba(0, 0, 0, 0.6);

  --font-sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:   ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
}

@supports (font-variation-settings: normal) {
  :root { --font-sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss03", "ss07";
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 800px at 90% -20%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-2) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.bg-orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -180px; right: -120px;
}
.bg-orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: -120px; left: -100px;
  opacity: 0.18;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(7, 7, 13, 0.55);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand svg { color: var(--violet); }

.topbar .user[data-when="signed-in"] { display: none; gap: 10px; align-items: center; }
.topbar .user[data-when="signed-in"].show { display: flex; }

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
}
.user-avatar {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: white;
  border-radius: 50%;
  background: var(--grad-accent);
  text-transform: uppercase;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.view { animation: fade-in 320ms ease both; }
.hidden { display: none !important; }

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

.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.auth-shell { min-height: calc(100vh - 200px); display: flex; align-items: center; }
.auth-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}
@media (max-width: 880px) {
  .auth-grid { grid-template-columns: 1fr; gap: 32px; }
}

.auth-hero { max-width: 520px; }
.hero-badge {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 22px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 999px;
}
.hero-title {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-soft);
  margin: 0 0 28px;
  max-width: 460px;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.hero-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 180ms ease, background 180ms ease;
}
.hero-points li:hover {
  border-color: var(--border-hi);
  background: var(--surface-2);
}
.hero-points strong { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.hero-points span:not(.dot) { font-size: 13px; color: var(--text-mute); }
.dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; flex: 0 0 9px; box-shadow: 0 0 12px currentColor; }
.dot-violet  { background: var(--violet);  color: var(--violet); }
.dot-emerald { background: var(--emerald); color: var(--emerald); }
.dot-amber   { background: var(--amber);   color: var(--amber); }

.auth-card { max-width: 440px; margin-left: auto; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-soft); }
.field > span {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.field .hint {
  font-style: normal;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  margin-left: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
input::placeholder { color: var(--text-dim); }
input:hover { border-color: var(--border-hi); }
input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--violet-2);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

.otp-input {
  font-family: var(--font-mono);
  text-align: center;
  letter-spacing: 0.5em;
  font-size: 22px;
  padding: 16px;
}

button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 160ms ease, border-color 160ms ease, transform 80ms ease, box-shadow 160ms ease;
}
button:hover { background: var(--surface-2); border-color: var(--border-hi); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25);
}

button.primary {
  position: relative;
  color: white;
  background: var(--grad-accent);
  border-color: transparent;
  box-shadow: 0 6px 18px -6px rgba(129, 140, 248, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
button.primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  box-shadow: 0 10px 24px -6px rgba(129, 140, 248, 0.7);
}

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

button.block { width: 100%; justify-content: center; padding: 12px 16px; }

.muted { color: var(--text-mute); font-size: 13px; }
.muted.center { text-align: center; margin: 18px 0 0; }
a { color: var(--violet); text-decoration: none; font-weight: 500; }
a:hover { color: #c4b5fd; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head .muted { margin: 0; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius-lg);
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: var(--violet);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.empty h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.empty p { margin: 0; color: var(--text-mute); font-size: 14px; }
.empty strong { color: var(--text); font-weight: 600; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead { background: rgba(255, 255, 255, 0.025); }
th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  vertical-align: middle;
}
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: none; }

.cell-primary { color: var(--text); font-weight: 500; }
.cell-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.active   { color: var(--emerald); background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.22); }
.badge.warn     { color: var(--amber);   background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.22); }
.badge.expired  { color: var(--red);     background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.25); }

.row-action {
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--text-mute);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.row-action:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.2); }

.wizard { max-width: 560px; margin: 0 auto; }
.wizard-card { margin-top: 24px; }

.steps {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  margin: 0;
  gap: 12px;
  font-size: 13px;
  color: var(--text-mute);
}
.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}
.steps li:not(:last-child)::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
  margin-left: 4px;
}
.steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  flex: 0 0 26px;
}
.steps li.active { color: var(--text); }
.steps li.active span {
  background: var(--grad-accent);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18);
}
.steps li.done { color: var(--emerald); }
.steps li.done span {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--emerald);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.actions.center { justify-content: center; }

.otp-sent { margin: -6px 0 18px; }

.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 20px 0 24px;
  font-size: 13px;
  color: var(--text-soft);
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: var(--radius);
}
.callout svg { color: var(--violet); flex: 0 0 14px; margin-top: 2px; }

.success-card { text-align: center; }
.success-orb {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--emerald-2), var(--emerald));
  box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: pop 380ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.success-card h2 { margin: 0 0 6px; font-size: 1.4rem; }
.success-card .muted { margin: 0 0 24px; }

.kv-section {
  text-align: left;
  margin: 12px 0 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table.kv {
  font-size: 13px;
  border: none;
  background: transparent;
}
table.kv th, table.kv td {
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
}
table.kv th {
  width: 38%;
  color: var(--text-mute);
  font-weight: 500;
  font-size: 12.5px;
}
table.kv td { color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: rgba(17, 17, 30, 0.85);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  max-width: min(520px, calc(100% - 48px));
  animation: toast-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0);    }
}
.toast::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 12px currentColor;
  flex: 0 0 8px;
}
.toast.error          { color: var(--rose);    border-color: rgba(251, 113, 133, 0.4); }
.toast.error::before  { background: var(--rose); }
.toast.success        { color: var(--emerald); border-color: rgba(52, 211, 153, 0.4); }
.toast.success::before{ background: var(--emerald); }

.view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}
.view-tabs[data-when="admin"] { display: none; }
.view-tabs[data-when="admin"].show { display: flex; }
.view-tabs .tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mute);
  border-radius: 8px;
}
.view-tabs .tab:hover { color: var(--text-soft); background: var(--surface-2); }
.view-tabs .tab.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(167, 139, 250, 0.06));
  border-color: rgba(167, 139, 250, 0.3);
}
.section-head { margin-top: 48px; }
.section-head h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 7, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 200ms ease both;
}
.modal-card {
  width: 100%;
  max-width: 540px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)),
    var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: pop 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.icon-only { padding: 6px; }
.icon-only svg { display: block; }

.form select {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.form select:hover { border-color: var(--border-hi); }
.form select:focus {
  outline: none;
  border-color: var(--violet-2);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}
.form input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.form input[type="number"]:focus {
  outline: none;
  border-color: var(--violet-2);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}
.field.inline-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.field.inline-check input { width: auto; margin: 0; }
.field.inline-check span { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

.categories-rows {
  display: grid;
  gap: 8px;
  margin: 6px 0 8px;
}
.cat-row {
  display: grid;
  
  grid-template-columns: minmax(0, 1fr) 80px 130px auto;
  gap: 8px;
  align-items: center;
}
.cat-row input { padding: 9px 12px; font-size: 13px; }
.cat-row .row-action { padding: 6px 10px; font-size: 12px; }
.cat-row input.cat-pkg { font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace); }
.cat-row.suggested input.cat-pkg {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
}

.input-with-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.input-with-action input { width: 100%; }
.input-with-action button { white-space: nowrap; padding: 0 14px; }

#event-probe-status {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}
#event-probe-status[data-kind="ok"]    { color: rgba(34, 197, 94, 0.95); }
#event-probe-status[data-kind="warn"]  { color: rgba(234, 179, 8, 0.95); }
#event-probe-status[data-kind="error"] { color: rgba(248, 113, 113, 0.95); }

.expand-toggle {
  background: transparent;
  border: 0;
  padding: 4px 6px;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.expand-toggle:hover { background: var(--surface-2); color: var(--text); }
.expand-toggle svg {
  transition: transform 180ms ease;
  transform-origin: center;
}
.expand-toggle.open svg { transform: rotate(90deg); }

.input-billing {
  width: 140px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
  text-align: right;
}
.input-billing.dirty {
  border-color: rgba(234, 179, 8, 0.55);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.12);
}

.cell-remaining {
  font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
  text-align: right;
  white-space: nowrap;
}
.cell-remaining.paid { color: rgba(34, 197, 94, 0.95); }
.cell-remaining.owed { color: rgba(234, 179, 8, 0.95); }
.cell-remaining.over { color: rgba(96, 165, 250, 0.95); }

.user-cookies-row > td {
  background: rgba(255, 255, 255, 0.02);
  padding: 0;
}
.user-cookies-row .sub-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.user-cookies-row .sub-table th,
.user-cookies-row .sub-table td {
  padding: 10px 14px;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}
.user-cookies-row .sub-empty {
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.exp-stack {
  display: grid;
  gap: 4px;
}
.exp-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
}
.exp-label {
  width: 56px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.row-actions {
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}
.row-actions button {
  padding: 4px 10px;
  font-size: 12px;
  background: transparent;
  color: var(--text-mute);
  border: 1px solid transparent;
  border-radius: 6px;
}
.row-actions button:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-hi); }
.row-actions .danger:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.25); }
.row-actions .accent:hover { color: var(--violet); background: rgba(167, 139, 250, 0.08); border-color: rgba(167, 139, 250, 0.25); }

th input[type="checkbox"], td input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #818cf8;
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .container { padding: 36px 18px 64px; }
  .topbar { padding: 12px 18px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .primary { width: 100%; justify-content: center; }
  th, td { padding: 12px; font-size: 13px; }
  th:nth-child(2), td:nth-child(2),
  th:nth-child(3), td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .steps li:not(.active):not(.done) span { width: 22px; height: 22px; flex: 0 0 22px; }
}
