:root {
  color-scheme: dark;
  --bg: #050509;
  --panel: rgba(12, 12, 26, 0.82);
  --panel-strong: #0c0c1a;
  --text: #eef0ff;
  --muted: #8890b8;
  --accent: #7c5cfc;
  --accent-2: #36d1f0;
  --accent-glow: rgba(124, 92, 252, 0.22);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-active: rgba(124, 92, 252, 0.5);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(124, 92, 252, 0.20) 0%, transparent 38%),
    radial-gradient(circle at 82% 6%, rgba(54, 209, 240, 0.10) 0%, transparent 32%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; }

/* ===== TOPBAR ===== */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px);
  background: rgba(5, 5, 9, 0.72);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand, nav { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.brand { gap: 16px; font-weight: 800; letter-spacing: -0.01em; }
.brand-logo {
  width: 42px; height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(124, 92, 252, 0.68));
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }
nav a.nav-active { color: var(--text); }

/* ===== NAV LINKS (icon pills) ===== */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
}
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-link.nav-active { color: var(--text); background: rgba(124, 92, 252, 0.16); }

/* ===== NAV "MORE" DROPDOWN ===== */
.nav-more { position: relative; display: inline-flex; }
.nav-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.nav-more-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-more-toggle .nav-more-chevron { width: 12px; height: 12px; margin-left: -2px; transition: transform 0.18s; }
.nav-more-toggle:hover,
.nav-more-toggle.nav-active,
.nav-more.open .nav-more-toggle {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}
.nav-more.open .nav-more-chevron { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}
.nav-more.open .nav-more-menu { display: flex; }
.nav-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.87rem;
  transition: color 0.15s, background 0.15s;
}
.nav-more-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-more-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-more-item.nav-active { color: var(--text); background: rgba(124, 92, 252, 0.16); }
.nav-more-divider { height: 1px; background: var(--line); margin: 6px 4px; }

/* ===== SHELL & HERO ===== */
.shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 80px; }
.hero { min-height: 300px; display: flex; align-items: center; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1.08;
  padding-bottom: 0.06em;
  margin: 0 0 18px;
  max-width: 920px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-2) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-head h1,
h1.page-head {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.05;
  margin: 0 0 6px;
  max-width: 760px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}
.panel h1 {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.15;
  margin: 8px 0 16px;
}
.lede { color: var(--muted); font-size: 1.12rem; max-width: 780px; line-height: 1.65; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: .78rem; letter-spacing: .10em; font-weight: 800; }

/* ===== PANEL ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== FORM ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.span { grid-column: 1 / -1; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.01em; }
input, textarea, select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.18);
}
/* Native <option> popups ignore the <select>'s translucent background and
   render on the OS's opaque white list, which made --text's near-white
   color unreadable — give options an explicit opaque dark background. */
select option {
  background-color: #0c0c1a;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
.large-textarea { min-height: 260px; }

/* ===== BUTTONS ===== */
button, .primary, .secondary {
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s, background 0.15s;
  letter-spacing: 0.01em;
}
.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f9ef8 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.28);
}
.primary:hover {
  box-shadow: 0 0 36px rgba(124, 92, 252, 0.5);
  transform: translateY(-1px);
}
.primary:active { transform: translateY(0); }
.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
}
.secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--line-strong);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.full { width: 100%; }

/* ===== LAYOUT ===== */
.split { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.split.wide { grid-template-columns: minmax(0, 1fr) 360px; }
.edit-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}
.edit-layout > * {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.edit-form { display: grid; gap: 22px; }
.editor-band { display: grid; gap: 14px; }
.prompt-editor { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.35; }
.prompt-editor.small { min-height: 150px; }
.blog-editor { min-height: 680px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.45; }

/* ===== BLOG PREVIEW ===== */
.blog-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.blog-preview h2 { margin: 0 0 14px; font-size: 1.8rem; }
.blog-preview pre { max-height: 520px; line-height: 1.5; }

/* ===== ARTICLE RENDER ===== */
.article-render {
  color: #dde0f8;
  line-height: 1.75;
  font-size: 1.05rem;
}
.article-render h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 24px;
  color: #ffffff;
}
.article-render h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  margin: 40px 0 14px;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.article-render h3 { margin: 24px 0 8px; color: #c8d4ff; font-size: 1.15rem; }
.article-render p, .article-render li { color: #b8c4e8; }
.article-render ul { padding-left: 22px; }
.article-render a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.article-render .md-table-wrap {
  overflow-x: auto;
  margin: 18px 0 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.article-render .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.article-render .md-table th,
.article-render .md-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: #b8c4e8;
}
.article-render .md-table th {
  color: var(--text);
  font-weight: 700;
  background: rgba(124, 92, 252, 0.10);
}
.article-render .md-table tr:last-child td { border-bottom: none; }
.article-render figure.section-image { margin: 20px 0 32px; }
.article-render figure.section-image img { width: 100%; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; aspect-ratio: 16 / 9; display: block; }

/* Soft closing CTA band (consultation / launch invite) */
.article-render .article-cta {
  margin: 36px 0 8px;
  padding: 22px 24px;
  border: 1px solid rgba(201, 191, 154, 0.35);
  border-radius: 14px;
  background: rgba(201, 191, 154, 0.08);
}
.article-render .article-cta > h2 {
  margin-top: 0;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}
.article-render .article-cta p { color: #dfe4f4; margin: 0 0 12px; }
.article-render .article-cta p:last-child { margin-bottom: 0; }
.article-render .article-cta a {
  color: #e8dcc0;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 220, 192, 0.55);
}
.article-render .article-cta a:hover { border-bottom-color: #e8dcc0; }

/* ===== FAQ ACCORDION (article render — mirrors the goodhand.ae markup) ===== */
.article-render .accordion { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 32px; }
.article-render .faq-card { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.article-render .faq-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; }
.article-render .faq-question { margin: 0; font-size: 1.05rem; color: #ffffff; }
.article-render .faq-icon img { width: 14px; height: 14px; display: block; margin: 0; transition: transform 0.2s ease; filter: invert(1); }
.article-render .faq-toggle[aria-expanded="true"] .faq-icon img { transform: rotate(45deg); }
.article-render .accordion-collapse { display: none; }
.article-render .accordion-collapse.show { display: block; }
.article-render .faq-answer { padding: 0 18px 16px; }
.article-render .faq-answer p:first-child { margin-top: 0; }
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}

/* ===== BLOG DETAIL LAYOUT ===== */
.blog-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.blog-detail-layout > * {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.image-plan { display: grid; gap: 12px; margin: 20px 0; }
.check-card { grid-template-columns: auto 1fr; align-items: start; }
.check-card input { width: auto; margin-top: 4px; }
.check-card span, .check-card small { grid-column: 2; }
.ai-details { margin-top: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.asset-ai-list { display: grid; gap: 18px; margin-top: 20px; }
.ai-asset { border-top: 1px solid var(--line); padding-top: 18px; }
.side-stack { display: grid; gap: 18px; }
.preview-image { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 14px; }
.logo-preview { object-fit: contain; background: rgba(255,255,255,.06); max-height: 180px; padding: 14px; }
.source-list { display: grid; gap: 8px; }
.source-list a { color: var(--accent-2); overflow-wrap: anywhere; }

/* ===== VERSION LIST ===== */
.version-list { display: grid; gap: 10px; }
.version-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255,255,255,.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.version-list a:hover { border-color: var(--line-strong); }
.version-list a.active { border-color: var(--line-active); box-shadow: 0 0 0 1px rgba(124,92,252,.2) inset; }
.version-list img { width: 72px; aspect-ratio: 1; object-fit: cover; border-radius: 7px; grid-row: span 2; }
.version-list span { font-weight: 750; }
.version-list small { color: var(--muted); }
.version-grid .campaign-card pre { max-height: 180px; font-size: .82rem; }

/* ===== REVIEW SLOT (blog-images regenerate/select grid) ===== */
.review-slot {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.review-slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.review-slot-head .secondary.small {
  margin-left: auto;
  padding: 4px 10px;
  font-size: .78rem;
}
.story-tag {
  background: rgba(124,92,252,.12);
  border: 1px solid rgba(124,92,252,.3);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  color: #a78bfa;
}
.regen-spinner { color: var(--muted); font-size: .82rem; }
.review-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.review-version {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.review-version:hover { border-color: var(--line-strong); }
.review-version.active { border-color: var(--line-active); box-shadow: 0 0 0 1px rgba(124,92,252,.2) inset; }
.review-version img { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; }
.review-version small { color: var(--muted); font-size: .72rem; }
.review-version input[type="radio"] { margin: 0; }

/* ===== MISC COMPONENTS ===== */
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.mini-grid div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 14px; display: grid; gap: 6px; }
.mini-grid span, li, .panel p { color: var(--muted); }
.style-list { display: grid; gap: 12px; margin: 18px 0; }
.style-card { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.style-card span { color: var(--text); font-weight: 750; }
.style-card small { color: var(--muted); }
pre { white-space: pre-wrap; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: #c8d4ff; overflow: auto; }

/* ===== LOADING ===== */
.loading-wrap {
  width: min(980px, 100%);
  min-height: 420px;
  margin: 14px auto 0;
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 28px;
  text-align: center;
}
.loading-wrap h1 { margin: 10px 0 0; }
.loading-wrap .lede { margin: 12px 0 10px; }
.loader-orb {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin 1.1s cubic-bezier(.6,.15,.4,.85) infinite;
  box-shadow: 0 0 32px rgba(124, 92, 252, 0.28), 0 0 8px rgba(54,209,240,0.15);
  background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, transparent 70%);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.progress {
  height: 5px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
  width: min(520px, 100%);
  position: relative;
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .7s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.progress span::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
.job-status {
  width: min(560px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 6px;
}
.step-hint {
  max-width: 520px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.error { color: #f87194 !important; font-size: .85rem; line-height: 1.5; }

/* ===== RESULT / IMAGE STAGE ===== */
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: start;
}
.result-grid > * {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.image-stage { background: #04040e; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.image-stage img { width: 100%; display: block; }
dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px 14px; }
dt { color: var(--muted); } dd { margin: 0; }

/* ===== PAGE HEAD ===== */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
h1.page-head { display: block; align-items: unset; justify-content: unset; }
.agent-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 16px;
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 12px;
  background: rgba(124, 92, 252, 0.12);
  color: var(--text); font-weight: 700; font-size: 0.95rem;
}
.agent-banner .tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: rgba(124, 92, 252, 0.28); font-size: 0.75rem; letter-spacing: .04em;
  text-transform: uppercase;
}
.connected-pill {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px;
  background: rgba(62, 180, 120, 0.2); color: #7ddea8; font-size: 0.75rem; font-weight: 700;
}
.unconfigured-pill {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 0.75rem; font-weight: 700;
}

/* ===== CARDS ===== */
.cards, .model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.campaign-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campaign-card:hover {
  border-color: var(--line-active);
  box-shadow: 0 0 0 1px rgba(124,92,252,0.18), 0 8px 40px rgba(124,92,252,0.12);
}
.campaign-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.campaign-card div { padding: 18px; }
.campaign-card h2 { font-size: 1.1rem; margin: 8px 0 6px; line-height: 1.3; }
.campaign-card p { font-size: 0.85rem; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.campaign-card small { color: var(--muted); font-size: 0.78rem; }
.model-card { display: grid; gap: 14px; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; }
.check input { width: auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .form-grid, .split, .split.wide, .edit-layout, .result-grid, .blog-detail-layout, .detail-grid { grid-template-columns: 1fr; }
  .edit-layout > *, .result-grid > *, .blog-detail-layout > * {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .topbar { padding: 0 16px; }
  nav { gap: 4px; font-size: .88rem; }
  .nav-link span, .nav-more-toggle span { display: none; }
  .nav-link, .nav-more-toggle { padding: 9px; }
  .nav-more-toggle .nav-more-chevron { display: none; }
  .nav-more-menu { min-width: 170px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
}

/* ===== PLATFORM ICON GRID ===== */
.field-label { color: var(--muted); font-weight: 700; margin: 0 0 10px; font-size: 0.88rem; }
.field-hint { font-size: .8rem; font-weight: 400; opacity: .65; margin-left: 8px; }
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
}
.platform-tile { display: block; cursor: pointer; }
.platform-tile input[type="checkbox"] { display: none; }
.platform-tile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 6px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  transition: border-color .18s, background .18s, box-shadow .18s, color .18s;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.platform-tile-inner svg {
  width: 28px; height: 28px;
  color: var(--muted);
  transition: color .18s;
  flex-shrink: 0;
}
.platform-tile-inner span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-tile input:checked + .platform-tile-inner {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.12);
  box-shadow: 0 0 0 1px rgba(124,92,252,.28) inset, 0 0 20px rgba(124,92,252,.15);
  color: var(--text);
}
.platform-tile input:checked + .platform-tile-inner svg { color: var(--accent); }
.platform-cell { display: flex; flex-direction: column; gap: 6px; }
.platform-cell .platform-tile { flex: 1; }
.content-type-select {
  width: 100%;
  padding: 5px 6px;
  font-size: .74rem;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.content-type-select:focus { outline: none; border-color: var(--accent); }
.content-type-fixed {
  color: var(--muted);
  opacity: .75;
  cursor: default;
  background: transparent;
}

/* ===== PLATFORM BADGES ===== */
.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.platform-badge-instagram { border-color: #e1306c44; color: #f77; background: rgba(225,48,108,.1); }
.platform-badge-facebook { border-color: #1877f244; color: #6af; background: rgba(24,119,242,.1); }
.platform-badge-linkedin { border-color: #0a66c244; color: #5df; background: rgba(10,102,194,.1); }
.platform-badge-twitter_x, .platform-badge-x { border-color: rgba(255,255,255,.18); color: #ccd; background: rgba(255,255,255,.06); }
.platform-badge-tiktok { border-color: #69c9d044; color: #6df; background: rgba(105,201,208,.1); }
.platform-badge-website { border-color: rgba(54,209,240,.35); color: var(--accent-2); background: rgba(54,209,240,.08); }
.platform-badge-google_business { border-color: #4285f444; color: #7ab8ff; background: rgba(66,133,244,.1); }
.card-platform-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.platform-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

/* ===== STATUS BADGE ===== */
.status-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: rgba(124, 92, 252, 0.14);
  border: 1px solid rgba(124, 92, 252, 0.38);
  color: #a78bfa;
}
.status-badge-posted {
  background: rgba(47, 158, 68, 0.14);
  border-color: rgba(47, 158, 68, 0.38);
  color: #7ddea8;
}
.status-badge-failed {
  background: rgba(201, 42, 42, 0.14);
  border-color: rgba(201, 42, 42, 0.38);
  color: #ff8787;
}
.status-badge-pending, .status-badge-posting {
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.35);
  color: #ffd666;
}
.status-badge-cancelled, .status-badge-manual {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: var(--muted);
}
.hint-text { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.small-text { font-size: .82rem; color: var(--muted); }

/* ===== BRIEF PAGE ===== */
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chip {
  background: rgba(54, 209, 240, 0.08);
  border: 1px solid rgba(54, 209, 240, 0.28);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .78rem;
  color: var(--accent-2);
}
.kw-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: .68rem;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}
.color-swatches { display: flex; gap: 8px; margin: 10px 0; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  display: inline-block;
}

/* ===== PLATFORM VIEW TABS ===== */
.platform-view-tabs { margin-top: 24px; }
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.tab-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tab-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.tab-btn.active {
  background: rgba(124, 92, 252, 0.14);
  border-color: var(--accent);
  color: var(--text);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== MOCKUP: BROWSER ===== */
.mockup-browser {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.mockup-browser-bar {
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
}
.browser-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.browser-url {
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .78rem;
  color: var(--muted);
  flex: 1;
}
.mockup-browser-content {
  background: #06060f;
  padding: 32px 48px;
  max-height: 70vh;
  overflow-y: auto;
}
.website-article { max-width: 720px; margin: 0 auto; }

/* ===== MOCKUP: PHONE ===== */
.mockup-phone {
  width: 360px;
  margin: 0 auto;
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 36px;
  overflow: hidden;
  background: #06060f;
  box-shadow: 0 28px 80px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.04);
  position: relative;
}
.mockup-phone-tall { width: 300px; }
.mockup-phone-notch {
  height: 28px;
  background: rgba(0,0,0,.6);
  margin: 0 auto;
  width: 120px;
  border-radius: 0 0 18px 18px;
  position: absolute;
  left: 50%; transform: translateX(-50%);
  z-index: 2;
}
.mockup-phone-screen { padding-top: 28px; min-height: 540px; overflow-y: auto; }
.mockup-screen-story { position: relative; min-height: 600px; overflow: hidden; }

/* ===== INSTAGRAM MOCKUP ===== */
.insta-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.insta-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
}
.insta-avatar.sm { width: 28px; height: 28px; }
.insta-user { display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.insta-user strong { font-size: .9rem; }
.insta-user span { color: var(--accent-2); font-weight: 700; font-size: .78rem; }
.insta-image { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.insta-image-placeholder { width: 100%; aspect-ratio: 4/5; background: rgba(255,255,255,.05); display: grid; place-items: center; color: var(--muted); }
.insta-actions { display: flex; gap: 14px; padding: 12px 14px 6px; }
.insta-actions svg { width: 22px; height: 22px; }
.insta-caption { padding: 4px 14px 14px; font-size: .82rem; line-height: 1.45; }
.insta-hashtags { color: var(--accent-2); font-size: .78rem; }
.insta-more-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 6px; }
.insta-more-images img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ===== STORY MOCKUP ===== */
.story-bars { display: flex; gap: 4px; padding: 8px 10px; position: relative; z-index: 2; }
.story-bars span { flex: 1; height: 3px; background: rgba(255,255,255,.35); border-radius: 999px; }
.story-bars span:first-child { background: rgba(255,255,255,.9); }
.story-image { width: 100%; height: 100%; min-height: 580px; object-fit: cover; position: absolute; top: 0; left: 0; }
.story-image-placeholder { position: absolute; inset: 0; background: rgba(255,255,255,.04); display: grid; place-items: center; color: var(--muted); }
.story-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 18px 14px; background: linear-gradient(transparent, rgba(0,0,0,.82)); z-index: 3; }
.story-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.story-text { font-size: .9rem; color: #fff; margin: 0; line-height: 1.4; }

/* ===== FACEBOOK / LINKEDIN FEED ===== */
.mockup-feed { max-width: 540px; margin: 0 auto; }
.feed-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.feed-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.feed-meta { color: var(--muted); font-size: .78rem; display: block; }
.feed-text { padding: 0 16px 12px; font-size: .9rem; line-height: 1.5; color: var(--text); }
.feed-image { width: 100%; max-height: 400px; object-fit: cover; display: block; }
.feed-image-placeholder { width: 100%; height: 220px; background: rgba(255,255,255,.04); display: grid; place-items: center; color: var(--muted); }
.feed-link-strip { padding: 12px 16px; background: rgba(0,0,0,.22); border-top: 1px solid var(--line); }
.feed-link-strip strong { display: block; font-size: .9rem; margin: 4px 0 2px; }
.feed-link-strip small { color: var(--muted); font-size: .8rem; }
.feed-link-domain { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 4px; }
.feed-actions { display: flex; gap: 0; border-top: 1px solid var(--line); }
.feed-actions span { flex: 1; text-align: center; padding: 10px 4px; font-size: .82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tweet-actions { gap: 18px; padding: 8px 16px; }
.tweet-actions span { flex: none; }
.tweet-image { max-height: 280px; }
.tweet-card .feed-text { padding: 8px 16px; }
.li-avatar { background: linear-gradient(135deg, #0a66c2, #36d1f0); }

/* ===== BLOG IMAGES: PER-PLATFORM GRID ===== */
.platform-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; align-items: stretch; }
.platform-image-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.platform-image-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.size-tag { font-size: .72rem; color: var(--muted); font-family: ui-monospace, monospace; white-space: nowrap; }
.count-label { color: var(--muted); font-size: .82rem; font-weight: 700; display: grid; gap: 8px; }
.count-stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: fit-content; }
.stepper-btn {
  width: 36px; height: 36px; border: 0; background: rgba(255,255,255,.06);
  color: var(--text); font-size: 1.2rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
}
.stepper-btn:hover { background: rgba(124,92,252,.15); }
.count-input { width: 48px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; font-size: 1rem; font-weight: 800; padding: 6px 4px; }
.plan-preview { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 0 0; margin-top: auto; padding-top: 4px; }
.plan-role {
  font-size: .7rem; background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 6px; color: var(--muted);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plan-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-role-badge { background: rgba(124,92,252,.12); border: 1px solid rgba(124,92,252,.3); border-radius: 4px; padding: 2px 8px; font-size: .72rem; font-weight: 800; color: #a78bfa; white-space: nowrap; }
.plan-item-label { font-weight: 700; font-size: .88rem; flex: 1; }
.plan-item-summary { color: var(--muted); font-size: .8rem; }

/* ===== SUGGESTION CHIPS ===== */
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 4px; }
.chip-label { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: .8rem; color: var(--muted);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: rgba(124,92,252,.12); border-color: var(--line-active); color: var(--text); }
.chip-sm { padding: 3px 9px; font-size: .74rem; }
.field-label { font-size: .82rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ===== TOPIC CORRECTION BANNER ===== */
.correction-banner {
  background: rgba(124,92,252,.08);
  border: 1px solid rgba(124,92,252,.28);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  color: #a78bfa;
  margin-bottom: 12px;
}
.correction-banner s { color: var(--muted); }

/* ===== PLATFORM COPY PREVIEW ===== */
.plat-copy-preview {
  font-size: .78rem; color: var(--muted); line-height: 1.4;
  background: rgba(255,255,255,.03);
  border-left: 2px solid var(--line);
  padding: 6px 10px;
  margin: 0;
  border-radius: 0 4px 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plat-hashtags {
  font-size: .75rem; color: var(--accent-2); margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== GALLERY CARD EXTRAS ===== */
.campaign-card-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--line);
}
.campaign-card-body { padding: 18px; display: grid; gap: 10px; }
.campaign-card-body h2 { font-size: 1.05rem; margin: 0; line-height: 1.35; }
.campaign-card-body p { font-size: 0.84rem; color: var(--muted); margin: 0; line-height: 1.5; }
.campaign-card-body small { font-size: 0.76rem; color: var(--muted); }
.card-actions { flex-wrap: wrap; gap: 8px; }
.card-btn-disabled { opacity: 0.38; pointer-events: none; }
.sched-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.84rem;
}
.sched-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== SCHEDULE BADGE (on card) ===== */
.sched-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  background: rgba(54, 209, 240, 0.10);
  border: 1px solid rgba(54, 209, 240, 0.30);
  color: var(--accent-2);
}

/* ===== SCHEDULE MODAL ===== */
.sched-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.sched-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}
.sched-modal-dialog {
  position: relative; z-index: 1;
  background: #0e0e1e;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: 0 32px 100px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
}
.sched-modal-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sched-modal-head strong { font-size: 1.08rem; display: block; }
.sched-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 30px; height: 30px;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.15s;
}
.sched-close:hover { background: rgba(255,255,255,0.12); }
.sched-close svg { width: 14px; height: 14px; }
.sched-form { padding: 8px 24px 0; }
.sched-row {
  /* Fixed column widths so date/time controls line up across every row,
     whether or not the row has a preview thumb or a post-type select. */
  display: grid;
  grid-template-columns: 56px 104px 1fr 78px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-of-type { border-bottom: none; }
/* Videos modal rows start with the badge (no preview thumb) — span both lead columns */
.sched-row > .platform-badge:first-child { grid-column: 1 / 3; }
.sched-row .platform-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: start;
}
.sched-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sched-dims {
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}
.sched-thumb {
  width: 44px; height: 44px; border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.sched-thumb-empty {
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sched-thumb-empty svg { width: 18px; height: 18px; color: var(--muted); }
.sched-dt {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  padding: 9px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sched-dt:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.18);
}
.sched-post-type {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  padding: 9px 4px 9px 8px;
  width: 100%;
}
.sched-post-type:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.18);
}
.sched-modal-foot {
  padding: 16px 24px 20px;
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.sched-foot-hint {
  margin-right: auto;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 200px;
}
.sched-foot-hint strong { color: var(--text); }

/* Date + time schedule picker (replaces the native datetime-local input whose
   popup covered the Save button) */
.sched-when {
  display: grid;
  grid-template-columns: minmax(126px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.sched-when .sched-date { color-scheme: dark; min-width: 126px; padding: 9px 8px; }
.sched-when .sched-time { color-scheme: dark; min-width: 88px; padding: 9px 4px 9px 8px; }
.sched-clear {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 28px; height: 28px;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.sched-clear:hover { background: rgba(255,80,80,0.15); color: #f88; }
.sched-clear svg { width: 12px; height: 12px; }
.sched-when-summary {
  grid-column: 1 / -1;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-when-summary.set { color: var(--accent-2); }
@media (max-width: 560px) {
  .sched-row { grid-template-columns: 56px 1fr; }
  .sched-row > .platform-badge:first-child { grid-column: auto; }
  .sched-row .sched-when { grid-column: 1 / -1; }
  .sched-row .sched-post-type { grid-column: 1 / -1; width: auto; justify-self: start; }
}

/* ===== BTN ALIASES (secondary style helpers) ===== */
.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.01em;
}
.btn:hover { background: rgba(124,92,252,0.85); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--line-strong); }
.btn-sm { padding: 6px 14px !important; font-size: 0.84rem !important; }

/* ===== BRAND PROFILE ===== */
.brand-profile-selector {
  background: rgba(124,92,252,0.06);
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.brand-logo-preview {
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--surface2, rgba(255,255,255,0.04));
  padding: 3px;
  margin-right: 0.5rem;
}
.chip-service {
  cursor: pointer;
  background: rgba(54,209,240,0.1);
  border: 1px solid rgba(54,209,240,0.25);
  transition: opacity 0.2s;
}
.chip-service:hover { background: rgba(54,209,240,0.2); }
.chip-pinned {
  background: rgba(124,92,252,0.18);
  border: 1px solid rgba(124,92,252,0.35);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dynamic-row {
  display: grid;
  grid-template-columns: 200px 1fr 32px;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}
.dynamic-row input, .dynamic-row textarea {
  width: 100%;
}
.btn-icon {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-icon:hover { color: var(--text); border-color: var(--line-strong); }
.btn-sm { padding: 6px 14px; font-size: 0.84rem; }
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { animation: fadeIn 0.15s ease; }

.panel-dl-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.panel-dl-btn:hover { background: rgba(255,255,255,0.13); color: var(--text); }

/* ===== Creative Studio V2 additions ===== */
.brand-cluster { display:flex; align-items:center; gap:14px; text-decoration:none; }
.brand-cluster .brand-text { display:flex; flex-direction:column; gap:2px; }
.brand-cluster .brand-name { font-weight:800; letter-spacing:-0.01em; color:var(--text); font-size:0.98rem; }
.project-switch select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  max-width: 200px;
}
.device.phone {
  max-width: 320px;
  border: 10px solid #1a1a2e;
  border-radius: 28px;
  padding: 12px;
  background: #0a0a14;
  box-shadow: 0 0 40px rgba(124,92,252,0.15);
}
.device.phone .phone-screen {
  background: rgba(255,255,255,0.04);
  min-height: 420px;
  border-radius: 16px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
}
.device.browser {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
}
.placeholder {
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  min-height: 200px;
  background: linear-gradient(160deg, rgba(124,92,252,0.12), rgba(54,209,240,0.08));
  border-radius: 12px;
  color: var(--muted);
  text-align:center;
  padding: 20px;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.slot-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.slot-card:hover {
  border-color: var(--line-active);
}
.slot-thumb-wrap { position: relative; }
.slot-card img,
.slot-thumb-wrap > img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.slot-role-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.slot-card-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.slot-card-check input { width: auto; }
.slot-card-body { display: grid; gap: 6px; }
.slot-card-body strong { color: var(--text); font-size: 0.95rem; }
.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 100%;
}
.room-chip img {
  width: 22px;
  height: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}
.slot-settings {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0,0,0,.12);
}
.slot-settings summary {
  cursor: pointer;
  color: var(--accent-2, #5eead4);
  font-size: 0.88rem;
  font-weight: 600;
}
.slot-regen-form label { font-size: 0.82rem; }

.studio-content-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.studio-content-title {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
}
.studio-platform-label {
  margin: 18px 0 10px;
  color: var(--text);
  font-size: 0.95rem;
}
.studio-compose { padding-bottom: 8px; }
.compose-platform {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  background: rgba(0,0,0,.12);
}
.compose-step { margin-bottom: 14px; }
.compose-step-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.count-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.count-seg-btn,
.mode-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.count-seg-btn:hover,
.mode-chip:hover {
  border-color: var(--line-active);
  transform: translateY(-1px);
}
.count-seg-btn.is-active,
.mode-chip.is-active {
  background: rgba(124,92,252,0.2);
  border-color: var(--line-active);
  color: #fff;
}
.mode-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.compose-advanced {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.compose-advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.room-pick-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.room-pick-card {
  flex: 0 0 160px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.03);
  display: grid;
  gap: 8px;
  transition: border-color .15s ease, box-shadow .15s ease, opacity .2s ease;
  animation: roomCardIn .25s ease;
}
.room-pick-card.is-selected {
  border-color: var(--line-active);
  box-shadow: 0 0 0 1px rgba(124,92,252,0.25);
}
.room-pick-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}
.room-pick-preview {
  aspect-ratio: 4/3;
  border-radius: 8px;
  border: 1px dashed var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.2);
}
.room-pick-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.room-pick-empty {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 8px;
}
.room-pick-select { width: 100%; font-size: 0.82rem; }
.studio-generate-bar {
  position: sticky;
  bottom: 12px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12,10,20,.92);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: flex-end;
  z-index: 5;
}
@keyframes roomCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.studio-bulk-bar {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-active);
  background: rgba(124,92,252,0.12);
}
.asset-card img { max-width:220px; border-radius:10px; display:block; border:1px solid var(--line); }
.asset-card { display:flex; flex-direction:column; gap:8px; }
button.asset-card.carousel-thumb {
  background: transparent;
  padding: 0;
  border: none;
  cursor: pointer;
  max-width: 120px;
}
button.asset-card.carousel-thumb img {
  max-width: 120px;
  opacity: 0.72;
  transition: opacity .15s ease, box-shadow .15s ease;
}
button.asset-card.carousel-thumb.is-active img,
button.asset-card.carousel-thumb:hover img {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent, #7c5cfc);
}
.section-image { margin: 1rem 0 1.5rem; }
.section-image img { width: 100%; border-radius: 12px; display: block; }
.btn-danger, button.btn-danger {
  background: rgba(220, 60, 80, 0.85);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.row { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 20px; align-items:center; }
.tabs .tab-disabled {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  opacity: 0.45;
  cursor: not-allowed;
  font-size: 0.9rem;
}
.tabs a {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.tabs a.nav-active, .tabs a:hover {
  color: var(--text);
  background: rgba(124,92,252,0.16);
  border-color: var(--line-active);
}
.table { width:100%; border-collapse: collapse; }
.table th, .table td {
  text-align:left; padding:12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.table th { color: var(--text); font-weight: 700; }

/* ===== POSTING HISTORY ===== */
.posts-history { overflow-x: auto; }
.posts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.posts-table th,
.posts-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.posts-table th { color: var(--text); font-weight: 700; white-space: nowrap; }
.posts-when { white-space: nowrap; color: var(--muted); }
.posts-campaign a { color: var(--text); font-weight: 600; text-decoration: none; }
.posts-campaign a:hover { color: var(--accent-2); text-decoration: underline; }
.posts-link { max-width: 320px; word-break: break-word; }
.posts-link a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.posts-error { color: #ff8787; font-size: 0.84rem; line-height: 1.45; }
.posts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}
.posts-actions form { margin: 0; }
.posts-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
}
.posts-empty { padding: 1rem !important; }

.card-list { display:grid; gap:16px; }
.platform-tiles { display:flex; flex-wrap:wrap; gap:12px; }
.tile {
  display:flex; align-items:center; gap:10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  text-decoration:none; color:var(--text); font-weight:600;
  transition: border-color .15s, background .15s;
}
.tile:hover { border-color: var(--line-active); background: rgba(124,92,252,0.1); }
.tile input { width:auto; accent-color: var(--accent); }
.brand-logo-lg { width:96px; height:96px; object-fit:contain; filter: drop-shadow(0 0 14px rgba(124,92,252,0.5)); }
.check { display:flex; flex-direction:row; align-items:center; gap:8px; font-weight:600; }
.error { color: #ff7b8a; font-weight: 600; }
.muted { color: var(--muted); }
.login-wrap { max-width: 420px; margin: 64px auto; }
body.theme-yoyime {
  --accent: #6d7248;
  --accent-2: #c4bf9a;
  --accent-glow: rgba(109, 114, 72, 0.22);
}
