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

@supports (font: -apple-system-body) {
  html {
    font: -apple-system-body;
  }
}

:root {
  color-scheme: dark;
  --bg: #1e1e1e;
  --panel: #252526;
  --panel-2: #2d2d30;
  --line: #414147;
  --text: #dcdcdc;
  --muted: #a4a4aa;
  --accent: #00e5ff;
  --accent-strong: #00b8d4;
  --purple: #c586ff;
  --mint: #39ff88;
  --warning: #ffd866;
  --danger: #ff5c8a;
  --radius: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.5;
  background:
    radial-gradient(circle at 92% 4%, rgba(0, 229, 255, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
}

body.nav-open {
  overflow: hidden;
}

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

p,
li,
label,
button,
a,
input,
textarea,
select {
  overflow-wrap: anywhere;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #07130f;
  border-radius: 10px;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.4rem;
  border-right: 1px solid var(--line);
  background: rgba(24, 24, 24, 0.97);
  backdrop-filter: blur(18px);
}

.mobile-menu,
.mobile-close,
.nav-scrim {
  display: none;
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-avatar {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.1);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 0.1rem;
  color: var(--muted);
}

nav {
  display: grid;
  gap: 0.35rem;
  min-height: 0;
  overflow-y: auto;
}

nav a {
  padding: 0.72rem 0.85rem;
  border-radius: 11px;
  color: var(--muted);
  text-decoration: none;
}

nav .nav-action {
  width: 100%;
  padding: 0.58rem 0.85rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
}

nav a:hover,
nav a.active,
nav .nav-action:hover {
  background: var(--panel-2);
  color: var(--text);
}

.nav-label {
  margin: 0.75rem 0.85rem 0.15rem;
  color: #85858c;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group {
  border-radius: 12px;
}

.nav-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.72rem 0.85rem;
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.nav-group summary:hover,
.nav-group:has(a.active) summary {
  background: var(--panel-2);
  color: var(--text);
}

.nav-chevron {
  color: #85858c;
  transition: transform 160ms ease;
}

.nav-group[open] .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-links {
  display: grid;
  gap: 0.2rem;
  margin: 0.25rem 0 0.35rem 0.65rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--line);
}

.nav-group-links a {
  padding-block: 0.58rem;
  font-size: 0.88rem;
}

.nav-group-links .install-app-cta {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.7rem;
  border: 1px solid rgba(0, 229, 255, 0.42);
  background: rgba(0, 122, 204, 0.16);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 229, 255, 0.08);
}

.install-app-cta > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #071014;
  font-size: 1.15rem;
  font-weight: 900;
}

.install-app-cta > span:last-child {
  display: grid;
  gap: 0.1rem;
}

.install-app-cta strong {
  color: var(--text);
}

.install-app-cta small {
  color: var(--muted);
  font-size: 0.66rem;
}

.nav-group-links .install-app-cta:hover {
  border-color: var(--accent);
  background: rgba(0, 122, 204, 0.24);
  box-shadow: 0 12px 34px rgba(0, 229, 255, 0.13);
}

.sidebar-foot {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.sidebar-setup {
  display: grid;
  gap: 0.65rem;
  margin-top: auto;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-setup-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-setup-heading strong {
  color: var(--mint);
}

.sidebar-setup .progress {
  height: 5px;
}

.sidebar-setup-list {
  display: grid;
  gap: 0.2rem;
}

.sidebar-setup-list a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-decoration: none;
}

.sidebar-setup-list a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.sidebar-setup-list a > span:first-child {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.65rem;
}

.sidebar-setup-list a.done {
  color: var(--mint);
}

.sidebar-setup-list a.done > span:first-child {
  border-color: rgba(109, 232, 208, 0.35);
  background: rgba(109, 232, 208, 0.09);
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 12px currentColor;
}

.status-dot.ready {
  background: var(--mint);
}

.status-dot.error {
  background: var(--danger);
}

main {
  min-width: 0;
  padding: 0 2rem 4rem;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 0.75rem 0;
  background: linear-gradient(to bottom, var(--bg) 75%, transparent);
}

.topbar-title {
  min-width: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h2 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.eyebrow {
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.project-switcher select {
  min-width: 150px;
  max-width: 230px;
  padding: 0.55rem 2.2rem 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--panel);
}

.sidebar-project-switcher {
  display: grid;
  gap: 0.4rem;
  margin-top: -0.75rem;
}

.sidebar-project-switcher > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-project-switcher select {
  width: 100%;
  min-width: 0;
  max-width: none;
  border-color: var(--line);
  background: var(--panel-2);
}

.auth-shell {
  display: block;
}

.auth-shell main {
  padding: 0;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 122, 204, 0.12), transparent 30rem),
    var(--bg);
}

.auth-card {
  width: min(720px, 100%);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 28, 47, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.auth-brand {
  margin-bottom: 2rem;
}

.auth-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-progress > span {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.25rem;
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.auth-progress > span.active {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-progress small {
  font-size: 0.68rem;
  font-weight: 600;
}

.text-button {
  padding: 0.6rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.project-card.selected {
  border-color: rgba(115, 224, 186, 0.6);
  box-shadow: inset 0 0 0 1px rgba(115, 224, 186, 0.12);
}

.publish-destinations {
  flex-basis: 100%;
  display: grid;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding: 0.9rem;
  border: 1px solid rgba(115, 224, 186, 0.3);
  border-radius: 12px;
  background: rgba(115, 224, 186, 0.06);
}

.network-drafts {
  display: grid;
  gap: 0.8rem;
  margin: 0.9rem 0;
}

.network-draft {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.35);
}

.network-draft .draft-box {
  margin-top: 0.6rem;
}

.media-request {
  margin: 0.8rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(182, 162, 255, 0.35);
  border-radius: 12px;
  background: rgba(182, 162, 255, 0.08);
}

.media-request strong {
  color: var(--purple);
}

.media-request p {
  margin: 0.35rem 0 0.65rem;
}

.publish-dialog .setup-shell {
  width: min(720px, calc(100vw - 2rem));
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.publish-dialog textarea {
  min-height: 12rem;
  resize: vertical;
}

.publish-dialog .setup-body {
  min-height: 0;
  padding-bottom: 2rem;
}

.publish-dialog .setup-footer {
  position: sticky;
  bottom: 0;
  margin-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.customizer-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.image-source-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.customizer-tab,
.image-source-tab {
  min-height: 42px;
  padding: 0.6rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.customizer-tab:hover,
.customizer-tab.active,
.image-source-tab:hover,
.image-source-tab.active {
  color: var(--text);
}

.customizer-tab.active {
  border-bottom-color: var(--accent);
}

.image-source-tab {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 9px;
}

.image-source-tab.active {
  border-color: rgba(0, 229, 255, 0.26);
  background: rgba(0, 122, 204, 0.16);
  color: var(--accent);
}

.customizer-panel {
  display: grid;
  gap: 0.8rem;
  min-height: 0;
  padding-top: 0.25rem;
}

.image-source-panel {
  display: grid;
  gap: 0.8rem;
}

#publish-download-image {
  justify-self: start;
}

.schedule-dialog {
  width: min(460px, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.schedule-dialog::backdrop {
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(4px);
}

.schedule-dialog-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.schedule-dialog-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr);
  gap: 0.8rem;
}

.schedule-dialog .setup-footer {
  padding: 0;
  border: 0;
}

.preflight-summary {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.review-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.error-text,
.warning-text {
  margin: 0;
}

.error-text {
  color: var(--danger);
}

.warning-text {
  color: var(--warning);
}

.image-customizer {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.35);
}

.upload-dropzone {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px dashed rgba(115, 224, 186, 0.5);
  border-radius: 12px;
  cursor: pointer;
}

.upload-dropzone input {
  padding: 0.4rem 0;
}

.image-preview {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
  gap: 1rem;
  align-items: start;
}

.image-generator {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.image-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
}

.recommendation-intro {
  display: grid;
  gap: 1rem;
}

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.pipeline-steps span {
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.pipeline-steps i {
  width: 1.5rem;
  height: 1px;
  background: var(--line);
}

.suggestions-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(1180px, 100%);
  gap: 1rem;
  margin: 0 auto;
}

.suggestions-page > * {
  grid-column: 1;
  min-width: 0;
}

.suggestion-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0 0.35rem;
  border-bottom: 1px solid var(--line);
}

.suggestion-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.suggestion-tab strong {
  display: grid;
  min-width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.72rem;
}

.suggestion-tab:hover,
.suggestion-tab.active {
  color: var(--text);
}

.suggestion-tab.active {
  border-bottom-color: var(--accent);
}

.suggestion-tab.active strong {
  background: rgba(0, 229, 255, 0.13);
  color: var(--accent);
}

.suggestion-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.suggestion-rail {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  max-height: min(720px, calc(100vh - 180px));
  overflow-y: auto;
  padding: 0.65rem;
  border-right: 1px solid var(--line);
  background: rgba(30, 30, 30, 0.72);
}

.suggestion-rail-item {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.suggestion-rail-item:hover {
  background: var(--panel-2);
}

.suggestion-rail-item.active {
  border-color: rgba(0, 229, 255, 0.32);
  background: rgba(0, 122, 204, 0.14);
  box-shadow: inset 3px 0 0 var(--accent);
}

.suggestion-rail-item .pill {
  justify-self: start;
}

.suggestion-rail-item strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.suggestion-rail-item small {
  color: var(--muted);
}

.suggestion-review {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.7rem);
}

.suggestion-review > .item {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.suggestion-actionbar {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.suggestion-primary-action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.suggestion-primary-action .button {
  min-width: min(100%, 220px);
}

.suggestion-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.queued-posts-panel {
  grid-column: auto;
}

.queued-posts-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.queued-posts-panel summary::-webkit-details-marker {
  display: none;
}

.queued-posts-panel summary > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.queued-posts-panel[open] summary > span:last-child {
  transform: rotate(180deg);
}

.schedule-list {
  display: grid;
  gap: 0.65rem;
}

.scheduled-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.scheduled-item strong {
  margin-left: 0.55rem;
}

.scheduled-item p {
  margin: 0.4rem 0 0.15rem;
}

.schedule-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.schedule-control input {
  width: auto;
  min-width: 13.5rem;
}

.scheduled-posts {
  display: grid;
  gap: 0.8rem;
}

.scheduled-post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.scheduled-post-card .draft-box {
  margin: 0.7rem 0;
}

.schedule-actions {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  min-width: 230px;
}

.compact-form {
  max-width: 720px;
  margin-top: 1rem;
}

.schedule-plan {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.schedule-plan-list {
  display: grid;
  gap: 0.75rem;
}

.schedule-plan-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  cursor: pointer;
}

.schedule-plan-item input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
}

.schedule-plan-item > span {
  display: grid;
  gap: 0.35rem;
}

.schedule-plan-item small {
  color: var(--accent);
  font-weight: 700;
}

.schedule-plan-item .draft-box {
  margin-top: 0.35rem;
}

.active-project {
  align-self: center;
  color: var(--accent);
  font-weight: 800;
}

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

.local-badge,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
}

.pill[data-status="ready"],
.pill[data-status="approved_copy_ready"] {
  border-color: rgba(115, 224, 186, 0.4);
  background: rgba(115, 224, 186, 0.08);
  color: var(--accent);
}

.pill[data-status="drafted"] {
  border-color: rgba(182, 162, 255, 0.4);
  background: rgba(182, 162, 255, 0.08);
  color: var(--purple);
}

.pill[data-status="dismissed"],
.pill[data-status="disabled"] {
  opacity: 0.7;
}

.view {
  max-width: 1180px;
  margin: 0 auto;
}

.hero,
.card,
.metric,
.loading-card,
.empty {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(42, 42, 45, 0.98), rgba(31, 31, 33, 0.98));
  border-radius: var(--radius);
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  overflow: hidden;
}

.hero-copy {
  max-width: 680px;
}

.hero h2 {
  font-size: clamp(1.65rem, 4vw, 3.1rem);
  letter-spacing: -0.04em;
}

.hero p {
  color: var(--muted);
  line-height: 1.65;
}

.miluma-avatar {
  width: clamp(150px, 18vw, 220px);
  height: clamp(150px, 18vw, 220px);
  align-self: center;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 38%;
  object-fit: cover;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.28),
    0 0 0 10px rgba(197, 134, 255, 0.04);
  transform: rotate(2deg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.metric {
  grid-column: span 3;
  padding: 1.1rem;
}

.metric strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.85rem;
}

.metric span,
.muted {
  color: var(--muted);
}

.card {
  grid-column: span 6;
  padding: 1.2rem;
}

.card.full {
  grid-column: 1 / -1;
}

.card.third {
  grid-column: span 4;
}

.card-header,
.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.stack {
  display: grid;
  gap: 0.8rem;
}

.item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 18, 31, 0.45);
}

.item p {
  color: var(--muted);
  line-height: 1.55;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0.62rem 0.9rem;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #071014;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.mobile-menu.button {
  display: none;
}

.button:hover {
  background: var(--accent-strong);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.button.compact {
  min-height: 36px;
  padding: 0.45rem 0.72rem;
}

.button.secondary {
  background: var(--purple);
  color: #100719;
}

.button.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.button.danger {
  background: rgba(255, 126, 138, 0.15);
  color: #ffb2b9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-bar {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.filter-button {
  white-space: nowrap;
}

.filter-button.active {
  border-color: var(--accent);
  background: rgba(115, 224, 186, 0.1);
}

.composer {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.composer[hidden] {
  display: none;
}

.draft-box {
  margin: 0.8rem 0;
  padding: 1rem;
  border-left: 3px solid var(--purple);
  border-radius: 0 12px 12px 0;
  background: rgba(182, 162, 255, 0.07);
  color: var(--text);
  white-space: pre-wrap;
}

.checklist {
  display: grid;
  gap: 0.65rem;
}

.check {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

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

.check-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.check.done .check-mark {
  border-color: var(--accent);
  background: rgba(115, 224, 186, 0.12);
  color: var(--accent);
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #007acc, var(--accent));
}

.billing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.membership-status {
  flex: 0 0 auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.membership-status.active {
  border-color: var(--accent);
  background: rgba(115, 224, 186, 0.12);
  color: var(--accent);
}

.usage-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.usage-meter-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.usage-meter-heading div {
  display: grid;
  gap: 0.15rem;
}

.usage-meter-heading span,
.usage-meter small {
  color: var(--muted);
}

.usage-progress {
  height: 11px;
  margin-bottom: 0.35rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.plan-card.selected {
  border-color: var(--accent);
}

.plan-card .button {
  margin-top: auto;
}

.plan-price {
  margin: 0;
  font-size: 2rem;
  font-weight: 750;
}

.plan-price small {
  margin-left: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.plain-list {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.button.disabled {
  cursor: default;
  opacity: 0.65;
}

.reveal {
  animation: reveal-up 0.65s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.delay-one {
  animation-delay: 0.08s;
}

.delay-two {
  animation-delay: 0.16s;
}

.delay-three {
  animation-delay: 0.24s;
}

.live-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 rgba(109, 232, 208, 0.45);
  animation: live-pulse 2s infinite;
}

.talk-experience,
.upsell-experience,
.billing-page,
.usage-page,
.admin-page {
  display: grid;
  gap: 1.2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.talk-welcome,
.upsell-hero,
.page-hero-clean,
.admin-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(190, 167, 255, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 15%, rgba(0, 122, 204, 0.14), transparent 20rem),
    linear-gradient(145deg, rgba(42, 42, 45, 0.98), rgba(30, 30, 30, 0.98));
  box-shadow: 0 28px 90px rgba(5, 2, 14, 0.32);
}

.talk-welcome,
.chat-stage {
  width: 100%;
  max-width: none;
}

.talk-welcome-copy,
.upsell-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.talk-welcome h2,
.upsell-hero h2,
.page-hero-clean h2,
.admin-hero h2 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.talk-welcome h2 span,
.upsell-hero h2 span {
  color: var(--accent);
}

.talk-welcome p,
.upsell-copy > p,
.page-hero-clean p,
.admin-hero p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.talk-context,
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.talk-context span,
.trust-row span {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.talk-context a,
.billing-facts a {
  color: var(--mint);
  text-decoration: none;
}

.avatar-stage {
  position: relative;
  width: clamp(190px, 24vw, 310px);
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.avatar-stage img,
.upsell-avatar-wrap > img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-radius: 38%;
  object-fit: cover;
  box-shadow: 0 35px 90px rgba(255, 100, 127, 0.25);
  animation: avatar-float 5s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: -12%;
  z-index: 1;
  border: 1px solid rgba(190, 167, 255, 0.24);
  border-radius: 50%;
  animation: orbit-spin 14s linear infinite;
}

.orbit::before {
  position: absolute;
  top: 12%;
  left: 10%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  content: "";
}

.orbit-two {
  inset: -22%;
  animation-direction: reverse;
  animation-duration: 19s;
}

.setup-ribbon,
.billing-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(25, 19, 41, 0.86);
}

.setup-ribbon > div:first-child {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}

.setup-ribbon > div:first-child strong {
  color: var(--mint);
  font-size: 1.35rem;
}

.setup-ribbon > div:first-child span {
  color: var(--muted);
  font-size: 0.8rem;
}

.setup-ribbon-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.setup-ribbon-items a {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.setup-ribbon-items a.done {
  border-color: rgba(109, 232, 208, 0.25);
  color: var(--mint);
}

.chat-stage {
  min-height: 520px;
  padding: clamp(1rem, 3vw, 1.6rem);
  border-radius: 26px;
}

.chat-stage-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-stage-heading h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.private-note {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.upsell-hero {
  min-height: min(680px, calc(100vh - 150px));
}

.upsell-copy .actions {
  margin-top: 1.5rem;
}

.upsell-avatar-wrap {
  position: relative;
  width: clamp(260px, 34vw, 470px);
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.avatar-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.48);
  filter: blur(55px);
  opacity: 0.35;
  animation: glow-breathe 4s ease-in-out infinite;
}

.spark {
  position: absolute;
  z-index: 4;
  color: var(--warning);
  font-size: 1.8rem;
  animation: sparkle 3s ease-in-out infinite;
}

.spark-one { top: 5%; right: 5%; }
.spark-two { top: 28%; left: -4%; animation-delay: 0.7s; color: var(--mint); }
.spark-three { right: 2%; bottom: 20%; animation-delay: 1.4s; color: var(--purple); }

.floating-note {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 0.15rem;
  max-width: 210px;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(20, 15, 34, 0.88);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  animation: note-float 5s ease-in-out infinite;
}

.floating-note span {
  color: var(--muted);
  font-size: 0.72rem;
}

.note-one { bottom: 7%; left: -10%; }
.note-two { top: 14%; right: -10%; animation-delay: 1.2s; }

.experience-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem;
}

.experience-flow > div {
  display: grid;
  gap: 0.25rem;
}

.experience-flow > div > span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.experience-flow small {
  color: var(--muted);
}

.experience-flow i {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, #007acc, var(--accent));
}

.pricing-showcase {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.section-heading {
  max-width: 680px;
}

.section-heading h2 {
  margin: 0.35rem 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  color: var(--muted);
}

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

.plan-card-new {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(37, 26, 57, 0.94), rgba(20, 15, 34, 0.96));
  transition: transform 180ms ease, border-color 180ms ease;
}

.plan-card-new:hover {
  border-color: rgba(255, 132, 151, 0.45);
  transform: translateY(-5px);
}

.plan-card-new.featured,
.plan-card-new.selected {
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(255, 100, 127, 0.14);
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--accent);
  color: #240b15;
  font-size: 0.7rem;
  font-weight: 900;
}

.plan-card-new h3 {
  margin: 0.3rem 0 0;
  font-size: 1.35rem;
}

.plan-features {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.plan-features li {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  gap: 0.25rem;
  align-items: baseline;
}

.plan-features span {
  color: var(--mint);
}

.plan-card-new .button,
.plan-change-note {
  margin-top: auto;
}

.plan-change-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-page,
.usage-page,
.admin-page {
  gap: 1.4rem;
}

.page-hero-clean h2,
.admin-hero h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.billing-status-card,
.admin-live {
  display: flex;
  min-width: 210px;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-status-card > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 132, 151, 0.12);
  color: var(--accent);
}

.billing-status-card.active > span {
  background: rgba(109, 232, 208, 0.12);
  color: var(--mint);
}

.billing-status-card div,
.admin-live div {
  display: grid;
  gap: 0.2rem;
}

.billing-status-card small,
.admin-live small {
  color: var(--muted);
}

.billing-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.billing-facts div {
  display: grid;
  gap: 0.2rem;
  padding: 0.25rem 0.7rem;
  border-right: 1px solid var(--line);
}

.billing-facts div:last-child {
  border: 0;
}

.billing-facts small {
  color: var(--muted);
}

.billing-assurance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.billing-assurance span {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
}

.billing-assurance p {
  color: var(--muted);
  line-height: 1.55;
}

.usage-empty {
  min-height: calc(100vh - 180px);
  place-items: center;
  align-content: center;
  text-align: center;
}

.usage-empty img {
  width: 150px;
  border-radius: 38%;
  box-shadow: 0 25px 70px rgba(255, 100, 127, 0.25);
  animation: avatar-float 5s ease-in-out infinite;
}

.usage-empty h2 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.05em;
}

.usage-empty > p:not(.eyebrow) {
  max-width: 600px;
  color: var(--muted);
  line-height: 1.65;
}

.usage-summary-grid,
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.usage-summary-grid article,
.admin-stat-grid article {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.usage-summary-grid span,
.admin-stat-grid span,
.usage-summary-grid small,
.admin-stat-grid small {
  color: var(--muted);
}

.usage-summary-grid strong,
.admin-stat-grid strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.usage-detail-grid,
.admin-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.usage-panel,
.admin-panel {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.network-usage-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.usage-footnote {
  color: var(--muted);
  text-align: center;
}

.admin-stat-grid {
  grid-template-columns: repeat(5, 1fr);
}

.admin-stat-grid article:nth-child(3) {
  background: linear-gradient(145deg, rgba(0, 122, 204, 0.14), var(--panel));
}

.impression-chart {
  display: flex;
  height: 240px;
  gap: 0.55rem;
  align-items: end;
  margin-top: 1rem;
  padding-top: 1.5rem;
}

.impression-chart > div {
  position: relative;
  display: grid;
  min-width: 20px;
  height: 100%;
  flex: 1;
  grid-template-rows: 1fr auto;
  align-items: end;
  text-align: center;
}

.impression-chart > div > span {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--accent), #007acc);
}

.impression-chart small {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.impression-chart strong {
  position: absolute;
  top: -1.2rem;
  right: 0;
  left: 0;
  font-size: 0.65rem;
}

.route-bars {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.route-bars > div > span {
  display: flex;
  justify-content: space-between;
}

.route-bars small {
  color: var(--muted);
}

.route-bars i {
  display: block;
  height: 8px;
  margin-top: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.route-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #007acc, var(--accent));
}

.admin-users {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.admin-user {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(130px, 0.6fr) minmax(220px, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-user.suspended {
  opacity: 0.64;
  border-color: rgba(255, 126, 138, 0.45);
}

.admin-user-identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-user-identity > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #007acc;
  color: #220b18;
  font-weight: 900;
}

.admin-user-identity div,
.admin-user-plan {
  display: grid;
  gap: 0.15rem;
}

.admin-user-identity small,
.admin-user-plan small,
.admin-user-usage small {
  color: var(--muted);
}

.admin-user-usage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.admin-user-usage span {
  display: grid;
  padding: 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.admin-user-controls {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.admin-user-controls input {
  min-width: 200px;
}

.billing-ledger {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.billing-ledger > div {
  display: grid;
  grid-template-columns: 100px 110px minmax(180px, 1fr) 110px minmax(160px, auto);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.billing-ledger small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes avatar-float {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}

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

@keyframes glow-breathe {
  0%, 100% { opacity: 0.28; transform: scale(0.94); }
  50% { opacity: 0.48; transform: scale(1.05); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.2) rotate(18deg); }
}

@keyframes note-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 232, 208, 0.45); }
  65% { box-shadow: 0 0 0 8px rgba(109, 232, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 232, 208, 0); }
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quick-prompts button {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.quick-prompts button:hover {
  border-color: var(--accent);
  color: var(--text);
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #1e1e1e;
  color: var(--text);
  padding: 0.7rem 0.8rem;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(115, 224, 186, 0.35);
  outline-offset: 2px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.service {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

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

.service > span:last-child {
  margin-left: auto;
}

.chat {
  display: grid;
  min-height: 430px;
  grid-template-rows: 1fr auto;
  gap: 1rem;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 58vh;
  overflow: auto;
}

.chat-message {
  display: grid;
  gap: 0.35rem;
}

.chat-message.user {
  justify-items: end;
}

.chat-message.assistant {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: end;
  justify-items: start;
}

.chat-message.assistant .chat-message-actions {
  grid-column: 2;
}

.suggestion-toolbox {
  display: grid;
  grid-column: 2;
  gap: 0.7rem;
  width: min(760px, 100%);
  margin-top: 0.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(190, 167, 255, 0.25);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 122, 204, 0.12), transparent 15rem),
    rgba(24, 18, 40, 0.92);
}

.suggestion-toolbox-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.suggestion-toolbox-heading > div {
  display: grid;
  gap: 0.15rem;
}

.suggestion-toolbox-heading > div > span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suggestion-toolbox-list {
  display: grid;
  gap: 0.45rem;
}

.suggestion-toolbox-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.suggestion-toolbox-list article.added {
  border-color: rgba(109, 232, 208, 0.24);
}

.toolbox-number {
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 900;
}

.suggestion-toolbox-list article > div {
  display: grid;
  gap: 0.25rem;
}

.suggestion-toolbox-list p,
.suggestion-toolbox-list small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.suggestion-toolbox-list small {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.75rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  grid-column: 1;
  grid-row: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  object-fit: cover;
}

.chat-message.assistant .bubble {
  grid-column: 2;
}

.chat-message-actions {
  display: flex;
  padding: 0 0.25rem;
}

.assistant-dock {
  position: fixed;
  z-index: 14;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  display: grid;
  justify-items: end;
  gap: 0.75rem;
  pointer-events: none;
}

.assistant-launcher,
.assistant-panel {
  pointer-events: auto;
}

.assistant-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 190px;
  padding: 0.55rem 0.8rem 0.55rem 0.55rem;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 16px;
  background: rgba(37, 37, 38, 0.97);
  color: var(--text);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  text-align: left;
}

.assistant-launcher:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.assistant-launcher img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  object-fit: cover;
}

.assistant-launcher span {
  display: grid;
  gap: 0.1rem;
}

.assistant-launcher small {
  color: var(--muted);
  font-size: 0.7rem;
}

.assistant-launcher i {
  position: absolute;
  top: 0.45rem;
  left: 2.65rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(57, 255, 136, 0.7);
}

.assistant-dock.open .assistant-launcher span {
  display: none;
}

.assistant-dock.open .assistant-launcher {
  min-width: 56px;
  padding-right: 0.55rem;
}

.assistant-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 2rem));
  height: min(680px, calc(100dvh - 7rem));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(37, 37, 38, 0.99);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  transform-origin: bottom right;
  animation: assistant-enter 160ms ease-out;
}

.assistant-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #2d2d30;
}

.assistant-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.assistant-identity img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
}

.assistant-identity div {
  display: grid;
  min-width: 0;
}

.assistant-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-identity .live-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.3rem;
}

.assistant-close {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.35rem;
}

.assistant-close:hover {
  border-color: var(--accent);
  color: var(--text);
}

.assistant-conversation {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  padding: 0.8rem;
}

.assistant-conversation .chat-log {
  min-height: 0;
  padding: 0 0.15rem 0.65rem;
}

.assistant-conversation .chat-message {
  max-width: 94%;
}

.assistant-conversation .quick-prompts {
  margin-bottom: 0.65rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.assistant-conversation #chat-form {
  flex-wrap: nowrap;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.assistant-conversation #chat-form input {
  min-width: 0;
}

.assistant-conversation .suggestion-toolbox {
  width: 100%;
  padding: 0.65rem;
}

.assistant-conversation .suggestion-toolbox-heading {
  align-items: flex-start;
  flex-direction: column;
}

.assistant-conversation .suggestion-toolbox-list article {
  grid-template-columns: 22px minmax(0, 1fr);
}

.assistant-conversation .suggestion-toolbox-list article > .button {
  grid-column: 2;
  justify-self: start;
}

@keyframes assistant-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

.bubble {
  max-width: 78%;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: #2b4669;
}

.bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 132, 151, 0.1);
  border: 1px solid rgba(255, 132, 151, 0.22);
}

.empty,
.loading-card {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  max-width: 380px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #192941;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.setup-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: min(760px, calc(100dvh - 2rem));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.setup-dialog::backdrop {
  background: rgba(2, 7, 14, 0.8);
  backdrop-filter: blur(5px);
}

.setup-shell {
  display: grid;
  height: min(760px, calc(100dvh - 2rem));
  max-height: inherit;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.setup-header,
.setup-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.setup-header h2 {
  margin-bottom: 0;
}

.setup-footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel);
}

.modal-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
}

.setup-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.8rem 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.setup-tab {
  min-width: 110px;
  padding: 0.65rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.setup-tab span,
.setup-tab strong {
  display: block;
}

.setup-tab span {
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
}

.setup-tab.active {
  border-color: var(--accent);
  background: rgba(115, 224, 186, 0.08);
  color: var(--text);
}

.setup-tab.complete {
  color: var(--accent);
}

.setup-body {
  padding: 1.35rem;
  overflow-y: auto;
}

.setup-body h3 {
  font-size: 1.25rem;
}

.setup-body p,
.setup-body li {
  color: var(--muted);
  line-height: 1.6;
}

.setup-body ol,
.setup-body ul {
  padding-left: 1.3rem;
}

.setup-callout {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(115, 224, 186, 0.3);
  border-radius: 12px;
  background: rgba(115, 224, 186, 0.07);
}

.setup-callout.warning {
  border-color: rgba(255, 203, 107, 0.35);
  background: rgba(255, 203, 107, 0.08);
}

.setup-result {
  margin: 0 1.5rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
}

.setup-result[data-status="success"] {
  border-color: rgba(115, 224, 186, 0.45);
  background: rgba(115, 224, 186, 0.08);
  color: var(--accent);
}

.setup-result[data-status="error"] {
  border-color: rgba(255, 126, 138, 0.45);
  background: rgba(255, 126, 138, 0.08);
  color: var(--danger);
}

.setup-review {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.setup-review > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.setup-review span {
  color: var(--muted);
}

.setup-progress {
  color: var(--muted);
  font-size: 0.8rem;
}

.adapter-launchers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.adapter-launcher {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 18, 31, 0.45);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.adapter-launcher:hover {
  border-color: var(--accent);
}

.adapter-launcher small {
  color: var(--muted);
}

/* VS Code dark surfaces with restrained neon accents. */
.auth-wrap {
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 122, 204, 0.12), transparent 30rem),
    var(--bg);
}

.auth-card,
.item,
.network-draft,
.image-customizer,
.adapter-launcher,
.setup-ribbon,
.billing-facts,
.floating-note,
.plan-card-new,
.billing-status-card,
.admin-live,
.suggestion-toolbox,
.suggestion-toolbox-list article,
.admin-user,
.admin-user-usage span,
.talk-context span,
.trust-row span {
  background: rgba(37, 37, 38, 0.92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

.talk-welcome,
.upsell-hero,
.page-hero-clean,
.admin-hero {
  border-color: rgba(197, 134, 255, 0.22);
  background:
    radial-gradient(circle at 82% 15%, rgba(0, 229, 255, 0.11), transparent 20rem),
    linear-gradient(145deg, rgba(45, 45, 48, 0.99), rgba(30, 30, 30, 0.99));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.media-request,
.subscription-callout,
.setup-callout,
.setup-tab.active {
  background: rgba(57, 255, 136, 0.07);
}

.publish-destinations,
.plan-card.selected,
.plan-card-new.featured,
.plan-card-new.selected {
  box-shadow: 0 14px 38px rgba(0, 229, 255, 0.08);
}

.bubble.user {
  background: #264f78;
  color: #fff;
}

.bubble.assistant {
  border-color: rgba(0, 229, 255, 0.24);
  background: rgba(0, 229, 255, 0.08);
}

.toast {
  background: #252526;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.popular-badge,
.admin-user-identity > span {
  color: #071014;
}

.sidebar-setup,
.setup-ribbon-items a {
  background: rgba(255, 255, 255, 0.025);
}

.setup-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

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

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

  .sidebar {
    position: fixed;
    z-index: 20;
    width: min(310px, 86vw);
    height: 100dvh;
    padding: 1.2rem;
    border-right: 1px solid var(--line);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .sidebar nav {
    display: grid;
    overflow-y: auto;
  }

  .sidebar-foot {
    display: flex;
  }

  .mobile-menu,
  .mobile-close {
    display: inline-flex;
  }

  .mobile-menu.button {
    display: inline-flex;
  }

  .mobile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 1.35rem;
  }

  .nav-scrim.visible {
    position: fixed;
    z-index: 15;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(2, 7, 14, 0.72);
  }

  main {
    padding: 0 1rem 3rem;
  }

  .metric,
  .card,
  .card.third {
    grid-column: span 6;
  }

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

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

  .talk-welcome,
  .upsell-hero,
  .page-hero-clean,
  .admin-hero {
    align-items: flex-start;
  }

  .upsell-avatar-wrap {
    width: min(38vw, 330px);
  }

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

  .admin-user-usage {
    grid-column: 1 / -1;
  }

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

  .suggestion-rail {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 42vw);
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .suggestion-rail-item.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }
}

@media (max-width: 620px) {
  .schedule-dialog-fields {
    grid-template-columns: 1fr;
  }

  .assistant-dock {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .assistant-panel {
    width: calc(100vw - 1.5rem);
    height: calc(100dvh - 5.75rem);
    border-radius: 17px;
  }

  .assistant-launcher {
    min-width: 56px;
    padding: 0.5rem;
    border-radius: 15px;
  }

  .assistant-launcher img {
    width: 42px;
    height: 42px;
  }

  .assistant-launcher span {
    display: none;
  }

  .assistant-launcher i {
    top: 0.35rem;
    left: 2.5rem;
  }

  .assistant-conversation {
    padding: 0.65rem;
  }

  .assistant-conversation #chat-form .button {
    min-width: auto;
    padding-inline: 0.75rem;
  }

  .recommendation-intro .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .recommendation-intro #add-suggestion {
    width: 100%;
  }

  .pipeline-steps i {
    width: 0.75rem;
  }

  .suggestion-tabs {
    padding: 0;
  }

  .suggestion-tab {
    min-height: 42px;
    padding-inline: 0.65rem;
  }

  .suggestion-rail {
    grid-auto-columns: minmax(170px, 72vw);
  }

  .suggestion-review {
    padding: 1rem;
  }

  .suggestion-review .item-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .suggestion-primary-action .button,
  .publish-destinations .button {
    width: 100%;
  }

  .suggestion-secondary-actions .button {
    flex: 1 1 auto;
  }

  .scheduled-post-card {
    grid-template-columns: 1fr;
  }

  .schedule-actions {
    min-width: 0;
  }

  .topbar {
    min-height: 76px;
  }

  .topbar-title .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .local-badge {
    display: none;
  }

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

  .miluma-avatar {
    width: 84px;
    height: 84px;
    grid-row: 1;
  }

  .metric,
  .card,
  .card.third {
    grid-column: 1 / -1;
  }

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

  .form-grid .wide {
    grid-column: auto;
  }

  .card-header,
  .item-header {
    align-items: stretch;
    flex-direction: column;
  }

  .card-header > .button {
    width: 100%;
  }

  .chat {
    min-height: calc(100dvh - 130px);
  }

  .bubble {
    max-width: 92%;
  }

  .check {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .check > .button {
    grid-column: 2;
    justify-self: start;
  }

  .setup-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .setup-tabs {
    grid-template-columns: repeat(4, 125px);
  }

  .setup-footer {
    position: sticky;
    bottom: 0;
  }

  .setup-progress {
    display: none;
  }

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

  .talk-welcome,
  .upsell-hero,
  .page-hero-clean,
  .admin-hero {
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 22px;
  }

  .avatar-stage {
    width: 135px;
    align-self: center;
  }

  .upsell-avatar-wrap {
    width: min(88vw, 340px);
    align-self: center;
  }

  .floating-note {
    display: none;
  }

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

  .experience-flow i {
    width: 1px;
    height: 20px;
    margin-left: 0.6rem;
  }

  .plan-grid-new,
  .usage-summary-grid,
  .usage-detail-grid,
  .billing-facts,
  .billing-assurance,
  .admin-stat-grid,
  .admin-chart-grid,
  .admin-user {
    grid-template-columns: 1fr;
  }

  .setup-ribbon,
  .chat-stage-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-facts div {
    padding: 0.7rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .billing-status-card,
  .admin-live {
    min-width: 0;
    width: 100%;
  }

  .admin-user-plan,
  .admin-user-usage {
    grid-column: auto;
  }

  .admin-user-controls {
    flex-direction: column;
  }

  .admin-user-controls label,
  .admin-user-controls input,
  .admin-user-controls select,
  .admin-user-controls button {
    width: 100%;
  }

  .billing-ledger > div {
    grid-template-columns: 1fr 1fr;
  }

  .suggestion-toolbox-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .suggestion-toolbox-list article {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .suggestion-toolbox-list article > .button {
    grid-column: 2;
    justify-self: start;
  }
}

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