@font-face {
  font-family: "Fast4 Manrope";
  src: url("/brand/fonts/fast4-manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Fast4 Space Grotesk";
  src: url("/brand/fonts/fast4-space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080b0e;
  --bg-soft: #0c1014;
  --surface: rgba(17, 23, 29, 0.92);
  --surface-solid: #11171d;
  --surface-raised: #182029;
  --surface-light: #f5f7fa;
  --line: rgba(224, 234, 242, 0.14);
  --line-strong: rgba(224, 234, 242, 0.25);
  --text: #f5f7fa;
  --text-soft: #a8b2bc;
  --text-dark: #080b0e;
  --green: #ff842b;
  --green-bright: #ff9b58;
  --green-deep: #f97316;
  --blue: #79a7ff;
  --amber: #f2c46d;
  --danger: #ff7f87;
  --success: #72e9bd;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.2);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar: 248px;
  --topbar: 92px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: "Fast4 Manrope", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  overflow-x: hidden;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 155, 88, 0.74);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 16px;
  color: var(--text-dark);
  background: var(--green-bright);
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(120px);
  opacity: .12;
}

.ambient--one {
  top: -180px;
  right: 5vw;
  background: var(--green);
}

.ambient--two {
  bottom: -220px;
  left: 18vw;
  background: #ff842b;
  opacity: .08;
}

.svg-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow i {
  width: 18px;
  height: 1px;
  background: currentColor;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms var(--ease),
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0) scale(.985);
}

.button:disabled {
  cursor: wait;
  opacity: .55;
  transform: none;
}

.button--primary {
  color: #080b0e;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(255, 132, 43, .17);
}

.button--primary:hover {
  background: var(--green-bright);
  box-shadow: 0 16px 34px rgba(255, 132, 43, .25);
}

.button--secondary {
  border-color: rgba(255, 155, 88, .26);
  color: var(--green-bright);
  background: rgba(255, 132, 43, .08);
}

.button--secondary:hover {
  border-color: rgba(255, 155, 88, .5);
  background: rgba(255, 132, 43, .13);
}

.button--light {
  color: var(--text-dark);
  background: #f5f7fa;
}

.button--ghost-light {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
}

.button--quiet {
  border-color: var(--line);
  color: var(--text-soft);
  background: rgba(255, 255, 255, .025);
}

.button--wide {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .025);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .055);
}

.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  border: 0;
  color: var(--green-bright);
  background: none;
  font-size: 13px;
  font-weight: 700;
}

.text-button svg {
  width: 16px;
}

.glass-panel {
  border: 1px solid var(--line);
  background: rgba(12, 16, 20, .88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

/* Login */
.login-stage {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.2fr) minmax(400px, .8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 140px);
  padding: clamp(28px, 6vw, 88px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.login-stage__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 23% 44%, rgba(255, 132, 43, .15), transparent 28%),
    linear-gradient(120deg, rgba(255, 132, 43, .06), transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .025) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, .025) 80px);
  mask-image: linear-gradient(to right, black, transparent 84%);
}

.login-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 11%;
  left: 10%;
  width: 380px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 155, 88, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 155, 88, .025),
    0 0 0 140px rgba(255, 155, 88, .015);
}

.login-brand {
  width: min(680px, 100%);
}

.login-brand > img {
  width: 210px;
  height: auto;
  margin-bottom: clamp(52px, 8vh, 92px);
}

.login-brand__copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 760;
  letter-spacing: -.065em;
  line-height: .9;
}

.login-brand__copy p {
  max-width: 590px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.login-flow {
  display: grid;
  max-width: 600px;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 58px;
}

.login-flow div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.login-flow span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.login-flow strong {
  font-size: 13px;
  font-weight: 650;
}

.login-card {
  width: min(460px, 100%);
  justify-self: end;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 155, 88, .7), transparent);
}

.login-card__signal {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 155, 88, .15);
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(255, 132, 43, .11);
}

.status-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.status-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(255, 132, 43, .1);
}

.login-card h2 {
  margin: 26px 0 10px;
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -.04em;
}

.login-card > p {
  margin: 0 0 32px;
  color: var(--text-soft);
  line-height: 1.6;
}

.login-card > small {
  display: block;
  margin-top: 18px;
  color: #74808c;
  font-size: 11px;
  text-align: center;
}

/* Forms */
.field {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}

.field > span:first-child {
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

.field > small {
  color: var(--text-soft);
  font-size: 11px;
}

.field__control {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field__control:focus-within {
  border-color: rgba(255, 155, 88, .55);
  background: rgba(255, 132, 43, .035);
  box-shadow: 0 0 0 4px rgba(255, 132, 43, .08);
}

.field__control svg {
  width: 18px;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea,
.field__control input,
.field__control select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.field select {
  color-scheme: dark;
}

.field textarea {
  min-height: 100px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
  background: rgba(255, 255, 255, .025);
  line-height: 1.55;
}

.field textarea:focus {
  border-color: rgba(255, 155, 88, .55);
  box-shadow: 0 0 0 4px rgba(255, 132, 43, .08);
}

::placeholder {
  color: #74808c;
  opacity: 1;
}

.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.form-message.is-success {
  color: var(--success);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.toggle-row {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  cursor: pointer;
}

.toggle-row span {
  display: grid;
  gap: 5px;
}

.toggle-row strong {
  font-size: 13px;
}

.toggle-row small {
  color: var(--text-soft);
  line-height: 1.4;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-row i {
  width: 48px;
  height: 27px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #202a34;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.toggle-row i::after {
  content: "";
  display: block;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #74808c;
  transition: transform 220ms var(--ease), background-color 180ms ease;
}

.toggle-row input:checked + i {
  border-color: var(--green);
  background: rgba(255, 132, 43, .18);
}

.toggle-row input:checked + i::after {
  background: var(--green-bright);
  transform: translateX(21px);
}

.toggle-row input:focus-visible + i {
  outline: 3px solid rgba(255, 155, 88, .74);
  outline-offset: 3px;
}

/* Shell */
.app-shell {
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 14, .96);
  backdrop-filter: blur(24px);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 160px;
  background: linear-gradient(var(--green), transparent);
  opacity: .7;
}

.sidebar__brand {
  display: grid;
  gap: 2px;
  padding: 0 10px 28px;
  color: var(--text);
  text-decoration: none;
}

.sidebar__brand img {
  width: 154px;
  height: auto;
  margin-left: -7px;
}

.sidebar__brand span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sidebar__nav {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.nav-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #a8b2bc;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.nav-item svg {
  width: 18px;
}

.nav-item span {
  flex: 1;
}

.nav-item strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .05);
  font-size: 10px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .035);
}

.nav-item.is-active {
  border-color: rgba(255, 155, 88, .18);
  color: var(--green-bright);
  background: rgba(255, 132, 43, .085);
}

.nav-item.is-active strong {
  color: #080b0e;
  background: var(--green);
}

.sidebar__system {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: auto 8px 14px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.system-orbit {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 132, 43, .22);
  border-radius: 50%;
}

.system-orbit span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(255, 132, 43, .8);
}

.sidebar__system div:last-child {
  display: grid;
  gap: 4px;
}

.sidebar__system span {
  color: var(--text-soft);
  font-size: 10px;
}

.sidebar__system strong {
  font-size: 11px;
}

.sidebar__logout {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.sidebar__logout:hover {
  color: var(--danger);
}

.app-main {
  min-height: 100dvh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: var(--topbar);
  align-items: center;
  gap: 20px;
  padding: 16px clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 14, .86);
  backdrop-filter: blur(24px);
}

.topbar > div:nth-child(2) {
  display: grid;
  gap: 4px;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.035em;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.topbar__menu {
  display: none;
}

.radar-status {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.radar-status__pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(255, 132, 43, .08), 0 0 18px rgba(255, 132, 43, .45);
}

.radar-status > span:last-child {
  display: grid;
  gap: 2px;
}

.radar-status small {
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.radar-status strong {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

main {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 48px);
}

.app-page {
  display: none;
  animation: page-in 340ms var(--ease) both;
}

.app-page.is-active {
  display: block;
}

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

.hero-panel {
  display: grid;
  min-height: 345px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(255, 155, 88, .2);
  border-radius: var(--radius-lg);
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(115deg, rgba(24, 32, 41, .98), rgba(17, 23, 29, .96) 56%, rgba(10, 18, 25, .98)),
    var(--surface-solid);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to right, black, transparent);
}

.hero-panel::after {
  content: "FAST4";
  position: absolute;
  z-index: -1;
  right: -1vw;
  bottom: -4vw;
  color: rgba(255, 255, 255, .025);
  font-size: clamp(100px, 17vw, 260px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .8;
}

.hero-panel__content h2 {
  margin: 15px 0 20px;
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 740;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-panel__content h2 em {
  color: var(--green-bright);
  font-style: normal;
}

.hero-panel__content p {
  max-width: 690px;
  margin: 0;
  color: #a8b2bc;
  font-size: 16px;
  line-height: 1.7;
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-panel__visual {
  width: min(330px, 28vw);
  aspect-ratio: 1;
  justify-self: center;
  position: relative;
}

.signal-ring,
.signal-core,
.signal-node {
  position: absolute;
  border-radius: 50%;
}

.signal-ring {
  inset: 0;
  border: 1px solid rgba(255, 155, 88, .18);
}

.signal-ring::before,
.signal-ring::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px dashed rgba(255, 155, 88, .16);
  border-radius: 50%;
}

.signal-ring::after {
  inset: 31%;
  border-style: solid;
  border-color: rgba(255, 155, 88, .12);
}

.signal-ring--inner {
  inset: 13%;
  border-style: dashed;
}

.signal-core {
  inset: 35%;
  display: grid;
  place-items: center;
  color: var(--green-bright);
  border: 1px solid rgba(255, 155, 88, .42);
  background: rgba(255, 132, 43, .08);
  box-shadow: 0 0 60px rgba(255, 132, 43, .18);
}

.signal-core svg {
  width: 38px;
  height: 38px;
}

.signal-node {
  width: 9px;
  height: 9px;
  background: var(--green);
  box-shadow: 0 0 15px rgba(255, 132, 43, .8);
}

.signal-node--one { top: 9%; left: 49%; }
.signal-node--two { right: 5%; bottom: 30%; }
.signal-node--three { bottom: 12%; left: 22%; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-card {
  display: grid;
  min-height: 132px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.stat-card__icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(255, 155, 88, .17);
  border-radius: 12px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .06);
}

.stat-card div {
  display: grid;
  gap: 4px;
}

.stat-card small {
  color: var(--text-soft);
  font-size: 11px;
}

.stat-card strong {
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}

.stat-card__trend {
  align-self: end;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .07);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 18px;
  margin-top: 18px;
}

.content-panel {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading > div {
  display: grid;
  gap: 7px;
}

.section-heading h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.03em;
}

.compact-queue,
.activity-list {
  display: grid;
  gap: 10px;
}

.compact-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, .022);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.compact-item:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .04);
}

.compact-item__index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .08);
  font-size: 11px;
  font-weight: 800;
}

.compact-item__copy {
  min-width: 0;
}

.compact-item__copy strong,
.compact-item__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item__copy strong {
  font-size: 13px;
}

.compact-item__copy span {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .025);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--new { color: var(--blue); }
.status-pill--drafted { color: var(--amber); }
.status-pill--prepared { color: var(--green-bright); }
.status-pill--sent { color: var(--success); }
.status-pill--archived { color: var(--text-soft); }

.compact-item__action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .02);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(255, 132, 43, .08);
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

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

.activity-item__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .07);
}

.activity-item__icon svg {
  width: 16px;
}

.activity-item__copy {
  min-width: 0;
}

.activity-item__copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.activity-item__copy span {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 10px;
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

.empty-state > div {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.empty-state svg {
  width: 30px;
  height: 30px;
  color: var(--green);
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

/* Secondary pages */
.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.page-intro > div {
  display: grid;
  gap: 8px;
}

.page-intro h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.055em;
}

.page-intro p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.search-field {
  display: flex;
  width: min(420px, 100%);
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.search-field svg {
  width: 18px;
  color: var(--text-soft);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-pills button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .02);
  font-size: 11px;
  font-weight: 700;
}

.filter-pills button.is-active {
  border-color: rgba(255, 155, 88, .26);
  color: var(--green-bright);
  background: rgba(255, 132, 43, .08);
}

.queue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  display: grid;
  min-height: 310px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms var(--ease), border-color 180ms ease, box-shadow 220ms ease;
}

.video-card:hover {
  border-color: rgba(255, 155, 88, .24);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .28);
  transform: translateY(-3px);
}

.video-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 0;
}

.video-card__identity {
  display: flex;
  min-width: 0;
  gap: 12px;
}

.video-card__avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 155, 88, .2);
  border-radius: 13px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .07);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.video-card__identity div {
  min-width: 0;
}

.video-card__identity strong,
.video-card__identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card__identity strong {
  font-size: 13px;
}

.video-card__identity span {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 10px;
}

.video-card__body {
  padding: 18px 20px;
}

.video-card__body h3 {
  margin: 0 0 9px;
  font-size: 19px;
  letter-spacing: -.025em;
  line-height: 1.28;
}

.video-card__body > p {
  display: -webkit-box;
  min-height: 43px;
  margin: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.meta-chip {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .018);
  font-size: 9px;
  font-weight: 700;
}

.video-card__selected {
  margin-top: 15px;
  padding: 12px 13px;
  border-left: 2px solid var(--green);
  border-radius: 0 9px 9px 0;
  color: #cbd5e1;
  background: rgba(255, 132, 43, .045);
  font-size: 11px;
  line-height: 1.5;
}

.video-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .08);
}

.video-card__actions .button {
  flex: 1;
  min-height: 42px;
  padding: 0 12px;
  font-size: 11px;
}

.video-card__actions .icon-button {
  width: 42px;
  height: 42px;
}

.variant-stack {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.variant-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, .018);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.variant-option:hover,
.variant-option.is-selected {
  border-color: rgba(255, 155, 88, .28);
  background: rgba(255, 132, 43, .05);
}

.variant-option input {
  margin-top: 3px;
  accent-color: var(--green);
}

.variant-option div {
  min-width: 0;
}

.variant-option strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-bright);
  font-size: 10px;
  text-transform: uppercase;
}

.variant-option p {
  margin: 0;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.5;
}

.variant-option button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--text-soft);
  background: transparent;
}

.variant-option button:hover {
  color: var(--green-bright);
  background: rgba(255, 255, 255, .04);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.template-card {
  display: grid;
  min-height: 220px;
  grid-template-rows: auto 1fr auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.template-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-card__tone {
  color: var(--green-bright);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.template-card h3 {
  margin: 13px 0 9px;
  font-size: 17px;
}

.template-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.template-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 10px;
}

.history-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.history-head,
.history-row {
  display: grid;
  grid-template-columns: 170px 190px minmax(220px, 1fr) minmax(200px, 1.1fr);
  gap: 16px;
  align-items: center;
}

.history-head {
  min-height: 52px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  background: rgba(255, 255, 255, .025);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.history-row {
  min-height: 64px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

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

.history-row time,
.history-row span:last-child {
  color: var(--text-soft);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 18px;
}

.settings-form {
  max-width: 780px;
}

.integrations {
  align-self: start;
}

.integration-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.integration-row__logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 155, 88, .2);
  border-radius: 12px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .07);
  font-size: 11px;
  font-weight: 800;
}

.integration-row__logo--tiktok {
  color: #fff;
  border-color: rgba(255, 255, 255, .14);
  background: #101716;
  box-shadow: 3px 0 #25f4ee, -3px 0 #fe2c55;
}

.integration-row div {
  display: grid;
  gap: 4px;
}

.integration-row strong {
  font-size: 13px;
}

.integration-row small {
  color: var(--text-soft);
  line-height: 1.4;
}

.connection-state {
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--amber);
  background: rgba(242, 196, 109, .07);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.connection-state.is-connected {
  color: var(--success);
  background: rgba(114, 233, 189, .07);
}

.safety-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 155, 88, .16);
  border-radius: 12px;
  color: var(--green-bright);
  background: rgba(255, 132, 43, .04);
}

.safety-note div {
  display: grid;
  gap: 5px;
}

.safety-note strong {
  font-size: 12px;
}

.safety-note p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
}

/* Modals and feedback */
.modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 7, 12, .78);
  backdrop-filter: blur(10px);
}

.modal__dialog {
  width: min(720px, 100%);
  max-height: min(880px, calc(100dvh - 36px));
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  position: relative;
  background: #11171d;
  box-shadow: var(--shadow);
  animation: modal-in 260ms var(--ease) both;
}

.modal__dialog--small {
  width: min(560px, 100%);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.modal__header > div {
  display: grid;
  gap: 8px;
}

.modal__header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.toast-region {
  position: fixed;
  z-index: 400;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(390px, calc(100vw - 40px));
  gap: 10px;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #182029;
  box-shadow: var(--shadow);
  animation: toast-in 260ms var(--ease) both;
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(255, 132, 43, .7);
}

.toast.is-error::before {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 127, 135, .6);
}

.toast p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.toast button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--text-soft);
  background: transparent;
}

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

body.modal-open {
  overflow: hidden;
}

body.sidebar-open::after {
  content: "";
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgba(0, 0, 0, .56);
  backdrop-filter: blur(4px);
}

/* Responsive */
@media (max-width: 1180px) {
  :root {
    --sidebar: 220px;
  }

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

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

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

  .history-head,
  .history-row {
    grid-template-columns: 150px 160px minmax(200px, 1fr);
  }

  .history-head span:last-child,
  .history-row span:last-child {
    display: none;
  }
}

@media (max-width: 960px) {
  .login-stage {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .login-brand {
    text-align: center;
    justify-self: center;
  }

  .login-brand > img {
    margin-bottom: 36px;
  }

  .login-brand__copy p {
    margin-inline: auto;
  }

  .login-card {
    justify-self: center;
  }

  .sidebar {
    width: min(290px, calc(100vw - 50px));
    transform: translateX(-105%);
    transition: transform 260ms var(--ease);
  }

  body.sidebar-open .sidebar {
    transform: none;
  }

  .app-main {
    margin-left: 0;
  }

  .topbar__menu {
    display: inline-grid;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel__visual {
    display: none;
  }

  .queue-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-form {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .login-stage {
    align-content: center;
    padding: 24px 16px 32px;
  }

  .login-brand > img {
    width: 170px;
  }

  .login-brand__copy h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .login-brand__copy p {
    font-size: 15px;
  }

  .login-flow {
    margin-top: 32px;
  }

  .login-flow strong {
    font-size: 10px;
  }

  .topbar {
    min-height: 76px;
    padding: 12px 16px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .topbar__actions .radar-status {
    display: none;
  }

  .topbar__actions .button {
    width: 46px;
    padding: 0;
  }

  .topbar__actions .button span {
    display: none;
  }

  main {
    padding: 18px 14px 30px;
  }

  .hero-panel {
    min-height: 360px;
    padding: 28px 22px;
  }

  .hero-panel__content h2 {
    font-size: clamp(37px, 12vw, 54px);
  }

  .hero-panel__content p {
    font-size: 14px;
  }

  .hero-panel__actions {
    display: grid;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 140px;
    grid-template-columns: auto 1fr;
    align-content: center;
    padding: 16px;
  }

  .stat-card__icon {
    width: 40px;
    height: 40px;
  }

  .stat-card__trend {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .content-panel {
    padding: 20px 16px;
  }

  .compact-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .compact-item .status-pill {
    display: none;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-pills {
    flex-wrap: nowrap;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pills button {
    flex: 0 0 auto;
  }

  .video-card__actions {
    flex-wrap: wrap;
  }

  .video-card__actions .button {
    min-width: calc(50% - 8px);
  }

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

  .history-panel {
    overflow-x: auto;
  }

  .history-head,
  .history-row {
    min-width: 720px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal__dialog {
    max-height: 92dvh;
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
  }

  .modal__actions {
    display: grid;
  }
}

@media (max-width: 430px) {
  .login-brand__copy .eyebrow,
  .login-flow {
    display: none;
  }

  .login-card {
    padding: 26px 20px;
  }

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

  .stat-card {
    min-height: 104px;
    grid-template-columns: auto 1fr auto;
  }

  .stat-card__trend {
    grid-column: auto;
    justify-self: auto;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading .text-button {
    font-size: 0;
  }

  .section-heading .text-button svg {
    width: 20px;
  }

  .video-card__actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .video-card__actions .button {
    min-width: 0;
  }

  .video-card__actions .button:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

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

/* SaaS auth parity — ported from the Fast4 Invoice Cloud source in folder 28. */
body.auth-active {
  color: #f5f7fa;
  background: #080b0e;
}

body.auth-active .ambient {
  display: none;
}

.login-stage.auth-page {
  --auth-canvas: #080b0e;
  --auth-canvas-raised: #0c1014;
  --auth-surface: #11171d;
  --auth-surface-strong: #182029;
  --auth-surface-soft: #202a34;
  --auth-ink: #f5f7fa;
  --auth-muted: #a8b2bc;
  --auth-faint: #74808c;
  --auth-line: rgb(224 234 242 / 0.14);
  --auth-line-strong: rgb(224 234 242 / 0.25);
  --auth-accent: #ff842b;
  --auth-accent-hover: #ff9b58;
  --auth-focus: #ffb27c;

  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  gap: 0;
  padding: 0;
  color: var(--auth-ink);
  background: var(--auth-canvas);
  font-family: "Fast4 Manrope", "Segoe UI", system-ui, sans-serif;
  isolation: auto;
  overflow: clip;
}

.login-stage.auth-page::before {
  display: none;
}

.auth-topbar {
  display: grid;
  width: min(calc(100% - 86px), 1339px);
  min-height: 116px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
}

.auth-topbar > :last-child {
  justify-self: end;
}

.auth-return-link,
.auth-host,
.auth-display-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--auth-ink);
  background: var(--auth-canvas-raised);
  border: 1px solid var(--auth-line-strong);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgb(245 247 250 / 0.035);
}

.auth-return-link {
  width: fit-content;
  padding-inline: 15px;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition:
    color 140ms ease-out,
    background-color 140ms ease-out,
    border-color 140ms ease-out;
}

.auth-return-link:hover {
  color: #fff;
  background: var(--auth-surface);
  border-color: var(--auth-focus);
}

.auth-host {
  min-width: 112px;
  padding-inline: 13px;
  color: var(--auth-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.auth-topbar-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.auth-display-button {
  width: 44px;
  flex: 0 0 44px;
  padding: 0;
  cursor: default;
}

.auth-display-button svg {
  width: 18px;
  height: 18px;
  color: var(--auth-muted);
}

.auth-lockup {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.auth-lockup__image {
  display: flex;
  width: 136px;
  height: 36px;
  min-width: 0;
  flex: 0 1 136px;
  align-items: center;
}

.auth-lockup__image img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-lockup__product {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding-left: 12px;
  color: var(--auth-muted);
  border-left: 1px solid rgb(224 234 242 / .24);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-grid {
  display: grid;
  width: min(calc(100% - 86px), 1339px);
  flex: 1;
  grid-template-columns: minmax(0, 760px) minmax(420px, 462px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(54px, 8vw, 118px);
  margin-inline: auto;
  padding: 32px 0 72px;
}

.auth-brand-panel,
.auth-panel {
  min-width: 0;
}

.auth-brand-panel {
  display: flex;
  min-height: 496px;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-content {
  width: min(100%, 720px);
}

.auth-kicker,
.auth-context-label {
  margin: 0 0 20px;
  color: var(--auth-accent-hover);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.auth-brand-content h1,
.auth-header h2 {
  font-family: "Fast4 Space Grotesk", "Fast4 Manrope", "Segoe UI", sans-serif;
}

.auth-brand-content h1 {
  max-width: 720px;
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(48px, 4.8vw, 70px);
  font-weight: 460;
  letter-spacing: -.052em;
  line-height: .99;
  text-wrap: balance;
}

.auth-lead {
  max-width: 590px;
  margin: 26px 0 0;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.65;
}

.auth-trust-list {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 56px;
  border-top: 1px solid var(--auth-line);
}

.auth-trust-item {
  min-width: 0;
  padding: 21px 20px 0;
  border-left: 1px solid var(--auth-line);
}

.auth-trust-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.auth-trust-item strong,
.auth-trust-item > span {
  display: block;
}

.auth-trust-item strong {
  color: var(--auth-ink);
  font-size: 13px;
  font-weight: 730;
}

.auth-trust-item > span {
  margin-top: 12px;
  color: var(--auth-faint);
  font-size: 12px;
  line-height: 1.58;
}

.auth-panel {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.auth-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 32px;
  background: rgb(16 22 28 / .98);
  border: 1px solid var(--auth-line-strong);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .07),
    0 32px 84px rgb(0 7 14 / .38);
}

.auth-wrap::before {
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--auth-accent), transparent);
  content: "";
}

.auth-header {
  margin-bottom: 25px;
}

.auth-header .auth-context-label {
  margin-bottom: 13px;
  color: var(--auth-muted);
}

.auth-header h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(29px, 2.4vw, 32px);
  font-weight: 540;
  letter-spacing: -.04em;
  line-height: 1.03;
  text-wrap: balance;
}

.auth-header > p:last-child {
  margin: 9px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.auth-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.auth-field > span:first-child,
.auth-label-row > span:first-child,
.auth-label-row a {
  color: var(--auth-ink);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.3;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-label-row a {
  color: var(--auth-accent-hover);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition:
    color 140ms ease-out,
    text-decoration-color 140ms ease-out;
}

.auth-label-row a:hover {
  color: var(--auth-focus);
  text-decoration-color: currentColor;
}

.auth-input-wrap {
  display: flex;
  min-height: 46px;
  align-items: center;
  color: var(--auth-faint);
  background: #0b1015;
  border: 1px solid var(--auth-line-strong);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .02);
  transition:
    background-color 140ms ease-out,
    border-color 140ms ease-out,
    box-shadow 140ms ease-out;
}

.auth-input-wrap:hover {
  border-color: rgb(224 234 242 / .34);
}

.auth-input-wrap:focus-within {
  background: #0c1116;
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 4px rgb(255 178 124 / .16);
}

.auth-input-wrap input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  color: var(--auth-ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  line-height: 1.35;
}

.auth-input-wrap input::placeholder {
  color: var(--auth-faint);
  opacity: 1;
}

.auth-input-wrap:has(input:not(:placeholder-shown)) {
  color: #111318;
  background: #e8f0fe;
}

.auth-input-wrap:has(input:not(:placeholder-shown)) input {
  color: #111318;
}

.auth-input-wrap:has(input:not(:placeholder-shown)):focus-within {
  background: #eef4ff;
}

.auth-reveal-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  color: var(--auth-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition:
    color 140ms ease-out,
    background-color 140ms ease-out;
}

.auth-reveal-button:hover {
  color: var(--auth-ink);
  background: rgb(245 247 250 / .055);
}

.auth-reveal-button svg {
  width: 18px;
  height: 18px;
}

.auth-eye-hide {
  display: none;
}

.auth-reveal-button[aria-pressed="true"] .auth-eye-show {
  display: none;
}

.auth-reveal-button[aria-pressed="true"] .auth-eye-hide {
  display: block;
}

.auth-primary-button,
.auth-passkey-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding-inline: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 140ms ease-out,
    color 140ms ease-out,
    background-color 140ms ease-out,
    border-color 140ms ease-out,
    box-shadow 140ms ease-out;
}

.auth-primary-button {
  margin-top: 2px;
  color: #111318;
  background: linear-gradient(180deg, #ff9b58 0%, #ff842b 100%);
  border: 1px solid var(--auth-accent);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .22),
    0 10px 28px rgb(255 132 43 / .15);
}

.auth-primary-button:not(:disabled):hover {
  background: linear-gradient(180deg, #ffad75 0%, #ff9b58 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .28),
    0 13px 32px rgb(255 132 43 / .2);
  transform: translateY(-1px);
}

.auth-primary-button:not(:disabled):active,
.auth-passkey-button:active {
  transform: translateY(1px);
}

.auth-primary-button:disabled {
  cursor: wait;
  opacity: .58;
}

.auth-separator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--auth-faint);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
  height: 1px;
  background: var(--auth-line);
  content: "";
}

.auth-passkey-button {
  color: var(--auth-ink);
  background: var(--auth-canvas-raised);
  border: 1px solid var(--auth-line-strong);
}

.auth-passkey-button:hover {
  background: var(--auth-surface-strong);
  border-color: var(--auth-focus);
  transform: translateY(-1px);
}

.auth-passkey-button svg {
  width: 19px;
  height: 19px;
}

.auth-preview-note {
  margin: -2px 0 0;
  color: var(--auth-faint);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-form-message {
  margin: -3px 0 0;
  padding: 11px 12px;
  color: #ffb4b7;
  background: rgb(255 109 114 / .13);
  border: 1px solid rgb(255 109 114 / .38);
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.auth-form-message:empty {
  display: none;
}

.auth-security-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  margin-top: 23px;
  padding: 13px;
  color: var(--auth-muted);
  background: var(--auth-surface-strong);
  border: 1px solid var(--auth-line);
  border-radius: 8px;
}

.auth-security-note > svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #4ecb88;
}

.auth-security-note p,
.auth-security-note strong,
.auth-security-note span {
  display: block;
  margin: 0;
}

.auth-security-note strong {
  color: var(--auth-ink);
  font-size: 11px;
  font-weight: 720;
}

.auth-security-note span {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.5;
}

.auth-legal {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 3px 0;
  color: var(--auth-faint);
  font-size: 10px;
}

.auth-legal span {
  margin-right: auto;
}

.auth-legal a {
  min-height: 24px;
  color: var(--auth-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition:
    color 140ms ease-out,
    text-decoration-color 140ms ease-out;
}

.auth-legal a:hover {
  color: var(--auth-ink);
  text-decoration-color: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .auth-wrap {
    animation: auth-panel-in 280ms cubic-bezier(.22, 1, .36, 1) both;
  }
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 440px);
    gap: 48px;
  }

  .auth-brand-content h1 {
    font-size: clamp(44px, 5.7vw, 60px);
  }

  .auth-trust-list {
    margin-top: 44px;
  }

  .auth-trust-item {
    padding-inline: 14px;
  }
}

@media (max-width: 860px) {
  .auth-topbar {
    width: calc(100% - 32px);
    min-height: 94px;
    grid-template-columns: auto 1fr;
    gap: 14px;
  }

  .auth-topbar > :last-child {
    width: 136px;
    overflow: hidden;
    justify-self: end;
  }

  .auth-host,
  .auth-display-button,
  .auth-lockup__product {
    display: none;
  }

  .auth-grid {
    display: block;
    width: calc(100% - 32px);
    padding: 4px 0 46px;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-panel {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  .auth-topbar {
    width: calc(100% - 32px);
    min-height: 94px;
  }

  .auth-return-link {
    padding-inline: 11px;
    font-size: 11px;
  }

  .auth-topbar > :last-child {
    width: 134px;
  }

  .auth-grid {
    width: calc(100% - 32px);
  }

  .auth-wrap {
    padding: 25px 24px 27px;
  }

  .auth-input-wrap input {
    font-size: 16px;
  }

  .auth-header {
    margin-bottom: 23px;
  }

  .auth-header h2 {
    font-size: 30px;
  }

  .auth-header > p:last-child {
    font-size: 13px;
  }

  .auth-security-note {
    display: none;
  }

  .auth-legal span {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .auth-form {
    gap: 16px;
  }

  .auth-label-row {
    align-items: flex-end;
    gap: 9px;
  }

  .auth-label-row a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: flex-end;
    font-size: 11px;
    text-align: right;
  }

  .auth-preview-note {
    display: none;
  }
}

@media (max-width: 370px) {
  .auth-topbar > :last-child {
    width: 118px;
  }

  .auth-wrap {
    padding-inline: 20px;
  }
}

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

/* Fast4 SaaS control-plane parity — authenticated Social Copilot only */
body:not(.auth-active) {
  color: #101820;
  background: #f3f4f5;
}

body:not(.auth-active) .ambient {
  display: none;
}

.app-shell {
  min-height: 100dvh;
  color: #101820;
  background: #f3f4f5;
  color-scheme: light;
  --app-line: #d7dde2;
  --app-line-soft: #e5e9ed;
  --app-muted: #52606d;
  --app-faint: #74808c;
  --app-panel: #ffffff;
  --app-panel-soft: #f8f9fa;
  --app-orange: #ff842b;
  --app-orange-dark: #c2410c;
  --app-shadow: 0 10px 30px rgb(16 24 32 / .06);
}

.app-shell .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: 272px;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
  color: #d8e0e7;
  background:
    radial-gradient(circle at 10% 0, rgb(255 132 43 / .13), transparent 21rem),
    linear-gradient(180deg, #0c1014, #080b0e);
  border-right: 1px solid rgb(255 255 255 / .1);
  backdrop-filter: none;
}

.app-shell .sidebar::after {
  display: none;
}

.app-shell .sidebar__brand {
  display: flex;
  min-height: 88px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgb(255 255 255 / .1);
}

.app-shell .sidebar__brand img {
  width: 166px;
  height: auto;
  margin: 0;
}

.sidebar__product {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 18px;
  padding: 11px;
  border: 1px solid #303841;
  border-radius: 9px;
  background: #151b21;
}

.sidebar__product-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #111820;
  background: var(--app-orange);
  border-radius: 7px;
}

.sidebar__product-icon svg {
  width: 19px;
  height: 19px;
}

.sidebar__product > span:last-child,
.sidebar__product small,
.sidebar__product strong {
  display: block;
  min-width: 0;
}

.sidebar__product small {
  color: #8f9aa5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sidebar__product strong {
  overflow: hidden;
  margin-top: 3px;
  color: #f8fafc;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .sidebar__nav {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 2px 17px;
}

.sidebar__label {
  padding: 4px 10px 7px;
  color: #7f8a95;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sidebar__label--system {
  margin-top: 15px;
}

.app-shell .sidebar__nav .nav-item {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  color: #aeb8c2;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 680;
  transition: 160ms ease;
}

.app-shell .sidebar__nav .nav-item:hover {
  color: #fff;
  background: #171e25;
  border-color: #303841;
}

.app-shell .sidebar__nav .nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgb(255 132 43 / .22), rgb(255 132 43 / .06));
  border-color: rgb(255 132 43 / .28);
  box-shadow: inset 3px 0 var(--app-orange);
}

.app-shell .sidebar__nav .nav-item.is-active svg {
  color: #ff984f;
}

.app-shell .sidebar__nav .nav-item strong {
  min-width: 22px;
  height: 20px;
  color: #111820;
  background: var(--app-orange);
  border-radius: 999px;
  font-size: 10px;
}

.app-shell .sidebar__system {
  display: flex;
  margin: auto 18px 8px;
  padding: 14px;
  color: #96a3ae;
  background: rgb(255 255 255 / .035);
  border: 1px solid #252d35;
  border-radius: 9px;
}

.app-shell .sidebar__system strong {
  color: #e6ebef;
}

.app-shell .sidebar__logout {
  min-height: 46px;
  margin: 0 18px 18px;
  padding: 0 14px;
  color: #96a3ae;
  border: 1px solid transparent;
  border-radius: 8px;
}

.app-shell .sidebar__logout:hover {
  color: #fff;
  border-color: #303841;
  background: #171e25;
}

.app-shell .app-main {
  min-height: 100dvh;
  margin-left: 272px;
}

.app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px clamp(20px, 3vw, 42px);
  color: #dfe6ec;
  background: rgb(8 11 14 / .96);
  border-bottom: 1px solid #293039;
  backdrop-filter: blur(18px);
}

.topbar__mobile-brand,
.app-shell .topbar__menu {
  display: none;
}

.topbar__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aeb8c2;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
}

.topbar__live i {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border: 2px solid #dcfce7;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(34 197 94 / .13);
}

.topbar__live strong {
  color: #f8fafc;
}

.app-shell .topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.app-shell .radar-status {
  min-height: 44px;
  padding: 0 13px;
  color: #d9e0e6;
  border: 1px solid #303841;
  border-radius: 8px;
  background: #141a20;
}

.app-shell .radar-status small {
  color: #89949f;
}

.app-shell .topbar .button--primary {
  min-height: 44px;
  border-radius: 8px;
  color: #111820;
  background: var(--app-orange);
  box-shadow: none;
}

.topbar__queue {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #d9e0e6;
  border-color: #303841;
  border-radius: 8px;
  background: #141a20;
}

.topbar__queue:hover {
  color: #fff;
  border-color: var(--app-orange);
  background: #141a20;
}

.topbar__queue strong {
  position: absolute;
  top: -5px;
  right: -6px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  color: #111820;
  background: var(--app-orange);
  border: 2px solid #080b0e;
  border-radius: 999px;
  font-size: 9px;
}

.app-shell #main-content {
  width: min(1460px, calc(100% - clamp(32px, 5vw, 76px)));
  margin: 0 auto;
  padding: 30px 0 84px;
}

.app-shell .page-intro {
  display: flex;
  min-height: 130px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin: 0 0 28px;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--app-line);
}

.app-shell .page-intro .eyebrow {
  margin: 0 0 1px;
  color: var(--app-orange-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
}

.app-shell .page-intro h2 {
  margin: 0;
  color: #101820;
  font-size: clamp(29px, 3.2vw, 42px);
  letter-spacing: -.045em;
  line-height: 1.03;
}

.app-shell .page-intro p {
  display: block;
  max-width: 760px;
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.55;
}

.page-intro__meta {
  display: flex !important;
  width: auto;
  flex: 0 0 auto;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px !important;
}

.page-intro__status {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: #3f4c58;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  font-weight: 750;
}

.page-intro__status i {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(34 197 94 / .12);
}

.app-shell .button {
  border-radius: 8px;
}

.app-shell .button--primary {
  color: #111820;
  background: var(--app-orange);
  box-shadow: 0 8px 22px rgb(255 132 43 / .16);
}

.app-shell .button--primary:hover {
  color: #111820;
  background: #ff984f;
  box-shadow: 0 10px 25px rgb(255 132 43 / .22);
}

.app-shell .button--secondary {
  color: #9a3412;
  border-color: rgb(255 132 43 / .32);
  background: #fff7ed;
}

.app-shell .button--quiet {
  color: #45525e;
  border-color: var(--app-line);
  background: #fff;
}

.app-shell .hero-panel {
  min-height: 330px;
  padding: clamp(30px, 4.5vw, 58px);
  border: 1px solid #303841;
  border-radius: 12px;
  background:
    radial-gradient(circle at 82% 18%, rgb(255 132 43 / .13), transparent 22rem),
    linear-gradient(118deg, #10161c, #080b0e);
  box-shadow: 0 18px 48px rgb(16 24 32 / .15);
}

.app-shell .hero-panel::after {
  color: rgb(255 255 255 / .025);
}

.app-shell .hero-panel__content h2 {
  color: #f8fafc;
}

.app-shell .hero-panel__content p {
  color: #aeb8c2;
}

.app-shell .hero-panel .button--light {
  color: #111820;
  background: var(--app-orange);
}

.app-shell .hero-panel .button--ghost-light {
  color: #e7edf2;
  border-color: #3b454f;
  background: #141a20;
}

.app-shell .stat-grid {
  gap: 14px;
  margin-top: 18px;
}

.app-shell .stat-card,
.app-shell .content-panel,
.app-shell .video-card,
.app-shell .template-card,
.app-shell .history-panel {
  color: #101820;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-panel);
  box-shadow: var(--app-shadow);
  backdrop-filter: none;
}

.app-shell .stat-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
}

.app-shell .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--app-orange);
}

.app-shell .stat-card__icon,
.app-shell .compact-item__index,
.app-shell .activity-item__icon,
.app-shell .video-card__avatar,
.app-shell .integration-row__logo {
  color: #c2410c;
  border-color: #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

.app-shell .stat-card small,
.app-shell .compact-item__copy span,
.app-shell .activity-item__copy span,
.app-shell .empty-state p,
.app-shell .video-card__identity span,
.app-shell .video-card__body > p,
.app-shell .template-card p,
.app-shell .template-card__footer,
.app-shell .integration-row small,
.app-shell .safety-note p,
.app-shell .history-row time,
.app-shell .history-row span:last-child {
  color: var(--app-muted);
}

.app-shell .stat-card__trend {
  color: #9a3412;
  background: #fff7ed;
}

.app-shell .dashboard-grid {
  gap: 18px;
  margin-top: 18px;
}

.app-shell .content-panel {
  padding: clamp(20px, 3vw, 30px);
}

.app-shell .section-heading {
  margin-bottom: 22px;
}

.app-shell .section-heading .eyebrow {
  color: var(--app-orange-dark);
}

.app-shell .section-heading h3 {
  color: #101820;
}

.app-shell .text-button {
  color: var(--app-orange-dark);
}

.app-shell .compact-item {
  border-color: var(--app-line-soft);
  border-radius: 8px;
  background: var(--app-panel-soft);
}

.app-shell .compact-item:hover {
  border-color: #ffbe8f;
  background: #fffaf5;
}

.app-shell .compact-item__action {
  color: #35424e;
  border-color: var(--app-line);
  border-radius: 8px;
  background: #fff;
}

.app-shell .activity-item {
  border-color: var(--app-line-soft);
}

.app-shell .status-pill {
  border-color: var(--app-line);
  color: #596672;
  background: #f8fafc;
}

.app-shell .status-pill--new { color: #2563eb; background: #eff6ff; border-color: #bfdbfe; }
.app-shell .status-pill--drafted { color: #a16207; background: #fefce8; border-color: #fde68a; }
.app-shell .status-pill--prepared { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.app-shell .status-pill--sent { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }

.app-shell .empty-state {
  color: #101820;
  border-color: #cbd3da;
  border-radius: 9px;
  background: #fafbfc;
}

.app-shell .filterbar {
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--app-shadow);
}

.app-shell .search-field {
  border-color: var(--app-line);
  border-radius: 8px;
  background: #f8f9fa;
}

.app-shell .search-field input {
  color: #101820;
}

.app-shell .filter-pills button {
  color: #596672;
  border-color: var(--app-line);
  border-radius: 7px;
  background: #fff;
}

.app-shell .filter-pills button.is-active {
  color: #9a3412;
  border-color: #ffbe8f;
  background: #fff7ed;
}

.app-shell .video-card {
  overflow: hidden;
}

.app-shell .video-card:hover {
  border-color: #ffbe8f;
  box-shadow: 0 16px 38px rgb(16 24 32 / .1);
}

.app-shell .video-card__selected {
  color: #3f4c58;
  border-left-color: var(--app-orange);
  background: #fff7ed;
}

.app-shell .video-card__actions {
  border-color: var(--app-line-soft);
  background: #f8f9fa;
}

.app-shell .video-card__actions .icon-button,
.app-shell .variant-option button {
  color: #52606d;
  border-color: var(--app-line);
  background: #fff;
}

.app-shell .meta-chip {
  color: #596672;
  border-color: var(--app-line);
  background: #f8fafc;
}

.app-shell .variant-option {
  border-color: var(--app-line);
  border-radius: 8px;
  background: #fafbfc;
}

.app-shell .variant-option:hover,
.app-shell .variant-option.is-selected {
  border-color: #ffbe8f;
  background: #fff7ed;
}

.app-shell .variant-option strong {
  color: #c2410c;
}

.app-shell .variant-option p {
  color: #35424e;
}

.app-shell .template-card__tone {
  color: #c2410c;
}

.app-shell .template-card__footer {
  border-color: var(--app-line-soft);
}

.app-shell .history-head {
  color: #596672;
  border-color: var(--app-line);
  background: #f1f3f5;
}

.app-shell .history-row {
  border-color: var(--app-line-soft);
}

.app-shell .history-row:hover {
  background: #fafbfc;
}

.app-shell .field > span:first-child,
.app-shell .toggle-row strong {
  color: #27333e;
}

.app-shell .field > small,
.app-shell .toggle-row small {
  color: var(--app-muted);
}

.app-shell .field__control,
.app-shell .field textarea {
  color: #101820;
  border-color: var(--app-line);
  border-radius: 8px;
  background: #f8f9fa;
}

.app-shell .field__control:focus-within,
.app-shell .field textarea:focus {
  border-color: #fb923c;
  background: #fff;
  box-shadow: 0 0 0 4px rgb(255 132 43 / .1);
}

.app-shell .field input,
.app-shell .field select,
.app-shell .field textarea,
.app-shell .field__control input,
.app-shell .field__control select {
  color: #101820;
}

.app-shell .field select {
  color-scheme: light;
}

.app-shell .toggle-row i {
  border-color: #bbc4cc;
  background: #dfe4e8;
}

.app-shell .toggle-row input:checked + i {
  border-color: var(--app-orange);
  background: #ffdfc7;
}

.app-shell .toggle-row input:checked + i::after {
  background: var(--app-orange);
}

.app-shell .integration-row {
  border-color: var(--app-line-soft);
}

.app-shell .integration-row__logo--tiktok {
  color: #fff;
  border-color: #1f2933;
  background: #101716;
}

.app-shell .integration-row__logo--radar svg {
  width: 19px;
  height: 19px;
}

.app-shell .connection-state {
  color: #a16207;
  border: 0;
  border-radius: 7px;
  background: #fef9c3;
}

.app-shell .connection-state.is-connected {
  color: #15803d;
  background: #dcfce7;
}

.app-shell .connection-state--button {
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
}

.app-shell .connection-state--button:hover {
  color: #9a3412;
  background: #ffedd5;
}

.app-shell .safety-note {
  color: #c2410c;
  border-color: #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

.mobile-nav {
  display: none;
}

body:not(.auth-active) .modal__dialog {
  color: #101820;
  border-color: var(--app-line);
  border-radius: 12px;
  background: #fff;
}

body:not(.auth-active) .modal__header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--app-line-soft);
}

body:not(.auth-active) .modal__header .eyebrow {
  color: var(--app-orange-dark);
}

body:not(.auth-active) .modal__dialog .field > span:first-child,
body:not(.auth-active) .modal__dialog .toggle-row strong {
  color: #27333e;
}

body:not(.auth-active) .modal__dialog .field > small,
body:not(.auth-active) .modal__dialog .toggle-row small {
  color: var(--app-muted);
}

body:not(.auth-active) .modal__dialog .field__control,
body:not(.auth-active) .modal__dialog .field textarea {
  color: #101820;
  border-color: var(--app-line);
  border-radius: 8px;
  background: #f8f9fa;
}

body:not(.auth-active) .modal__dialog input,
body:not(.auth-active) .modal__dialog textarea {
  color: #101820;
}

body:not(.auth-active) .modal__dialog .icon-button {
  color: #45525e;
  border-color: var(--app-line);
  background: #fff;
}

@media (max-width: 1180px) {
  .app-shell .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .app-shell .activity-panel {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .app-shell .sidebar {
    display: none;
  }

  .app-shell .app-main {
    margin-left: 0;
  }

  .app-shell .topbar {
    min-height: 64px;
    padding: 7px 16px;
  }

  .topbar__mobile-brand {
    display: block;
    width: 116px;
    height: 28px;
    margin-right: 8px;
  }

  .topbar__mobile-brand img {
    width: 112px;
    height: auto;
  }

  .app-shell #main-content {
    width: min(calc(100% - 32px), 820px);
    padding-top: 20px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .app-shell .page-intro {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0 23px;
  }

  .app-shell .page-intro h2 {
    font-size: clamp(27px, 8vw, 38px);
  }

  .app-shell .page-intro__meta {
    width: 100%;
    grid-auto-flow: row;
    grid-template-columns: 1fr auto;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid;
    min-height: calc(68px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 4px env(safe-area-inset-bottom);
    background: rgb(8 11 14 / .97);
    border-top: 1px solid #2a3239;
    backdrop-filter: blur(18px);
  }

  .mobile-nav .nav-item {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 0;
    color: #8e9aa5;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 9px;
  }

  .mobile-nav .nav-item > span {
    position: relative;
    display: grid;
    place-items: center;
  }

  .mobile-nav .nav-item small {
    overflow: hidden;
    max-width: 100%;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav .nav-item.is-active {
    color: #ff984f;
    background: rgb(255 132 43 / .08);
  }

  .mobile-nav .nav-item b {
    position: absolute;
    top: -2px;
    right: -5px;
    display: none;
    width: 7px;
    height: 7px;
    background: var(--app-orange);
    border: 1px solid #080b0e;
    border-radius: 50%;
  }

  .mobile-nav .nav-item b.is-visible {
    display: block;
  }
}

@media (max-width: 720px) {
  .app-shell .topbar__live {
    display: none;
  }

  .app-shell .radar-status {
    display: none;
  }

  .app-shell .topbar .button--primary {
    width: 44px;
    padding: 0;
  }

  .app-shell .topbar .button--primary span {
    display: none;
  }

  .app-shell .hero-panel {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

  .app-shell .hero-panel__visual {
    display: none;
  }

  .app-shell .hero-panel__content h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .app-shell .stat-grid,
  .app-shell .queue-grid,
  .app-shell .settings-grid {
    grid-template-columns: 1fr;
  }

  .app-shell .filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell .search-field {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .app-shell #main-content {
    width: calc(100% - 24px);
  }

  .app-shell .page-intro p {
    font-size: 14px;
  }

  .app-shell .page-intro__status {
    display: none;
  }

  .app-shell .page-intro__meta {
    display: block !important;
  }

  .app-shell .page-intro__meta .button {
    width: 100%;
  }

  .app-shell .hero-panel__actions {
    display: grid;
  }

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

/* R6 complete dual-theme contrast layer */
:root {
  --ui-canvas: #0a0f14;
  --ui-raised: #131b23;
  --ui-surface: #0f161d;
  --ui-soft: #18212a;
  --ui-hover: #1d2832;
  --ui-control: #101820;
  --ui-text: #f4f6f8;
  --ui-muted: #b8c1c9;
  --ui-faint: #929ea8;
  --ui-line: #2b3741;
  --ui-line-strong: #3c4a55;
  --ui-chrome: #080c10;
  --ui-chrome-raised: #12191f;
  --ui-chrome-soft: #182129;
  --ui-chrome-hover: #1d2730;
  --ui-shadow: 0 18px 52px rgb(0 0 0 / .25);
  --ui-success: #66d690;
  --ui-success-soft: #10291d;
  --ui-warning: #f7bc63;
  --ui-warning-soft: #302312;
  --ui-danger: #ff8e8e;
  --ui-danger-soft: #35191b;
  --ui-info: #7dcff5;
  --ui-info-soft: #102735;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f5;
  --bg-soft: #ffffff;
  --surface: rgb(255 255 255 / .96);
  --surface-solid: #ffffff;
  --surface-raised: #f8f9fa;
  --line: rgb(16 24 32 / .14);
  --line-strong: rgb(16 24 32 / .26);
  --text: #101820;
  --text-soft: #52606d;
  --text-dark: #101820;
  --danger: #b4232b;
  --success: #147a46;
  --shadow: 0 24px 64px rgb(32 42 51 / .16);
  --shadow-soft: 0 16px 44px rgb(32 42 51 / .1);
  --ui-canvas: #f3f4f5;
  --ui-raised: #ffffff;
  --ui-surface: #f8f9fa;
  --ui-soft: #e9edf0;
  --ui-hover: #e3e8ec;
  --ui-control: #f8fafb;
  --ui-text: #101820;
  --ui-muted: #46535f;
  --ui-faint: #64717c;
  --ui-line: #cfd7dd;
  --ui-line-strong: #b5c0c8;
  --ui-chrome: #f8fafb;
  --ui-chrome-raised: #ffffff;
  --ui-chrome-soft: #edf1f3;
  --ui-chrome-hover: #e7ecef;
  --ui-shadow: 0 16px 42px rgb(11 24 36 / .1);
  --ui-success: #147a46;
  --ui-success-soft: #edf9f2;
  --ui-warning: #8a4b08;
  --ui-warning-soft: #fff7e8;
  --ui-danger: #b4232b;
  --ui-danger-soft: #fff0f1;
  --ui-info: #245f9e;
  --ui-info-soft: #eef6ff;
}

html,
body {
  background-color: var(--ui-canvas);
}

body.auth-active {
  color: var(--ui-text);
  background: var(--ui-canvas);
}

.login-stage.auth-page {
  --auth-canvas: var(--ui-canvas);
  --auth-canvas-raised: var(--ui-chrome-raised);
  --auth-surface: var(--ui-surface);
  --auth-surface-strong: var(--ui-soft);
  --auth-surface-soft: var(--ui-hover);
  --auth-ink: var(--ui-text);
  --auth-muted: var(--ui-muted);
  --auth-faint: var(--ui-faint);
  --auth-line: var(--ui-line);
  --auth-line-strong: var(--ui-line-strong);
  --auth-accent: #ff842b;
  --auth-accent-hover: #d85400;
  --auth-focus: #d85400;
}

:root[data-theme="dark"] .login-stage.auth-page {
  --auth-accent-hover: #ff9b58;
  --auth-focus: #ffb27c;
}

.auth-return-link,
.auth-host,
.auth-display-button,
.auth-passkey-button {
  color: var(--auth-ink);
  background: var(--auth-canvas-raised);
  border-color: var(--auth-line-strong);
}

.auth-display-button {
  cursor: pointer;
}

.auth-display-button:hover {
  color: var(--auth-ink);
  background: var(--auth-surface-strong);
  border-color: var(--auth-focus);
}

.auth-lockup__product {
  color: var(--auth-muted);
  border-color: var(--auth-line);
}

.auth-wrap {
  background: var(--auth-canvas-raised);
  border-color: var(--auth-line-strong);
  box-shadow: inset 0 1px color-mix(in srgb, var(--auth-ink) 6%, transparent), var(--ui-shadow);
}

.auth-input-wrap,
.auth-input-wrap:has(input:not(:placeholder-shown)),
.auth-input-wrap:has(input:not(:placeholder-shown)):focus-within {
  color: var(--auth-faint);
  background: var(--ui-control);
  border-color: var(--auth-line-strong);
}

.auth-input-wrap input,
.auth-input-wrap:has(input:not(:placeholder-shown)) input {
  color: var(--auth-ink);
}

.auth-input-wrap:hover {
  border-color: color-mix(in srgb, var(--auth-ink) 34%, transparent);
}

.auth-input-wrap:focus-within {
  background: var(--ui-control);
  border-color: var(--auth-focus);
}

.auth-security-note {
  color: var(--auth-muted);
  background: var(--auth-surface-strong);
  border-color: var(--auth-line);
}

.auth-security-note > svg {
  color: var(--ui-success);
}

.auth-form-message {
  color: var(--ui-danger);
  background: var(--ui-danger-soft);
  border-color: color-mix(in srgb, var(--ui-danger) 38%, transparent);
}

body:not(.auth-active) {
  color: var(--ui-text);
  background: var(--ui-canvas);
}

.app-shell {
  color: var(--ui-text);
  background: var(--ui-canvas);
  color-scheme: inherit;
  --app-line: var(--ui-line);
  --app-line-soft: color-mix(in srgb, var(--ui-line) 74%, transparent);
  --app-muted: var(--ui-muted);
  --app-faint: var(--ui-faint);
  --app-panel: var(--ui-raised);
  --app-panel-soft: var(--ui-surface);
  --app-orange: #ff842b;
  --app-orange-dark: #b74708;
  --app-shadow: var(--ui-shadow);
}

:root[data-theme="dark"] .app-shell {
  --app-orange-dark: #ff9b58;
}

.app-shell .sidebar {
  color: var(--ui-muted);
  background:
    radial-gradient(circle at 10% 0, rgb(255 132 43 / .12), transparent 21rem),
    linear-gradient(180deg, var(--ui-chrome-raised), var(--ui-chrome));
  border-color: var(--ui-line);
}

.app-shell .sidebar__brand {
  border-color: var(--ui-line);
}

.sidebar__product {
  background: var(--ui-chrome-soft);
  border-color: var(--ui-line);
}

.sidebar__product small,
.sidebar__label,
.app-shell .sidebar__system,
.app-shell .sidebar__logout {
  color: var(--ui-faint);
}

.sidebar__product strong,
.app-shell .sidebar__system strong {
  color: var(--ui-text);
}

.app-shell .sidebar__nav .nav-item {
  color: var(--ui-muted);
}

.app-shell .sidebar__nav .nav-item:hover {
  color: var(--ui-text);
  background: var(--ui-chrome-hover);
  border-color: var(--ui-line);
}

.app-shell .sidebar__nav .nav-item.is-active {
  color: var(--ui-text);
  background:
    linear-gradient(90deg, rgb(255 132 43 / .2), rgb(255 132 43 / .05)),
    var(--ui-chrome-raised);
  border-color: rgb(255 132 43 / .36);
}

.app-shell .sidebar__system {
  background: var(--ui-chrome-soft);
  border-color: var(--ui-line);
}

.app-shell .sidebar__logout:hover {
  color: var(--ui-text);
  background: var(--ui-chrome-hover);
  border-color: var(--ui-line);
}

.app-shell .topbar {
  color: var(--ui-text);
  background: color-mix(in srgb, var(--ui-chrome) 94%, transparent);
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow);
}

.topbar__live,
.app-shell .radar-status small {
  color: var(--ui-muted);
}

.topbar__live strong {
  color: var(--ui-text);
}

.app-shell .radar-status,
.topbar__queue,
.theme-cycle-button {
  color: var(--ui-muted);
  background: var(--ui-chrome-raised);
  border-color: var(--ui-line);
}

.topbar__queue:hover,
.theme-cycle-button:hover {
  color: var(--ui-text);
  background: var(--ui-chrome-hover);
  border-color: var(--app-orange);
}

.topbar__queue strong {
  border-color: var(--ui-chrome);
}

.app-shell .page-intro {
  border-color: var(--ui-line);
}

.app-shell .page-intro h2,
.app-shell .section-heading h3,
.app-shell .stat-card,
.app-shell .content-panel,
.app-shell .video-card,
.app-shell .template-card,
.app-shell .history-panel {
  color: var(--ui-text);
}

.page-intro__status {
  color: var(--ui-muted);
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

.app-shell .button--secondary {
  color: var(--app-orange-dark);
  background: color-mix(in srgb, var(--app-orange) 10%, var(--ui-raised));
  border-color: color-mix(in srgb, var(--app-orange) 38%, var(--ui-line));
}

.app-shell .button--quiet {
  color: var(--ui-muted);
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

.app-shell .hero-panel {
  color: var(--ui-text);
  background:
    radial-gradient(circle at 82% 18%, rgb(255 132 43 / .13), transparent 22rem),
    var(--ui-raised);
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow);
}

.app-shell .hero-panel::after {
  color: color-mix(in srgb, var(--ui-text) 3%, transparent);
}

.app-shell .hero-panel__content h2 {
  color: var(--ui-text);
}

.app-shell .hero-panel__content p {
  color: var(--ui-muted);
}

.app-shell .hero-panel .button--ghost-light {
  color: var(--ui-text);
  background: var(--ui-soft);
  border-color: var(--ui-line);
}

.app-shell .stat-card,
.app-shell .content-panel,
.app-shell .video-card,
.app-shell .template-card,
.app-shell .history-panel,
.app-shell .filterbar {
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

.app-shell .stat-card__icon,
.app-shell .compact-item__index,
.app-shell .activity-item__icon,
.app-shell .video-card__avatar,
.app-shell .integration-row__logo {
  color: var(--app-orange-dark);
  background: color-mix(in srgb, var(--app-orange) 11%, var(--ui-raised));
  border-color: color-mix(in srgb, var(--app-orange) 34%, var(--ui-line));
}

.app-shell .stat-card__trend,
.app-shell .filter-pills button.is-active,
.app-shell .video-card__selected,
.app-shell .variant-option:hover,
.app-shell .variant-option.is-selected {
  color: var(--app-orange-dark);
  background: color-mix(in srgb, var(--app-orange) 10%, var(--ui-raised));
  border-color: color-mix(in srgb, var(--app-orange) 38%, var(--ui-line));
}

.app-shell .compact-item,
.app-shell .empty-state,
.app-shell .search-field,
.app-shell .video-card__actions,
.app-shell .variant-option,
.app-shell .history-head {
  color: var(--ui-text);
  background: var(--ui-surface);
  border-color: var(--ui-line);
}

.app-shell .compact-item:hover,
.app-shell .history-row:hover {
  background: var(--ui-hover);
  border-color: color-mix(in srgb, var(--app-orange) 38%, var(--ui-line));
}

.app-shell .compact-item__action,
.app-shell .video-card__actions .icon-button,
.app-shell .variant-option button,
.app-shell .filter-pills button {
  color: var(--ui-muted);
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

.app-shell .search-field input,
.app-shell .variant-option p,
.app-shell .field > span:first-child,
.app-shell .toggle-row strong {
  color: var(--ui-text);
}

.app-shell .status-pill {
  color: var(--ui-muted);
  background: var(--ui-surface);
  border-color: var(--ui-line);
}

.app-shell .status-pill--new { color: var(--ui-info); background: var(--ui-info-soft); border-color: color-mix(in srgb, var(--ui-info) 34%, transparent); }
.app-shell .status-pill--drafted { color: var(--ui-warning); background: var(--ui-warning-soft); border-color: color-mix(in srgb, var(--ui-warning) 34%, transparent); }
.app-shell .status-pill--prepared { color: var(--app-orange-dark); background: color-mix(in srgb, var(--app-orange) 10%, var(--ui-raised)); border-color: color-mix(in srgb, var(--app-orange) 34%, transparent); }
.app-shell .status-pill--sent { color: var(--ui-success); background: var(--ui-success-soft); border-color: color-mix(in srgb, var(--ui-success) 34%, transparent); }

.app-shell .field__control,
.app-shell .field textarea {
  color: var(--ui-text);
  background: var(--ui-control);
  border-color: var(--ui-line-strong);
}

.app-shell .field__control:focus-within,
.app-shell .field textarea:focus {
  background: var(--ui-control);
  border-color: #ff842b;
}

.app-shell .field input,
.app-shell .field select,
.app-shell .field textarea,
.app-shell .field__control input,
.app-shell .field__control select {
  color: var(--ui-text);
}

.app-shell .field select {
  color-scheme: inherit;
}

.app-shell .toggle-row i {
  background: var(--ui-soft);
  border-color: var(--ui-line-strong);
}

.app-shell .toggle-row input:checked + i {
  background: color-mix(in srgb, var(--app-orange) 24%, var(--ui-soft));
}

.app-shell .integration-row {
  border-color: var(--ui-line);
}

.app-shell .connection-state {
  color: var(--ui-warning);
  background: var(--ui-warning-soft);
}

.app-shell .connection-state.is-connected {
  color: var(--ui-success);
  background: var(--ui-success-soft);
}

.app-shell .safety-note {
  color: var(--app-orange-dark);
  background: color-mix(in srgb, var(--app-orange) 9%, var(--ui-raised));
  border-color: color-mix(in srgb, var(--app-orange) 34%, var(--ui-line));
}

body:not(.auth-active) .modal__dialog {
  color: var(--ui-text);
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

body:not(.auth-active) .modal__header {
  border-color: var(--ui-line);
}

body:not(.auth-active) .modal__dialog .field > span:first-child,
body:not(.auth-active) .modal__dialog .toggle-row strong,
body:not(.auth-active) .modal__dialog input,
body:not(.auth-active) .modal__dialog textarea {
  color: var(--ui-text);
}

body:not(.auth-active) .modal__dialog .field__control,
body:not(.auth-active) .modal__dialog .field textarea {
  color: var(--ui-text);
  background: var(--ui-control);
  border-color: var(--ui-line-strong);
}

body:not(.auth-active) .modal__dialog .icon-button {
  color: var(--ui-muted);
  background: var(--ui-raised);
  border-color: var(--ui-line);
}

.toast {
  color: var(--ui-text);
  background: var(--ui-raised);
  border-color: var(--ui-line-strong);
  box-shadow: var(--ui-shadow);
}

.toast button {
  color: var(--ui-muted);
}

@media (max-width: 980px) {
  .mobile-nav {
    background: color-mix(in srgb, var(--ui-chrome) 96%, transparent);
    border-color: var(--ui-line);
    box-shadow: 0 -16px 38px color-mix(in srgb, var(--ui-chrome) 24%, transparent);
  }

  .mobile-nav .nav-item {
    color: var(--ui-faint);
  }

  .mobile-nav .nav-item.is-active {
    color: var(--app-orange-dark);
    background: color-mix(in srgb, var(--app-orange) 10%, transparent);
  }

  .mobile-nav .nav-item b {
    border-color: var(--ui-chrome);
  }
}
