/* V1.8.1 — AI Content Workspace / Purple SaaS */
:root {
  color-scheme:light;
  --ink:#211b2b;
  --muted:#81798e;
  --line:#e8e2ef;
  --paper:#f7f5fa;
  --surface:#fff;
  --surface-2:#fcfaff;
  --surface-3:#f1ebf8;
  --green:#8739d7;
  --green2:#a43de7;
  --lime:#eee1ff;
  --white:#fff;
  --purple:#a52cff;
  --pink:#df38d8;
  --shadow:0 9px 30px rgba(52,28,75,.055);
  --shadow-hover:0 16px 38px rgba(52,28,75,.11);
}
html[data-theme="dark"] {
  color-scheme:dark;
  --ink:#f4effa;
  --muted:#9891a5;
  --line:#292431;
  --paper:#0b0a0f;
  --surface:#141219;
  --surface-2:#191620;
  --surface-3:#241c2d;
  --green:#bd5aff;
  --green2:#dc50f2;
  --lime:#2d1d3b;
  --white:#fff;
  --purple:#bd36ff;
  --pink:#ef42d8;
  --shadow:0 10px 34px rgba(0,0,0,.21);
  --shadow-hover:0 18px 46px rgba(0,0,0,.32);
}
html {scroll-behavior:smooth}
body {
  background:
    radial-gradient(ellipse at 80% -10%,rgba(168,48,255,.09),transparent 34%),
    var(--paper);
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:14px;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,b,strong {font-family:Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:-.025em}
h1 {font-size:clamp(25px,3vw,33px);font-weight:760;letter-spacing:-.045em}
h2 {font-size:22px;font-weight:740}
h3 {font-size:15px;font-weight:730}
p {line-height:1.65}
.hidden {display:none!important}
.muted {color:var(--muted)}
.eyebrow {font-size:10px;letter-spacing:.16em;font-weight:800;color:var(--muted)}
.tiny {font-size:11px}

/* Permanent dark sidebar, purple active state */
.app-shell {grid-template-columns:258px minmax(0,1fr);min-height:100vh}
.sidebar {
  position:sticky;top:0;height:100vh;
  padding:24px 16px 15px;
  background:linear-gradient(160deg,#100d16,#0b0a0f 75%);
  border-right:1px solid #282130;
  color:#f5effb;
  box-shadow:8px 0 34px rgba(0,0,0,.09);
}
.brand {padding:5px 9px 32px;gap:12px}
.brand-mark.small {
  width:40px;height:40px;border-radius:13px;
  background:linear-gradient(140deg,#e23ae0,#822cff);
  box-shadow:0 6px 22px rgba(177,43,255,.26);
}
.brand b {color:#fff;font-size:13px}
.brand small {color:#a69aaf}
#nav {display:grid;gap:5px}
.nav-item {
  min-height:46px;padding:11px 13px;margin:0;
  border:1px solid transparent;border-radius:12px;
  color:#a69fad;gap:13px;font-size:15px;
  transition:background .18s,border-color .18s,color .18s,transform .18s;
}
.nav-item span {font-size:12px;font-weight:650;letter-spacing:.005em}
.nav-item:hover {background:#1b1722;color:#fff;transform:translateX(2px)}
.nav-item.active {
  color:#fff;
  background:linear-gradient(100deg,rgba(174,48,255,.22),rgba(174,48,255,.07));
  border-color:rgba(187,91,255,.16);
  box-shadow:inset 3px 0 #c342ff;
}
.sidebar-bottom {
  margin-top:auto;padding:15px 9px 7px;
  border-top:1px solid #30283a;color:#a69fad;
}
.online-dot {background:#b34dff;box-shadow:0 0 0 4px rgba(179,77,255,.12)}
.sidebar-bottom .ghost {color:#ddd1e9;border-color:#403548}
.sidebar-bottom .ghost:hover {background:#211a29}

/* Top bar and always-visible theme control */
.main {max-width:1780px;min-width:0;width:100%;padding:28px clamp(22px,4vw,58px)}
.topbar {
  position:sticky;top:0;z-index:25;
  min-height:72px;
  margin:-28px calc(clamp(22px,4vw,58px) * -1) 27px;
  padding:13px clamp(22px,4vw,58px);
  background:color-mix(in srgb,var(--paper) 92%,transparent);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.topbar-heading {display:flex;align-items:center;gap:14px;min-width:0}
.topbar-heading .eyebrow {margin-bottom:4px}
.topbar-heading h1 {margin:0}
.topbar-right {display:flex;align-items:center;gap:11px;min-width:0}
.topbar-right #userEmail {font-size:11px}
.theme-toggle {
  display:inline-flex!important;visibility:visible!important;
  align-items:center;justify-content:center;gap:8px;
  flex:0 0 auto;min-height:39px;padding:8px 12px;
  border:1px solid var(--line);border-radius:11px;
  background:var(--surface);color:var(--ink);
  box-shadow:0 3px 12px rgba(0,0,0,.07);
  font-size:11px;font-weight:750;
}
.theme-toggle:hover {border-color:var(--purple);background:var(--surface-2)}
.theme-toggle-icon {font-size:17px;color:var(--purple);line-height:1}

/* Purple hero */
.hero {
  isolation:isolate;position:relative;overflow:hidden;
  min-height:205px;padding:34px 36px;margin-bottom:20px;
  border:1px solid rgba(210,138,255,.19);border-radius:22px;
  background:
    radial-gradient(circle at 87% 22%,rgba(208,61,255,.28),transparent 23%),
    radial-gradient(circle at 70% 120%,rgba(116,48,255,.28),transparent 38%),
    linear-gradient(112deg,#1b1028 0%,#17101f 55%,#100e17 100%);
  box-shadow:0 15px 42px rgba(88,30,133,.16);
}
.hero::after {
  content:"";position:absolute;z-index:-1;inset:0;opacity:.13;
  background-image:radial-gradient(rgba(255,255,255,.8) .7px,transparent .7px);
  background-size:17px 17px;
  mask-image:linear-gradient(90deg,transparent 16%,#000);
}
.hero h2 {max-width:700px;font-size:clamp(23px,3vw,31px);line-height:1.2;letter-spacing:-.04em;color:#fff}
.hero p:not(.eyebrow) {max-width:670px;font-size:13px;color:#c3b4d0}
.hero .eyebrow.light {color:#d18aff}
.hero-orbit {font-size:120px;color:#c143ff;opacity:.56;text-shadow:0 0 45px #a52cff}

/* KPI and panels */
.stats-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stat-card {
  min-width:0;position:relative;overflow:hidden;
  padding:20px;border:1px solid var(--line);border-radius:17px;
  background:var(--surface);box-shadow:var(--shadow);
  transition:transform .18s,border-color .18s,box-shadow .18s;
}
.stat-card::after {
  content:"";position:absolute;right:-38px;top:-52px;width:105px;height:105px;
  border-radius:50%;background:radial-gradient(circle,rgba(173,54,255,.13),transparent 70%);
}
.stat-card:hover {transform:translateY(-3px);border-color:rgba(174,67,255,.42);box-shadow:var(--shadow-hover)}
.stat-card span {font-size:11px;font-weight:650;color:var(--muted)}
.stat-card strong {display:block;margin:9px 0 2px;font-size:30px;font-weight:780;letter-spacing:-.055em;color:var(--ink)}
.stat-card small {font-size:10px;color:var(--muted)}
.grid-two {grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.panel {
  min-width:0;padding:22px;margin-bottom:17px;
  border:1px solid var(--line);border-radius:18px;
  background:var(--surface);box-shadow:var(--shadow);
}
.panel-head,.section-intro {gap:16px}
.panel-head h3 {margin-bottom:5px}
.panel-head p,.section-intro p {font-size:12px;color:var(--muted)}
.section-intro {margin:5px 0 21px}
.section-intro h2 {font-size:23px;letter-spacing:-.04em}
.workflow {gap:15px}
.workflow div {font-size:12px;color:var(--muted)}
.workflow b {
  display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;
  border-radius:12px;background:var(--lime);color:var(--green);
}
.platform-list {gap:13px}
.platform-row {font-size:12px}
.platform-row b {font-weight:720}
.platform-row span:last-child {padding:6px 10px;background:var(--surface-3);color:var(--muted);border-radius:20px}

/* Quick action workspace cards */
.quick-actions-panel {margin-top:18px}
.quick-actions-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.quick-actions-heading h3 {font-size:17px;margin:2px 0 4px}
.quick-actions-heading p:not(.eyebrow) {font-size:11px;color:var(--muted)}
.workspace-chip {
  padding:7px 10px;border:1px solid rgba(174,67,255,.24);
  border-radius:999px;background:var(--lime);color:var(--green);
  font-size:9px;font-weight:800;letter-spacing:.08em;white-space:nowrap;
}
.quick-actions-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.quick-action {
  display:grid;grid-template-columns:43px minmax(0,1fr) 18px;
  gap:10px;align-items:center;text-align:left;
  min-width:0;min-height:82px;padding:13px;
  border:1px solid var(--line);border-radius:14px;
  background:var(--surface-2);color:var(--ink);
}
.quick-action:hover {transform:translateY(-2px);border-color:rgba(184,66,255,.55);box-shadow:var(--shadow)}
.quick-action-icon {
  display:grid;place-items:center;width:42px;height:42px;
  border-radius:13px;color:white;font-size:19px;
  background:linear-gradient(145deg,#d83ddd,#822cff);
  box-shadow:0 5px 16px rgba(157,42,225,.2);
}
.quick-action-copy {display:grid;gap:3px;min-width:0}
.quick-action-copy b {font-size:11px;overflow-wrap:anywhere}
.quick-action-copy small {font-size:9px;color:var(--muted);line-height:1.4}
.quick-action-arrow {color:var(--purple);font-size:17px}

/* Forms, controls, buttons */
.stack {gap:15px}
.stack label,.form-grid label,.product-dialog label {
  gap:8px;color:var(--ink);font-size:11px;font-weight:700;
}
input,select,textarea {
  min-width:0;padding:12px 13px;
  border:1px solid var(--line);border-radius:11px;
  background:var(--surface-2);color:var(--ink);
  font:400 13px Inter,ui-sans-serif,system-ui,sans-serif;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
input::placeholder,textarea::placeholder {color:var(--muted);opacity:.8}
input:hover,select:hover,textarea:hover {border-color:rgba(175,67,255,.5)}
input:focus,select:focus,textarea:focus {
  outline:none;border-color:var(--purple);background:var(--surface);
  box-shadow:0 0 0 3px rgba(174,67,255,.14);
}
textarea {line-height:1.6}
.check {background:var(--surface-2);border-color:var(--line);color:var(--ink)}
.check input {accent-color:var(--purple)}
.form-grid {gap:15px}
.form-panel {padding:24px}
.product-form-help {color:var(--muted);line-height:1.7}
.product-research-source {padding:17px;background:var(--surface)}
.product-research-source label {color:var(--ink)}
button {
  min-height:39px;padding:10px 15px;border-radius:11px;
  font-size:11px;font-weight:740;letter-spacing:.005em;
  transition:background .16s,border-color .16s,transform .16s,box-shadow .16s;
}
button:focus-visible {outline:3px solid rgba(182,66,255,.48);outline-offset:2px}
button:hover {transform:translateY(-1px)}
.primary {
  color:#fff;
  background:linear-gradient(125deg,#b22cff,#832fe5);
  box-shadow:0 4px 14px rgba(155,43,226,.22);
}
.primary:hover {background:linear-gradient(125deg,#c23cff,#922cf4);box-shadow:0 7px 20px rgba(155,43,226,.3)}
.secondary {color:var(--green);background:var(--lime);border:1px solid rgba(174,67,255,.13)}
.secondary:hover {background:var(--surface-3)}
.ghost {color:var(--muted);background:var(--surface);border:1px solid var(--line)}
.ghost:hover {color:var(--ink);background:var(--surface-2);border-color:var(--purple)}
.button-row {gap:9px}

/* Product, research, content preview and tables */
.card-list {gap:12px}
.data-card {
  min-width:0;padding:17px;border:1px solid var(--line);
  border-radius:15px;background:var(--surface);
  box-shadow:0 3px 12px rgba(0,0,0,.025);
  transition:border-color .16s,box-shadow .16s;
}
.data-card:hover {border-color:rgba(175,67,255,.42);box-shadow:var(--shadow)}
.data-card b {font-weight:730;color:var(--ink)}
.data-card small {line-height:1.55;color:var(--muted)}
.product-actions {gap:7px}
.product-actions .meta {font-size:9px;letter-spacing:.09em;color:var(--green)}
.table-wrap {max-width:100%;border-radius:12px}
.data-table {font-size:11px}
.data-table th {color:var(--muted);font-size:9px;letter-spacing:.10em}
.data-table th,.data-table td {padding:13px 12px;border-bottom:1px solid var(--line)}
.data-table tbody tr:hover {background:var(--surface-2)}
.status {border:1px solid var(--line);background:var(--surface-3);color:var(--muted)}
.status.PUBLISHED,.status.APPROVED {background:var(--lime);color:var(--green)}
.preview-panel {padding:22px;min-height:420px}
#aiPreview {min-width:0}
#aiPreview>.notice {margin-bottom:13px}
.preview-item {
  margin:12px 0;padding:17px;
  border:1px solid var(--line);border-radius:15px;
  background:var(--surface-2);
}
.preview-item>b {font-size:13px}
.preview-item textarea,.preview-item input {background:var(--surface);color:var(--ink)}
.preview-item label {font-size:10px;color:var(--muted)}
.product-research-card,.hashtag-plan {
  border-color:var(--line);background:var(--surface-2);color:var(--ink);
}
.product-research-card>summary,.hashtag-plan>summary {color:var(--green)}
.product-research-card>section,.hashtag-plan-grid>section {
  background:var(--surface);border-color:var(--line);
}
.research-keywords>div,.research-comparisons>div {background:var(--surface-2);border-color:var(--line)}
.research-keywords b,.research-comparisons b {color:var(--ink)}
.research-keywords small,.research-comparisons small {color:var(--muted)}
.buyer-analysis-card {
  background:var(--lime);border-color:rgba(174,67,255,.25);color:var(--ink);
}
.buyer-analysis-card>summary,.copy-strategy>b,.buyer-strategy b {color:var(--green)}
.buyer-analysis-grid>div,.copy-strategy,.buyer-strategy {
  background:var(--surface);border-color:var(--line);
}
.buyer-analysis-grid b,.copy-strategy>div span,.buyer-analysis-grid span {color:var(--ink)}
.feedback-panel,.learning-memory-row,.product-intelligence {
  background:var(--surface-2);border-color:var(--line);color:var(--ink);
}
.feedback-panel>b,.product-intelligence summary {color:var(--green)}
.feedback-panel label {color:var(--muted)}
.feedback-panel select,.feedback-panel textarea {background:var(--surface);color:var(--ink);border-color:var(--line)}
.quality-score {background:var(--lime);border-color:var(--line);color:var(--ink)}
.quality-score b {color:var(--green)}
.trend-source-card,.hub-selected-item,.hub-admin-preview,.hub-preview-products>div {
  background:var(--surface-2);border-color:var(--line);color:var(--ink);
}
.hub-admin-preview>p,.hub-admin-preview>small {color:var(--muted)}
.hub-preview-products>div {background:var(--surface)}
.empty-state {background:var(--surface-2);border-color:var(--line);color:var(--muted)}
.empty-note {color:var(--muted)}
.notice {
  background:var(--lime);border:1px solid rgba(174,67,255,.17);color:var(--ink);
}
.notice.warning {background:#fff5e8;border-color:#f1dfc6;color:#80501e}
.pill {background:var(--lime);color:var(--green)}
.pill.orange {background:#fff1e6;color:#a85a2d}
.pill.green {background:var(--lime);color:var(--green)}
.toast {box-shadow:var(--shadow-hover)}
.product-dialog {background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.product-dialog input,.product-dialog textarea,.product-dialog select {background:var(--surface-2);color:var(--ink);border-color:var(--line)}
.slug-input {background:var(--surface);border-color:var(--line)}
.slug-input input {background:transparent}
footer {color:var(--muted);padding:30px 12px}

/* Dark palette: remove legacy white/green surfaces */
html[data-theme="dark"] body {background:var(--paper);color:var(--ink)}
html[data-theme="dark"] .main {background:transparent}
html[data-theme="dark"] .topbar {background:rgba(11,10,15,.93);border-color:var(--line)}
html[data-theme="dark"] .sidebar {background:linear-gradient(160deg,#100d16,#0b0a0f 75%)}
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .data-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .product-dialog {background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .auth-shell {
  background:
    radial-gradient(circle at 15% 15%,rgba(159,44,255,.18),transparent 34%),
    radial-gradient(circle at 90% 85%,rgba(222,56,216,.10),transparent 27%),
    var(--paper);
}
html[data-theme="dark"] .notice {background:var(--surface-3);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .notice.warning {background:#382b1d;border-color:#5a4429;color:#f0c48b}
html[data-theme="dark"] .pill.orange {background:#3b2b1f;color:#f2b47c}
html[data-theme="dark"] .platform-row span:last-child {background:var(--surface-3);color:var(--muted)}
html[data-theme="dark"] .workflow b {background:#2c1d3b;color:#d28bff}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .feedback-panel select,
html[data-theme="dark"] .feedback-panel textarea {background:#100e15;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {background:#17121e}
html[data-theme="dark"] .check,
html[data-theme="dark"] .feedback-panel,
html[data-theme="dark"] .learning-memory-row,
html[data-theme="dark"] .product-intelligence,
html[data-theme="dark"] .product-research-card,
html[data-theme="dark"] .hashtag-plan,
html[data-theme="dark"] .trend-source-card,
html[data-theme="dark"] .hub-selected-item,
html[data-theme="dark"] .hub-admin-preview,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .preview-item,
html[data-theme="dark"] .copy-strategy,
html[data-theme="dark"] .buyer-strategy,
html[data-theme="dark"] .quality-score {background:var(--surface-2);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .buyer-analysis-card {background:#291b37;border-color:#503465;color:var(--ink)}
html[data-theme="dark"] .buyer-analysis-grid>div,
html[data-theme="dark"] .product-research-card>section,
html[data-theme="dark"] .hashtag-plan-grid>section,
html[data-theme="dark"] .research-keywords>div,
html[data-theme="dark"] .research-comparisons>div,
html[data-theme="dark"] .hub-preview-products>div {background:#15121c;border-color:var(--line)}
html[data-theme="dark"] .data-table tbody tr:hover {background:var(--surface-2)}
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {border-color:var(--line)}
html[data-theme="dark"] .hub-preview-products>div {color:var(--ink)}
html[data-theme="dark"] .slug-input {background:var(--surface-2);border-color:var(--line)}
html[data-theme="dark"] .slug-input input {background:transparent}
html[data-theme="dark"] .product-dialog::backdrop {background:rgba(0,0,0,.76)}
html[data-theme="dark"] .trend-tags span {background:#2e1c3c;color:#dfa7ff}
html[data-theme="dark"] .trend-warning {background:#392f1c;color:#f1d18e}
html[data-theme="dark"] .toast {background:#281638;color:#f5effa}
html[data-theme="dark"] .toast.bad {background:#7b2929;color:#fff}
html[data-theme="dark"] .theme-toggle {background:#191620;border-color:#342c3c;color:#fff}

/* Light mode remains purple, not green */
html[data-theme="light"] .sidebar {background:linear-gradient(160deg,#17111f,#100d16)}
html[data-theme="light"] .hero {color:#fff}
html[data-theme="light"] .theme-toggle {background:#fff;color:#292033}

/* Tablet and mobile */
@media(max-width:1100px) {
  .app-shell {grid-template-columns:235px minmax(0,1fr)}
  .main {padding-left:25px;padding-right:25px}
  .topbar {margin-left:-25px;margin-right:-25px;padding-left:25px;padding-right:25px}
  .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .quick-actions-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero {padding:28px}
}
@media(max-width:900px) {
  .app-shell {display:block}
  .sidebar {
    position:fixed;z-index:40;top:0;right:auto;bottom:0;left:0;
    width:min(320px,88vw);height:100vh;height:100dvh;
    padding:22px 16px 14px;display:flex;flex-direction:column;
    overflow:hidden;transform:translateX(-105%);
    transition:transform .24s cubic-bezier(.2,.75,.25,1);
    box-shadow:18px 0 50px rgba(0,0,0,.35);
  }
  .sidebar .brand {display:flex!important;justify-content:flex-start;padding:4px 8px 24px}
  .sidebar .brand>div:last-child {display:block!important}
  #nav {display:flex;flex:1 1 auto;min-height:0;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;overflow-y:auto;overscroll-behavior:contain;padding:2px 0 12px}
  .nav-item {display:flex;width:100%;min-height:46px;justify-content:flex-start;align-items:center;gap:13px;margin:0;padding:12px 14px;font-size:16px;text-align:left;flex:0 0 auto}
  .nav-item span {display:inline!important;font-size:13px}
  .sidebar .sidebar-bottom {display:block!important;flex:0 0 auto;margin-top:10px;padding:14px 8px 8px;border-top:1px solid rgba(255,255,255,.14);font-size:11px}
  .sidebar-open .sidebar {transform:translateX(0)}
  .nav-backdrop {display:block;position:fixed;z-index:35;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;background:rgba(4,3,8,.62);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease}
  .sidebar-open .nav-backdrop {opacity:1;visibility:visible;pointer-events:auto}
  .mobile-menu-toggle {display:inline-flex;background:var(--surface);border:1px solid var(--line);color:var(--ink)}
  .topbar {margin:-16px -18px 20px;padding:12px 18px;min-height:66px;gap:10px}
  .topbar-heading h1 {font-size:24px}
  .topbar-right {gap:8px}
  .topbar-right #userEmail {display:none}
  .theme-toggle {display:inline-flex!important;visibility:visible!important}
  .grid-two {grid-template-columns:minmax(0,1fr)}
  .section-intro {align-items:flex-start}
  .panel {padding:19px}
}
@media(max-width:600px) {
  .main {max-width:none;padding:13px 12px 27px}
  .topbar {margin:-13px -12px 16px;padding:10px 12px;gap:8px}
  .topbar-heading {gap:9px}
  .topbar-heading h1 {font-size:21px}
  .topbar-heading .eyebrow {font-size:8px}
  .topbar-right {display:flex!important;gap:6px;flex:0 0 auto}
  .topbar-right .pill {display:none}
  .theme-toggle {
    display:inline-flex!important;visibility:visible!important;
    width:40px;min-width:40px;height:40px;min-height:40px;
    padding:0;flex:0 0 40px;
  }
  .theme-toggle-label {display:none}
  .mobile-menu-toggle {display:inline-flex!important;width:40px;height:40px;min-width:40px;flex-basis:40px}
  .hero {min-height:0;padding:21px 19px;border-radius:17px}
  .hero h2 {font-size:21px}
  .hero p:not(.eyebrow) {font-size:12px}
  .hero-orbit {font-size:66px}
  .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .stat-card {padding:14px;border-radius:14px}
  .stat-card strong {font-size:25px}
  .panel {padding:15px;border-radius:15px}
  .section-intro h2 {font-size:20px}
  .section-intro p {font-size:11px}
  .form-grid {grid-template-columns:minmax(0,1fr);gap:12px}
  .span-2 {grid-column:1/-1}
  .checks {grid-template-columns:repeat(2,minmax(0,1fr))}
  .button-row {gap:7px}
  .button-row>button {flex:1 1 135px}
  input,select,textarea {font-size:16px;min-height:45px}
  textarea {min-height:90px}
  button {min-height:43px}
  .data-card {padding:14px}
  .product-actions {justify-content:flex-start;margin-top:10px}
  .preview-item {padding:13px}
  .buyer-analysis-grid {grid-template-columns:1fr}
  .trend-platform-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .hashtag-plan-grid,.trend-source-grid {grid-template-columns:1fr}
  .table-wrap {width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .data-table {min-width:620px}
  .quick-actions-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .quick-action {grid-template-columns:34px minmax(0,1fr);gap:8px;min-height:75px;padding:10px}
  .quick-action-icon {width:34px;height:34px;border-radius:10px;font-size:16px}
  .quick-action-arrow {display:none}
  .quick-actions-heading {align-items:flex-start}
  .workspace-chip {font-size:8px;padding:6px 8px}
  .auth-card {padding:24px}
}
@media(max-width:370px) {
  .topbar-heading .eyebrow {display:none}
  .topbar-heading h1 {font-size:19px}
  .quick-actions-grid {grid-template-columns:1fr}
  .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* V1.8.1 R2 — force consistent purple accents across legacy widgets */
html[data-theme] .primary,
html[data-theme] button.primary {
  background:linear-gradient(125deg,#b22cff,#832fe5)!important;
  color:#fff!important;
}
html[data-theme] .nav-item.active {
  background:linear-gradient(100deg,rgba(174,48,255,.25),rgba(174,48,255,.08))!important;
  color:#fff!important;
  box-shadow:inset 3px 0 #c342ff!important;
}
html[data-theme] .brand-mark {background:linear-gradient(140deg,#e23ae0,#822cff)!important}
html[data-theme] .trend-tags span {
  background:var(--lime)!important;color:var(--green)!important
}
html[data-theme] .trend-evidence a,
html[data-theme] .product-intelligence summary,
html[data-theme] .product-research-card>summary,
html[data-theme] .hashtag-plan>summary,
html[data-theme] .feedback-panel>b,
html[data-theme] .quality-score b,
html[data-theme] .buyer-analysis-card>summary,
html[data-theme] .copy-strategy>b,
html[data-theme] .buyer-strategy b,
html[data-theme] .hub-list-card a {
  color:var(--green)!important
}
html[data-theme] .secondary {
  background:var(--lime)!important;color:var(--green)!important
}
html[data-theme] .theme-toggle {border-color:var(--line)!important}

/* V1.8.3 Account Management */
.manager-card {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:14px; padding:15px; border:1px solid var(--line);
  border-radius:14px; background:var(--surface); min-width:0;
}
.manager-card-main {display:grid; gap:6px; min-width:0; flex:1}
.manager-card-main>b {font-size:13px}
.manager-card-main>small {font-size:11px; color:var(--muted); overflow-wrap:anywhere}
.manager-card-actions {display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; flex-shrink:0}
.manager-card-actions button,.small-btn {padding:8px 10px; font-size:11px}
.danger {background:#8b292e; color:#fff}
.account-toolbar {display:grid; grid-template-columns:minmax(180px,1fr) minmax(140px,.65fr) minmax(140px,.65fr); gap:8px; margin-top:16px}
.account-setting-row {align-items:flex-start}
.account-setting-main {display:grid; gap:8px; min-width:0; flex:1}
.account-platform-heading {display:flex; align-items:center; gap:8px}
.account-edit-dialog {width:min(560px,calc(100vw - 24px)); max-height:85vh; overflow:auto}
.account-edit-dialog form {padding:4px}
.account-edit-dialog::backdrop {background:rgba(8,5,14,.72); backdrop-filter:blur(3px)}
.toast {display:flex; align-items:flex-start; gap:12px; width:max-content; max-width:min(680px,calc(100vw - 28px)); user-select:text; text-align:left}
.toast.hidden {display:none!important}
.toast-message {flex:1; min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; user-select:text}
.toast-actions {display:flex; align-items:center; gap:6px; flex-shrink:0}
.toast-action {padding:6px 9px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.10); color:inherit; font-size:10px}
html[data-theme="light"] .toast-action {border-color:rgba(0,0,0,.15); background:rgba(0,0,0,.06)}
@media(max-width:720px) {
  .manager-card {flex-direction:column}
  .manager-card-actions {justify-content:flex-start; width:100%}
  .account-toolbar {grid-template-columns:1fr}
  .toast {left:10px; right:10px; bottom:76px; width:auto; max-width:none}
}

/* V1.8.5 Studio — Link Hub */
.linkhub-page-head,.publish-page-head {
  display:flex;align-items:flex-end;justify-content:space-between;gap:20px;
  margin:5px 0 22px;
}
.linkhub-page-head h2,.publish-page-head h2 {
  margin:0 0 8px;font-size:clamp(25px,3vw,32px);letter-spacing:-.055em;
}
.linkhub-page-head>div:first-child>p:last-child,
.publish-page-head>div:first-child>p:last-child {
  max-width:720px;color:var(--muted);font-size:12px;line-height:1.65;
}
.linkhub-head-status {
  display:flex;align-items:center;gap:9px;padding:10px 13px;
  white-space:nowrap;border:1px solid var(--line);border-radius:13px;
  background:var(--surface);color:var(--muted);font-size:11px;font-weight:700;
}
.linkhub-head-status span,.publisher-status-indicator {
  width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#a4a0ad;
}
.linkhub-process-strip {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;
  margin-bottom:18px;border:1px solid var(--line);border-radius:15px;
  overflow:hidden;background:var(--surface);
}
.linkhub-process-strip>div {
  display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:10px;
  align-items:center;padding:14px 17px;border-right:1px solid var(--line);
}
.linkhub-process-strip>div:last-child {border-right:0}
.linkhub-process-strip>div>span {
  grid-row:span 2;display:grid;place-items:center;width:29px;height:29px;
  border-radius:9px;background:var(--surface-3);color:var(--green);
  font-size:10px;font-weight:800;
}
.linkhub-process-strip b {font-size:12px;color:var(--ink)}
.linkhub-process-strip small {font-size:10px;color:var(--muted)}
.linkhub-workspace {display:grid;grid-template-columns:minmax(0,1.08fr) minmax(330px,.92fr);gap:18px;align-items:start}
.linkhub-editor-panel,.linkhub-side-column>.panel {padding:22px}
.linkhub-side-column {display:grid;gap:17px;min-width:0}
.linkhub-panel-heading {display:flex;align-items:center;gap:12px;margin-bottom:18px}
.linkhub-step-number {
  width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:12px;background:var(--surface-2);
  color:var(--green);font-size:12px;font-weight:850;
}
.linkhub-panel-heading h3 {margin:0 0 4px;font-size:15px;letter-spacing:-.02em}
.linkhub-panel-heading p {margin:0;color:var(--muted);font-size:11px}
.linkhub-form {gap:20px}
.linkhub-form-section {display:grid;gap:13px}
.linkhub-section-label {
  display:block;padding-bottom:9px;border-bottom:1px solid var(--line);
  color:var(--muted);font-size:9px;font-weight:850;letter-spacing:.14em;
}
.linkhub-form label {gap:7px;font-size:11px;font-weight:700}
.linkhub-form input,.linkhub-form textarea,.linkhub-form select {
  min-width:0;border-radius:10px;font-size:12px;
}
.linkhub-form small {font-size:10px;line-height:1.5}
.linkhub-publish-toggle {
  display:flex!important;align-items:center;padding:13px;border:1px solid var(--line);
  border-radius:12px;background:var(--surface-2);
}
.linkhub-publish-toggle input {width:17px;min-height:17px;flex:0 0 17px}
.linkhub-publish-toggle span {display:grid;gap:3px}
.linkhub-publish-toggle b {font-size:11px;color:var(--ink)}
.linkhub-publish-toggle small {color:var(--muted);font-weight:400}
.linkhub-product-picker {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
.linkhub-product-picker button {white-space:nowrap}
.linkhub-form-actions {display:flex;flex-wrap:wrap;gap:9px;padding-top:17px;border-top:1px solid var(--line)}
.linkhub-form-actions button {min-height:43px}
.linkhub-preview-panel {overflow:hidden}
#linkHubPreview.hub-admin-preview {
  display:flex;flex-direction:column;align-items:center;gap:10px;
  min-height:190px;padding:24px 19px;border:1px solid var(--line);
  border-radius:15px;background:var(--surface-2);text-align:center;
}
#linkHubPreview .hub-preview-avatar {
  width:67px;height:67px;flex:0 0 67px;display:grid;place-items:center;
  overflow:hidden;border:3px solid var(--surface);border-radius:50%;
  background:linear-gradient(140deg,#6b4ac3,#a28be4);
  color:white;font-size:25px;font-weight:800;box-shadow:0 5px 18px rgba(30,20,55,.16);
}
#linkHubPreview .hub-preview-avatar img {width:100%;height:100%;object-fit:cover}
#linkHubPreview .hub-account-meta {display:grid;justify-items:center;gap:4px;font-size:11px}
#linkHubPreview h3 {margin:5px 0 0;font-size:18px;letter-spacing:-.035em}
#linkHubPreview>p {max-width:370px;color:var(--muted);font-size:11px;line-height:1.6}
#linkHubPreview .notice {width:100%;margin-top:5px;border-radius:10px;font-size:10px}
#linkHubPreview .hub-preview-products {width:100%;display:grid;gap:7px;margin-top:5px}
#linkHubPreview .hub-preview-products>div {
  display:flex;justify-content:space-between;gap:10px;padding:10px 12px;
  border:1px solid var(--line);border-radius:10px;text-align:left;font-size:10px;
}
.linkhub-public-url-wrap {
  display:grid;gap:5px;margin-top:13px;padding:12px 13px;
  border:1px solid var(--line);border-radius:11px;background:var(--surface-2);
}
.linkhub-public-url-wrap>span {font-size:9px;font-weight:850;letter-spacing:.13em;color:var(--muted)}
.linkhub-public-url-wrap p,.linkhub-public-url-wrap a {
  margin:0;overflow-wrap:anywhere;font-size:11px;font-weight:700;color:var(--green);
}
.linkhub-pages-panel .card-list {display:grid;gap:9px}
#linkHubList .data-card {gap:10px;padding:13px;border-radius:12px}
#linkHubList .hub-account-meta {display:grid;gap:5px;margin-top:6px}
#linkHubList .hub-list-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#linkHubList a {overflow-wrap:anywhere;font-size:10px}
.account-profile-avatar {
  width:49px;height:49px;flex:0 0 49px;display:grid;place-items:center;
  overflow:hidden;margin-top:2px;border:1px solid var(--line);border-radius:50%;
  background:var(--surface-3);color:var(--muted);font-weight:800;font-size:19px;
}
.account-profile-avatar img {width:100%;height:100%;object-fit:cover}
.account-profile-field {display:block;margin-top:7px;font-size:11px}
.account-profile-field input {width:100%;min-width:0}
.account-profile-controls {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.account-profile-controls small {font-size:10px;color:var(--muted);overflow-wrap:anywhere}
.hub-preview-avatar {overflow:hidden}
.hub-preview-avatar img {display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}

/* V1.8.5 Studio — publishing centre */
.publish-status-card,.publisher-status-card {
  display:flex;align-items:flex-start;gap:13px;padding:17px 19px;
  margin-bottom:16px;border:1px solid var(--line);border-radius:15px;
  background:var(--surface);box-shadow:var(--shadow);
}
.publisher-status-indicator {margin-top:5px;background:#d48b45;box-shadow:0 0 0 4px rgba(212,139,69,.12)}
.publisher-status-indicator.simulated {background:#679bce;box-shadow:0 0 0 4px rgba(103,155,206,.12)}
.publisher-status-copy {min-width:0;flex:1}
.publisher-status-title {display:flex;align-items:center;justify-content:space-between;gap:12px}
.publisher-status-title b {font-size:13px}
.publisher-status-title>span {padding:5px 8px;border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:9px;font-weight:850;letter-spacing:.1em}
.publisher-status-copy>p {margin:6px 0 12px;color:var(--muted);font-size:11px;line-height:1.55}
.publisher-platforms {display:flex;flex-wrap:wrap;gap:7px}
.publisher-platform-chip {
  display:grid;gap:3px;padding:7px 9px;border:1px solid var(--line);
  border-radius:9px;background:var(--surface-2);
}
.publisher-platform-chip b {font-size:10px}
.publisher-platform-chip small {color:var(--muted);font-size:9px}
.publish-stats {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:17px}
.publish-stat {
  display:grid;gap:7px;padding:13px;border:1px solid var(--line);
  border-radius:12px;background:var(--surface);
}
.publish-stat small {color:var(--muted);font-size:10px}
.publish-stat b {font-size:24px;letter-spacing:-.05em}
.publish-queue-panel {overflow:hidden}
.publish-list {display:grid;gap:11px}
.publish-item {padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.publish-item-head {display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.publish-item-copy {min-width:0}
.publish-item-copy>small {display:block;color:var(--muted);font-size:10px}
.publish-item-copy h3 {margin:7px 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.publish-item-copy time {color:var(--muted);font-size:9px}
.publish-targets {display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.publish-target-chip {
  display:grid;gap:3px;min-width:105px;padding:8px 10px;
  border:1px solid var(--line);border-radius:9px;background:var(--surface);
}
.publish-target-chip>span {font-size:10px;font-weight:750}
.publish-target-chip>small {font-size:9px;color:var(--muted)}
.publish-target-chip>small.PUBLISHED {color:#26986c}
.publish-target-chip>small.FAILED {color:#d46b70}
.publish-item-meta {display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:12px;color:var(--muted);font-size:10px}
.publish-errors {display:grid;gap:5px;margin-top:11px;padding:10px 12px;border:1px solid rgba(212,107,112,.25);border-radius:9px;background:rgba(212,107,112,.07);color:var(--ink);font-size:10px;line-height:1.5}
.publish-attempts {margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.publish-attempts summary {cursor:pointer;color:var(--muted);font-size:10px;font-weight:750}
.publish-attempt {display:grid;grid-template-columns:100px 100px minmax(0,1fr) auto;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:9px}
.publish-attempt small,.publish-attempt time {color:var(--muted);overflow-wrap:anywhere}
.publish-item-actions {display:flex;justify-content:flex-end;margin-top:12px}
.publish-empty {display:grid;justify-items:center;gap:9px;padding:35px 15px;text-align:center}
.publish-empty b {font-size:14px}
.publish-empty p {max-width:410px;color:var(--muted);font-size:11px;line-height:1.6}
@media(max-width:1050px) {
  .linkhub-workspace {grid-template-columns:minmax(0,1fr)}
  .linkhub-side-column {grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .publish-stats {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px) {
  .linkhub-page-head,.publish-page-head {align-items:flex-start;flex-direction:column;gap:12px}
  .linkhub-head-status {white-space:normal}
  .linkhub-process-strip>div {grid-template-columns:25px minmax(0,1fr);padding:10px 8px;gap:6px}
  .linkhub-process-strip>div>span {width:24px;height:24px}
  .linkhub-process-strip small {font-size:9px}
  .linkhub-editor-panel,.linkhub-side-column>.panel {padding:16px}
  .linkhub-side-column {grid-template-columns:minmax(0,1fr)}
  .linkhub-product-picker {grid-template-columns:minmax(0,1fr)}
  .publish-stats {grid-template-columns:repeat(2,minmax(0,1fr))}
  .publish-item-head {flex-direction:column}
  .publish-attempt {grid-template-columns:1fr 1fr}
  .publish-attempt small {grid-column:1/-1}
}


/* RP187_GLOBAL_STOREFRONT_ADMIN */
.linkhub-page-head,.linkhub-process-strip,.linkhub-workspace{display:none!important}
.rp-store-admin{margin-bottom:22px}.rp-store-head,.rp-store-catalog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.rp-store-head p:not(.eyebrow){font-size:12px}.rp-store-settings{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:13px;background:var(--panel,transparent)}.rp-store-save{display:flex;align-items:end}.rp-store-identity{display:flex;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line)}.rp-store-logo-box{width:104px;height:104px;flex:0 0 104px;display:grid;place-items:center;border-radius:18px;overflow:hidden;background:#151515;color:#e6e6e6;border:1px solid var(--line);font:800 26px Manrope}.rp-store-logo-box img{width:100%;height:100%;object-fit:cover}.rp-store-logo-controls{display:grid;gap:8px;min-width:0}.rp-store-logo-controls input{max-width:360px}.rp-store-url{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}.rp-store-url>div:first-child{display:grid;gap:5px;min-width:0}.rp-store-url b{overflow-wrap:anywhere;font-size:13px}.rp-store-open{display:inline-flex;align-items:center;text-decoration:none;padding:11px 15px;border-radius:10px;font-size:12px;font-weight:700}.rp-store-catalog-head{align-items:center;margin:18px 0 12px}.rp-store-product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rp-store-product{display:grid;grid-template-columns:116px minmax(0,1fr);gap:12px;padding:12px;border:1px solid var(--line);border-radius:13px;min-width:0}.rp-store-product-photo{width:116px;aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:var(--surface-secondary,#f2f3f2);color:var(--muted);font-size:10px;text-align:center}.rp-store-product-photo img{width:100%;height:100%;object-fit:cover}.rp-no-image{padding:8px}.rp-store-product-info{display:grid;align-content:start;gap:6px;min-width:0}.rp-store-product-info>b{font-size:12px;line-height:1.45}.rp-store-product-info>strong{font-size:13px}.rp-store-product-info>small{font-size:10px;color:var(--muted)}.rp-category{font-size:9px;font-weight:700;width:max-content;max-width:100%;padding:4px 7px;border-radius:20px}.rp-category.verified{background:#e5f5e9;color:#28754c}.rp-category.pending{background:#fff2df;color:#99601a}.rp-image-tools{display:grid;gap:7px;margin-top:6px;padding-top:8px;border-top:1px solid var(--line)}.rp-image-tools label{display:grid;gap:5px;font-size:10px;font-weight:700;color:var(--muted)}.rp-image-tools input{font-size:11px;padding:8px}.rp-image-tools .button-row button{padding:8px 10px;font-size:10px}.rp-upload-label input{border:0;padding:4px 0}.rp-product-link{font-size:10px;color:var(--accent,#287e62);text-decoration:none;margin-top:3px}.rp-store-footnote{padding:12px;background:var(--surface-secondary,rgba(120,120,120,.07));border-radius:9px;margin-top:16px;line-height:1.6}
@media(max-width:900px){.rp-store-product-grid{grid-template-columns:1fr}}
@media(max-width:600px){.rp-store-head,.rp-store-url{align-items:flex-start;flex-direction:column}.rp-store-identity{align-items:flex-start}.rp-store-product{grid-template-columns:88px minmax(0,1fr);gap:9px;padding:9px}.rp-store-product-photo{width:88px}.rp-store-product .button-row{flex-wrap:wrap}}
/* END RP187_GLOBAL_STOREFRONT_ADMIN */
