:root {
  --bg: #EEF7FF;
  --panel: rgba(255, 255, 255, .94);
  --panel-strong: rgba(255, 255, 255, .98);
  --line: rgba(8, 120, 255, .20);
  --line-strong: rgba(53, 215, 255, .38);
  --text: #0B1526;
  --muted: #607089;
  --blue: #0878FF;
  --cyan: #35D7FF;
  --red: #FF1749;
  --green: #20D37B;
  --yellow: #D97706;
  --navy: #06152D;
  --deep-blue: #083B75;
  --violet: #6D5BD0;
  --surface: #FFFFFF;
  --white: #ffffff;
  --shadow: 0 28px 64px rgba(8, 48, 94, .18), 0 0 26px rgba(53, 215, 255, .10);
  --sidebar-ease: cubic-bezier(.16, 1, .3, 1);
  --sidebar-duration: 520ms;
  --sidebar-soft-duration: 380ms;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(53, 215, 255, .22), transparent 30%),
    radial-gradient(circle at 96% 10%, rgba(255, 23, 73, .12), transparent 28%),
    linear-gradient(145deg, #FFFFFF 0%, #ECF8FF 46%, #F6F9FF 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
  transform: none !important;
  filter: none !important;
}

.hidden {
  display: none !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(53, 215, 255, .16), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(8, 120, 255, .18), transparent 32%),
    #030509;
}

.boot-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(320px, 90vw);
  padding: 28px;
  border: 1px solid rgba(53, 215, 255, .22);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(10, 20, 36, .86), rgba(5, 12, 24, .94));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.boot-card img {
  width: min(210px, 72vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(8, 120, 255, .20));
}

.boot-card span {
  color: #DFF8FF;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.boot-card i {
  position: relative;
  width: 160px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
}

.boot-card i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--red));
  animation: bootSlide 900ms ease-in-out infinite alternate;
}

@keyframes bootSlide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(140%);
  }
}

.background-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(8, 120, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 120, 255, .06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), transparent 78%);
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 440px;
  gap: 34px;
  min-height: 100vh;
  padding: 34px;
}

.auth-hero {
  display: grid;
  align-content: space-between;
  min-height: calc(100vh - 68px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98) 0%, rgba(237, 248, 255, .94) 54%, rgba(255, 243, 246, .88) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-lockup,
.sidebar-brand,
.user-menu,
.metric-row,
.chat-agent,
.onboarding-step,
.saved-ad,
.token-box {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 14px;
}

.brand-logo-xl {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 22px 44px rgba(8, 120, 255, .20),
    0 0 0 1px rgba(53, 215, 255, .36),
    inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.brand-lockup strong {
  display: block;
  max-width: 420px;
  font-size: 18px;
  line-height: 1.25;
}

.eyebrow,
.status-chip,
.sidebar-brand span,
.card-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 10px;
  color: #08305E;
  background: rgba(255, 23, 73, .10);
  border: 1px solid rgba(255, 23, 73, .26);
  border-radius: 999px;
}

.hero-copy {
  max-width: 860px;
  padding: 70px 0;
}

.hero-copy h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: .92;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #35506A;
  font-size: 20px;
  line-height: 1.55;
}

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

.proof-grid article,
.auth-panel,
.metric-card,
.action-card,
.agent-list,
.chat-card,
.saved-ad,
.pricing-card,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(237, 248, 255, .84));
  box-shadow:
    0 18px 42px rgba(8, 48, 94, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 0 -16px 30px rgba(8, 120, 255, .05);
}

.proof-grid article {
  min-height: 136px;
  padding: 16px;
}

.proof-grid span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.proof-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.proof-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-panel {
  align-self: center;
  padding: 22px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(22px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab,
.ghost-button,
.secondary-button {
  min-height: 42px;
  color: #08305E;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(235, 248, 255, .88));
  border: 1px solid var(--line);
  border-radius: 14px;
}

.auth-tab.active {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--deep-blue));
  border-color: rgba(53, 215, 255, .8);
}

.auth-form h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.auth-form label,
.field-block label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #0B1526;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input,
.field-block input,
.field-block select,
.library-toolbar input,
.library-toolbar select,
.chat-composer textarea {
  width: 100%;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid rgba(8, 120, 255, .22);
  border-radius: 14px;
  outline: none;
}

.auth-form input,
.field-block input,
.field-block select,
.library-toolbar input,
.library-toolbar select {
  min-height: 46px;
  padding: 0 13px;
}

.auth-form input:focus,
.field-block input:focus,
.field-block select:focus,
.library-toolbar input:focus,
.library-toolbar select:focus,
.chat-composer textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(53, 215, 255, .18);
}

.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: #FFFFFF;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(145deg, #FF315D 0%, #D90636 47%, #750719 100%);
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 15px;
  box-shadow:
    0 15px 28px rgba(255, 23, 73, .30),
    inset 0 1px 0 rgba(255, 255, 255, .44),
    inset 0 -12px 22px rgba(79, 0, 14, .28);
}

.danger-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), #ff7891);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--text);
  text-decoration: none;
}

.primary-button,
.secondary-button,
.danger-button,
.auth-tab,
.ghost-button,
.compact-button,
.step-action,
.profile-button,
.theme-toggle,
.mining-choice-card,
.agent-preview-card,
.chat-agent,
.saved-ad,
.workflow-step,
.signal-row,
.command-stat,
.metric-row,
.onboarding-step,
.library-card,
.token-box,
.pricing-card,
.settings-card {
  transition:
    transform 180ms cubic-bezier(.22, 1, .36, 1),
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:not(:disabled):hover,
  .secondary-button:not(:disabled):hover,
  .danger-button:not(:disabled):hover,
  .auth-tab:hover,
  .ghost-button:hover,
  .compact-button:hover,
  .step-action:hover,
  .profile-button:hover,
  .theme-toggle:hover {
    transform: translateY(-1px) scale(1.01);
    filter: saturate(1.08);
  }

  .secondary-button:not(:disabled):hover,
  .ghost-button:hover,
  .compact-button:hover,
  .step-action:hover {
    color: var(--blue);
    border-color: rgba(8, 120, 255, .34);
    box-shadow: 0 12px 24px rgba(8, 120, 255, .12);
  }

  .nav-item:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .24);
    transform: translateX(2px);
  }

  .nav-item:hover .nav-icon {
    color: #FFFFFF;
    filter: drop-shadow(0 0 12px rgba(53, 215, 255, .44));
    transform: scale(1.08);
  }

  .nav-item:hover .nav-label {
    color: #FFFFFF;
  }

  .mining-choice-card:hover,
  .agent-preview-card:hover,
  .chat-agent:hover,
  .saved-ad:hover,
  .workflow-step:hover,
  .signal-row:hover,
  .command-stat:hover,
  .metric-row:hover,
  .onboarding-step:hover,
  .library-card:hover,
  .token-box:hover,
  .pricing-card:hover,
  .settings-card:hover {
    border-color: rgba(8, 120, 255, .34);
    box-shadow:
      0 20px 44px rgba(8, 48, 94, .14),
      0 0 22px rgba(53, 215, 255, .12),
      inset 0 1px 0 rgba(255, 255, 255, .92);
    transform: translateY(-2px) scale(1.01);
  }

  .agent-preview-card:hover h5,
  .chat-agent:hover strong,
  .saved-ad:hover h4,
  .workflow-step:hover strong,
  .signal-row:hover strong,
  .mining-choice-card:hover strong {
    color: var(--blue);
  }
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--yellow);
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--sidebar-duration) var(--sidebar-ease);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100vh;
  padding: 18px;
  color: #FFFFFF;
  background: linear-gradient(145deg, #06152D 0%, #083B75 42%, #0878FF 78%, #35D7FF 120%);
  border-right: 1px solid rgba(53, 215, 255, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -18px 34px rgba(0, 0, 0, .14),
    18px 0 44px rgba(8, 48, 94, .16);
  backdrop-filter: blur(22px);
  overflow: visible;
  transition:
    width var(--sidebar-duration) var(--sidebar-ease),
    box-shadow var(--sidebar-soft-duration) ease,
    border-color var(--sidebar-soft-duration) ease;
}

.sidebar-brand {
  position: relative;
  min-height: 68px;
  gap: 12px;
  min-width: 0;
  padding: 8px 0 24px;
  overflow: visible;
  align-items: flex-start;
  transition:
    min-height var(--sidebar-duration) var(--sidebar-ease),
    padding 420ms var(--sidebar-ease);
}

.sidebar-logo-full,
.sidebar-logo-icon {
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 12px 18px rgba(0, 0, 0, .20))
    drop-shadow(0 0 16px rgba(53, 215, 255, .28));
  transition:
    opacity 300ms ease,
    transform var(--sidebar-duration) var(--sidebar-ease),
    max-width var(--sidebar-duration) var(--sidebar-ease);
}

.sidebar-logo-full {
  display: block;
  width: 232px;
  max-width: calc(100% - 6px);
  height: 62px;
}

.sidebar-logo-icon {
  position: absolute;
  left: 50%;
  top: 5px;
  display: block;
  width: 78px;
  height: 54px;
  opacity: 0;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  transform: translateX(-50%) scale(.88);
  transform-origin: center;
}

.sidebar-toggle {
  position: absolute;
  right: -15px;
  top: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  width: 30px;
  height: 30px;
  padding: 0;
  background: linear-gradient(145deg, #FFFFFF, #EAF8FF);
  border: 1px solid rgba(53, 215, 255, .48);
  border-radius: 50%;
  box-shadow:
    0 10px 22px rgba(8, 48, 94, .24),
    inset 0 1px 0 rgba(255, 255, 255, .84);
  transition:
    opacity 220ms ease,
    transform 300ms var(--sidebar-ease),
    box-shadow 260ms ease,
    background 260ms ease;
}

.sidebar-toggle span {
  width: 8px;
  height: 8px;
  border-top: 2px solid #083B75;
  border-left: 2px solid #083B75;
  transform: rotate(-45deg) translateX(1px);
}

.sidebar-toggle:hover {
  box-shadow:
    0 14px 28px rgba(8, 120, 255, .28),
    0 0 18px rgba(53, 215, 255, .30),
    inset 0 1px 0 rgba(255, 255, 255, .84);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
}

.nav-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 46px;
  padding: 0;
  color: rgba(255, 255, 255, .84);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  transition:
    width var(--sidebar-duration) var(--sidebar-ease),
    grid-template-columns var(--sidebar-duration) var(--sidebar-ease),
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 260ms ease,
    transform 260ms var(--sidebar-ease);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 46px;
  color: rgba(255, 255, 255, .82);
  transition:
    color 220ms ease,
    filter 260ms ease,
    transform 320ms var(--sidebar-ease),
    height 420ms var(--sidebar-ease);
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  overflow: hidden;
  max-width: 160px;
  padding-left: 0;
  opacity: 1;
  font-weight: 850;
  white-space: nowrap;
  transform: translateX(0);
  transition:
    opacity 320ms ease,
    max-width var(--sidebar-duration) var(--sidebar-ease),
    transform 360ms var(--sidebar-ease),
    color 220ms ease;
}

.nav-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
  filter: drop-shadow(0 0 10px rgba(255, 23, 73, .55));
}

.sidebar-panel {
  max-height: 116px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition:
    opacity 320ms ease,
    max-height var(--sidebar-duration) var(--sidebar-ease),
    padding 420ms var(--sidebar-ease),
    border-color 260ms ease,
    transform 360ms var(--sidebar-ease);
}

.app-shell.sidebar-collapsed .sidebar {
  width: 92px;
  padding: 18px;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  min-height: 80px;
  padding: 0 0 20px;
}

.app-shell.sidebar-collapsed .sidebar-brand div {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-logo-full {
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px) scale(.94);
}

.app-shell.sidebar-collapsed .sidebar-logo-icon {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  right: -15px;
  top: 27px;
  width: 30px;
  height: 30px;
}

.app-shell.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(135deg) translateX(1px);
}

.app-shell.sidebar-collapsed .nav-item {
  grid-template-columns: 52px minmax(0, 0fr);
  justify-items: start;
  width: 52px;
  min-height: 52px;
  padding: 0;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .nav-icon {
  width: 52px;
  height: 52px;
}

.app-shell.sidebar-collapsed .nav-label {
  max-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}

.app-shell.sidebar-collapsed .sidebar-panel {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

@media (hover: hover) and (pointer: fine) {
  .sidebar .sidebar-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-4px) scale(.88);
  }

  .sidebar:hover .sidebar-toggle,
  .sidebar:focus-within .sidebar-toggle {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .sidebar,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover {
    width: 280px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -18px 34px rgba(0, 0, 0, .14),
      28px 0 54px rgba(8, 48, 94, .24);
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .sidebar-brand div,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .sidebar-brand div {
    display: block;
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .sidebar-logo-full,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .sidebar-logo-full {
    max-width: calc(100% - 6px);
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .sidebar-logo-icon,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .sidebar-logo-icon {
    opacity: 0;
    transform: translateX(-50%) scale(.88);
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .nav-item,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .nav-item {
    grid-template-columns: 52px minmax(0, 1fr);
    justify-items: stretch;
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .nav-icon,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .nav-icon {
    width: 52px;
    height: 46px;
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .nav-label,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .nav-label {
    max-width: 160px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek).sidebar-peek .sidebar-panel,
  .app-shell.sidebar-collapsed:not(.sidebar-suppress-peek) .sidebar:hover .sidebar-panel {
    max-height: 116px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-color: rgba(255, 255, 255, .24);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.sidebar-panel span,
.sidebar-panel small {
  color: rgba(255, 255, 255, .70);
  font-size: 12px;
}

.sidebar-panel strong {
  display: block;
  margin: 5px 0;
  font-size: 24px;
}

.workspace {
  min-width: 0;
  padding: 18px 20px 38px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .45), rgba(236, 249, 255, .70));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -20px 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.1;
}

.topbar-left,
.topbar-tools,
.user-menu {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 14px;
}

.topbar-title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.topbar-title .eyebrow {
  line-height: 1;
}

.topbar-title h2 {
  margin-top: 0;
}

.topbar-left > div:first-child {
  min-width: 0;
}

.topbar-tools {
  flex: 0 0 auto;
  gap: 12px;
}

.user-menu {
  gap: 12px;
}

.profile-name {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 42px;
  margin-right: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-usage-mount {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.top-usage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 22px 8px;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  align-content: center;
  min-width: 164px;
  min-height: 46px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.top-usage span,
.top-usage strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.top-usage span {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.top-usage strong {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: end;
}

.top-usage i {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: rgba(8, 48, 94, .14);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 120, 255, .10);
}

.top-usage i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.top-usage.is-blocked {
  color: var(--red);
}

.top-usage.is-blocked i {
  background: rgba(255, 23, 73, .16);
}

.top-usage.is-blocked span,
.top-usage.is-blocked strong {
  color: var(--red);
}

.top-usage.is-blocked i b {
  background: linear-gradient(90deg, #FF1749, #FF6A88);
}

.theme-toggle,
.privacy-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  color: #FFFFFF;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  transition: color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.theme-toggle:hover,
.privacy-toggle:hover {
  transform: translateY(-1px);
  opacity: .82;
}

.privacy-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-toggle .privacy-eye-closed {
  display: none;
}

.privacy-toggle[aria-pressed="true"] {
  color: #FFFFFF;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.privacy-toggle[aria-pressed="true"] .privacy-eye-open {
  display: none;
}

.privacy-toggle[aria-pressed="true"] .privacy-eye-closed {
  display: block;
}

.theme-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.theme-icon::before,
.theme-icon::after {
  content: "";
  position: absolute;
  inset: 0;
}

.theme-icon::before {
  width: 18px;
  height: 18px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: none;
  transform: rotate(-6deg);
}

.theme-icon::after {
  display: block;
  width: 15px;
  height: 15px;
  background: var(--theme-icon-cutout, #06152D);
  border-radius: 50%;
  transform: translate(7px, 0) scale(.98);
}

.theme-toggle-label {
  display: none;
}

.theme-toggle[aria-pressed="true"] {
  color: #FFFFFF;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body[data-theme="light"] .theme-toggle {
  color: #050B14;
}

.theme-toggle[aria-pressed="true"] .theme-icon::before {
  inset: 4px;
  width: 10px;
  height: 10px;
  background:
    radial-gradient(circle, currentColor 0 46%, currentColor 50% 100%);
  border-radius: 50%;
  box-shadow:
    0 -13px 0 -4px currentColor,
    0 13px 0 -4px currentColor,
    13px 0 0 -4px currentColor,
    -13px 0 0 -4px currentColor,
    9px 9px 0 -4px currentColor,
    -9px -9px 0 -4px currentColor,
    9px -9px 0 -4px currentColor,
    -9px 9px 0 -4px currentColor,
    0 0 16px rgba(255, 255, 255, .18);
  transform: none;
}

.theme-toggle[aria-pressed="true"] .theme-icon::after {
  display: none;
}

body[data-theme="light"] .privacy-toggle,
body[data-theme="light"] .theme-toggle[aria-pressed="true"],
body[data-theme="light"] .privacy-toggle[aria-pressed="true"] {
  color: #050B14;
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .privacy-toggle,
body[data-theme="dark"] .theme-toggle[aria-pressed="true"],
body[data-theme="dark"] .privacy-toggle[aria-pressed="true"] {
  color: #FFFFFF;
}

body[data-theme="light"] {
  --theme-icon-cutout: #F6FBFF;
}

body[data-theme="dark"] {
  --theme-icon-cutout: #06152D;
}

.theme-toggle-large {
  margin-top: 8px;
  width: 48px;
  height: 48px;
  min-width: 48px;
}

.profile-menu {
  position: relative;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #FFFFFF;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .70), transparent 24%),
    linear-gradient(145deg, #35D7FF 0%, #0878FF 48%, #083B75 100%);
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 14px;
  box-shadow:
    0 14px 26px rgba(8, 120, 255, .24),
    inset 0 1px 0 rgba(255, 255, 255, .42);
  transition: transform 160ms ease, box-shadow 180ms ease;
}

.profile-button:hover,
.profile-button[aria-expanded="true"] {
  transform: translateY(-1px);
  box-shadow:
    0 18px 32px rgba(8, 120, 255, .30),
    0 0 18px rgba(53, 215, 255, .24),
    inset 0 1px 0 rgba(255, 255, 255, .42);
}

.profile-button span {
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 8;
  min-width: 132px;
  padding: 8px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(8, 48, 94, .18);
}

.profile-logout {
  width: 100%;
  min-height: 40px;
  color: #08305E;
  font-weight: 900;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.profile-logout:hover {
  background: rgba(255, 23, 73, .10);
  color: var(--red);
}

.view-mount {
  display: grid;
  gap: 14px;
}

.dashboard-command {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  min-height: 360px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98) 0%, rgba(237, 248, 255, .94) 54%, rgba(255, 243, 246, .88) 100%);
  box-shadow: var(--shadow);
}

.dashboard-command::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .32), transparent 30% 70%, rgba(53, 215, 255, .18)),
    linear-gradient(275deg, transparent 0 50%, rgba(255, 23, 73, .11) 52%, transparent 68%);
  pointer-events: none;
}

.dashboard-command > * {
  position: relative;
  z-index: 1;
}

.intel-hero {
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 330px;
}

.command-copy {
  display: grid;
  align-content: center;
  justify-items: start;
}

.command-copy h3 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: .94;
}

.command-copy p {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  width: min(100%, 680px);
  margin-top: 22px;
  padding: 8px;
  border: 1px solid rgba(8, 120, 255, .20);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .84),
    0 18px 38px rgba(8, 48, 94, .10);
}

.hero-search input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.mining-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 680px);
  margin-top: 14px;
}

.mining-choice-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 15px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(237, 248, 255, .86));
  border: 1px solid rgba(53, 215, 255, .32);
  border-radius: 16px;
  box-shadow:
    0 16px 34px rgba(8, 48, 94, .12),
    inset 0 1px 0 rgba(255, 255, 255, .90);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.mining-choice-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(53, 215, 255, .16), transparent 48%, rgba(255, 23, 73, .14));
  pointer-events: none;
}

.mining-choice-card:hover,
.mining-choice-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 23, 73, .38);
  box-shadow:
    0 20px 42px rgba(8, 48, 94, .16),
    0 0 24px rgba(53, 215, 255, .18),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.mining-choice-card > * {
  position: relative;
  z-index: 1;
}

.mining-choice-card span,
.mining-choice-card small {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mining-choice-card span {
  color: var(--blue);
}

.mining-choice-card strong {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
}

.mining-choice-card small {
  color: var(--muted);
  line-height: 1.35;
  text-transform: none;
}

.spy-terminal {
  align-self: center;
  display: grid;
  gap: 16px;
  min-height: 280px;
  padding: 16px;
  color: #F4F8FB;
  border: 1px solid rgba(53, 215, 255, .34);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(6, 21, 45, .98), rgba(8, 59, 117, .92)),
    radial-gradient(circle at 60% 0%, rgba(53, 215, 255, .28), transparent 42%);
  box-shadow:
    0 26px 58px rgba(8, 48, 94, .24),
    0 0 30px rgba(53, 215, 255, .16),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}

.terminal-top,
.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.terminal-top {
  justify-content: start;
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-top span:nth-child(1) {
  background: var(--red);
}

.terminal-top span:nth-child(2) {
  background: var(--yellow);
}

.terminal-top span:nth-child(3) {
  background: var(--green);
}

.terminal-top strong {
  margin-left: auto;
  color: rgba(244, 248, 251, .74);
  font-size: 12px;
  text-transform: uppercase;
}

.terminal-logo {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px solid rgba(53, 215, 255, .18);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 54%),
    rgba(255, 255, 255, .04);
}

.terminal-logo img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, .26),
    0 0 18px rgba(53, 215, 255, .34);
}

.mining-level {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(53, 215, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
}

.mining-level span,
.mining-level small {
  color: rgba(244, 248, 251, .70);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mining-level strong {
  color: #FFFFFF;
  font-size: 24px;
  line-height: 1;
}

.mining-level i {
  display: block;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.mining-level i::before {
  content: "";
  display: block;
  width: var(--bar-value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--red));
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(53, 215, 255, .38);
}

.terminal-bars {
  display: grid;
  gap: 10px;
}

.terminal-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  color: rgba(244, 248, 251, .84);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-bar i,
.platform-row i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.terminal-bar i::before,
.platform-row i::before {
  content: "";
  display: block;
  width: var(--bar-value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--red));
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(53, 215, 255, .32);
}

.terminal-footer span,
.terminal-footer strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-footer span {
  color: rgba(244, 248, 251, .72);
}

.terminal-footer strong {
  color: var(--cyan);
}

.command-visual {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.radar-device {
  position: relative;
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(53, 215, 255, .34);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, .96) 0 28%, rgba(236, 249, 255, .64) 29% 52%, transparent 53%),
    conic-gradient(from 20deg, rgba(53, 215, 255, .24), rgba(255, 23, 73, .18), rgba(8, 120, 255, .22), rgba(53, 215, 255, .24));
  box-shadow:
    0 30px 70px rgba(8, 48, 94, .20),
    inset 0 1px 0 rgba(255, 255, 255, .92),
    0 0 34px rgba(53, 215, 255, .18);
}

.radar-device img {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  object-fit: contain;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow:
    0 16px 32px rgba(8, 120, 255, .22),
    0 0 0 1px rgba(53, 215, 255, .34);
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(8, 120, 255, .22);
  border-radius: 50%;
}

.ring-one {
  inset: 26px;
}

.ring-two {
  inset: 54px;
  border-color: rgba(255, 23, 73, .22);
}

.radar-signal {
  position: absolute;
  right: -10px;
  bottom: 18px;
  min-width: 112px;
  padding: 12px;
  color: #FFFFFF;
  text-align: center;
  background: linear-gradient(145deg, #FF315D 0%, #D90636 54%, #750719 100%);
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  box-shadow:
    0 16px 30px rgba(255, 23, 73, .28),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}

.radar-signal strong,
.radar-signal span {
  display: block;
}

.radar-signal strong {
  font-size: 34px;
  line-height: 1;
}

.radar-signal span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.command-stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(237, 248, 255, .84));
  box-shadow:
    0 14px 30px rgba(8, 48, 94, .10),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.command-stat span,
.command-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-stat strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.agent-usage-meter {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(237, 248, 255, .78));
  box-shadow:
    0 12px 26px rgba(8, 48, 94, .09),
    inset 0 1px 0 rgba(255, 255, 255, .88);
}

.agent-usage-head,
.agent-usage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-usage-head span,
.agent-usage-foot small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.agent-usage-head span {
  text-transform: uppercase;
}

.agent-usage-head strong {
  color: var(--blue);
  font-size: 15px;
}

.agent-usage-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 48, 94, .12);
}

.agent-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 16px rgba(53, 215, 255, .42);
  transition: width 280ms ease;
}

.agent-usage-meter.is-blocked .agent-usage-head strong {
  color: var(--red);
}

.agent-usage-meter.is-blocked .agent-usage-track span {
  background: linear-gradient(90deg, #FF1749, #FF6A88);
  box-shadow: 0 0 16px rgba(255, 23, 73, .36);
}

.chat-card .agent-usage-meter {
  margin: -2px 0 2px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  display: grid;
  gap: 16px;
}

.dashboard-section,
.activity-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(237, 248, 255, .84));
  box-shadow:
    0 18px 42px rgba(8, 48, 94, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

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

.section-heading.compact {
  display: block;
}

.section-heading h4 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.1;
}

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

.workflow-step {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 206px;
  padding: 14px;
  border: 1px solid rgba(8, 120, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.workflow-step strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 19px;
}

.workflow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.spy-flow-grid .workflow-step {
  min-height: 176px;
}

.step-action {
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  color: #075BBE;
  background: rgba(53, 215, 255, .12);
  border: 1px solid rgba(53, 215, 255, .30);
  border-radius: 12px;
  font-weight: 900;
}

.compact-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.signal-table {
  display: grid;
  gap: 8px;
}

.signal-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}

.signal-row.empty {
  grid-template-columns: 1fr;
}

.signal-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(8, 120, 255, .18);
}

.signal-row strong,
.signal-row small {
  display: block;
}

.signal-row strong {
  overflow: hidden;
  margin: 4px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-row small {
  color: var(--muted);
  font-weight: 800;
}

.signal-metrics {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  align-items: center;
}

.signal-metrics span,
.signal-metrics strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.signal-metrics span {
  color: #075BBE;
  background: rgba(53, 215, 255, .12);
  border: 1px solid rgba(53, 215, 255, .26);
}

.signal-metrics strong {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--red), var(--blue));
  border: 1px solid rgba(255, 255, 255, .30);
}

.platform-stack {
  display: grid;
  gap: 10px;
}

.platform-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .70);
}

.platform-row span,
.platform-row strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-row span {
  color: var(--muted);
}

.platform-row strong {
  color: var(--text);
}

.dashboard-showcase {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: stretch;
}

.dashboard-visual-stack {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.hero-creative-card {
  display: grid;
  grid-template-rows: minmax(240px, 1fr) auto;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(53, 215, 255, .30);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(237, 248, 255, .78));
  box-shadow:
    0 24px 54px rgba(8, 48, 94, .16),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.hero-creative-copy {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.hero-creative-copy h4,
.creative-photo-card h5 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  line-height: 1.15;
  -webkit-box-orient: vertical;
}

.hero-creative-copy h4 {
  font-size: 22px;
  -webkit-line-clamp: 2;
}

.hero-creative-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-creative-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.hero-creative-footer strong,
.hero-creative-footer span,
.hero-creative-footer small {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.hero-creative-footer strong {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--green), var(--blue));
}

.hero-creative-footer span {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--red), var(--blue));
}

.hero-creative-footer small {
  color: #075BBE;
  background: rgba(53, 215, 255, .13);
  border: 1px solid rgba(53, 215, 255, .26);
}

.ad-visual {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  inline-size: 100%;
  block-size: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #EAF8FF;
  contain: layout paint;
}

.ad-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-visual-hero {
  min-height: 260px;
}

.ad-visual-gallery {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
}

.ad-visual > figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  gap: 5px;
  padding: 10px;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
  background: rgba(6, 21, 45, .72);
  backdrop-filter: blur(12px);
}

.ad-visual > figcaption strong,
.ad-visual > figcaption span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-visual > figcaption strong {
  font-size: 14px;
  line-height: 1.2;
}

.ad-visual > figcaption span {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.generated-visual {
  isolation: isolate;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, .86), transparent 18%),
    linear-gradient(145deg, #06152D 0%, #0878FF 48%, #35D7FF 100%);
}

.generated-visual::before,
.generated-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.generated-visual::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .26), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 1px, transparent 1px 18px);
}

.generated-visual::after {
  inset: auto -18% -22% 24%;
  height: 62%;
  border-radius: 999px;
  background: rgba(255, 23, 73, .76);
  filter: blur(2px);
  transform: rotate(-12deg);
}

.visual-tone-1 {
  background:
    radial-gradient(circle at 75% 12%, rgba(255, 255, 255, .82), transparent 18%),
    linear-gradient(145deg, #07101E 0%, #20D37B 45%, #0878FF 100%);
}

.visual-tone-2 {
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, .80), transparent 18%),
    linear-gradient(145deg, #13080D 0%, #FF1749 46%, #6D5BD0 100%);
}

.visual-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #FFFFFF;
  background: rgba(6, 21, 45, .66);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.visual-photo-mark {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}

.visual-photo-mark::before,
.visual-photo-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
}

.visual-photo-mark::before {
  left: 12px;
  top: 12px;
  width: 14px;
  height: 14px;
}

.visual-photo-mark::after {
  left: 12px;
  right: 10px;
  bottom: 13px;
  height: 18px;
  border-radius: 9px 9px 5px 5px;
  clip-path: polygon(0 100%, 35% 35%, 52% 64%, 68% 42%, 100% 100%);
}

.media-fallback-mark {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 1;
  display: none;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 18px 44px rgba(6, 21, 45, .24);
  transform: translate(-50%, -50%);
}

.media-fallback-mark::before,
.media-fallback-mark::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .88);
}

.media-fallback-mark::before {
  left: 16px;
  top: 15px;
  width: 15px;
  height: 15px;
  border-radius: 999px;
}

.media-fallback-mark::after {
  left: 13px;
  right: 12px;
  bottom: 15px;
  height: 20px;
  border-radius: 10px 10px 6px 6px;
  clip-path: polygon(0 100%, 34% 32%, 52% 64%, 69% 40%, 100% 100%);
}

.mini-trend-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(8, 120, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.mini-trend-card strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 24px;
}

.mini-trend-bars {
  display: flex;
  align-items: end;
  justify-content: end;
  gap: 7px;
  height: 54px;
}

.mini-trend-bars span {
  width: 16px;
  height: var(--trend-value);
  min-height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue), var(--red));
  box-shadow: 0 0 14px rgba(53, 215, 255, .20);
}

.dashboard-atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: start;
}

.dashboard-atlas-simple {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-section-wide {
  grid-column: 1;
}

.dashboard-platform-card {
  grid-column: 2;
}

.dashboard-atlas-simple .dashboard-platform-card {
  display: none;
}

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

.creative-photo-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.creative-photo-card h5 {
  min-height: 40px;
  font-size: 16px;
  -webkit-line-clamp: 2;
}

.creative-photo-card p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-map {
  display: grid;
  gap: 15px;
}

.score-orb {
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
  margin: 6px auto 4px;
  color: var(--text);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, .98) 0 54%, transparent 55%),
    conic-gradient(var(--red) var(--score-value), rgba(8, 120, 255, .14) 0);
  box-shadow:
    0 20px 44px rgba(8, 48, 94, .14),
    inset 0 1px 0 rgba(255, 255, 255, .86);
}

.score-orb strong,
.score-orb span {
  grid-area: 1 / 1;
}

.score-orb strong {
  margin-top: -16px;
  font-size: 48px;
  line-height: 1;
}

.score-orb span {
  margin-top: 44px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
}

.score-bar-row span,
.score-bar-row strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.score-bar-row strong {
  color: var(--text);
  text-align: right;
}

.score-bar-row i {
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(8, 120, 255, .10);
  border-radius: 999px;
}

.score-bar-row i::before {
  content: "";
  display: block;
  width: var(--bar-value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--red));
  border-radius: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .hero-creative-card:hover,
  .creative-photo-card:hover,
  .first-photo-tile:hover,
  .mini-trend-card:hover {
    transform: translateY(-2px);
    border-color: rgba(53, 215, 255, .42);
    box-shadow:
      0 20px 44px rgba(8, 48, 94, .16),
      0 0 18px rgba(53, 215, 255, .12),
      inset 0 1px 0 rgba(255, 255, 255, .88);
  }

  .creative-photo-card:hover h5,
  .first-photo-tile:hover .top-offer-copy strong,
  .hero-creative-card:hover h4 {
    color: var(--blue);
  }
}

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

.agent-preview-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 128px;
  padding: 14px;
  border: 1px solid rgba(8, 120, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.agent-preview-light {
  width: 10px;
  height: 70px;
  background: var(--agent-accent, var(--blue));
  border-radius: 999px;
  box-shadow: 0 0 20px var(--agent-accent, var(--blue));
}

.agent-preview-card h5 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.agent-preview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.activity-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  padding: 12px;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .70);
}

.activity-list strong,
.activity-list span {
  display: block;
}

.activity-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-card {
  position: relative;
  overflow: hidden;
}

.account-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(53, 215, 255, .13), transparent 45%, rgba(255, 23, 73, .10));
  pointer-events: none;
}

.account-card > * {
  position: relative;
  z-index: 1;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(53, 215, 255, .34);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(8, 120, 255, .16);
}

.account-avatar img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.account-card h4 {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 23px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98) 0%, rgba(237, 248, 255, .94) 54%, rgba(255, 243, 246, .88) 100%);
  box-shadow: var(--shadow);
}

.hero-band h3,
.section-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
}

.hero-band p,
.action-card p,
.pricing-card p,
.settings-card p {
  color: var(--muted);
  line-height: 1.55;
}

.metric-stack {
  display: grid;
  gap: 10px;
}

.metric-row {
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84);
}

.metric-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-row strong {
  font-size: 24px;
}

.metric-grid,
.action-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.upgrade-plan-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 430px;
}

.upgrade-plan-card.current {
  opacity: .86;
}

.upgrade-plan-card.best-seller {
  position: relative;
  border-color: rgba(255, 23, 73, .40);
  transform: translateY(-8px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 242, 247, .94)),
    radial-gradient(circle at 85% 12%, rgba(255, 23, 73, .24), transparent 42%);
  box-shadow:
    0 22px 46px rgba(255, 23, 73, .16),
    0 0 34px rgba(8, 120, 255, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.upgrade-plan-card.best-seller::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 23, 73, .42), rgba(8, 120, 255, .20), rgba(55, 216, 239, .24));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.upgrade-plan-card.best-seller .card-kicker {
  color: var(--red);
}

.upgrade-plan-card.best-seller .primary-button {
  background: linear-gradient(135deg, #ff1749, #0878ff 86%);
  box-shadow: 0 18px 36px rgba(255, 23, 73, .20);
}

.upgrade-plan-card .primary-button,
.upgrade-plan-card .secondary-button {
  width: 100%;
  margin-top: 4px;
}

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

.admin-page {
  display: grid;
  gap: 16px;
}

.admin-clean-page {
  gap: 18px;
}

.admin-ledger {
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr);
  gap: 16px;
  align-items: stretch;
}

.admin-guide-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-guide-card h3 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.02;
}

.admin-guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-guide-meta {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

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

.admin-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 14px;
  align-items: start;
}

.admin-api-card,
.admin-usage-card {
  display: grid;
  gap: 14px;
}

.admin-api-form {
  display: grid;
  gap: 12px;
}

.admin-api-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.secret-field input {
  min-height: 48px;
  min-width: 0;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(8, 120, 255, .20);
  border-radius: 14px;
  outline: 0;
}

.admin-form-message {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(237, 248, 255, .84));
  box-shadow:
    0 14px 30px rgba(8, 48, 94, .10),
    inset 0 1px 0 rgba(255, 255, 255, .90);
}

.admin-summary-card span,
.admin-summary-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-summary-card span {
  text-transform: uppercase;
}

.admin-summary-card strong {
  display: block;
  margin: 9px 0 5px;
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
}

.admin-summary-card.revenue,
.admin-summary-card.profit,
.admin-summary-card.retention,
.admin-summary-card.ltv {
  border-color: rgba(32, 211, 123, .36);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(232, 255, 243, .88));
  box-shadow:
    0 16px 34px rgba(32, 211, 123, .12),
    inset 0 1px 0 rgba(255, 255, 255, .90);
}

.admin-summary-card.revenue strong,
.admin-summary-card.profit strong,
.admin-summary-card.retention strong,
.admin-summary-card.ltv strong {
  color: #118A4D;
}

.admin-summary-card.cost,
.admin-summary-card.churn,
.admin-summary-card.loss {
  border-color: rgba(255, 23, 73, .36);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 236, 242, .90));
  box-shadow:
    0 16px 34px rgba(255, 23, 73, .12),
    inset 0 1px 0 rgba(255, 255, 255, .90);
}

.admin-summary-card.cost strong,
.admin-summary-card.churn strong,
.admin-summary-card.loss strong {
  color: #D90636;
}

.admin-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-focus-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-section-title h4,
.admin-section-title p {
  margin: 0;
}

.admin-section-title h4 {
  margin-top: 6px;
}

.admin-section-title p {
  color: var(--muted);
  line-height: 1.45;
}

.admin-card .agent-usage-meter {
  margin-top: 10px;
  background: rgba(8, 120, 255, .06);
}

.admin-card-wide {
  grid-column: span 2;
}

.finance-meter {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(8, 120, 255, .18);
  border-radius: 14px;
  background: rgba(8, 120, 255, .06);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.admin-kpi {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .58);
}

.admin-kpi span,
.admin-kpi small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.admin-kpi span {
  text-transform: uppercase;
}

.admin-kpi strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.05;
}

.metric-card,
.action-card,
.pricing-card,
.settings-card {
  padding: 16px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.metric-card span,
.card-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.action-card h4,
.pricing-card h4,
.settings-card h4 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.onboarding-list {
  display: grid;
  gap: 10px;
}

.onboarding-step {
  gap: 12px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .84);
}

.step-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #031018;
  font-weight: 900;
  background: linear-gradient(145deg, var(--cyan), var(--blue) 64%, var(--deep-blue));
  border-radius: 14px;
  color: #FFFFFF;
}

.onboarding-step strong {
  display: block;
  margin-bottom: 3px;
}

.onboarding-step p {
  margin: 0;
  color: var(--muted);
}

.connection-card {
  overflow: hidden;
}

.connection-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 4px;
}

.connection-steps span {
  min-height: 46px;
  padding: 10px;
  color: #075BBE;
  background: rgba(53, 215, 255, .12);
  border: 1px solid rgba(53, 215, 255, .24);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.agent-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 138px);
}

.agent-list,
.chat-card {
  min-height: 0;
  padding: 12px;
}

.agent-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.chat-agent {
  gap: 12px;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  color: #0B1526;
  text-align: left;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(8, 48, 94, .08);
}

.chat-agent.active {
  border-color: var(--agent-accent, var(--blue));
  background: linear-gradient(145deg, #FFFFFF, #EEF8FF);
  box-shadow:
    0 14px 30px rgba(8, 120, 255, .14),
    0 0 18px rgba(53, 215, 255, .14);
}

.agent-light {
  flex: 0 0 auto;
  width: 12px;
  height: 48px;
  background: var(--agent-accent, var(--blue));
  border-radius: 999px;
  box-shadow: 0 0 22px var(--agent-accent, var(--blue));
}

.chat-agent strong,
.chat-agent span {
  display: block;
}

.chat-agent span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-header h3 {
  margin: 0;
}

.chat-header p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #08305E;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-status.live {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--green), var(--blue));
}

.ai-status.local {
  background: rgba(53, 215, 255, .14);
}

.ai-warning {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  color: #08305E;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 238, 243, .88));
  border: 1px solid rgba(255, 23, 73, .28);
  border-radius: 16px;
  box-shadow:
    0 14px 28px rgba(255, 23, 73, .10),
    inset 0 1px 0 rgba(255, 255, 255, .88);
}

.ai-warning strong {
  color: #D90636;
  font-size: 13px;
}

.ai-warning span {
  color: #607089;
  font-size: 12px;
  line-height: 1.45;
}

.messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 360px;
  max-height: calc(100vh - 306px);
  overflow: auto;
  padding-right: 4px;
}

.message {
  max-width: 78%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.message.assistant {
  justify-self: start;
  background: linear-gradient(145deg, #FFFFFF, #EEF8FF);
  box-shadow: 0 12px 26px rgba(8, 48, 94, .08);
}

.message.user {
  justify-self: end;
  color: #FFFFFF;
  background: linear-gradient(145deg, #35D7FF 0%, #0878FF 52%, #083B75 100%);
  box-shadow:
    0 12px 26px rgba(8, 120, 255, .24),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
}

.chat-composer textarea {
  min-height: 64px;
  max-height: 180px;
  resize: none;
  overflow: auto;
  padding: 12px;
  transition:
    height 120ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.saved-list,
.library-grid {
  display: grid;
  gap: 12px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(130px, .62fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow:
    0 18px 42px rgba(8, 48, 94, .10),
    inset 0 1px 0 rgba(255, 255, 255, .86);
}

.library-toolbar label,
.field-block label {
  min-width: 0;
}

.library-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-search {
  min-width: 260px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.saved-ad {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.library-card {
  position: relative;
  display: grid;
  overflow: hidden;
}

.library-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(53, 215, 255, .10), transparent 34% 74%, rgba(255, 23, 73, .10));
  pointer-events: none;
}

.library-card > * {
  position: relative;
  z-index: 1;
}

.library-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.ad-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.ad-chip-row span,
.ad-chip-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ad-chip-row span {
  color: #075BBE;
  background: rgba(53, 215, 255, .12);
  border: 1px solid rgba(53, 215, 255, .24);
}

.ad-chip-row strong {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--red), var(--blue));
  border: 1px solid rgba(255, 255, 255, .30);
}

.library-score-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 78px;
  min-height: 58px;
  padding: 8px 10px;
  color: #FFFFFF;
  background:
    linear-gradient(145deg, #20D37B 0%, #0878FF 58%, #083B75 100%);
  border: 1px solid rgba(255, 255, 255, .40);
  border-radius: 16px;
  box-shadow:
    0 14px 28px rgba(8, 120, 255, .22),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}

.library-score-badge span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-score-badge strong {
  font-size: 26px;
  line-height: 1;
}

.ad-dossier-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(240px, 1.35fr) minmax(200px, 1fr) minmax(170px, .75fr);
  gap: 10px;
}

.dossier-block {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(8, 120, 255, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.saved-ad h4 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.18;
}

.saved-ad p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.creative-block h4,
.sales-page-block h4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.creative-block h4 {
  -webkit-line-clamp: 2;
}

.creative-block p,
.sales-page-block p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.creative-block p {
  -webkit-line-clamp: 4;
}

.sales-page-block p {
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
}

.dossier-lines {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dossier-lines span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid rgba(8, 120, 255, .12);
  border-radius: 11px;
  background: rgba(255, 255, 255, .58);
}

.dossier-lines small,
.dossier-lines strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-lines small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dossier-lines strong {
  color: var(--text);
  font-size: 12px;
}

.ad-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ad-data-grid span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(8, 120, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
}

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

.ad-data-grid small,
.ad-data-grid strong {
  display: block;
}

.ad-data-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ad-data-grid strong {
  overflow: hidden;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-block {
  display: grid;
  justify-items: center;
  text-align: center;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin: 4px 0 10px;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, .94) 0 54%, transparent 55%),
    conic-gradient(var(--red) var(--score-value), rgba(8, 120, 255, .14) 0);
  border-radius: 50%;
  box-shadow:
    0 14px 28px rgba(8, 120, 255, .14),
    inset 0 1px 0 rgba(255, 255, 255, .90);
}

.score-ring strong {
  margin-top: 10px;
  font-size: 36px;
  line-height: .8;
}

.score-ring small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.score-block h4 {
  margin-bottom: 6px;
}

.score-block p {
  font-size: 12px;
}

.library-card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.library-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.library-action-row .secondary-button,
.library-action-row .danger-button {
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 13px;
  white-space: nowrap;
}

.library-action-row .secondary-button:disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, .52);
  border-color: rgba(8, 120, 255, .10);
}

.creative-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(1, 5, 12, .72);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 140ms ease;
}

.creative-viewer-modal.is-open {
  opacity: 1;
}

.creative-viewer-panel {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: min(840px, 92vh);
  padding: 16px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(53, 215, 255, .24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(53, 215, 255, .12), transparent 32%),
    var(--panel-strong);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .76);
  transform: translateY(8px) scale(.98);
  transition: transform 140ms cubic-bezier(.22, 1, .36, 1);
}

.creative-viewer-modal.is-open .creative-viewer-panel {
  transform: translateY(0) scale(1);
}

.creative-viewer-panel header,
.creative-viewer-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creative-viewer-panel h3,
.creative-viewer-panel p {
  margin: 0;
}

.creative-viewer-panel h3 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.creative-viewer-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.creative-close-button {
  flex: 0 0 auto;
}

.creative-viewer-frame {
  display: grid;
  place-items: center;
  min-height: 260px;
  max-height: min(620px, 66vh);
  overflow: hidden;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 14px;
  background: rgba(8, 19, 34, .96);
}

.creative-viewer-frame img,
.creative-viewer-frame video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(620px, 66vh);
  object-fit: contain;
}

.creative-empty-preview {
  display: grid;
  gap: 10px;
  width: min(560px, 92%);
  padding: 26px;
  color: #F5FBFF;
  text-align: center;
  border: 1px solid rgba(53, 215, 255, .20);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 215, 255, .16), transparent 42%),
    rgba(255, 255, 255, .06);
}

.creative-empty-preview h4,
.creative-empty-preview p,
.creative-empty-preview small {
  margin: 0;
}

.creative-empty-preview h4 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.06;
}

.creative-empty-preview p,
.creative-empty-preview small {
  color: rgba(220, 241, 255, .76);
}

.creative-viewer-panel footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

body[data-theme="dark"] .creative-viewer-panel {
  color: #F5FBFF;
  background:
    radial-gradient(circle at 12% 0%, rgba(53, 215, 255, .12), transparent 32%),
    linear-gradient(145deg, rgba(11, 21, 38, .98), rgba(6, 15, 31, .96));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .creative-viewer-panel p {
  color: rgba(220, 241, 255, .72);
}

.field-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
}

.field-block .wide {
  grid-column: 1 / -1;
}

.form-heading {
  margin-bottom: 2px;
}

.form-heading h4 {
  margin: 4px 0 0;
  font-size: 20px;
}

.spy-form {
  align-items: end;
}

.pricing-card.featured {
  border-color: rgba(255, 23, 73, .34);
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 238, 243, .88));
}

.license-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 14px;
}

.license-status-card {
  position: relative;
  overflow: hidden;
}

.license-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  margin-top: 10px;
  padding: 0 11px;
  color: #FFFFFF;
  background: linear-gradient(145deg, #FF315D, #D90636);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.license-badge.is-active {
  background: linear-gradient(145deg, var(--green), var(--blue));
}

.seat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.seat-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.seat-form input {
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid rgba(8, 120, 255, .20);
  border-radius: 12px;
  outline: 0;
}

.session-list {
  display: grid;
  gap: 9px;
}

.session-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(8, 120, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .70);
}

.session-dot {
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 23, 73, .42);
}

.session-dot.is-active {
  background: var(--green);
  box-shadow: 0 0 14px rgba(32, 211, 123, .42);
}

.session-row strong,
.session-row small {
  display: block;
}

.session-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.session-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-card strong {
  display: block;
  margin: 12px 0;
  font-size: 34px;
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.token-box {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(40, 213, 255, .45);
  border-radius: 16px;
  background: rgba(53, 215, 255, .10);
}

.token-box code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #08305E;
}

.brand-assets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.brand-assets img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(40, 213, 255, .18);
}

body[data-theme="dark"] {
  color: #F4F8FB;
  background:
    radial-gradient(circle at 18% 0%, rgba(53, 215, 255, .16), transparent 30%),
    radial-gradient(circle at 96% 8%, rgba(255, 23, 73, .18), transparent 26%),
    linear-gradient(145deg, #05070A 0%, #07101E 48%, #13080D 100%);
}

body[data-theme="dark"] .background-grid {
  background-image:
    linear-gradient(rgba(53, 215, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 215, 255, .06) 1px, transparent 1px);
}

body[data-theme="dark"] .auth-hero,
body[data-theme="dark"] .auth-panel,
body[data-theme="dark"] .proof-grid article,
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .action-card,
body[data-theme="dark"] .dashboard-command,
body[data-theme="dark"] .dashboard-section,
body[data-theme="dark"] .command-stat,
body[data-theme="dark"] .agent-usage-meter,
body[data-theme="dark"] .admin-summary-card,
body[data-theme="dark"] .admin-kpi,
body[data-theme="dark"] .hero-creative-card,
body[data-theme="dark"] .mini-trend-card,
body[data-theme="dark"] .spy-terminal,
body[data-theme="dark"] .library-toolbar,
body[data-theme="dark"] .agent-list,
body[data-theme="dark"] .chat-card,
body[data-theme="dark"] .saved-ad,
body[data-theme="dark"] .mining-choice-card,
body[data-theme="dark"] .dossier-block,
body[data-theme="dark"] .session-row,
body[data-theme="dark"] .pricing-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .activity-card {
  color: #F4F8FB;
  background:
    linear-gradient(145deg, rgba(17, 24, 35, .96), rgba(7, 16, 30, .92));
  border-color: rgba(53, 215, 255, .20);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, .30),
    0 0 26px rgba(53, 215, 255, .08),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .hero-copy p,
body[data-theme="dark"] .proof-grid p,
body[data-theme="dark"] .hero-band p,
body[data-theme="dark"] .action-card p,
body[data-theme="dark"] .pricing-card p,
body[data-theme="dark"] .settings-card p,
body[data-theme="dark"] .command-copy p,
body[data-theme="dark"] .hero-creative-copy p,
body[data-theme="dark"] .creative-photo-card p,
body[data-theme="dark"] .command-stat span,
body[data-theme="dark"] .command-stat small,
body[data-theme="dark"] .agent-usage-head span,
body[data-theme="dark"] .agent-usage-foot small,
body[data-theme="dark"] .admin-kpi span,
body[data-theme="dark"] .admin-kpi small,
body[data-theme="dark"] .admin-summary-card span,
body[data-theme="dark"] .admin-summary-card small,
body[data-theme="dark"] .admin-section-title p,
body[data-theme="dark"] .workflow-step p,
body[data-theme="dark"] .agent-preview-card p,
body[data-theme="dark"] .activity-list span,
body[data-theme="dark"] .signal-row small,
body[data-theme="dark"] .platform-row span,
body[data-theme="dark"] .session-row small,
body[data-theme="dark"] .session-row em,
body[data-theme="dark"] .chat-header p,
body[data-theme="dark"] .chat-agent span,
body[data-theme="dark"] .saved-ad p,
body[data-theme="dark"] .mining-choice-card small,
body[data-theme="dark"] .dossier-lines small,
body[data-theme="dark"] .score-ring small,
body[data-theme="dark"] .onboarding-step p {
  color: #9DB4C8;
}

body[data-theme="dark"] .auth-form label,
body[data-theme="dark"] .field-block label,
body[data-theme="dark"] .chat-agent,
body[data-theme="dark"] .topbar h2,
body[data-theme="dark"] .command-copy h3,
body[data-theme="dark"] .hero-creative-copy h4,
body[data-theme="dark"] .creative-photo-card h5,
body[data-theme="dark"] .mini-trend-card strong,
body[data-theme="dark"] .command-stat strong,
body[data-theme="dark"] .admin-kpi strong,
body[data-theme="dark"] .admin-summary-card strong,
body[data-theme="dark"] .section-heading h4,
body[data-theme="dark"] .workflow-step strong,
body[data-theme="dark"] .agent-preview-card h5,
body[data-theme="dark"] .activity-list strong,
body[data-theme="dark"] .signal-row strong,
body[data-theme="dark"] .platform-row strong,
body[data-theme="dark"] .ad-data-grid strong,
body[data-theme="dark"] .mining-choice-card strong,
body[data-theme="dark"] .dossier-lines strong,
body[data-theme="dark"] .score-ring,
body[data-theme="dark"] .session-row strong,
body[data-theme="dark"] .account-card h4,
body[data-theme="dark"] .hero-band h3,
body[data-theme="dark"] .action-card h4,
body[data-theme="dark"] .pricing-card h4,
body[data-theme="dark"] .settings-card h4 {
  color: #F4F8FB;
}

body[data-theme="dark"] .auth-form input,
body[data-theme="dark"] .field-block input,
body[data-theme="dark"] .field-block select,
body[data-theme="dark"] .library-toolbar input,
body[data-theme="dark"] .library-toolbar select,
body[data-theme="dark"] .seat-form input,
body[data-theme="dark"] .chat-composer textarea {
  color: #F4F8FB;
  background: rgba(5, 7, 10, .78);
  border-color: rgba(53, 215, 255, .20);
}

body[data-theme="dark"] .auth-form input::placeholder,
body[data-theme="dark"] .field-block input::placeholder,
body[data-theme="dark"] .library-toolbar input::placeholder,
body[data-theme="dark"] .chat-composer textarea::placeholder {
  color: #7F93A7;
}

body[data-theme="dark"] .topbar {
  background: rgba(5, 7, 10, .78);
  border-color: rgba(53, 215, 255, .18);
}

body[data-theme="dark"] .top-usage {
  background: transparent;
  border-color: transparent;
}

body[data-theme="dark"] .top-usage span,
body[data-theme="dark"] .top-usage strong {
  color: #F4F8FB;
}

body[data-theme="dark"] .top-usage.is-blocked span,
body[data-theme="dark"] .top-usage.is-blocked strong {
  color: #FF5C7C;
}

body[data-theme="dark"] .top-usage i {
  display: block;
  background: rgba(255, 255, 255, .14);
}

body[data-theme="dark"] .top-usage.is-blocked i {
  background: rgba(255, 92, 124, .20);
}

body[data-theme="dark"] .workspace {
  background:
    linear-gradient(145deg, rgba(7, 16, 30, .82), rgba(10, 17, 27, .90));
}

body[data-theme="dark"] .user-menu span {
  color: #DFF8FF;
}

body[data-theme="dark"] .hero-band {
  color: #F4F8FB;
  background:
    linear-gradient(125deg, rgba(53, 215, 255, .13), rgba(255, 23, 73, .10) 48%, rgba(8, 120, 255, .16)),
    rgba(7, 16, 30, .94);
  border-color: rgba(53, 215, 255, .26);
}

body[data-theme="dark"] .metric-row,
body[data-theme="dark"] .workflow-step,
body[data-theme="dark"] .agent-preview-card,
body[data-theme="dark"] .creative-photo-card,
body[data-theme="dark"] .activity-list li,
body[data-theme="dark"] .signal-row,
body[data-theme="dark"] .platform-row,
body[data-theme="dark"] .session-row,
body[data-theme="dark"] .onboarding-step,
body[data-theme="dark"] .field-block,
body[data-theme="dark"] .ad-data-grid span,
body[data-theme="dark"] .dossier-lines span,
body[data-theme="dark"] .message.assistant,
body[data-theme="dark"] .chat-agent {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(53, 215, 255, .16);
}

body[data-theme="dark"] .score-ring {
  background:
    radial-gradient(circle at center, rgba(7, 16, 30, .94) 0 54%, transparent 55%),
    conic-gradient(var(--red) var(--score-value), rgba(53, 215, 255, .13) 0);
}

body[data-theme="dark"] .score-orb {
  color: #F4F8FB;
  background:
    radial-gradient(circle at center, rgba(7, 16, 30, .96) 0 54%, transparent 55%),
    conic-gradient(var(--red) var(--score-value), rgba(53, 215, 255, .13) 0);
}

body[data-theme="dark"] .score-orb span,
body[data-theme="dark"] .score-bar-row span {
  color: #9DB4C8;
}

body[data-theme="dark"] .score-bar-row strong {
  color: #F4F8FB;
}

body[data-theme="dark"] .chat-agent.active,
body[data-theme="dark"] .radar-device,
body[data-theme="dark"] .message.assistant {
  background:
    linear-gradient(145deg, rgba(17, 24, 35, .96), rgba(8, 33, 62, .74));
}

body[data-theme="dark"] .dashboard-command {
  background:
    linear-gradient(125deg, rgba(53, 215, 255, .13), rgba(255, 23, 73, .10) 48%, rgba(8, 120, 255, .16)),
    rgba(7, 16, 30, .94);
}

body[data-theme="dark"] .hero-search {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(53, 215, 255, .18);
}

body[data-theme="dark"] .hero-search input {
  color: #F4F8FB;
}

body[data-theme="dark"] .secret-field input {
  color: #F4F8FB;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(53, 215, 255, .18);
}

body[data-theme="dark"] .radar-device img,
body[data-theme="dark"] .account-avatar {
  background: #FFFFFF;
}

body[data-theme="dark"] .secondary-button,
body[data-theme="dark"] .ghost-button,
body[data-theme="dark"] .auth-tab {
  color: #F4F8FB;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(53, 215, 255, .20);
}

body[data-theme="dark"] .profile-dropdown {
  background: rgba(5, 7, 10, .94);
  border-color: rgba(53, 215, 255, .20);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

body[data-theme="dark"] .profile-logout {
  color: #F4F8FB;
}

body[data-theme="dark"] .profile-logout:hover {
  color: #FFFFFF;
  background: rgba(255, 23, 73, .18);
}

body[data-theme="dark"] .auth-tab.active {
  background: linear-gradient(145deg, #35D7FF, #0878FF 58%, #083B75);
}

body[data-theme="dark"] .status-chip {
  color: #F4F8FB;
  background: rgba(255, 23, 73, .18);
}

body[data-theme="dark"] .token-box,
body[data-theme="dark"] .ai-status.local {
  color: #DFF8FF;
  background: rgba(53, 215, 255, .09);
  border-color: rgba(53, 215, 255, .28);
}

body[data-theme="dark"] .ai-warning {
  color: #F4F8FB;
  background:
    linear-gradient(145deg, rgba(255, 23, 73, .12), rgba(17, 24, 35, .94));
  border-color: rgba(255, 23, 73, .30);
}

body[data-theme="dark"] .ai-warning strong {
  color: #FF7891;
}

body[data-theme="dark"] .ai-warning span {
  color: #9DB4C8;
}

body[data-theme="dark"] .token-box code {
  color: #DFF8FF;
}

@media (max-width: 1060px) {
  .auth-screen,
  .dashboard-command,
  .dashboard-atlas,
  .dashboard-layout,
  .hero-band,
  .agent-layout,
  .license-grid,
  .admin-grid,
  .admin-main-grid,
  .ad-dossier-grid,
  .library-toolbar {
    grid-template-columns: 1fr;
  }

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

  .admin-card-wide {
    grid-column: auto;
  }

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

  .auth-hero {
    min-height: auto;
  }

  .metric-grid,
  .command-stats,
  .workflow-grid,
  .connection-steps,
  .agent-preview-grid,
  .action-grid,
  .upgrade-grid,
  .pricing-grid,
  .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-section-wide,
  .dashboard-platform-card {
    grid-column: auto;
  }

  .dashboard-platform-card {
    order: 4;
  }

  .command-visual {
    min-height: 230px;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .auth-screen {
    padding: 14px;
  }

  .hero-copy {
    padding: 36px 0;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .proof-grid,
  .metric-grid,
  .command-stats,
  .workflow-grid,
  .connection-steps,
  .agent-preview-grid,
  .creative-gallery,
  .mining-choice-grid,
  .action-grid,
  .pricing-grid,
  .upgrade-grid,
  .ad-data-grid,
  .field-block {
    grid-template-columns: 1fr;
  }

  .top-usage {
    min-width: 124px;
  }

  .dashboard-command {
    min-height: auto;
    padding: 18px;
  }

  .hero-creative-card {
    min-height: auto;
  }

  .ad-visual-hero {
    min-height: 220px;
  }

  .mini-trend-card {
    grid-template-columns: 1fr;
  }

  .mini-trend-bars {
    justify-content: start;
  }

  .command-copy h3 {
    font-size: 42px;
  }

  .command-copy p {
    font-size: 15px;
  }

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

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

  .seat-form,
  .session-row {
    grid-template-columns: 1fr;
  }

  .library-card-header {
    display: grid;
  }

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

  .library-score-badge {
    width: 100%;
  }

  .library-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .library-action-row .secondary-button,
  .library-action-row .danger-button {
    width: 100%;
  }

  .radar-device {
    width: 210px;
    height: 210px;
  }

  .agent-preview-card {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .agent-preview-card .secondary-button {
    grid-column: 2;
    width: fit-content;
  }

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

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

  .sidebar {
    position: static;
    height: auto;
  }

  .app-shell.sidebar-collapsed .sidebar {
    padding: 14px;
  }

  .app-shell.sidebar-collapsed .sidebar-brand {
    justify-content: flex-start;
  }

  .app-shell.sidebar-collapsed .sidebar-brand div,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .sidebar-panel {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar-toggle {
    right: -12px;
    top: 12px;
    width: 32px;
    height: 32px;
  }

  .app-shell.sidebar-collapsed .sidebar-toggle span {
    transform: rotate(-45deg) translateX(1px);
  }

  .app-shell.sidebar-collapsed .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 52px;
    min-height: 52px;
    gap: 0;
    padding: 0;
    margin: 0;
  }

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

  .app-shell.sidebar-collapsed .side-nav {
    grid-template-columns: repeat(auto-fit, 52px);
    justify-content: start;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-left {
    width: 100%;
    align-items: center;
  }

  .topbar-tools {
    padding-top: 0;
  }

  .user-menu {
    width: 100%;
    justify-content: flex-end;
  }

  .profile-name {
    max-width: min(46vw, 180px);
  }

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

  .message {
    max-width: 100%;
  }
}

/* Clean product pass */
.clean-hero {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 24px;
  background: var(--panel-strong);
  border-color: rgba(8, 120, 255, .14);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(8, 48, 94, .08);
}

.clean-hero::before,
.library-card::before,
.mining-choice-card::before {
  display: none;
}

.clean-hero .command-copy h3 {
  max-width: 720px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.clean-hero .command-copy p {
  max-width: 620px;
  font-size: 16px;
}

.clean-hero .hero-search {
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: none;
}

.clean-hero.dashboard-showcase {
  grid-template-columns: minmax(420px, .72fr) minmax(760px, 1.28fr);
  gap: 22px;
  align-items: stretch;
  height: clamp(560px, calc(100vh - 130px), 640px);
  min-height: 0;
  padding: 20px 18px;
  overflow: hidden;
}

.clean-hero.dashboard-showcase .command-copy {
  align-content: center;
  padding: 12px 16px 12px 8px;
}

.clean-hero.dashboard-showcase .command-copy h3 {
  max-width: 560px;
  font-size: clamp(42px, 3.8vw, 60px);
  line-height: 1.04;
}

.clean-hero.dashboard-showcase .command-copy p {
  max-width: 540px;
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.45;
}

.clean-hero.dashboard-showcase .hero-search {
  width: min(100%, 560px);
  margin-top: 20px;
  padding: 6px;
}

.clean-hero.dashboard-showcase .mining-choice-grid {
  width: min(100%, 560px);
  gap: 12px;
  margin-top: 14px;
}

.clean-hero.dashboard-showcase .mining-choice-card {
  min-height: 108px;
  padding: 16px 18px;
}

.hero-metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 520px);
  margin-top: 14px;
}

.hero-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 120, 255, .12);
  border-radius: 10px;
  background: rgba(8, 120, 255, .055);
}

.hero-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-metric strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.first-print-visuals {
  grid-template-columns: minmax(0, 1fr) minmax(222px, 248px);
  align-content: stretch;
  align-items: stretch;
  height: 100%;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.first-print-visuals .hero-creative-card {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.first-print-visuals .ad-visual-hero {
  height: 100%;
  min-height: 280px;
  max-height: 100%;
}

.first-print-side {
  display: grid;
  grid-template-rows: 1fr;
  gap: 10px;
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  height: 100%;
  overflow: hidden;
}

.first-print-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 9px;
  border: 1px solid rgba(8, 120, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.first-print-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  min-width: 0;
}

.first-print-heading strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
}

.first-photo-grid {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.first-photo-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(130px, 1fr) auto;
  gap: 7px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  min-height: 0;
  padding: 8px;
  border: 1px solid rgba(53, 215, 255, .18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(234, 248, 255, .60));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
  transition:
    transform 180ms cubic-bezier(.22, 1, .36, 1),
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.first-photo-tile.rank-1 {
  border-color: rgba(255, 184, 77, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .76),
    0 12px 26px rgba(255, 184, 77, .10);
}

.offer-rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 24px;
  padding: 0 9px;
  overflow: hidden;
  color: #231600;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  border: 1px solid rgba(255, 241, 181, .72);
  border-radius: 999px;
  background:
    linear-gradient(135deg, #FFF8C7 0%, #FFD66B 30%, #FFB000 58%, #FFF1A8 100%);
  box-shadow:
    0 0 18px rgba(255, 199, 74, .38),
    inset 0 1px 0 rgba(255, 255, 255, .78),
    inset 0 -1px 0 rgba(133, 73, 0, .22);
}

.offer-rank-badge::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -45%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  transform: rotate(18deg);
  opacity: .78;
}

.first-photo-tile.rank-2 .offer-rank-badge {
  color: #102033;
  border-color: rgba(238, 247, 255, .74);
  background:
    linear-gradient(135deg, #FFFFFF 0%, #DDE9F5 28%, #95A9BC 58%, #F7FBFF 100%);
  box-shadow:
    0 0 18px rgba(190, 219, 246, .34),
    inset 0 1px 0 rgba(255, 255, 255, .86),
    inset 0 -1px 0 rgba(74, 93, 115, .24);
}

.first-photo-tile.rank-3 .offer-rank-badge {
  color: #241104;
  border-color: rgba(255, 209, 163, .64);
  background:
    linear-gradient(135deg, #FFE2B8 0%, #D88847 31%, #A65A24 60%, #FFD1A2 100%);
  box-shadow:
    0 0 18px rgba(216, 136, 71, .32),
    inset 0 1px 0 rgba(255, 244, 226, .70),
    inset 0 -1px 0 rgba(92, 43, 12, .24);
}

.first-photo-tile .ad-visual-thumb {
  inline-size: 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 12px;
}

.first-photo-tile .ad-visual-thumb > figcaption {
  display: none;
}

.first-photo-tile .ad-visual-thumb .visual-badge {
  display: none;
}

.first-photo-tile .ad-visual-thumb .visual-photo-mark {
  top: 7px;
  left: auto;
  right: 7px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.top-offer-copy {
  min-width: 0;
  padding: 0 2px 1px;
}

.top-offer-copy span,
.top-offer-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-offer-copy span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.top-offer-copy strong {
  display: -webkit-box;
  min-height: 28px;
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.top-offer-copy small {
  display: none;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.top-offer-copy b,
.top-offer-copy i {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  font-style: normal;
  white-space: nowrap;
}

.top-offer-copy b {
  color: #FFFFFF;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
}

.top-offer-copy i {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: #075BBE;
  background: rgba(53, 215, 255, .12);
  text-overflow: ellipsis;
}

.first-print-score,
.first-print-side .mini-trend-card,
.first-print-score .score-map {
  display: none;
}

.primary-button,
.danger-button {
  min-height: 42px;
  background: var(--blue);
  border-color: rgba(8, 120, 255, .28);
  border-radius: 10px;
  box-shadow: none;
}

.secondary-button,
.ghost-button,
.auth-tab {
  border-radius: 10px;
  box-shadow: none;
}

.status-chip {
  color: var(--blue);
  background: rgba(8, 120, 255, .08);
  border-color: rgba(8, 120, 255, .14);
  border-radius: 999px;
}

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

.clean-section,
.command-stat,
.mining-choice-card,
.library-card,
.dossier-block,
.library-toolbar {
  background: var(--panel-strong);
  border-color: rgba(8, 120, 255, .12);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(8, 48, 94, .06);
}

.mining-choice-card {
  min-height: 96px;
  padding: 14px;
}

.mining-choice-card:hover,
.mining-choice-card:focus-visible {
  transform: none;
  border-color: rgba(8, 120, 255, .26);
  box-shadow: 0 12px 28px rgba(8, 48, 94, .09);
}

.mining-choice-card strong {
  font-size: 26px;
}

.library-card {
  padding: 16px;
}

.library-card-header {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(8, 120, 255, .10);
}

.library-score-badge {
  min-width: 94px;
  min-height: 48px;
  color: var(--text);
  background: #FFFFFF;
  border-color: rgba(8, 120, 255, .16);
  border-radius: 10px;
  box-shadow: none;
}

.library-score-badge span {
  color: var(--muted);
}

.library-score-badge strong {
  color: var(--blue);
  font-size: 18px;
}

.ad-dossier-grid {
  grid-template-columns: minmax(180px, .9fr) minmax(260px, 1.35fr) minmax(220px, 1fr) minmax(180px, .85fr);
}

.dossier-block {
  padding: 12px;
}

.score-block {
  justify-items: start;
  text-align: left;
}

.library-card-actions {
  justify-content: flex-start;
}

body[data-theme="dark"] .clean-hero,
body[data-theme="dark"] .clean-section,
body[data-theme="dark"] .command-stat,
body[data-theme="dark"] .mining-choice-card,
body[data-theme="dark"] .library-card,
body[data-theme="dark"] .dossier-block,
body[data-theme="dark"] .library-toolbar {
  background: rgba(17, 24, 35, .92);
  border-color: rgba(53, 215, 255, .14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

body[data-theme="dark"] .library-score-badge {
  color: #F4F8FB;
  background: rgba(255, 255, 255, .055);
  border-color: rgba(53, 215, 255, .16);
}

body[data-theme="dark"] .library-score-badge strong {
  color: #35D7FF;
}

body[data-theme="dark"] .hero-metric,
body[data-theme="dark"] .first-print-card,
body[data-theme="dark"] .first-photo-tile {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(53, 215, 255, .16);
}

body[data-theme="dark"] .hero-metric strong,
body[data-theme="dark"] .first-print-heading strong,
body[data-theme="dark"] .top-offer-copy strong {
  color: #F4F8FB;
}

body[data-theme="dark"] .hero-metric small,
body[data-theme="dark"] .top-offer-copy span {
  color: #9DB4C8;
}

body[data-theme="dark"] .top-offer-copy i {
  color: #B9EFFF;
  background: rgba(53, 215, 255, .14);
}

.ad-visual img,
.ad-visual video {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.ad-visual video,
.ad-visual-video {
  background: #06152D;
}

.ad-visual-video-fallback {
  place-items: center;
}

.ad-visual-video-fallback .visual-video-mark {
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
}

.ad-visual.media-failed {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .70), transparent 18%),
    linear-gradient(145deg, #06152D 0%, #0878FF 52%, #35D7FF 100%);
}

.ad-visual.media-failed img,
.ad-visual.media-failed video,
.creative-viewer-frame.media-failed img,
.creative-viewer-frame.media-failed video {
  display: none;
}

.ad-visual.media-failed .media-fallback-mark {
  display: block;
}

.creative-viewer-frame.media-failed {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .10), transparent 22%),
    linear-gradient(145deg, #06152D 0%, #0A2B55 100%);
}

.creative-viewer-frame.media-failed::after {
  content: "Midia indisponivel";
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-shell.offers-hidden .ad-visual img,
.app-shell.offers-hidden .ad-visual video,
.app-shell.offers-hidden .generated-visual::before,
.app-shell.offers-hidden .generated-visual::after,
.app-shell.offers-hidden .generated-visual .visual-photo-mark,
.app-shell.offers-hidden .ad-visual .visual-sensitive,
.app-shell.offers-hidden .ad-visual figcaption strong,
.app-shell.offers-hidden .ad-visual figcaption span,
.app-shell.offers-hidden .hero-creative-copy .card-kicker,
.app-shell.offers-hidden .hero-creative-copy h4,
.app-shell.offers-hidden .hero-creative-copy p,
.app-shell.offers-hidden .hero-creative-footer span,
.app-shell.offers-hidden .hero-creative-footer small,
.app-shell.offers-hidden .top-offer-copy span,
.app-shell.offers-hidden .top-offer-copy strong,
.app-shell.offers-hidden .top-offer-copy small,
.app-shell.offers-hidden .creative-photo-card .card-kicker,
.app-shell.offers-hidden .creative-photo-card h5,
.app-shell.offers-hidden .creative-photo-card p,
.app-shell.offers-hidden .signal-row .card-kicker,
.app-shell.offers-hidden .signal-row strong,
.app-shell.offers-hidden .signal-row small,
.app-shell.offers-hidden .saved-ad .creative-block h4,
.app-shell.offers-hidden .saved-ad .creative-block p,
.app-shell.offers-hidden .saved-ad .sales-page-block h4,
.app-shell.offers-hidden .saved-ad .sales-page-block p,
.app-shell.offers-hidden .saved-ad .library-card-header h4,
.app-shell.offers-hidden .saved-ad .dossier-block h4,
.app-shell.offers-hidden .saved-ad .dossier-lines strong,
.app-shell.offers-hidden .saved-ad .dossier-lines small,
.app-shell.offers-hidden .ad-visual-library figcaption,
.app-shell.offers-hidden .creative-viewer-frame img,
.app-shell.offers-hidden .creative-viewer-frame video,
.app-shell.offers-hidden .creative-empty-preview h4,
.app-shell.offers-hidden .creative-empty-preview p,
.app-shell.offers-hidden .creative-viewer-panel header h3 {
  filter: blur(5px);
  user-select: none;
  transition: filter 160ms ease, opacity 160ms ease;
}

.app-shell.offers-hidden .ad-visual img,
.app-shell.offers-hidden .ad-visual video,
.app-shell.offers-hidden .generated-visual::before,
.app-shell.offers-hidden .generated-visual::after,
.app-shell.offers-hidden .generated-visual .visual-photo-mark,
.app-shell.offers-hidden .creative-viewer-frame img,
.app-shell.offers-hidden .creative-viewer-frame video {
  opacity: .72;
}

.video-badge {
  left: 12px;
  right: auto;
}

.clean-hero.dashboard-showcase {
  grid-template-columns: minmax(420px, .72fr) minmax(760px, 1.28fr);
  height: clamp(560px, calc(100vh - 130px), 640px);
  min-height: 0;
}

.dashboard-visual-stack.first-print-visuals {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  max-height: 100%;
  justify-self: stretch;
  justify-content: end;
}

.first-print-visuals {
  grid-template-columns: minmax(0, min(660px, calc(100% - 264px))) minmax(222px, 248px);
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.first-print-visuals .hero-creative-card {
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100%;
  height: 100%;
  max-height: none;
  border-radius: 18px;
}

.first-print-visuals .ad-visual-hero {
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

.first-print-visuals .ad-visual-hero > figcaption {
  display: grid;
  left: 16px;
  right: 16px;
  bottom: 18px;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(73, 88, 108, .88);
}

.first-print-visuals .hero-creative-copy {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  min-height: 168px;
  padding: 20px 20px 18px;
}

.first-print-visuals .hero-creative-copy .card-kicker {
  font-size: 12px;
}

.first-print-visuals .hero-creative-copy h4 {
  font-size: 22px;
  line-height: 1.14;
  -webkit-line-clamp: 2;
}

.first-print-visuals .hero-creative-copy p {
  display: -webkit-box;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}

.first-print-visuals .hero-creative-footer {
  justify-self: start;
  flex-wrap: nowrap;
  margin-top: 2px;
}

.first-print-visuals .hero-creative-footer strong,
.first-print-visuals .hero-creative-footer span,
.first-print-visuals .hero-creative-footer small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.first-print-visuals .hero-creative-footer small {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1501px) {
  .clean-hero.dashboard-showcase {
    grid-template-columns: minmax(640px, .82fr) minmax(900px, 1.18fr);
  }

  .clean-hero.dashboard-showcase .command-copy h3 {
    max-width: 700px;
  }

  .clean-hero.dashboard-showcase .command-copy p {
    max-width: 620px;
  }

  .clean-hero.dashboard-showcase .hero-search,
  .clean-hero.dashboard-showcase .mining-choice-grid {
    width: min(100%, 700px);
  }

  .dashboard-visual-stack.first-print-visuals {
    justify-content: center;
  }
}

@media (max-width: 1460px) {
  .clean-hero.dashboard-showcase {
    grid-template-columns: minmax(320px, .46fr) minmax(0, .54fr);
    gap: 16px;
    height: clamp(500px, calc(100vh - 118px), 548px);
    min-height: 0;
    padding: 16px;
  }

  .clean-hero.dashboard-showcase .command-copy {
    padding: 8px 10px 8px 8px;
  }

  .clean-hero.dashboard-showcase .command-copy h3 {
    max-width: 440px;
    font-size: clamp(34px, 4vw, 50px);
  }

  .clean-hero.dashboard-showcase .command-copy p {
    max-width: 410px;
    font-size: 15px;
  }

  .clean-hero.dashboard-showcase .hero-search,
  .clean-hero.dashboard-showcase .mining-choice-grid {
    width: min(100%, 420px);
  }

  .clean-hero.dashboard-showcase .mining-choice-card {
    min-height: 88px;
    padding: 12px 14px;
  }

  .dashboard-visual-stack.first-print-visuals {
    justify-content: stretch;
  }

  .first-print-visuals {
    grid-template-columns: minmax(0, 1fr) minmax(156px, 176px);
    gap: 10px;
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  .first-print-card {
    padding: 8px;
  }

  .first-print-heading {
    margin-bottom: 8px;
  }

  .first-print-heading strong {
    font-size: 11px;
  }

  .first-photo-grid {
    gap: 8px;
  }

  .first-photo-tile {
    grid-template-rows: minmax(104px, 1fr) auto;
    gap: 6px;
    padding: 7px;
    border-radius: 12px;
  }

  .first-photo-tile .ad-visual-thumb {
    border-radius: 10px;
  }

  .offer-rank-badge {
    top: 9px;
    left: 9px;
    min-width: 48px;
    height: 22px;
    font-size: 9px;
  }

  .top-offer-copy span {
    font-size: 8px;
  }

  .top-offer-copy strong {
    min-height: 26px;
    font-size: 11px;
  }

  .first-print-visuals .ad-visual-hero > figcaption {
    left: 12px;
    right: 12px;
    bottom: 14px;
    padding: 11px 12px;
  }

  .first-print-visuals .hero-creative-copy {
    min-height: 140px;
    padding: 15px 15px 14px;
  }

  .first-print-visuals .hero-creative-copy h4 {
    font-size: 18px;
  }

  .first-print-visuals .hero-creative-copy p {
    font-size: 13px;
  }

  .first-print-visuals .hero-creative-footer {
    flex-wrap: wrap;
    gap: 6px;
  }

  .first-print-visuals .hero-creative-footer strong,
  .first-print-visuals .hero-creative-footer span,
  .first-print-visuals .hero-creative-footer small {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (max-width: 1280px) {
  .clean-hero.dashboard-showcase {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .clean-hero.dashboard-showcase .command-copy {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    grid-template-areas:
      "chip search"
      "title search"
      "copy cards";
    gap: 8px 16px;
    align-content: start;
    align-items: center;
    padding: 0;
  }

  .clean-hero.dashboard-showcase .status-chip {
    grid-area: chip;
    width: fit-content;
  }

  .clean-hero.dashboard-showcase .command-copy h3 {
    grid-area: title;
    max-width: 520px;
    font-size: clamp(30px, 4vw, 42px);
  }

  .clean-hero.dashboard-showcase .command-copy p {
    grid-area: copy;
    max-width: 520px;
    margin-top: 0;
  }

  .clean-hero.dashboard-showcase .hero-search {
    grid-area: search;
    width: 100%;
    margin-top: 0;
  }

  .clean-hero.dashboard-showcase .mining-choice-grid {
    grid-area: cards;
    width: 100%;
    margin-top: 0;
  }

  .first-print-visuals {
    height: auto;
    min-height: 440px;
    max-height: none;
  }
}

.library-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.library-card-body .ad-dossier-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ad-visual-library {
  min-height: 210px;
  height: 100%;
  border: 1px solid rgba(8, 120, 255, .14);
  border-radius: 12px;
  background: rgba(8, 120, 255, .08);
}

.ad-visual-library > figcaption {
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 8px;
  border-radius: 10px;
}

body[data-theme="dark"] .ad-visual-library {
  border-color: rgba(53, 215, 255, .16);
  background: rgba(255, 255, 255, .05);
}

@media (max-width: 1060px) {
  .admin-ledger,
  .admin-bottom-grid {
    grid-template-columns: 1fr;
  }

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

  .clean-hero.dashboard-showcase {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .first-print-visuals {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .62fr);
  }

  .clean-stats,
  .ad-dossier-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-visual-stack.first-print-visuals {
    justify-self: stretch;
    max-width: none;
  }

  .library-card-body {
    grid-template-columns: 1fr;
  }

  .ad-visual-library {
    max-height: 280px;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .clean-hero.dashboard-showcase {
    gap: 16px;
    height: auto;
    min-height: auto;
    padding: 16px;
    overflow: visible;
  }

  .clean-hero.dashboard-showcase .command-copy {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chip"
      "title"
      "copy"
      "search"
      "cards";
    gap: 10px;
    align-items: stretch;
    padding: 0;
  }

  .clean-hero.dashboard-showcase .status-chip {
    margin-bottom: 0;
  }

  .clean-hero.dashboard-showcase .command-copy h3 {
    max-width: 100%;
    font-size: clamp(36px, 11vw, 46px);
    line-height: 1.02;
  }

  .clean-hero.dashboard-showcase .command-copy p {
    max-width: 100%;
    margin: 0;
  }

  .clean-hero.dashboard-showcase .hero-search,
  .clean-hero.dashboard-showcase .mining-choice-grid {
    width: 100%;
  }

  .clean-hero.dashboard-showcase .hero-search {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 6px;
  }

  .clean-hero.dashboard-showcase .hero-search button {
    width: 100%;
  }

  .first-print-visuals,
  .first-print-score .score-map {
    grid-template-columns: 1fr;
  }

  .dashboard-visual-stack.first-print-visuals {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .first-print-visuals .hero-creative-card {
    height: auto;
    min-height: 0;
    grid-template-rows: minmax(230px, 42vh) auto;
  }

  .first-print-visuals .ad-visual-hero {
    min-height: 230px;
    max-height: 360px;
  }

  .first-print-side {
    height: auto;
    overflow: visible;
  }

  .first-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    height: auto;
  }

  .first-photo-tile {
    grid-template-rows: minmax(104px, 30vw) auto;
  }

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

  .first-print-side .mini-trend-card {
    grid-template-columns: 1fr;
  }

  .first-print-visuals .hero-creative-card {
    max-height: none;
  }

  .ad-visual-library {
    max-height: 230px;
  }
}

@media (max-width: 520px) {
  .first-photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .signal-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .signal-metrics {
    grid-column: 1 / -1;
  }

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

  .admin-summary-grid,
  .admin-ops-grid,
  .admin-metric-board,
  .admin-kpi-grid.compact {
    grid-template-columns: 1fr;
  }

  .library-action-row {
    grid-template-columns: 1fr;
  }
}

/* Auth entrance inspired by the Rota SPY product UI */
body:has(#authScreen:not(.hidden)) {
  background:
    radial-gradient(circle at 16% 8%, rgba(53, 215, 255, .16), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(8, 120, 255, .20), transparent 28%),
    #030509;
}

.auth-screen {
  grid-template-columns: minmax(520px, 1fr) minmax(430px, .78fr);
  gap: 0;
  min-height: 100vh;
  padding: clamp(18px, 3.2vw, 52px);
  background: #030509;
}

.auth-hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - clamp(36px, 6.4vw, 104px));
  padding: clamp(18px, 3vw, 38px);
  border: 1px solid rgba(53, 215, 255, .26);
  border-right: 0;
  border-radius: 20px 0 0 20px;
  background:
    linear-gradient(145deg, rgba(0, 25, 82, .97) 0%, rgba(4, 72, 173, .94) 52%, rgba(8, 120, 255, .96) 100%);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: -20% -8%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .64), rgba(0, 0, 0, .18), transparent);
}

.auth-app-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-self: center;
  width: min(1040px, 112%);
  min-height: min(620px, calc(100vh - 142px));
  margin-left: clamp(0px, 2vw, 28px);
  color: #F5FBFF;
  background: rgba(5, 7, 10, .74);
  border: 1px solid rgba(53, 215, 255, .24);
  border-radius: 18px;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .10);
  overflow: hidden;
}

.preview-sidebar {
  display: grid;
  grid-template-rows: auto repeat(4, auto) 1fr;
  gap: 14px;
  min-width: 0;
  padding: 26px 22px;
  background: linear-gradient(180deg, rgba(3, 28, 60, .92), rgba(8, 120, 255, .70));
  border-right: 1px solid rgba(53, 215, 255, .18);
}

.preview-sidebar img {
  width: min(172px, 100%);
  height: 58px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 18px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .24));
}

.preview-nav {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: rgba(245, 251, 255, .78);
  border: 1px solid transparent;
  border-radius: 14px;
}

.preview-nav.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .28);
}

.preview-nav span {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.preview-nav strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-status {
  align-self: end;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
}

.preview-status small,
.preview-status span,
.preview-copy p,
.preview-search span,
.preview-mini-cards span,
.preview-graph-card span {
  color: rgba(220, 241, 255, .72);
}

.preview-status strong {
  font-size: 22px;
}

.preview-status span {
  font-size: 13px;
}

.preview-workspace {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: linear-gradient(145deg, rgba(5, 7, 10, .96), rgba(8, 19, 34, .92));
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(53, 215, 255, .18);
}

.preview-topbar span {
  display: block;
  color: #0878FF;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-topbar strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
}

.preview-actions {
  display: flex;
  gap: 12px;
}

.preview-actions i {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(53, 215, 255, .34);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 220, 67, .95) 0 10%, transparent 11%),
    linear-gradient(145deg, rgba(4, 65, 130, .92), rgba(8, 120, 255, .72));
}

.preview-actions i:last-child {
  background:
    linear-gradient(145deg, rgba(53, 215, 255, .86), rgba(8, 120, 255, .86));
}

.preview-command {
  display: grid;
  grid-template-columns: minmax(270px, .76fr) minmax(300px, 1fr);
  gap: 22px;
  margin: 26px;
  padding: 24px;
  border: 1px solid rgba(53, 215, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
}

.preview-copy {
  align-self: center;
  min-width: 0;
}

.preview-copy .status-chip {
  color: #FFFFFF;
  background: rgba(255, 23, 73, .32);
  border-color: rgba(255, 23, 73, .28);
}

.preview-copy h1 {
  margin: 26px 0 0;
  font-size: clamp(40px, 5vw, 66px);
  line-height: .94;
}

.preview-copy p {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.45;
}

.preview-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin-top: 24px;
  padding: 8px;
  border: 1px solid rgba(53, 215, 255, .20);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
}

.preview-search span {
  min-width: 0;
  padding-left: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-search strong {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 10px;
  background: #0878FF;
}

.preview-mini-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preview-mini-cards article,
.preview-graph-card,
.preview-stack div {
  border: 1px solid rgba(53, 215, 255, .16);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.preview-mini-cards article {
  min-height: 92px;
  padding: 14px;
  border-radius: 14px;
}

.preview-mini-cards span {
  display: block;
  color: #0878FF;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-mini-cards strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.preview-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  min-width: 0;
}

.preview-graph-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 330px;
  padding: 18px;
  border-radius: 18px;
}

.preview-graph-card span {
  justify-self: start;
  font-size: 13px;
  font-weight: 900;
}

.preview-donut {
  width: min(180px, 68%);
  aspect-ratio: 1;
  margin-top: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(8, 19, 34, .96) 0 48%, transparent 49%),
    conic-gradient(#0878FF 0 45%, #35D7FF 45% 72%, #FDD243 72% 88%, #FF1749 88% 100%);
  box-shadow: 0 0 34px rgba(53, 215, 255, .22);
}

.preview-legend {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.preview-legend i {
  width: 58px;
  height: 9px;
  border-radius: 999px;
  background: rgba(53, 215, 255, .32);
}

.preview-legend i:nth-child(2) {
  background: rgba(8, 120, 255, .82);
}

.preview-legend i:nth-child(3) {
  background: rgba(255, 23, 73, .72);
}

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

.preview-stack div {
  min-height: 96px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(53, 215, 255, .28) 0 38%, transparent 39%),
    rgba(255, 255, 255, .055);
}

.preview-stack div:nth-child(2) {
  background:
    linear-gradient(90deg, rgba(8, 120, 255, .55) 0 58%, transparent 59%),
    rgba(255, 255, 255, .055);
}

.preview-stack div:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(255, 23, 73, .50) 0 46%, transparent 47%),
    rgba(255, 255, 255, .055);
}

.auth-panel {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: calc(100vh - clamp(36px, 6.4vw, 104px));
  padding: clamp(34px, 6.8vw, 108px);
  color: #FFFFFF;
  background: linear-gradient(145deg, #060537 0%, #04052C 58%, #030420 100%);
  border: 1px solid rgba(53, 215, 255, .16);
  border-left: 0;
  border-radius: 22px;
  box-shadow:
    -24px 0 64px rgba(1, 4, 18, .28),
    0 34px 90px rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: none;
}

.auth-panel-logo {
  width: min(260px, 68vw);
  height: 88px;
  object-fit: contain;
  margin-bottom: clamp(38px, 7vh, 78px);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .30));
}

.auth-tabs {
  display: none;
}

.auth-form {
  width: min(100%, 560px);
}

.auth-form h2 {
  margin: 0;
  color: #FFFFFF;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
}

.auth-form > p {
  margin: 18px 0 34px;
  color: rgba(236, 246, 255, .78);
  font-size: 17px;
  line-height: 1.42;
}

.auth-form label {
  gap: 0;
  margin-bottom: 22px;
  color: #FFFFFF;
}

.auth-label-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.auth-form input {
  min-height: 64px;
  padding: 0 22px;
  color: #0B1526;
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .94);
}

.auth-form input::placeholder {
  color: #B8BEC9;
}

.auth-form input:focus {
  border-color: #35D7FF;
  box-shadow:
    0 0 0 4px rgba(53, 215, 255, .22),
    0 18px 36px rgba(0, 0, 0, .22);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #778196;
  background: transparent;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle.is-visible {
  color: #0878FF;
}

.auth-submit {
  width: 100%;
  min-height: 62px;
  margin-top: 6px;
  background: #0878FF;
  border: 0;
  border-radius: 999px;
  box-shadow:
    0 18px 42px rgba(8, 120, 255, .28),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.auth-switch-copy {
  margin: 26px 0 0 !important;
  color: rgba(236, 246, 255, .76) !important;
  font-size: 16px !important;
}

.auth-link {
  display: inline;
  padding: 0;
  color: #35D7FF;
  font: inherit;
  font-weight: 800;
  background: transparent;
  border: 0;
}

.auth-link:hover,
.auth-link:focus-visible {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-panel .form-message {
  width: min(100%, 560px);
  color: #FDD243;
  font-size: 14px;
}

body[data-theme="dark"] .auth-hero,
body[data-theme="dark"] .auth-panel {
  color: #FFFFFF;
}

body[data-theme="dark"] .auth-form input {
  color: #0B1526;
  background: #FFFFFF;
  border-color: rgba(255, 255, 255, .68);
}

body[data-theme="dark"] .auth-form input::placeholder {
  color: #B8BEC9;
}

@media (max-width: 1180px) {
  .auth-screen {
    grid-template-columns: minmax(420px, .92fr) minmax(400px, .78fr);
    padding: 20px;
  }

  .auth-app-preview {
    grid-template-columns: 86px minmax(0, 1fr);
    width: 108%;
    min-height: 560px;
    margin-left: 0;
  }

  .preview-sidebar {
    padding: 22px 14px;
    justify-items: center;
  }

  .preview-sidebar img {
    width: 56px;
    height: 56px;
    object-position: left center;
    object-fit: cover;
  }

  .preview-nav {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 54px;
    padding: 0;
  }

  .preview-nav strong,
  .preview-status {
    display: none;
  }

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

  .preview-board {
    grid-template-columns: minmax(0, 1fr) 130px;
  }
}

@media (max-width: 880px) {
  .auth-screen {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 14px;
  }

  .auth-hero {
    min-height: 330px;
    border-right: 1px solid rgba(53, 215, 255, .26);
    border-radius: 20px 20px 0 0;
  }

  .auth-app-preview {
    width: 100%;
    min-height: 300px;
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .preview-sidebar {
    padding: 16px 10px;
    gap: 10px;
  }

  .preview-sidebar img {
    width: 48px;
    height: 48px;
  }

  .preview-nav {
    width: 44px;
    min-height: 44px;
  }

  .preview-topbar {
    min-height: 72px;
    padding: 16px;
  }

  .preview-topbar strong {
    font-size: 24px;
  }

  .preview-command {
    margin: 14px;
    padding: 16px;
  }

  .preview-copy h1 {
    font-size: 36px;
  }

  .preview-board {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 34px 20px 38px;
    border-left: 1px solid rgba(53, 215, 255, .16);
    border-radius: 0 0 20px 20px;
  }

  .auth-panel-logo {
    height: 70px;
    margin-bottom: 28px;
  }
}

@media (max-width: 760px) {
  .auth-hero {
    display: none;
  }

  .auth-panel {
    min-height: calc(100vh - 28px);
    border-radius: 20px;
  }

  .auth-form input,
  .auth-submit {
    min-height: 56px;
  }
}

/* Auth full-screen correction */
body:has(#authScreen:not(.hidden)) {
  overflow: hidden;
  background: #030509;
}

body:has(#authScreen:not(.hidden)) .background-grid {
  display: none;
}

#authScreen.auth-screen {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  grid-template-columns: minmax(0, 56fr) minmax(420px, 44fr);
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #030509;
}

#authScreen .auth-hero {
  align-items: center;
  min-height: 100vh;
  height: 100vh;
  padding: clamp(32px, 4vw, 76px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#authScreen .auth-app-preview {
  width: min(100%, 980px);
  max-width: 100%;
  height: min(680px, calc(100vh - 118px));
  min-height: 520px;
  margin: 0 auto;
  grid-template-columns: minmax(182px, 220px) minmax(0, 1fr);
  transform: none;
}

#authScreen .preview-workspace {
  min-height: 0;
  overflow: hidden;
}

#authScreen .preview-topbar {
  min-height: 82px;
  padding: 20px 24px;
}

#authScreen .preview-command {
  min-height: 0;
  margin: 22px;
  padding: 20px;
  grid-template-columns: minmax(238px, .88fr) minmax(230px, .72fr);
  gap: 18px;
  overflow: hidden;
}

#authScreen .preview-copy h1 {
  margin-top: 22px;
  font-size: clamp(42px, 4vw, 62px);
}

#authScreen .preview-copy p {
  font-size: 16px;
}

#authScreen .preview-search {
  grid-template-columns: minmax(0, 1fr) 112px;
  min-height: 56px;
  margin-top: 18px;
}

#authScreen .preview-search strong {
  min-height: 42px;
}

#authScreen .preview-mini-cards article {
  min-height: 82px;
}

#authScreen .preview-board {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

#authScreen .preview-graph-card {
  min-height: 0;
  padding: 16px;
}

#authScreen .preview-donut {
  width: min(154px, 64%);
  margin-top: 18px;
}

#authScreen .preview-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#authScreen .preview-stack div {
  min-height: 58px;
}

#authScreen .auth-panel {
  height: 100vh;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 86px);
  border: 0;
  border-radius: 34px 0 0 34px;
  overflow-y: auto;
  box-shadow:
    -40px 0 90px rgba(1, 4, 18, .36),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

#authScreen .auth-panel-logo {
  height: 76px;
  margin-bottom: clamp(28px, 5vh, 52px);
}

#authScreen .auth-form {
  width: min(100%, 540px);
}

#authScreen .auth-form > p {
  margin: 16px 0 28px;
}

#authScreen .auth-form label {
  margin-bottom: 18px;
}

#authScreen .auth-form input,
#authScreen .auth-submit {
  min-height: 58px;
}

#authScreen .auth-switch-copy {
  margin-top: 22px !important;
}

@media (max-width: 1500px) {
  #authScreen .auth-app-preview {
    grid-template-columns: minmax(162px, 190px) minmax(0, 1fr);
    height: min(650px, calc(100vh - 96px));
    min-height: 0;
  }

  #authScreen .preview-sidebar {
    padding: 24px 18px;
  }

  #authScreen .preview-sidebar img {
    height: 52px;
  }

  #authScreen .preview-command {
    grid-template-columns: 1fr;
    align-content: center;
  }

  #authScreen .preview-board {
    display: none;
  }

  #authScreen .preview-copy h1 {
    font-size: clamp(38px, 4vw, 56px);
  }
}

@media (max-width: 1180px) {
  #authScreen.auth-screen {
    grid-template-columns: minmax(0, 52fr) minmax(400px, 48fr);
  }

  #authScreen .auth-app-preview {
    grid-template-columns: 86px minmax(0, 1fr);
    width: min(100%, 740px);
    min-height: min(560px, calc(100vh - 80px));
  }

  #authScreen .preview-command {
    grid-template-columns: 1fr;
  }

  #authScreen .preview-board {
    display: none;
  }
}

@media (max-width: 980px) {
  body:has(#authScreen:not(.hidden)) {
    overflow: auto;
  }

  #authScreen.auth-screen {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  #authScreen .auth-hero {
    display: none;
  }

  #authScreen .auth-panel {
    min-height: 100vh;
    height: auto;
    padding: clamp(28px, 8vw, 52px);
    border-radius: 0;
  }
}

/* Stronger auth preview and logo polish */
#authScreen .preview-sidebar img,
#authScreen .auth-panel-logo,
.sidebar-logo-full,
.brand-assets img {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter:
    drop-shadow(0 0 1px rgba(53, 215, 255, .24))
    drop-shadow(0 0 10px rgba(53, 215, 255, .16))
    drop-shadow(0 16px 20px rgba(0, 0, 0, .30));
}

#authScreen .auth-panel-logo {
  padding: 0;
}

#authScreen .preview-sidebar img,
.sidebar-logo-full {
  padding: 0;
}

#authScreen .preview-command {
  position: relative;
  background:
    radial-gradient(circle at 76% 12%, rgba(53, 215, 255, .11), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
}

#authScreen .preview-command::before {
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(53, 215, 255, .12) 1px, transparent 1px),
    linear-gradient(rgba(53, 215, 255, .08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 74% 48%, rgba(0, 0, 0, .72), transparent 58%);
  opacity: .58;
}

#authScreen .preview-command > * {
  position: relative;
  z-index: 1;
}

#authScreen .preview-copy h1 {
  text-shadow: 0 16px 34px rgba(0, 0, 0, .28);
}

#authScreen .preview-mini-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#authScreen .preview-mini-cards article {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(53, 215, 255, .13), rgba(255, 255, 255, .055) 58%, rgba(8, 120, 255, .11));
}

#authScreen .preview-mini-cards article::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px 12px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #35D7FF, #0878FF);
}

#authScreen .preview-signal-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

#authScreen .preview-signal-grid article {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(53, 215, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
}

#authScreen .preview-signal-grid small {
  color: rgba(220, 241, 255, .74);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#authScreen .preview-signal-grid i {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
}

#authScreen .preview-signal-grid i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill);
  border-radius: inherit;
  background: linear-gradient(90deg, #35D7FF, #0878FF 68%, #FF1749);
  box-shadow: 0 0 12px rgba(53, 215, 255, .32);
}

#authScreen .preview-graph-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(53, 215, 255, .12), transparent 46%),
    rgba(255, 255, 255, .055);
}

#authScreen .preview-graph-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 16px 16px;
  height: 42px;
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(53, 215, 255, .88) 0 58%, transparent 58%),
    linear-gradient(90deg, rgba(8, 120, 255, .74) 0 78%, transparent 78%),
    rgba(255, 255, 255, .08);
  box-shadow: 0 0 22px rgba(53, 215, 255, .16);
  opacity: .85;
}

#authScreen .preview-donut {
  position: relative;
  display: grid;
  place-items: center;
}

#authScreen .preview-donut::before {
  content: "84";
  color: #FFFFFF;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 10px 22px rgba(0, 0, 0, .36);
}

#authScreen .preview-donut::after {
  content: "SCORE";
  position: absolute;
  top: calc(50% + 20px);
  left: 50%;
  color: rgba(220, 241, 255, .74);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  transform: translateX(-50%);
}

#authScreen .preview-stack div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(53, 215, 255, .32) 0 10px, transparent 11px),
    rgba(255, 255, 255, .06);
}

#authScreen .preview-stack span {
  color: rgba(220, 241, 255, .66);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

#authScreen .preview-stack strong {
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.1;
}

@media (max-width: 1500px) {
  #authScreen .preview-signal-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1501px) {
  #authScreen .preview-signal-grid {
    display: none;
  }

  #authScreen .preview-mini-cards article {
    min-height: 76px;
  }

  #authScreen .preview-stack div {
    min-height: 48px;
  }
}

body[data-theme="dark"] .admin-summary-card.revenue,
body[data-theme="dark"] .admin-summary-card.profit,
body[data-theme="dark"] .admin-summary-card.retention,
body[data-theme="dark"] .admin-summary-card.ltv {
  border-color: rgba(32, 211, 123, .42);
  background:
    linear-gradient(145deg, rgba(8, 41, 30, .96), rgba(7, 16, 30, .92));
  box-shadow:
    0 22px 48px rgba(32, 211, 123, .13),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .admin-summary-card.revenue strong,
body[data-theme="dark"] .admin-summary-card.profit strong,
body[data-theme="dark"] .admin-summary-card.retention strong,
body[data-theme="dark"] .admin-summary-card.ltv strong {
  color: #35E08A;
}

body[data-theme="dark"] .admin-summary-card.cost,
body[data-theme="dark"] .admin-summary-card.churn,
body[data-theme="dark"] .admin-summary-card.loss {
  border-color: rgba(255, 23, 73, .44);
  background:
    linear-gradient(145deg, rgba(54, 11, 23, .96), rgba(7, 16, 30, .92));
  box-shadow:
    0 22px 48px rgba(255, 23, 73, .14),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .admin-summary-card.cost strong,
body[data-theme="dark"] .admin-summary-card.churn strong,
body[data-theme="dark"] .admin-summary-card.loss strong {
  color: #FF5C7C;
}
