:root {
  --bg-0: #090b10;
  --bg-1: #0f1219;
  --bg-2: #151923;
  --bg-3: #1b202c;
  --border: #272d3a;
  --text: #f1f3f8;
  --text-dim: #9299aa;
  --purple-1: #7657e8;
  --purple-2: #8b72ef;
  --purple-3: #a99bf4;
  --purple-glow: rgba(118, 87, 232, 0.2);
  --danger: #ef6b73;
  --ok: #40c89a;
  --info: #6ba5e7;
  --radius: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 15% 15%, rgba(118, 87, 232, 0.12), transparent 28rem),
    var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
body.layout-app {
  background:
    radial-gradient(circle at 12% 0%, rgba(118, 87, 232, 0.1), transparent 26rem),
    var(--bg-0);
}

a {
  color: var(--purple-3);
  text-decoration: none;
  transition: color .18s ease, opacity .18s ease;
}
a:hover { color: #c4b5fd; }

h1, h2, h3 { margin: 0 0 .35rem; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 1.45rem; line-height: 1.25; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .85rem; color: var(--text-dim); font-size: .88rem; }

.page-shell { max-width: 1080px; margin: 0 auto; padding: 18px 18px 40px; }
.layout-auth .page-shell { max-width: none; padding: 0; min-height: 100vh; }
body.has-sidebar { background: var(--bg-0); }

.site-footer, .split, .wizard-actions {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.wizard-actions {
  justify-content: flex-end;
}
.wizard-actions #prev-step:not([hidden]) {
  margin-inline-end: auto;
}

.public-header {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(9, 11, 16, .96), rgba(9, 11, 16, .88));
  backdrop-filter: blur(12px);
}
.public-nav { display: flex; gap: 16px; align-items: center; font-size: .86rem; }
.public-nav a { color: var(--text); }
.public-nav a:hover { color: var(--purple-3); }

.app-frame {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.app-sidebar {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px 16px;
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .08), transparent 28%),
    var(--bg-1);
  border-right: 1px solid var(--border);
  z-index: 30;
}
.sidebar-brand { margin: 0 4px 18px; }
.sidebar-label {
  margin: 0 10px 8px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  color: #c5cad6;
  background: transparent;
  font: inherit;
  font-size: .88rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sidebar-link i { width: 1.1rem; text-align: center; color: var(--purple-3); }
.sidebar-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.sidebar-link.is-active {
  background: rgba(118, 87, 232, .16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(139, 114, 239, .28);
}
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.sidebar-user, .navbar-user {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.sidebar-user {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid var(--border);
}
.sidebar-user-meta, .navbar-user-meta {
  display: grid; min-width: 0;
}
.sidebar-user-meta strong, .navbar-user-meta strong {
  font-size: .82rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-meta small, .navbar-user-meta small {
  color: var(--text-dim); font-size: .72rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-signout { color: #b7becc; }
.avatar {
  flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--purple-1), #5b21b6);
  color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em;
}
.app-body { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.app-navbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 64px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 18, 25, .92);
  backdrop-filter: blur(14px);
}
.navbar-left, .navbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.navbar-title { min-width: 0; }
.navbar-title .eyebrow { margin: 0; }
.navbar-title strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  appearance: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  font-size: .95rem;
}
.icon-btn.is-copied { color: var(--ok); border-color: rgba(64, 200, 154, .4); }
.sidebar-toggle { display: none; }
.notify { position: relative; }
.notify-toggle {
  position: relative;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.notify-toggle i {
  display: inline-block;
  transform-origin: top center;
  transition: transform .18s ease;
}
.notify-toggle:hover {
  border-color: rgba(139, 114, 239, .45);
  color: var(--purple-3);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .12);
  transform: translateY(-1px);
}
.notify-toggle:active {
  transform: translateY(0) scale(.96);
}
.notify-toggle[aria-expanded="true"] {
  border-color: rgba(139, 114, 239, .55);
  color: var(--purple-3);
  background: rgba(118, 87, 232, .12);
}
.notify-toggle:hover i,
.notify-toggle[aria-expanded="true"] i {
  animation: notify-bell-nudge .7s ease;
}
.notify-toggle.has-unread i {
  animation: notify-bell-ring 2.4s ease-in-out infinite;
}
.notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  animation: notify-badge-pop .28s ease;
}
@keyframes notify-bell-nudge {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(12deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(6deg); }
}
@keyframes notify-bell-ring {
  0%, 88%, 100% { transform: rotate(0deg); }
  90% { transform: rotate(14deg); }
  92% { transform: rotate(-12deg); }
  94% { transform: rotate(10deg); }
  96% { transform: rotate(-6deg); }
  98% { transform: rotate(3deg); }
}
@keyframes notify-badge-pop {
  from { transform: scale(.6); opacity: .4; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .notify-toggle,
  .notify-toggle i,
  .notify-badge {
    animation: none !important;
    transition: none !important;
  }
  .notify-toggle:hover,
  .notify-toggle:active {
    transform: none;
  }
}
.notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(480px, calc(100vh - 6rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #11151d;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
  z-index: 40;
}
.notify-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.notify-head strong { display: block; font-size: .95rem; }
.notify-head-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.notify-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}
.notify-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
}
.notify-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}
.notify-item.is-unread { background: rgba(118, 87, 232, .12); }
.notify-item a {
  color: var(--text);
  font-weight: 600;
  font-size: .84rem;
}
.notify-item p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: .76rem;
}
.notify-item time {
  display: block;
  margin-top: 6px;
  color: #7d8596;
  font-size: .7rem;
}
.notify-actions { display: grid; gap: 4px; align-content: start; }
.notify-actions button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}
.notify-actions button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(3, 5, 9, .55);
}
.app-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  align-self: stretch;
}
.app-main.page-enter { width: 100%; max-width: none; }
.app-content {
  width: 100%;
  max-width: none;
  padding: 20px 22px 8px;
}
.app-footer { margin: 8px 22px 18px; padding-top: 14px; }
.brand, .brand-link {
  display: flex; align-items: center; gap: .65rem;
  color: inherit; text-decoration: none; font-weight: 600;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}
.sidebar-brand .brand-logo {
  height: 34px;
  max-width: 168px;
}
.brand-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--purple-1), #5b21b6);
  color: #fff; font-size: .95rem;
  box-shadow: 0 8px 20px rgba(118, 87, 232, .28);
}
.brand-text { display: flex; align-items: baseline; gap: .28rem; }
.brand-mark { font-weight: 700; font-size: 1.02rem; color: var(--purple-3); }
.brand-name { font-weight: 600; font-size: .98rem; color: var(--text); }
.nav { display: flex; gap: 14px; align-items: center; font-size: .86rem; }
.nav a { color: var(--text); }
.nav a:hover { color: var(--purple-3); }
.sidebar-foot form, .navbar-right form { margin: 0; }

.btn, .button, .nav-cta {
  appearance: none;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  background: var(--purple-1);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  min-height: 36px;
  padding: .48rem .85rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.btn:hover, .button.primary:hover, .nav-cta:hover {
  background: var(--purple-2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(72, 50, 158, .22);
}
.btn:active, .button:active, .nav-cta:active {
  transform: scale(.97) translateY(0);
  box-shadow: none;
}
.btn .ripple, .button .ripple, .nav-cta .ripple {
  position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  pointer-events: none;
  animation: btn-ripple .5s ease-out forwards;
}
.btn-ghost, .button.ghost, .btn-secondary {
  background: #151923;
  border-color: #2b3240;
  color: #b6bdca;
  box-shadow: none;
}
.btn-ghost:hover, .button.ghost:hover, .btn-secondary:hover {
  border-color: #3b4455;
  background: #1b202c;
  color: var(--text);
  box-shadow: none;
}
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: .35rem .65rem; font-size: .78rem; }
.btn-filter {
  min-height: 42px;
  padding: 5px 14px 5px 6px;
  border-radius: 12px;
  border: 1px solid rgba(139, 114, 239, .38);
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .24), rgba(118, 87, 232, .1)),
    linear-gradient(180deg, #171c27, #0c1017);
  color: #ece8ff;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn-filter i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(118, 87, 232, .32);
  color: #fff;
  font-size: .72rem;
}
.btn-filter:hover {
  border-color: #8b72ef;
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .36), rgba(118, 87, 232, .16)),
    linear-gradient(180deg, #1c2230, #10151e);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .16);
}
.queue-actions .btn-ghost {
  min-height: 42px;
  border-radius: 12px;
  padding-inline: 14px;
}
[hidden] { display: none !important; }

.inline-form { margin: 0; }
.link-button {
  background: none; border: 0; color: var(--text); font: inherit; font-size: .86rem;
  cursor: pointer; padding: 0;
}
.link-button:hover { color: var(--purple-3); }
.main { min-height: 58vh; }
.layout-app main.page-enter { animation: page-enter .28s ease both; }

.hero { padding: 12px 0 8px; max-width: 680px; }
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--purple-3);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.lede { font-size: .9rem; max-width: 68ch; }
.hero-actions { margin: 18px 0; flex-wrap: wrap; display: flex; gap: 10px; }

/* ---------- Public landing ---------- */
.public-shell {
  max-width: 1120px;
  padding: 20px 28px 56px;
}
.public-shell .public-header {
  padding: 10px 0 18px;
  margin-bottom: 0;
  border-bottom-color: rgba(39, 45, 58, .7);
}
.public-shell .main {
  min-height: auto;
}
.public-shell .site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .78rem;
}

.landing {
  display: grid;
  gap: 72px;
  padding-top: 48px;
}

.landing-hero {
  position: relative;
  max-width: 720px;
  padding: 28px 0 8px;
  animation: landing-rise .55s ease both;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: -40px -20% auto auto;
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(118, 87, 232, .18), transparent 68%);
  pointer-events: none;
  z-index: -1;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  margin: 0 0 22px;
  line-height: 1;
}
.landing-brand-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
}
.landing-brand-link:hover {
  opacity: .92;
}
.landing-brand-logo {
  display: block;
  height: clamp(48px, 7vw, 62px);
  width: auto;
  max-width: min(280px, 80vw);
  object-fit: contain;
  object-position: left center;
}
.landing-brand-mark {
  font-weight: 700;
  color: var(--purple-3);
}
.landing-brand-name {
  font-weight: 600;
  color: var(--text);
}
.landing-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text);
  max-width: 16ch;
}
.landing-lede {
  margin: 0 0 28px;
  max-width: 42ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.landing-actions .btn,
.landing-actions .btn-ghost {
  min-height: 44px;
  padding: .7rem 1.15rem;
  border-radius: 10px;
  font-size: .9rem;
}

.landing-section {
  display: grid;
  gap: 28px;
  animation: landing-rise .6s ease both;
  animation-delay: .08s;
}
.landing-section-head {
  max-width: 34rem;
  display: grid;
  gap: 8px;
}
.landing-section-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  letter-spacing: -0.03em;
  color: var(--text);
}
.landing-section-head p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.landing-types {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.landing-types li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 118px;
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 26, 36, .55), rgba(15, 18, 25, .35));
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.landing-types li:hover {
  border-color: rgba(139, 114, 239, .42);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(28, 32, 44, .75), rgba(15, 18, 25, .45));
}
.landing-type-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(118, 87, 232, .14);
  color: var(--purple-3);
  font-size: 1rem;
  line-height: 1;
}
.landing-type-icon i {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  text-align: center;
}
.landing-type-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.landing-type-copy strong {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.landing-type-copy p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.landing-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 36rem;
}
.landing-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: start;
  padding: 0 0 28px;
}
.landing-flow li:last-child {
  padding-bottom: 0;
}
.landing-flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 48px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, rgba(139, 114, 239, .55), rgba(139, 114, 239, .12));
}
.landing-flow-num {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--purple-3);
  background:
    linear-gradient(180deg, rgba(28, 32, 44, .95), rgba(15, 18, 25, .98));
  border: 1px solid rgba(139, 114, 239, .35);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  line-height: 1;
}
.landing-flow-body {
  padding-top: 6px;
  display: grid;
  gap: 6px;
}
.landing-flow-body strong {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.landing-flow-body p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.landing-trust {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px;
  border: 1px solid rgba(139, 114, 239, .22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(118, 87, 232, .1), transparent 55%),
    rgba(13, 16, 23, .9);
  animation: landing-rise .65s ease both;
  animation-delay: .14s;
}
.landing-trust-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(118, 87, 232, .16);
  color: var(--purple-3);
  font-size: 1.05rem;
  line-height: 1;
}
.landing-trust-icon i {
  display: block;
  line-height: 1;
}
.landing-trust h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}
.landing-trust p {
  margin: 0;
  max-width: 62ch;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--text-dim);
}

@keyframes landing-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .landing-section,
  .landing-trust { animation: none; }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 20px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(118, 87, 232, .16), transparent 46%),
    linear-gradient(180deg, rgba(22, 26, 36, .98), rgba(13, 16, 23, .99));
  box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 114, 239, .18), transparent 68%);
  pointer-events: none;
}
.page-head-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.page-head-copy { min-width: 0; }
.page-head-icon, .page-head-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(118, 87, 232, .28), rgba(91, 33, 182, .18));
  color: var(--purple-3);
  font-size: 1.05rem;
  border: 1px solid rgba(139, 114, 239, .28);
  box-shadow: 0 8px 18px rgba(72, 50, 158, .16);
}
.page-head-avatar {
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--purple-1), #5b21b6);
}
.page-head h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.page-head .lede { margin: 6px 0 0; }
.page-head-aside {
  position: relative;
  z-index: 1;
  flex: none;
}
.page-head-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(11, 14, 19, .55);
  color: var(--text);
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
}
.page-head-back:hover { border-color: #3b4455; color: var(--purple-3); }
.page-head.case-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 14px 16px;
}
.page-head.case-head .page-head-back { grid-column: 1 / -1; }
.grid-4, .grid-2, .two-col, .three-col, .choice-grid { display: grid; gap: 12px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-2, .two-col { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.three-col { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card, .narrow, .table-wrap, .panel {
  background: linear-gradient(180deg, rgba(22, 26, 36, .98), rgba(15, 18, 25, .99));
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.card.quiet {
  min-height: 128px;
  transition: transform .18s ease, border-color .18s ease;
}
.card.quiet:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 114, 239, .4);
}
.card.notice {
  background: linear-gradient(165deg, rgba(118, 87, 232, .1), transparent 60%), #0d1017;
}
.stat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(118, 87, 232, .16);
  color: var(--purple-3);
  margin-bottom: .55rem;
  font-size: .9rem;
}

.layout-auth .auth-main { position: relative; }
.layout-auth .flash {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(880px, calc(100% - 2rem));
  z-index: 5;
}
.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-shell {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
  animation: page-enter .32s ease both;
}
.auth-aside {
  padding: 2.35rem 2.1rem;
  background:
    linear-gradient(145deg, rgba(118, 87, 232, .1), transparent 60%),
    #0d1017;
  display: grid;
  align-content: start;
  gap: 1.1rem;
}
.auth-aside h2 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.auth-points {
  list-style: none; margin: .35rem 0 0; padding: 0;
  display: grid; gap: .7rem;
}
.auth-points li {
  color: #9aa2b2;
  font-size: .86rem;
  display: flex; align-items: center; gap: .6rem;
}
.auth-points i { color: var(--purple-3); width: 1.05rem; text-align: center; }
.auth-card {
  width: 100%;
  background: #11151d;
  padding: 2.2rem 2.1rem;
}
.auth-card h1 { margin: 0 0 .3rem; font-size: 1.4rem; }
.auth-card .sub { color: var(--text-dim); margin: 0 0 1.2rem; font-size: .84rem; }
.auth-card-solo {
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #11151d;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  animation: page-enter .32s ease both;
}

.form-grid, .stack { display: grid; gap: .85rem; }
.form-row, .stack > label:not(.check) { display: grid; gap: .38rem; font-size: .8rem; }
.form-row label, .stack > label {
  color: #a7afbd;
  font-size: .8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.form-row label i { color: #747e91; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  background: #0b0e13;
  color: #e9ebf1;
  border: 1px solid #29303d;
  border-radius: 8px;
  padding: .58rem .72rem;
  font: inherit;
  font-size: .86rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
select {
  appearance: none;
  padding-right: 2.2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #8b72ef 50%),
    linear-gradient(135deg, #8b72ef 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #363f4f; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #7259d6;
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .12);
}
.cselect {
  position: relative;
  width: 100%;
}
.cselect-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.cselect-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 5px 5px 12px;
  border: 1px solid #2c3342;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent 42%),
    linear-gradient(180deg, #171c27, #0c1017);
  color: #e9ebf1;
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.cselect-btn:hover { border-color: #424b5e; }
.cselect.is-open .cselect-btn,
.cselect-btn:focus {
  outline: none;
  border-color: #7b62e4;
  box-shadow:
    0 0 0 3px rgba(118, 87, 232, .16),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}
.cselect-btn.is-placeholder { color: #7d8596; font-weight: 400; }
.cselect-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cselect-value span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-caret {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: rgba(118, 87, 232, .16);
  color: var(--purple-3);
  font-size: .68rem;
  transition: transform .16s ease, background .16s ease;
}
.cselect.is-open .cselect-caret {
  transform: rotate(180deg);
  background: rgba(118, 87, 232, .28);
}
.cselect-menu {
  position: fixed;
  z-index: 70;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(139, 114, 239, .28);
  border-radius: 14px;
  background: linear-gradient(180deg, #1a2030, #10151e);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03),
    0 22px 50px rgba(0, 0, 0, .55);
  backdrop-filter: blur(16px);
}
.cselect-menu::-webkit-scrollbar { width: 8px; }
.cselect-menu::-webkit-scrollbar-thumb {
  background: #343c4e;
  border-radius: 8px;
}
.cselect-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e4e7ef;
  font: inherit;
  font-size: .84rem;
  text-align: left;
  cursor: pointer;
}
.cselect-option:hover, .cselect-option.is-active {
  background: rgba(118, 87, 232, .14);
}
.cselect-option.is-selected {
  background: linear-gradient(90deg, rgba(118, 87, 232, .3), rgba(118, 87, 232, .12));
  color: #fff;
}
.cselect-option:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.cselect-option-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.cselect-option-main > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cselect-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
  background: #6b7280;
}
.cselect-dot.tone-submitted, .cselect-dot.tone-under_review, .cselect-dot.tone-scoping,
.cselect-dot.tone-testing, .cselect-dot.tone-staging { background: #a99bf4; }
.cselect-dot.tone-approved, .cselect-dot.tone-in_progress, .cselect-dot.tone-active,
.cselect-dot.tone-completed, .cselect-dot.tone-low,
.cselect-dot.tone-fixed, .cselect-dot.tone-closed { background: #40c89a; }
.cselect-dot.tone-rejected, .cselect-dot.tone-cancelled, .cselect-dot.tone-locked,
.cselect-dot.tone-critical, .cselect-dot.tone-production,
.cselect-dot.tone-not_fixed { background: #ef6b73; }
.cselect-dot.tone-unverified, .cselect-dot.tone-mfa_pending, .cselect-dot.tone-medium,
.cselect-dot.tone-high, .cselect-dot.tone-open,
.cselect-dot.tone-partially_fixed, .cselect-dot.tone-partially_closed { background: #d4a843; }
.cselect-dot.tone-development, .cselect-dot.tone-small { background: #6ba5e7; }
.cselect-dot.tone-large { background: #ef6b73; }
.cselect-check { color: var(--purple-3); font-size: .72rem; opacity: 0; }
.cselect-option.is-selected .cselect-check { opacity: 1; }
.hint, .fine, .optional { color: var(--text-dim); font-size: .78rem; }
.errors {
  background: rgba(239, 107, 115, .1);
  color: #f29aa0;
  border: 1px solid rgba(239, 107, 115, .28);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .82rem;
  margin: 0 0 .8rem;
}
.flash {
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .82rem;
}
.flash-success { border-color: rgba(64, 200, 154, .4); color: #9ee9cf; }
.flash-error { border-color: rgba(239, 107, 115, .4); color: #f29aa0; }
.flash-info { border-color: rgba(107, 165, 231, .4); color: #b7d4f5; }

.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); font-weight: 500;
}
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(118, 87, 232, .08); }
.muted { display: block; color: var(--text-dim); font-size: .76rem; margin-top: 2px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input[type="search"] { min-width: 220px; }

.queue-panel {
  width: 100%;
  background: linear-gradient(180deg, rgba(22, 26, 36, .98), rgba(15, 18, 25, .99));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.inline-form.queue-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px auto;
  gap: 12px 16px;
  align-items: end;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 19, .45);
}
.inline-form.queue-toolbar-retests {
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
}
.queue-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #a7afbd;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.queue-input {
  position: relative;
  display: block;
}
.queue-input i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #747e91;
  font-size: .78rem;
  pointer-events: none;
}
.queue-input input[type="search"] {
  min-width: 0;
  width: 100%;
  padding-left: 2.1rem;
}
.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 1px;
}
.queue-table { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.queue-table table { width: 100%; }
.queue-table tr:last-child td { border-bottom: 0; }
.queue-empty { text-align: center; padding: 36px 16px; }
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: rgba(11, 14, 19, .35);
}
.pagination-meta {
  margin: 0;
  color: var(--text-dim);
  font-size: .8rem;
}
.pagination-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-page {
  min-width: 7.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: .8rem;
}
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}
.pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  font-size: .72rem; font-weight: 600;
  border-radius: 999px;
}
.status-submitted, .status-under_review, .status-scoping { color: #b5a8f7; border-color: rgba(118, 87, 232, .28); background: rgba(118, 87, 232, .09); }
.status-active { color: #9ee9cf; border-color: rgba(64, 200, 154, .35); background: rgba(64, 200, 154, .1); }
.status-unverified, .status-mfa_pending { color: #f5d48a; border-color: rgba(212, 168, 67, .35); background: rgba(212, 168, 67, .1); }
.status-locked { color: #f29aa0; border-color: rgba(239, 107, 115, .35); background: rgba(239, 107, 115, .1); }
.status-approved, .status-in_progress { color: var(--purple-3); }
.status-completed { color: #9ee9cf; background: rgba(64, 200, 154, .1); }
.fix-status-open { color: #f0c674; background: rgba(240, 198, 116, .12); border-color: rgba(240, 198, 116, .3); }
.fix-status-partially_closed { color: #9eb6ff; background: rgba(110, 140, 255, .12); border-color: rgba(110, 140, 255, .3); }
.fix-status-closed { color: #9ee9cf; background: rgba(64, 200, 154, .1); border-color: rgba(64, 200, 154, .3); }
.status-rejected, .status-cancelled { color: #f29aa0; }

.meta { display: grid; gap: 10px; }
.meta div { border-top: 1px solid var(--border); padding-top: 8px; }
dt {
  font-size: .7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em;
}
dd { margin: 3px 0 0; color: var(--text); font-size: .86rem; }
.pre { white-space: pre-wrap; }

.choice-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice {
  border: 1px solid var(--border);
  padding: 12px;
  background: #0b0e13;
  cursor: pointer;
  border-radius: 10px;
  font-size: .84rem;
  transition: border-color .16s ease, transform .16s ease;
}
.choice:hover { border-color: #3b4455; }
.choice:has(input:checked) {
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .12);
}
.choice input { width: auto; min-height: 0; }

.file-drops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.file-drop {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  min-height: 178px;
  padding: 22px 18px 18px;
  border: 1px dashed #454e63;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 42%),
    linear-gradient(180deg, #161b26, #0c1017);
  cursor: pointer;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.file-drop:hover,
.file-drop:focus-visible {
  border-color: #7c66e4;
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .14);
}
.file-drop.is-dragover {
  border-style: solid;
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .2);
  transform: translateY(-1px);
}
.file-drop.has-file {
  border-style: solid;
  border-color: #4a3f7a;
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .12), transparent 48%),
    linear-gradient(180deg, #171c2a, #0c1017);
}
.file-drop-native {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
.file-drop-icon,
.file-drop-body,
.file-drop-action {
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.file-drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.28rem;
  border: 1px solid transparent;
}
.file-drop-icon.is-android {
  color: #7ee2a8;
  background: rgba(61, 220, 132, .12);
  border-color: rgba(61, 220, 132, .24);
}
.file-drop-icon.is-ios {
  color: #e8ebf2;
  background: rgba(232, 235, 242, .08);
  border-color: rgba(232, 235, 242, .18);
}
.file-drop-body { min-width: 0; width: 100%; }
.file-drop-title {
  margin: 0;
  color: #f1f3f8;
  font-size: .92rem;
  font-weight: 600;
}
.file-drop-hint,
.file-drop-file {
  margin: .28rem 0 0;
  color: var(--text-dim);
  font-size: .76rem;
}
.file-drop-file {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.file-drop.has-file .file-drop-hint { display: none; }
.file-drop.has-file .file-drop-file { display: flex; }
.file-drop-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: #d7dbe6;
  font-family: var(--mono);
  font-size: .74rem;
}
.file-drop-size { color: #8b93a6; }
.file-drop-ext {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid #3a4254;
  background: #10151d;
  color: #c8cde0;
  font-family: var(--mono);
  font-size: .68rem;
}
.file-drop-action {
  padding: 7px 14px;
  border: 1px solid #3b4356;
  border-radius: 999px;
  background: #141924;
  color: #e4e7ef;
  font-size: .74rem;
  font-weight: 600;
}
.file-drop.has-file .file-drop-action { display: none; }
.file-drop-clear {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: none;
  place-items: center;
  border: 1px solid #353c4d;
  border-radius: 999px;
  background: #121722;
  color: #c5cad6;
  cursor: pointer;
}
.file-drop.has-file .file-drop-clear { display: grid; }
.file-drop-clear:hover {
  border-color: rgba(239, 107, 115, .45);
  color: #f29aa0;
  background: rgba(239, 107, 115, .08);
}
.check { grid-template-columns: auto 1fr; align-items: start; gap: 8px; font-size: .82rem; }
.check input { width: auto; min-height: 0; margin-top: 3px; }

.wizard-nav {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 16px;
  padding: 14px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(118, 87, 232, .12), transparent 42%),
    linear-gradient(180deg, rgba(22, 26, 36, .98), rgba(13, 16, 23, .99));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.wizard-nav li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #7d8596;
  text-align: center;
}
.wizard-nav li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  border-radius: 99px;
  background: #2a3140;
}
.wizard-nav li.is-done:not(:last-child)::after {
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2));
}
.wizard-nav-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #32394a;
  background: #0c1017;
  color: #9aa2b2;
  font-size: .78rem;
  font-weight: 700;
  z-index: 1;
}
.wizard-nav-label {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.wizard-nav li.is-done .wizard-nav-index {
  border-color: rgba(139, 114, 239, .45);
  background: rgba(118, 87, 232, .2);
  color: #fff;
  font-size: 0;
}
.wizard-nav li.is-done .wizard-nav-index::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: .72rem;
  color: #c4b5fd;
}
.wizard-nav li.is-done .wizard-nav-label { color: #c8cde0; }
.wizard-nav li.is-active .wizard-nav-index {
  border-color: transparent;
  background: linear-gradient(145deg, var(--purple-1), #5b21b6);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(118, 87, 232, .18);
}
.wizard-nav li.is-active .wizard-nav-label { color: #fff; }
.wizard {
  position: relative;
}
.wizard-step {
  display: block;
  margin-bottom: 12px;
}
.wizard-step:not(.is-visible) {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
  pointer-events: none;
}
.wizard-step.is-visible {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  visibility: visible;
  pointer-events: auto;
  animation: page-enter .22s ease both;
}
.wizard-step > h2,
.wizard-step > h3,
.wizard-step > .hint,
.wizard-step > .choice-grid,
.wizard-step > .two-col,
.wizard-step > .three-col,
.wizard-step > label,
.wizard-step > div,
.wizard-step label:not(.choice),
.wizard-step .btn,
.wizard-actions {
  margin-top: .85rem;
  margin-bottom: .85rem;
}
.wizard-step label:not(.check):not(.choice) {
  display: grid;
  align-content: start;
  gap: .7rem;
}
.is-hidden { display: none; }
.qr-wrap { text-align: center; margin: 12px 0; }
.qr-wrap img { width: 180px; background: #fff; padding: 8px; border-radius: 10px; }
.mono { font-family: var(--mono); word-break: break-all; font-size: .78rem; }
.site-footer { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 14px; }
.site-footer p { margin: 0; font-size: .75rem; }
.steps { padding-left: 16px; color: var(--text-dim); font-size: .86rem; }
.empty { text-align: center; padding: 32px 16px; }

.page-veil {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg-0);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.page-veil.is-on { opacity: .72; pointer-events: auto; }

.submit-loading-dialog {
  width: min(400px, calc(100vw - 2rem));
  padding: 1.6rem 1.45rem 1.45rem;
  border: 1px solid rgba(118, 87, 232, .35);
  border-radius: 16px;
  background: radial-gradient(circle at 14% 0%, rgba(118, 87, 232, .18), transparent 46%), #11151d;
  color: #e1e5ec;
  box-shadow: 0 36px 110px rgba(0, 0, 0, .7);
  text-align: center;
}
.submit-loading-dialog[open] { animation: dialog-in .22s ease-out; }
.submit-loading-dialog::backdrop {
  background: rgba(3, 5, 9, .82);
  backdrop-filter: blur(7px);
}
.submit-loading-visual { display: grid; place-items: center; margin: 0 auto 1rem; }
.submit-loading-spinner {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border: 1px solid rgba(139, 92, 246, .35);
  border-radius: 16px;
  background: rgba(118, 87, 232, .12);
  color: var(--purple-3);
  font-size: 1.35rem;
}
.submit-loading-dialog .eyebrow { justify-content: center; width: 100%; }
.submit-loading-dialog h2 { margin: 0; font-size: 1.1rem; }
.submit-loading-dialog > p:not(.eyebrow) {
  margin: .55rem 0 0; color: #949daf; font-size: .78rem;
}

.card h2 i { color: var(--purple-3); margin-right: .4rem; font-size: .9rem; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-ok { color: #9ee9cf; border-color: rgba(64, 200, 154, .35); background: rgba(64, 200, 154, .1); }
.pill-warn { color: #f29aa0; border-color: rgba(239, 107, 115, .35); background: rgba(239, 107, 115, .1); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.stat-card {
  background: linear-gradient(180deg, rgba(22, 26, 36, .98), rgba(15, 18, 25, .99));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.stat-card span {
  display: block;
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.stat-card strong { font-size: .92rem; color: var(--text); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr);
  gap: 16px;
  align-items: stretch;
}
.detail-primary, .detail-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
/* Keep Scope / Activity bottoms aligned by letting both cards fill leftover column height. */
.card-scope,
.card-activity {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.card-activity .timeline-scroll {
  /* Keep ~2 activity rows visible; scroll when there are more. */
  flex: 0 1 auto;
  max-height: 7.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
  margin-top: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 87, 232, .55) transparent;
}
.card-activity .timeline-scroll::-webkit-scrollbar { width: 6px; }
.card-activity .timeline-scroll::-webkit-scrollbar-thumb {
  background: rgba(118, 87, 232, .55);
  border-radius: 999px;
}
.card-activity .timeline-scroll::-webkit-scrollbar-track { background: transparent; }

/* Admin assessment detail: lock Vulnerabilities + Activity to matching fixed heights. */
.admin-case-layout .card-findings,
.admin-case-layout .card-activity {
  flex: 0 0 22rem;
  height: 22rem;
  max-height: 22rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
/* Scope + Update status stretch so their bottoms align above the fixed cards. */
.admin-case-layout .card-scope,
.admin-case-layout .card-status {
  flex: 1 1 auto;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-case-layout .card-scope > h2,
.admin-case-layout .card-status > h2,
.admin-case-layout .card-findings .card-head-row,
.admin-case-layout .card-findings > h2,
.admin-case-layout .card-activity > h2 {
  flex: none;
}
.admin-case-layout .card-status .stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}
.admin-case-layout .card-status .admin-notes-label {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.admin-case-layout .card-status .admin-notes-field,
.admin-case-layout .card-status textarea[name="admin_notes"] {
  flex: 1 1 auto;
  min-height: 96px;
  height: auto !important;
  resize: none;
}
.admin-case-layout .card-status .stack > .btn {
  flex: none;
  margin-top: auto;
}
.admin-case-layout .card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 10px;
  padding-inline-end: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 87, 232, .55) transparent;
}
.admin-case-layout .card-scroll::-webkit-scrollbar { width: 6px; }
.admin-case-layout .card-scroll::-webkit-scrollbar-thumb {
  background: rgba(118, 87, 232, .55);
  border-radius: 999px;
}
.admin-case-layout .card-scroll::-webkit-scrollbar-track { background: transparent; }
.admin-case-layout .card-scroll > :first-child { margin-top: 0; }
.admin-case-layout .card-scroll .finding-list,
.admin-case-layout .card-scroll .timeline {
  margin: 0;
}
.person-row { display: flex; align-items: center; gap: 12px; }
.person-row .lede { color: var(--text-dim); }
.case-copy { color: var(--text); font-size: .9rem; margin: 0 0 14px; }
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.kv-grid div { border-top: 1px solid var(--border); padding-top: 8px; }
.kv-grid dt {
  font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em;
}
.kv-grid dd { margin: 3px 0 0; color: var(--text); font-size: .86rem; }
.case-block { margin-top: 16px; }
.case-block h3 { margin-bottom: .45rem; }
.case-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: .78rem;
  background: #0b0e13;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #d7dbe6;
}
.cia-grid { display: grid; gap: 12px; margin-top: 16px; }
.cia-label { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; margin-bottom: 6px; }
.cia-track { height: 6px; border-radius: 999px; background: #1b202c; overflow: hidden; }
.cia-fill { display: block; height: 100%; border-radius: inherit; }
.level-low { color: #9aa2b2; }
.level-medium { color: #b7d4f5; }
.level-high { color: #c4b5fd; }
.level-critical { color: #f29aa0; }
.cia-fill.level-low { background: #6b7280; }
.cia-fill.level-medium { background: #6ba5e7; }
.cia-fill.level-high { background: var(--purple-2); }
.cia-fill.level-critical { background: var(--danger); }
.copy-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.copy-row:first-of-type { border-top: 0; padding-top: 0; }
.field-kicker {
  display: block;
  font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 3px;
}
.copy-row a { word-break: break-all; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0e13;
}
.cred-table.table-wrap {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  border-radius: 10px;
}
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; }
.timeline-dot {
  width: 10px; height: 10px; margin-top: 5px;
  border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 0 4px rgba(118, 87, 232, .16);
}
.timeline strong { display: block; font-size: .84rem; }
.status-rail {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  display: grid;
  gap: 0;
}
.status-rail li {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 0 14px;
  color: #7d8596;
  font-size: .82rem;
  font-weight: 600;
}
.status-rail li:last-child { padding-bottom: 0; }
.status-rail li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: #2a3140;
}
.status-rail-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #3b4455;
  background: #0c1017;
  z-index: 1;
}
.status-rail li.is-done { color: #c8cde0; }
.status-rail li.is-done .status-rail-dot {
  border-color: transparent;
  background: var(--purple-1);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .16);
}
.status-rail li.is-done:not(:last-child)::after { background: var(--purple-1); }
.status-rail li.is-current { color: #fff; }
.status-rail li.is-current .status-rail-dot {
  border-color: transparent;
  background: linear-gradient(145deg, var(--purple-1), #5b21b6);
  box-shadow: 0 0 0 4px rgba(118, 87, 232, .2);
}
.card-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.card-head-row h2 { margin: 0; }
.finding-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.finding-link {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b0e13;
  color: inherit;
}
.finding-link:hover { border-color: rgba(139, 114, 239, .45); color: inherit; }
.finding-link strong { color: var(--text); }
.severity-none { color: #9aa2b2; border-color: #3b4455; background: rgba(255,255,255,.04); }
.severity-low { color: #9ee9cf; border-color: rgba(64, 200, 154, .35); background: rgba(64, 200, 154, .1); }
.severity-medium { color: #f5d48a; border-color: rgba(212, 168, 67, .35); background: rgba(212, 168, 67, .1); }
.severity-high { color: #f6b38a; border-color: rgba(232, 140, 80, .4); background: rgba(232, 140, 80, .12); }
.severity-critical { color: #f29aa0; border-color: rgba(239, 107, 115, .35); background: rgba(239, 107, 115, .1); }

.cvss-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 14, 19, .55);
}
.cvss-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.cvss-panel-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.cvss-panel-head .hint { margin: 0; }
.cvss-result {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.cvss-score-value {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  min-width: 3.2rem;
  text-align: right;
}
.cvss-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cvss-metric {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 18, 25, .65);
  min-width: 0;
}
.cvss-metric legend {
  padding: 0 4px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
}
.cvss-metric-key {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  color: var(--purple-3);
}
.cvss-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.cvss-option {
  position: relative;
  margin: 0 !important;
  display: block;
  cursor: pointer;
}
.cvss-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cvss-option span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0c1017;
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 500;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.cvss-option span code {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--purple-3);
}
.cvss-option:hover span {
  border-color: rgba(139, 114, 239, .4);
  color: var(--text);
}
.cvss-option input:checked + span {
  border-color: rgba(139, 114, 239, .7);
  background: rgba(118, 87, 232, .18);
  color: var(--text);
}
.cvss-option input:focus-visible + span {
  outline: 2px solid rgba(139, 114, 239, .55);
  outline-offset: 2px;
}
.cvss-vector-line {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(139, 114, 239, .28);
  background: rgba(9, 11, 16, .55);
  color: #c5cad6;
  font-size: .75rem;
  word-break: break-all;
}
@media (max-width: 900px) {
  .cvss-panel-head { flex-direction: column; }
  .cvss-metrics { grid-template-columns: 1fr; }
  .cvss-score-value { text-align: left; }
}

.finding-form .card > label,
.finding-form .three-col > label {
  display: grid;
  gap: .7rem;
  margin: .85rem 0;
}
.rich-field { display: grid; gap: 8px; }
.rich-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rich-toolbar button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c1017;
  color: var(--text);
  cursor: pointer;
}
.rich-toolbar button:hover { border-color: #7259d6; color: var(--purple-3); }
.rich-editor {
  min-height: 140px;
  padding: .7rem .8rem;
  border: 1px solid #29303d;
  border-radius: 10px;
  background: #0b0e13;
  color: #e9ebf1;
  line-height: 1.55;
}
.rich-editor:focus { outline: none; border-color: #7259d6; box-shadow: 0 0 0 3px rgba(118, 87, 232, .12); }
.rich-editor ul, .rich-editor ol { margin: .3rem 0 .3rem 1.2rem; }
.poc-rows, .poc-existing { display: grid; gap: 12px; margin: 0 0 12px; padding: 0; list-style: none; }
.poc-row, .poc-existing li {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b0e13;
  align-items: stretch;
}
.poc-row-side {
  display: grid;
  gap: 10px;
  align-content: start;
}
.poc-row-side label {
  display: grid;
  gap: .45rem;
  margin: 0;
}
.poc-row-remove {
  justify-self: start;
}
.poc-drop {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border: 1px dashed #454e63;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 42%),
    linear-gradient(180deg, #161b26, #0c1017);
  cursor: pointer;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.poc-drop:hover,
.poc-drop:focus-visible {
  border-color: #7c66e4;
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .14);
}
.poc-drop.is-dragover {
  border-style: solid;
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .2);
  transform: translateY(-1px);
}
.poc-drop.has-file {
  border-style: solid;
  border-color: #4a3f7a;
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .1), transparent 48%),
    linear-gradient(180deg, #171c2a, #0c1017);
}
.poc-drop-native {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.poc-drop-empty,
.poc-drop-preview {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 168px;
  padding: 18px 16px;
  text-align: center;
  pointer-events: none;
}
.poc-drop-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(118, 87, 232, .16);
  color: var(--purple-3);
  font-size: 1.05rem;
}
.poc-drop-copy {
  display: grid;
  gap: 4px;
}
.poc-drop-copy strong {
  color: var(--text);
  font-size: .9rem;
}
.poc-drop-copy span {
  color: var(--text-dim);
  font-size: .78rem;
}
.poc-drop-preview {
  grid-template-columns: 96px 1fr;
  place-items: center start;
  text-align: left;
  gap: 12px;
}
.poc-drop-preview img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
}
.poc-drop-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.poc-drop-meta strong {
  color: var(--text);
  font-size: .84rem;
  word-break: break-all;
}
.poc-drop-meta span {
  color: var(--text-dim);
  font-size: .76rem;
}
.poc-drop-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(12, 16, 23, .92);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.poc-drop-clear:hover {
  border-color: rgba(239, 107, 115, .45);
  color: #f29aa0;
}
.poc-existing li { grid-template-columns: 160px 1fr; align-items: center; }
.poc-existing img {
  width: 160px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}
.poc-existing p { margin: 6px 0; color: var(--text-dim); font-size: .84rem; }
.finding-delete { margin: 12px 0 0; }
.finding-detail {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.assessment-report { margin: 0 0 18px; }
.assessment-report .lede { margin: 8px 0 18px; max-width: 70ch; }
.assessment-asset,
.assessment-findings { margin-top: 18px; }
.assessment-asset h3,
.assessment-findings h3 { margin: 0 0 10px; }
.assessment-findings .findings-table {
  max-height: min(420px, 55vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 14, 19, .45);
  box-shadow: none;
}
.assessment-findings .findings-table table {
  min-width: 760px;
}
.assessment-findings .findings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #121722;
  border-bottom-color: #2a3344;
}
.assessment-findings .findings-table tbody tr:last-child td {
  border-bottom: 0;
}
.assessment-findings .findings-table td .pill {
  white-space: nowrap;
}
.assessment-findings .findings-table::-webkit-scrollbar { width: 8px; height: 8px; }
.assessment-findings .findings-table::-webkit-scrollbar-thumb {
  background: #3a4458;
  border-radius: 999px;
}
.assessment-findings .findings-table::-webkit-scrollbar-track { background: transparent; }

.admin-case-layout .card-findings .card-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-case-layout .card-findings .findings-table {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(11, 14, 19, .35);
  box-shadow: none;
}
.admin-case-layout .card-findings .findings-table table {
  min-width: 720px;
}
.admin-case-layout .card-findings .findings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #121722;
  border-bottom-color: #2a3344;
}
.admin-case-layout .card-findings .findings-table tbody tr:last-child td {
  border-bottom: 0;
}
.admin-case-layout .card-findings .findings-table td .pill {
  white-space: nowrap;
}
.admin-case-layout .card-findings .findings-table a.pill {
  text-decoration: none;
}
.admin-case-layout .card-findings .findings-table::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-case-layout .card-findings .findings-table::-webkit-scrollbar-thumb {
  background: #3a4458;
  border-radius: 999px;
}
.admin-case-layout .card-findings .findings-table::-webkit-scrollbar-track { background: transparent; }
.rich-readonly {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.55;
}
.rich-readonly p { color: inherit; }
.rich-readonly ul,
.rich-readonly ol { margin: .35rem 0 .35rem 1.2rem; }

.thread-shell {
  display: grid;
  gap: 16px;
}
.thread-stream {
  display: grid;
  gap: 14px;
  padding: 4px 0 8px;
}
.thread-empty {
  text-align: center;
  padding: 36px 16px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #10151d;
}
.thread-empty i { font-size: 1.6rem; color: var(--purple-3); }
.thread-empty h2 { margin: 10px 0 4px; }
.thread-msg {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  max-width: 760px;
}
.thread-msg.is-mine {
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr) 40px;
}
.thread-msg.is-mine .avatar { order: 2; }
.thread-msg.is-mine .thread-bubble {
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .14), transparent 48%),
    #151923;
  border-color: #3b3358;
}
.thread-bubble {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #11151d;
}
.thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.thread-meta time,
.thread-meta .pill { font-size: .72rem; color: var(--text-dim); }
.thread-body {
  color: #e6e9f2;
  font-size: .9rem;
  line-height: 1.55;
}
.thread-body p { margin: 0 0 .6rem; color: inherit; }
.thread-body p:last-child { margin-bottom: 0; }
.thread-body ul, .thread-body ol { margin: .3rem 0 .3rem 1.2rem; }
.thread-files {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.thread-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0e13;
  color: inherit;
}
.thread-file:hover { border-color: #7259d6; }
.thread-file i { color: var(--purple-3); }
.thread-file strong { display: block; font-size: .8rem; }
.thread-file em { font-style: normal; color: var(--text-dim); font-size: .72rem; }
.thread-image {
  display: block;
  margin-bottom: 8px;
}
.thread-image img {
  max-width: min(360px, 100%);
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.thread-composer h2 { margin-bottom: 10px; }
.thread-attach { margin-top: 12px; }
.thread-attach-drop {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px dashed #454e63;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 42%),
    linear-gradient(180deg, #161b26, #0c1017);
  color: var(--text-dim);
  cursor: pointer;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.thread-attach-drop:hover,
.thread-attach-drop:focus-visible {
  border-color: #7c66e4;
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .14);
}
.thread-attach-drop.is-dragover {
  border-style: solid;
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(118, 87, 232, .2);
  transform: translateY(-1px);
}
.thread-attach-drop.has-files {
  border-style: solid;
  border-color: #4a3f7a;
  background:
    linear-gradient(180deg, rgba(118, 87, 232, .1), transparent 48%),
    linear-gradient(180deg, #171c2a, #0c1017);
}
.thread-attach-native {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer;
  z-index: 1;
}
.thread-attach-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(118, 87, 232, .16);
  color: var(--purple-3);
  font-size: 1rem;
}
.thread-attach-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.thread-attach-copy strong {
  color: var(--text);
  font-size: .92rem;
}
.thread-attach-copy span {
  font-size: .78rem;
  line-height: 1.35;
}
.thread-attach-browse {
  position: relative;
  z-index: 2;
  pointer-events: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #3b4455;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
}
.thread-attach-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.thread-attach-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0e13;
  font-size: .8rem;
}
.thread-attach-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.thread-attach-file i {
  color: var(--purple-3);
  width: 1rem;
  text-align: center;
}
.thread-attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.thread-attach-size {
  color: #8b93a6;
  font-style: normal;
  white-space: nowrap;
}
.thread-attach-remove {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 1px solid #3b4455;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.thread-attach-remove:hover {
  border-color: #ef6b73;
  color: #f29aa0;
}
.thread-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.page-head-aside .btn { white-space: nowrap; }
.cselect-dot.tone-none { background: #6b7280; }

@keyframes page-enter {
  from { opacity: .55; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes btn-ripple {
  from { transform: scale(0); opacity: .45; }
  to { transform: scale(2.4); opacity: 0; }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (min-width: 961px) {
  .sidebar-overlay { display: none !important; }
}
@media (max-width: 960px) {
  .app-frame { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; left: 0; top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, .35);
  }
  .app-frame.sidebar-open .app-sidebar { transform: none; }
  .sidebar-toggle { display: grid; }
  .navbar-user-meta { display: none; }
}
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .card-scope,
  .card-activity { flex: 0 1 auto; }
  .admin-case-layout .card-findings,
  .admin-case-layout .card-activity {
    margin-top: 0;
    flex: 0 1 auto;
    height: 20rem;
    max-height: 20rem;
  }
  .admin-case-layout .card-scope,
  .admin-case-layout .card-status {
    flex: 0 1 auto;
    min-height: 0;
  }
  .landing-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing { gap: 56px; padding-top: 36px; }
}
@media (max-width: 720px) {
  .public-header, .page-head, .split { flex-direction: column; align-items: flex-start; }
  .page-head { padding: 16px; }
  .page-head-aside { width: 100%; }
  .app-navbar { padding: 10px 14px; }
  .app-content { padding: 16px 14px 8px; }
  .app-footer { margin: 8px 14px 16px; }
  .queue-toolbar, .inline-form.queue-toolbar { grid-template-columns: 1fr; }
  .stat-grid, .kv-grid { grid-template-columns: 1fr; }
  .poc-row, .poc-existing li { grid-template-columns: 1fr; }
  .public-shell { padding: 16px 16px 40px; }
  .public-nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
  .landing { gap: 44px; padding-top: 28px; }
  .landing-hero h1 { max-width: none; }
  .landing-types { grid-template-columns: 1fr; }
  .landing-types li { min-height: 0; }
  .landing-trust { flex-direction: column; }
  .wizard-nav { padding: 12px 6px 14px; }
  .wizard-nav-label { font-size: .62rem; letter-spacing: .03em; }
  .wizard-nav-index { width: 28px; height: 28px; }
  .wizard-nav li:not(:last-child)::after { top: 14px; left: calc(50% + 16px); width: calc(100% - 32px); }
  .page-head.case-head { grid-template-columns: 1fr; }
  .thread-actions { flex-direction: column; align-items: stretch; }
  .file-drop { min-height: 164px; padding: 18px 14px 16px; }
}
