/* Video Studio — dark-first, light theme via [data-theme] or OS setting */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f0f3f6; --border: #e1e6ec;
  --text: #0f172a; --muted: #5b6678; --faint: #94a0b0;
  --accent: #0e7a5f; --accent-hover: #0b6650; --accent-soft: #e3f4ee; --accent-text: #0b6650;
  --warn: #b45309; --warn-soft: #fdf3e5; --danger: #c2410c; --ok: #15803d;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e13; --surface: #11171f; --surface-2: #17202a; --border: #222c38;
    --text: #e7ecf2; --muted: #8d9aab; --faint: #5d6a7b;
    --accent: #19a37f; --accent-hover: #1cb88f; --accent-soft: #0f2a23; --accent-text: #5fd6b1;
    --warn: #f59e0b; --warn-soft: #2a1f0c; --danger: #f97316; --ok: #22c55e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e13; --surface: #11171f; --surface-2: #17202a; --border: #222c38;
  --text: #e7ecf2; --muted: #8d9aab; --faint: #5d6a7b;
  --accent: #19a37f; --accent-hover: #1cb88f; --accent-soft: #0f2a23; --accent-text: #5fd6b1;
  --warn: #f59e0b; --warn-soft: #2a1f0c; --danger: #f97316; --ok: #22c55e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); font-weight: 400; }
i[data-icon] { display: inline-flex; width: 18px; height: 18px; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; border-right: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  color: var(--on-accent, #fff); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text span { color: var(--muted); font-size: .82em; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: .72em; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--muted);
  text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.budget { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: .88em; }
.budget-row { display: flex; justify-content: space-between; gap: 8px; }
.budget-row b { font-variant-numeric: tabular-nums; }
.budget-row.muted { color: var(--muted); font-size: .9em; }
.meter { position: relative; height: 6px; border-radius: 99px; background: var(--border); margin: 8px 0 6px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; width: 0; transition: width .4s; }
#meter-used { background: var(--accent); }
#meter-pending { background: repeating-linear-gradient(45deg, var(--warn) 0 4px, transparent 4px 7px); }
.theme-toggle { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 10px; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--text); }

.main { padding: 28px 32px 120px; min-width: 0; }
.page-head { margin-bottom: 22px; max-width: 760px; }
.page-head.row-between { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.eyebrow { color: var(--accent-text); font-size: .78em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.page-head h1 { font-size: 1.75rem; letter-spacing: -.02em; margin: 2px 0 6px; }
.page-head p { color: var(--muted); margin: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 14px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > span { font-weight: 600; font-size: .9em; }
.field em, .toggle em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .92em; margin-left: 4px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.row > * { flex: 1; min-width: 160px; }
.hint { color: var(--muted); font-size: .82em; }
input[type=text], input[type=search], input[type=password], textarea, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 44px; }
input[type=text]:focus, input[type=search]:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
output { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88em; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--on-accent, #fff);
  border: none; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.big { width: 100%; padding: 14px; font-size: 1.02em; border-radius: 12px; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* segmented control */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 4px; width: fit-content; max-width: 100%; }
.seg button { border: none; background: none; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.shape { display: inline-block; border: 1.6px solid currentColor; border-radius: 3px; }

/* radio cards: models, presenter modes */
.picker, .cards-radio { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.opt { text-align: left; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt b { display: flex; justify-content: space-between; gap: 6px; font-size: .92em; }
.opt b small { color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.opt span { display: block; color: var(--muted); font-size: .82em; margin-top: 3px; line-height: 1.35; }

/* voice picker */
.voice { display: flex; gap: 8px; }
.voice select { flex: 1; }

/* toggles */
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; font-weight: 500; }
.toggle input { display: none; }
.toggle > span { width: 38px; height: 22px; border-radius: 99px; background: var(--border); position: relative; flex: none; transition: background .2s; }
.toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(16px); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 99px; padding: 5px 12px; font-size: .82em; color: var(--muted); cursor: pointer; }
.chips button:hover { color: var(--text); border-color: var(--accent); }

/* ---------------------------------------------------------------- dropzone */
.drop { position: relative; border: 1.5px dashed var(--border); border-radius: 12px; background: var(--surface-2); min-height: 86px;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s; text-align: center; font-size: .9em; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.drop-lg { min-height: 200px; }
.drop input { display: none; }
.drop.filled { border-style: solid; padding: 0; cursor: default; }
.drop.filled img { width: 100%; max-height: 320px; object-fit: contain; display: block; background: #000; }
.drop.filled audio { width: calc(100% - 24px); margin: 22px 12px; }
.drop .x { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .65); color: #fff; border: none; border-radius: 99px; width: 28px; height: 28px; cursor: pointer; display: grid; place-items: center; }
.drop .busy { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* ---------------------------------------------------------------- caption styles */
.captions { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cap-tile { background: none; border: 1.5px solid var(--border); border-radius: 12px; padding: 6px; cursor: pointer; text-align: center; color: var(--muted); font-size: .8em; font-weight: 600; transition: border-color .15s; }
.cap-tile.on { border-color: var(--accent); color: var(--accent-text); }
.cap-screen { height: 74px; border-radius: 8px; margin-bottom: 6px; display: flex; align-items: flex-end; justify-content: center; padding: 8px 6px;
  background: linear-gradient(160deg, #3b5d7a, #1a2a3a 60%, #0f1822); overflow: hidden; }
.cap { display: inline-block; color: #fff; font-weight: 800; font-size: 11px; line-height: 1.25; letter-spacing: .01em; }
.cap em { font-style: normal; }
.cap-clean { text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.cap-karaoke { font-family: Impact, "Arial Black", sans-serif; font-weight: 400; font-size: 14px; text-transform: uppercase;
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000; }
.cap-karaoke em { color: #FFD60A; }
.cap-pill { font-family: "Arial Black", sans-serif; text-transform: uppercase; font-size: 10px; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.cap-pill em { background: var(--accent); border-radius: 5px; padding: 1px 4px; }
.cap-boxed { background: rgba(0, 0, 0, .72); padding: 4px 7px; border-radius: 5px; font-weight: 700; }
.cap-brand { background: var(--accent); padding: 4px 7px; border-radius: 6px; font-family: "Arial Rounded MT Bold", "Arial Rounded Bold", sans-serif; }
.cap-brand em { color: #B8F5DC; }
.cap-minimal { font-size: 9px; font-weight: 600; text-shadow: 1px 1px 2px rgba(0, 0, 0, .8); }
.cap-none { color: rgba(255, 255, 255, .45); font-weight: 500; }

/* ---------------------------------------------------------------- summary / preview */
.summary { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; place-items: center; }
.screen { position: relative; width: 100%; max-width: 190px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #2c4a63, #13202d 55%, #0b131b); background-size: cover; background-position: center;
  box-shadow: 0 0 0 6px #05080c, 0 18px 40px rgba(0, 0, 0, .35); transition: aspect-ratio .3s, max-width .3s; }
.screen.r-16-9 { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; }
.screen.r-1-1 { aspect-ratio: 1; max-width: 230px; }
.screen .shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .45)); }
.screen .cap-line { position: absolute; left: 6%; right: 6%; bottom: 18%; text-align: center; }
.screen.r-16-9 .cap-line { bottom: 12%; }
.screen .cap { font-size: 12px; }
.screen .cap-karaoke { font-size: 16px; }
.screen .banner { position: absolute; top: 6%; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; font-size: 11px; text-shadow: 0 1px 3px #000; }
.screen .banner small { display: inline-block; background: var(--accent); border-radius: 99px; padding: 2px 8px; font-size: 9px; letter-spacing: .06em; margin-bottom: 3px; text-shadow: none; }
.screen .bubble { position: absolute; right: 6%; bottom: 34%; width: 30%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff;
  background: radial-gradient(circle at 50% 38%, #e6c3a5 0 18%, transparent 19%), radial-gradient(circle at 50% 100%, #3a5f8a 0 42%, #7aa0c4 43%); background-size: cover; background-position: center; }
.screen .tag { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; border-radius: 99px; padding: 2px 8px; }
.est-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.est-card .lbl { color: var(--muted); font-size: .85em; }
.est-card .amt { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.est-card .note { color: var(--muted); font-size: .82em; min-height: 1.2em; margin-bottom: 14px; }
.est-card .facts { list-style: none; padding: 0; margin: 0 0 14px; font-size: .85em; color: var(--muted); display: grid; gap: 4px; }
.est-card .facts li { display: flex; justify-content: space-between; gap: 8px; }
.est-card .facts b { color: var(--text); font-weight: 600; text-align: right; }

/* ---------------------------------------------------------------- tutorial steps */
.steps { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 12px; }
.step { display: grid; grid-template-columns: 34px 1fr 150px; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.step-no { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); display: grid; place-items: center; font-weight: 700; font-size: .9em; }
.step-tools { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.step-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step-body input, .step-body textarea { background: var(--surface); }
.step-body .title-in { font-weight: 600; }
.step-body details summary { cursor: pointer; color: var(--muted); font-size: .82em; }
.step-body details input { margin-top: 6px; }
.step .drop { min-height: 100%; font-size: .8em; padding: 8px; background: var(--surface); }
.step .drop.filled img { max-height: 150px; height: 100%; object-fit: cover; }
.add-step { width: 100%; }
.ai-draft { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); }
.ai-draft .row > input { flex: 3; }
.ai-draft .row > select { flex: 0 0 70px; min-width: 70px; }
.ai-draft .row > .btn { flex: 0 0 auto; min-width: 0; }

/* ---------------------------------------------------------------- clips */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 460px; overflow-y: auto; padding: 2px; }
.clip { text-align: left; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; }
.clip.on { border-color: var(--accent); background: var(--accent-soft); }
.clip b { font-size: .85em; display: block; }
.clip span { color: var(--muted); font-size: .8em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }

/* ---------------------------------------------------------------- library */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 14px; cursor: pointer; color: var(--muted); font-weight: 500; }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.media { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.media video { width: 100%; aspect-ratio: 16 / 10; background: #000; display: block; object-fit: contain; }
.media .meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.media .meta b { font-size: .9em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.media .sub { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .8em; flex-wrap: wrap; }
.media .acts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; padding-top: 4px; }
.media .acts a { font-size: .82em; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.badge { display: inline-block; font-size: .72em; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); text-transform: capitalize; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }

/* ---------------------------------------------------------------- models page */
.model-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.model-cols + .card { margin-bottom: 16px; }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.mrow:first-child { border-top: none; padding-top: 0; }
.mrow b { font-size: .95em; }
.mrow .p { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-text); text-align: right; }
.mrow span { grid-column: 1 / -1; color: var(--muted); font-size: .85em; }
.cost-table, .ledger { display: grid; gap: 0; font-size: .9em; }
.cost-table div, .ledger div { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.cost-table div:first-child, .ledger div:first-child { border-top: none; }
.cost-table b, .ledger b { font-variant-numeric: tabular-nums; }
.ledger span small { color: var(--muted); display: block; font-size: .85em; }

/* ---------------------------------------------------------------- signed-in user */
.me { display: flex; align-items: center; gap: 8px; padding: 8px 6px 0; border-top: 1px solid var(--border); }
.avatar-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: .85em; flex: none; text-transform: uppercase; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.me-text b { font-size: .88em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { color: var(--muted); font-size: .75em; }
body:not(.is-admin) .admin-only { display: none !important; }

/* team list */
.users { display: grid; margin-bottom: 14px; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.user-row:first-child { border-top: none; }
.user-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-row .who b { font-size: .92em; }
.user-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.user-row .acts button { font-size: .8em; padding: 6px 10px; }
.user-row.off { opacity: .55; }
.add-user > input { flex: 2; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.add-user > .toggle { flex: 0 0 auto; min-width: 0; }
.add-user > .btn { flex: 0 0 auto; min-width: 0; }
input[type=color] { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 4px; cursor: pointer; }
#page-settings .row > input, #page-account .row > input { flex: 2; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
#page-settings .row > .btn, #page-account .row > .btn { flex: 0 0 auto; min-width: 0; }
.modal-box input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }

/* ---------------------------------------------------------------- connections */
.conn { padding: 14px 0; border-top: 1px solid var(--border); }
.conn:first-of-type { border-top: none; padding-top: 0; }
.conn-head { display: flex; align-items: center; gap: 10px; }
.conn .hint { margin: 4px 0 10px; display: block; }
.conn .row > input { flex: 3; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.conn .row > .btn { flex: 0 0 auto; min-width: 0; }

/* voice extras (ElevenLabs) */
.voice { flex-wrap: wrap; }
.voice-extra { flex-basis: 100%; display: grid; gap: 10px; margin-top: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.voice-extra .seg { background: var(--surface); }
.voice-extra .lbl { font-size: .8em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.voice-extra .chips { margin-top: 0; }
.voice-extra .chips button { background: var(--surface); }

/* ---------------------------------------------------------------- activity drawer */
.activity-btn { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg);
  border: none; border-radius: 99px; padding: 11px 18px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.activity-btn .count { background: var(--accent); color: var(--on-accent, #fff); border-radius: 99px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: .8em; padding: 0 6px; }
.activity-btn.live i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); border-left: 1px solid var(--border);
  z-index: 40; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -20px 0 40px rgba(0, 0, 0, .2); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.job { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.job-top b { font-size: .92em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job .sub { color: var(--muted); font-size: .8em; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.status { font-size: .74em; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.status.queued { background: var(--border); color: var(--muted); }
.status.running { background: var(--warn-soft); color: var(--warn); }
.status.running::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite; }
.status.done { background: var(--accent-soft); color: var(--accent-text); }
.status.failed { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.job .bar { height: 3px; border-radius: 99px; background: var(--border); margin: 10px 0 8px; overflow: hidden; }
.job .bar i { display: block; height: 100%; width: 35%; background: var(--warn); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.job pre { margin: 8px 0 0; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: var(--muted);
  background: var(--surface); border-radius: 8px; padding: 8px 10px; max-height: 220px; overflow-y: auto; }
.job video { width: 100%; max-height: 300px; background: #000; border-radius: 8px; margin-top: 10px; display: block; }
.job .acts { display: flex; gap: 12px; margin-top: 8px; font-size: .85em; }
.job .acts a, .job .acts button { font-weight: 600; text-decoration: none; background: none; border: none; color: var(--accent-text); cursor: pointer; padding: 0; }

/* modal & toasts */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 8, 12, .55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: min(420px, 100%); box-shadow: var(--shadow); }
.modal-box h3 { margin: 0 0 8px; }
.modal-box p { color: var(--muted); margin: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); display: flex; gap: 14px; align-items: center; font-weight: 500; animation: rise .25s ease; max-width: min(520px, calc(100vw - 32px)); }
.toast.err { background: var(--danger); color: #fff; }
.toast button { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.keywarn { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; }
.keywarn div { color: var(--text); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; display: grid; grid-template-columns: 200px 1fr; }
  .model-cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 16px; border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .brand-text, .nav-label, .budget, .me-text { display: none; }
  .me { border-top: none; padding: 0; }
  .nav { flex-direction: row; gap: 4px; }
  .nav a { white-space: nowrap; padding: 8px 10px; font-size: .88em; }
  .main { padding: 20px 16px 110px; }
  .summary { grid-template-columns: 1fr; }
  .step { grid-template-columns: 30px 1fr; }
  .step .drop { grid-column: 2; min-height: 80px; }
}

/* delete button in the library */
.media .acts .del { margin-left: auto; background: none; border: none; color: var(--muted); font: inherit; font-size: .82em; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.media .acts .del:hover { color: var(--danger); }
.media .acts .del i[data-icon] { width: 15px; height: 15px; }
#modal-yes.danger { background: var(--danger); }

/* failure and warning boxes in Activity */
.job-error, .job-warn { border-radius: 10px; padding: 12px 14px; margin-top: 10px; font-size: .86em; line-height: 1.45; }
.job-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.job-error > b { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 1.02em; }
.job-error > b i[data-icon] { width: 16px; height: 16px; }
.job-error p { margin: 6px 0; color: var(--text); }
.job-error ul { margin: 6px 0 8px; padding-left: 18px; color: var(--text); }
.job-error li { margin: 3px 0; }
.job-error small { color: var(--muted); }
.job-error.cat-busy, .job-error.cat-billing, .job-error.cat-key { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.job-error.cat-busy > b, .job-error.cat-billing > b, .job-error.cat-key > b { color: var(--warn); }
.job-warn { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.job-warn b { color: var(--warn); }
.job-warn p { margin: 4px 0 0; color: var(--text); }

/* sign-in, set-password and reset pages */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); }
.login-card .logo { margin-bottom: 14px; }
.login-card h1 { font-size: 1.4rem; margin: 0 0 4px; letter-spacing: -.01em; }
.login-card > p { color: var(--muted); margin: 0 0 20px; font-size: .92em; }
.login-card input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card input[readonly] { color: var(--muted); }
.login-card .err { color: var(--danger); font-size: .88em; min-height: 1.3em; margin: 4px 0 10px; }
.login-card .ok-msg { color: var(--accent-text); font-size: .9em; margin: 4px 0 10px; }
.link-btn { display: block; margin: 14px auto 0; background: none; border: none; color: var(--accent-text); font: inherit; font-size: .9em; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.link-btn:hover { text-decoration: underline; }

/* show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; padding: 0; }
.pw-eye:hover { color: var(--text); background: var(--surface); }
.pw-eye svg { width: 18px; height: 18px; }

/* settings: email */
.mail-mode { margin-bottom: 14px; }
.user-row .who .em { color: var(--muted); font-size: .82em; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.conn-head .conn-remove { margin: 0 0 0 auto; display: inline; font-size: .82em; color: var(--muted); }
.conn-head .conn-remove:hover { color: var(--danger); }

/* balances & usage */
#usage-card h3 { display: flex; align-items: center; }
.providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.prov { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.prov.low { border-color: var(--warn); background: var(--warn-soft); }
.prov-top { display: flex; justify-content: space-between; align-items: center; }
.prov-top a { font-size: .82em; font-weight: 600; text-decoration: none; }
.prov-what { color: var(--muted); font-size: .8em; }
.prov-bal { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.prov-bal small { font-size: .5em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.prov-sub { color: var(--muted); font-size: .8em; }
.prov-used { font-size: .84em; margin-top: 6px; }
.prov-key { margin-top: 8px; }
.prov-key input { flex: 3; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.prov-key .btn { flex: 0 0 auto; min-width: 0; }
.usage-types { display: grid; font-size: .9em; }
.usage-types > div { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.usage-types .ut-head { display: block; border-top: none; font-weight: 600; color: var(--muted); font-size: .85em; padding-top: 0; }
.usage-types .ut-total { font-weight: 700; }
.prov-bal .muted { display: block; font-size: .5em !important; line-height: 1.45; font-weight: 400; letter-spacing: 0; }

/* voice picker: language + voice */
.voice .lang-sel { flex: 0 1 190px; min-width: 150px; }
.voice .voice-sel { flex: 1 1 200px; min-width: 160px; }
.voice .lang-note { flex-basis: 100%; }
.voice .lang-warn { flex-basis: 100%; color: var(--warn); font-size: .85em; font-weight: 600; }

/* photos & face swap */
.media img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #0b0f14; display: block; }
.job .job-img { width: 100%; max-height: 300px; object-fit: contain; background: #000; border-radius: 8px; margin-top: 10px; display: block; }
.drop.filled video { width: 100%; max-height: 320px; display: block; background: #000; }
.toggle.consent { align-items: flex-start; font-size: .9em; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.toggle.consent > span { margin-top: 2px; }

/* starter templates */
.templates { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; margin: -6px 0 20px; padding-bottom: 4px; scrollbar-width: thin; }
.templates .tpl-lbl { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: .8em; font-weight: 600; white-space: nowrap; padding-right: 4px; }
.templates .tpl-lbl i[data-icon] { width: 16px; height: 16px; }
.tpl { flex: 0 0 auto; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; cursor: pointer; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tpl:hover { border-color: var(--accent); transform: translateY(-1px); }
.tpl b { display: block; font-size: .88em; }
.tpl span { display: block; color: var(--muted); font-size: .76em; margin-top: 2px; }

/* improve with AI */
.improve { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .8em; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.improve:hover { border-color: var(--accent); }
.improve:disabled { opacity: .6; cursor: wait; }
.improve i[data-icon] { width: 14px; height: 14px; }
textarea + .improve { align-self: flex-start; }

/* library: make other sizes */
.media .acts .lnk { background: none; border: none; color: var(--accent-text); font: inherit; font-size: .82em; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.media .acts .lnk i[data-icon] { width: 15px; height: 15px; }
.resize-opts { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }

/* library: search, favourites */
.lib-tools { display: flex; gap: 10px; margin: -6px 0 18px; flex-wrap: wrap; }
.lib-tools input[type=search] { flex: 1 1 260px; max-width: 420px; }
.star-filter { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; }
.star-filter i[data-icon] { width: 15px; height: 15px; }
.star-filter.on { color: #b7791f; border-color: #e0b04a; background: rgba(224, 176, 74, .12); }
.star-filter.on svg { fill: currentColor; }
.media { position: relative; }
.media .star { position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .75; transition: opacity .15s, transform .15s; }
.media .star:hover { opacity: 1; transform: scale(1.08); }
.media .star i[data-icon] { width: 17px; height: 17px; }
.media .star.on { opacity: 1; color: #f6c445; }
.media .star.on svg { fill: currentColor; }

/* voiceover: no video preview; audio player in library and activity */
#page-voice .preview { display: none; }
.audio-card { aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2)); color: var(--accent-text); }
.audio-card i[data-icon] { width: 40px; height: 40px; }
.audio-card audio { width: 100%; }
.job .audio-card { aspect-ratio: auto; border-radius: 10px; margin-top: 8px; }

/* login: remember me */
.login-card .remember { font-size: .9em; margin: 0 0 8px; align-items: flex-start; }
.login-card .remember em { display: block; margin: 2px 0 0; }

/* public legal pages */
.legal-body { background: var(--bg); padding: 32px 16px; }
.legal { max-width: 760px; margin: 0 auto; padding: 32px clamp(18px, 4vw, 44px); line-height: 1.6; }
.legal h1 { font-size: 1.8rem; letter-spacing: -.02em; margin: 0 0 4px; }
.legal h2 { font-size: 1.1rem; margin: 26px 0 6px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal-links { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9em; }

/* ============================================ social media manager */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85em; }
.stat.warn b { color: var(--warn); }
.stat.bad b { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; }
.page > .card, .portal-main section > .card { margin-bottom: 18px; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: .9em; flex-wrap: wrap; }
.list-row:first-child { border-top: none; }
.list-row b { min-width: 120px; }
.list-row span:not(.badge) { color: var(--muted); flex: 1; }
.list-row .btn { padding: 6px 12px; font-size: .85em; }
.empty.small { padding: 16px 6px; font-size: .9em; }
.small { font-size: .88em; }
.hint.block { display: block; margin-top: 12px; line-height: 1.5; }
.link-sm { margin-left: auto; font-size: .82em; font-weight: 600; text-decoration: none; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9em; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .85em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.client-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.client-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.client-card img, .c-initial { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--surface-2); flex: none; }
.c-initial { display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: var(--accent-text); background: var(--accent-soft); }
.client-card b { display: block; }
.client-card > div > span { color: var(--muted); font-size: .85em; }
.c-tags { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: .85em; flex-wrap: wrap; }
.keywarn.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.keywarn.info .btn { flex: none; }
.summary-list { list-style: none; padding: 0; margin: 0; }
.summary-list li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .9em; }
.summary-list li:first-child { border-top: none; }
.summary-list li span { color: var(--muted); min-width: 110px; }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--border); display: inline-block; }
.btn.danger { color: var(--danger); }
.danger-zone .row > * { flex: 0 0 auto; }
.invite-row { margin-top: 14px; }
.invite-row .btn { flex: 0 0 auto; }

/* chips and option cards (wizard) */
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: .88em; cursor: pointer; flex: 0 0 auto; }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

/* onboarding wizard */
.wizard { max-width: 820px; }
.wiz-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; overflow-x: auto; }
.wiz-steps li { flex: 1 0 auto; }
.wiz-steps button { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: none; border-bottom: 3px solid var(--border); padding: 8px 6px; color: var(--muted); font: inherit; font-size: .85em; cursor: pointer; white-space: nowrap; }
.wiz-steps button:disabled { cursor: default; opacity: .6; }
.wiz-steps button span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: .85em; }
.wiz-steps li.done button { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.wiz-steps li.done button span { background: var(--accent-soft); color: var(--accent-text); }
.wiz-steps li.on button { color: var(--text); font-weight: 600; border-color: var(--accent); }
.wiz-steps li.on button span { background: var(--accent); color: var(--on-accent, #fff); }
.wiz-body textarea, .wiz-body select, .wiz-body input[type=text] { width: 100%; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.logo-pick { display: flex; align-items: center; gap: 14px; }
.logo-pick img, .logo-empty { width: 84px; height: 84px; border-radius: 14px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--border); }
.logo-empty { display: grid; place-items: center; color: var(--muted); font-size: .78em; text-align: center; }
.logo-pick .btn { cursor: pointer; }
.color-set { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-set input[type=color] { width: 44px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
.platforms { display: grid; gap: 10px; }
.platform { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.p-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.p-instagram .p-logo { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.p-facebook .p-logo { background: #1877f2; }
.p-tiktok .p-logo { background: #111; }
.p-linkedin .p-logo { background: #0a66c2; }
.p-text { flex: 1; min-width: 0; }
.p-text b { display: block; }
.p-text span { color: var(--muted); font-size: .85em; }
.soon { background: var(--warn-soft); color: var(--text); padding: 10px 12px; border-radius: 10px; }
.wiz-done { text-align: center; padding: 10px 0; }
.wiz-done .tick { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); font-size: 1.6rem; font-weight: 800; }
.wiz-done .summary-list { text-align: left; max-width: 460px; margin: 16px auto 0; }

/* client portal */
body.portal { background: var(--bg); }
.portal-top { display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.portal-top .brand { display: flex; align-items: center; gap: 10px; }
.portal-top .logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; background: #fff; }
.portal-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.portal-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92em; }
.portal-nav a.active, .portal-nav a:hover { background: var(--accent-soft); color: var(--accent-text); }
.portal-main { max-width: 1060px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; }
@media (max-width: 640px) { .portal-nav { order: 3; flex-basis: 100%; } .list-row b { min-width: 0; } }
.add-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.add-row input { width: auto; flex: 0 1 200px; }

/* social: connected accounts, picker, app settings */
.platform .btn { flex: none; text-decoration: none; }
.acct { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .85em; flex-wrap: wrap; }
.acct img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.acct > span:not(.badge) { color: var(--text); }
.link-btn { background: none; border: none; color: var(--accent-text); font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.pick-list { display: grid; gap: 8px; margin: 6px 0 4px; }
.pick { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; cursor: pointer; background: var(--surface-2); }
.pick.off { opacity: .55; cursor: not-allowed; }
.pick img, .p-dot { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.p-dot { display: grid; place-items: center; color: #fff; font-weight: 800; }
.p-dot.p-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); } .p-dot.p-facebook { background: #1877f2; }
.p-dot.p-tiktok { background: #111; } .p-dot.p-linkedin { background: #0a66c2; }
.pick b { display: block; font-size: .92em; }
.pick small { color: var(--muted); }
.app-block { border-top: 1px solid var(--border); padding: 16px 0 6px; }
.app-block:first-child { border-top: none; padding-top: 0; }
.app-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-block input[type=password] { width: 100%; }
.copy-row { display: flex; align-items: center; gap: 10px; font-size: .82em; margin: 6px 0; flex-wrap: wrap; }
.copy-row span { color: var(--muted); min-width: 150px; }
.copy-row code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; word-break: break-all; }
.app-acts { margin-top: 8px; }
.app-acts .btn { flex: 0 0 auto; }
a.btn { text-decoration: none; }

/* social: posts */
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge.muted { background: var(--surface-2); color: var(--muted); }
.btn.sm { padding: 6px 12px; font-size: .82em; }
.post-list { display: grid; gap: 8px; }
.post-row { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--surface); }
.post-row:hover { border-color: var(--accent); }
.post-row img, .post-noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.post-noimg { display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.pr-text { min-width: 0; flex: 1; }
.pr-text b { display: block; font-size: .92em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-text > span { color: var(--muted); font-size: .82em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { display: flex; gap: 6px; align-items: center; margin-top: 5px; font-size: .8em; flex-wrap: wrap; }
.p-dot.sm { width: 20px; height: 20px; font-size: .7em; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 18px; align-items: start; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr; } }
.post-grid > div > .card + .card { margin-top: 18px; }
.post-preview { padding: 0; overflow: hidden; max-width: 520px; }
.pp-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.c-initial.sm { width: 32px; height: 32px; font-size: .9rem; border-radius: 50%; }
.post-preview img { width: 100%; display: block; background: #000; }
.pp-caption { padding: 12px 14px 16px; font-size: .92em; line-height: 1.5; white-space: normal; }
.pp-caption .tag { color: var(--accent-text); }
.post-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.post-acts .btn { flex: 0 0 auto; }
.sched { display: inline-flex; gap: 6px; align-items: center; }
.sched input { padding: 7px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .85em; }
.var-list { margin-top: 10px; }
.history { display: grid; gap: 10px; margin-bottom: 12px; max-height: 320px; overflow: auto; }
.h-item { font-size: .88em; border-left: 3px solid var(--border); padding-left: 10px; }
.history + textarea { width: 100%; }
.chosen { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-img { position: relative; }
.ch-img img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 2px solid var(--accent); }
.ch-img button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.media-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.mp { padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--surface-2); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.mp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp.on { border-color: var(--accent); }
.card h3 .btn.sm { text-decoration: none; }
.post-row video { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: #000; }
.post-preview video { width: 100%; display: block; background: #000; max-height: 640px; }
.mp { position: relative; }
.mp video, .ch-img video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.ch-img video { width: 110px; height: 110px; border-radius: 10px; border: 2px solid var(--accent); }
.vbadge { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.65); color: #fff; font-style: normal; font-size: .7em; border-radius: 6px; padding: 1px 5px; }
.media-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.client-choose { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
/* autopilot */
.ap-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-est { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 4px 0; }
.ap-up { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.chip.sm { padding: 3px 9px; font-size: .78em; }
/* ads */
.ad-acct { border: 1px solid var(--border); border-radius: 12px; padding: 4px 12px 12px; margin-bottom: 12px; }
.ad-acct select { width: auto; padding: 5px 8px; font-size: .85em; }
.stats.mini { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.stats.mini .stat { padding: 10px; box-shadow: none; }
.stats.mini .stat b { font-size: 1.15rem; }
.sub-h { margin: 18px 0 8px; font-size: .9rem; }
.pick input[type=radio] { flex: none; }

/* client workspace page */
#client-title:empty, #client-sub:empty { display: none; }
.client-hero { padding: 20px 20px 0; margin-bottom: 18px; }
.ch-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ch-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--border); flex: none; font-size: 1.6rem; }
.ch-name { flex: 1; min-width: 200px; }
.ch-name h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.ch-name > span { color: var(--muted); font-size: .9em; }
.ch-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ch-acts { display: flex; gap: 8px; }
.ch-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.ch-stat { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.ch-stat:hover { border-color: var(--accent); }
.ch-stat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.ch-stat > span { color: var(--muted); font-size: .82em; }
.ch-icons { display: flex; gap: 4px; margin-top: 6px; font-style: normal; }
.p-dot.dim { opacity: .25; filter: grayscale(1); }
.tabs { display: flex; gap: 2px; margin-top: 16px; overflow-x: auto; border-top: 1px solid var(--border); }
.tabs button { background: none; border: none; border-bottom: 3px solid transparent; padding: 12px 14px; font: inherit; font-weight: 600; font-size: .9em; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab-panel > .card + .card { margin-top: 18px; }
.grid-2.tight { margin-bottom: 6px; gap: 0 24px; }
/* accounts */
.acc-group { margin-bottom: 22px; }
.acc-group:last-child { margin-bottom: 0; }
.acc-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.off { background: var(--border); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.acc-tile { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); flex-wrap: wrap; }
.acc-tile.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 5%, var(--surface)); }
.acc-tile.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); background: var(--warn-soft); }
.acc-tile.off { border-style: dashed; }
.acc-tile .p-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.acc-tile .p-logo.p-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); } .acc-tile .p-logo.p-facebook { background: #1877f2; }
.acc-tile .p-logo.p-tiktok { background: #111; } .acc-tile .p-logo.p-linkedin { background: #0a66c2; } .acc-tile .p-logo.p-meta_ads { background: #0866ff; }
.acc-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.acc-txt { flex: 1; min-width: 120px; }
.acc-txt b { display: block; font-size: .92em; }
.acc-txt span { color: var(--muted); font-size: .8em; }
.state { font-size: .78em; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.state.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.state.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.state.off { color: var(--muted); }
.acc-acts { display: flex; gap: 10px; align-items: center; width: 100%; justify-content: flex-end; }
.acc-tile .btn.sm { flex: none; }
.ov-acc { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .9em; }
.ov-acc:first-of-type { border-top: none; }
.ov-acc b { min-width: 110px; }
.ov-acc .muted { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ad targeting */
.loc-list { display: grid; gap: 6px; margin-bottom: 8px; }
.loc { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; background: var(--surface-2); font-size: .88em; flex-wrap: wrap; }
.loc b { flex: 1; min-width: 140px; font-weight: 600; }
.loc select { width: auto; padding: 4px 6px; font-size: .9em; }
.loc-type { font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-text); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; }
.loc-search { position: relative; display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.loc-search input { flex: 1; min-width: 200px; }
.sugg { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); max-height: 260px; overflow: auto; }
.sugg:empty { display: none; }
.sugg button { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 8px 10px; font: inherit; font-size: .88em; color: var(--text); cursor: pointer; }
.sugg button:hover { background: var(--surface-2); }
.sugg > div { padding: 8px 10px; }
.chip .x { background: none; border: none; color: inherit; cursor: pointer; font-weight: 700; margin-left: 4px; padding: 0; }
.aud-est { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; font-size: .9em; }
/* TikTok posting settings */
.tt-panel { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: var(--surface-2); }
.tt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tt-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tt-mode { margin-bottom: 12px; }
.tt-panel select { width: 100%; }
.tt-allow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 10px; font-size: .9em; }
.tt-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tt-check.off { opacity: .55; cursor: not-allowed; }
.tt-check em { font-style: normal; color: var(--muted); font-size: .9em; }
.tt-consent { font-size: .8em; }
/* caption library & hashtags */
.tool-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tool-row .chip { font-size: .82em; padding: 5px 12px; }
.snip-panel { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 8px; background: var(--surface-2); max-height: 380px; overflow: auto; }
.snip-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.snip-tabs select { width: auto; padding: 5px 8px; font-size: .85em; }
.snip-list { display: grid; gap: 8px; }
.snip { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.snip-txt { flex: 1; min-width: 0; font-size: .86em; }
.snip-txt b { display: block; }
.snip-txt span { color: var(--muted); display: block; white-space: pre-line; }
.snip-acts { display: flex; gap: 8px; align-items: center; flex: none; }
.sugg-group { margin-bottom: 10px; }
.sugg-group .chip-set { margin-top: 4px; }

/* composer: Facebook / Instagram post type and size */
.fmt-panel > .muted.small { display: block; margin: 10px 0 6px; }
.fmt-panel .chip:disabled { opacity: .45; cursor: not-allowed; }
.fmt-panel .chip em { font-style: normal; opacity: .7; font-weight: 400; }
.fmt-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.fmt-row .chip-set { flex: 1; }
.shape-prev { position: relative; width: 84px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: #222; border: 1px solid var(--border); }
.shape-prev img, .shape-prev video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.shape-prev .fit { object-fit: contain; }

/* Google */
.p-google_business .p-logo, .p-dot.p-google_business, .acc-tile .p-logo.p-google_business { background: #4285f4; }
.p-google_ads .p-logo, .p-dot.p-google_ads, .acc-tile .p-logo.p-google_ads { background: #34a853; }

/* Website editor (site_admin.js) */
.sw-sec { margin-bottom: 16px; }
.sw-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: var(--surface-2); }
.sw-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sw-item-head span { display: flex; gap: 10px; }
.sw-img { display: flex; gap: 12px; align-items: flex-start; }
.sw-img img, .sw-noimg { width: 150px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: 0 0 auto; }
.sw-noimg { display: grid; place-items: center; font-size: .8em; color: var(--muted); }
.sw-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.sw-g { position: relative; } .sw-g img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.sw-g button { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 24px; height: 24px; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.sw-gpick { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.sw-save { position: sticky; bottom: 0; display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 2; }
.sw-msg { padding: 14px 0; border-bottom: 1px solid var(--border); }
.sw-msg:last-child { border-bottom: 0; }
.sw-msg.unread { border-left: 3px solid var(--accent); padding-left: 12px; }
.sw-msg p { margin: 8px 0; white-space: normal; }
.sw-msg-acts { display: flex; gap: 14px; align-items: center; }
.link-btn.danger { color: #d33; }

/* platform logos + client Accounts tab */
.plogo { display: inline-flex; width: 44px; height: 44px; flex: 0 0 auto; }
.plogo svg { width: 100%; height: 100%; display: block; border-radius: 11px; }
.plogo.sm { width: 32px; height: 32px; } .plogo.sm svg { border-radius: 8px; }
.plogo.xs { width: 20px; height: 20px; } .plogo.xs svg { border-radius: 5px; }
.dim .plogo, .plogo.dim { filter: grayscale(1); opacity: .35; }
.ch-icons { display: flex; gap: 4px; }
.acc-summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; flex-wrap: wrap; }
.acc-summary > div { margin-left: 8px; display: grid; }
.acc-h { margin: 22px 0 10px; font-size: .78em; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.acc-h::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.pcard:hover { box-shadow: 0 6px 20px -12px rgba(0,0,0,.35); }
.pcard.on { border-color: color-mix(in srgb, #16a34a 45%, var(--border)); }
.pcard.warn { border-color: color-mix(in srgb, #d97706 60%, var(--border)); }
.pcard-head { display: flex; gap: 12px; align-items: center; }
.pcard-title { display: grid; gap: 2px; }
.pcard-title b { font-size: 1.02em; }
.pstate { font-size: .78em; font-weight: 600; }
.pstate.ok { color: #16a34a; } .pstate.warn { color: #d97706; } .pstate.off { color: var(--muted); }
.pcard-what { color: var(--muted); font-size: .86em; margin: 10px 0 8px; }
.pcard-list { flex: 1; display: grid; gap: 8px; align-content: start; }
.pacct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pacct img, .pacct-ini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pacct-ini { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .85em; }
.pacct-txt { flex: 1; min-width: 0; display: grid; }
.pacct-txt b { font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pacct-txt span { font-size: .76em; color: var(--muted); }
.pdis { border: 1px solid var(--border); background: var(--surface); color: #c2410c; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .78em; cursor: pointer; flex: 0 0 auto; }
.pdis:hover { background: #fff1ec; border-color: #fdba74; }
.pneed { font-size: .8em; color: var(--muted); padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; }
.pcard-foot { margin-top: 12px; display: flex; justify-content: flex-end; }

/* Settings tabs + social media apps */
.set-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.set-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; font-size: .92em; color: var(--muted); cursor: pointer; }
.set-tabs button:hover { color: var(--text); background: var(--surface); }
.set-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px -4px rgba(0,0,0,.25); }
.set-logos { display: inline-flex; gap: 2px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .app-grid { grid-template-columns: 1fr; } }
.app-block { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; margin: 0 !important; }
.app-block .app-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.app-logos { display: flex; gap: 4px; }
.app-title { flex: 1; display: grid; }
.app-title span { font-size: .8em; color: var(--muted); }
.app-body { flex: 1; }
.app-block .app-acts { align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Settings menu: joined buttons with dividers */
.set-tabs { display: flex; flex-wrap: wrap; gap: 0; padding: 0; overflow: hidden; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 2px 10px -6px rgba(0,0,0,.2); }
.set-tabs button { flex: 1 1 auto; justify-content: center; border-radius: 0; padding: 14px 18px; position: relative; }
.set-tabs button + button::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.set-tabs button:hover { background: var(--surface-2); }
.set-tabs button.on { background: var(--accent); color: var(--on-accent, #fff); box-shadow: none; }
.set-tabs button.on::before, .set-tabs button.on + button::before { display: none; }
.set-tabs button.on .plogo { filter: drop-shadow(0 0 1px rgba(255,255,255,.6)); }
@media (max-width: 700px) { .set-tabs button { flex: 1 1 45%; } .set-tabs button + button::before { display: none; } .set-tabs button { border-top: 1px solid var(--border); } }

/* Team: client access */
.user-row .access { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-left: 40px; border-radius: 10px; background: var(--surface-2); }
.access-label { font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.achip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: .82em; font-weight: 600; }
.achip button { border: 0; background: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 1em; line-height: 1; }
.achip button:hover { background: rgba(0,0,0,.12); }
.achip.made { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding-right: 10px; }
.achip em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .9em; }
.access select { width: auto; padding: 5px 10px; font-size: .82em; border-radius: 99px; border: 1px dashed var(--border); background: var(--surface); }
.user-row .access.tools { margin-top: -4px; }
.tchip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 3px 10px; font: inherit; font-size: .8em; cursor: pointer; text-decoration: line-through; }
.tchip.on { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 600; text-decoration: none; }
.tchip:hover { border-color: var(--accent); }

/* Team: dropdowns with tick boxes */
.msel { position: relative; }
.msel-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 240px; max-width: 460px; justify-content: space-between; padding: 7px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .86em; cursor: pointer; }
.msel-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-btn i { font-style: normal; color: var(--muted); }
.msel-btn:hover { border-color: var(--accent); }
.msel-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-width: 86vw; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); padding: 10px; }
.msel-search { width: 100%; margin-bottom: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.msel-quick { display: flex; gap: 14px; padding: 2px 4px 8px; border-bottom: 1px solid var(--border); }
.msel-quick .link-btn { font-size: .8em; }
.msel-list { max-height: 260px; overflow: auto; padding: 6px 0; display: grid; }
.msel-opt { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: .9em; }
.msel-opt:hover { background: var(--surface-2); }
.msel-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
.msel-opt.fixed { opacity: .75; cursor: default; }
.msel-opt em { font-style: normal; color: var(--muted); font-size: .85em; }
.msel-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Settings → Payments & sign-ups */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .int-grid { grid-template-columns: 1fr; } }
.int-block { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--surface); }
.int-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.int-head > div { flex: 1; display: grid; } .int-head span:not(.pstate):not(.int-ico) { font-size: .8em; color: var(--muted); }
.int-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85em; flex: 0 0 auto; }

/* client page: website sign-up */
.signup-card { border-left: 4px solid #d97706; }
.signup-card.approved { border-left-color: #16a34a; } .signup-card.rejected { border-left-color: #dc2626; }
.su-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.su-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; margin: 10px 0; }
.su-grid div { display: grid; gap: 2px; font-size: .9em; }
.su-grid span { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.su-grid b { font-weight: 500; white-space: pre-wrap; }
.su-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; }
.su-files img, .su-files video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* onboarding: visual style examples */
.opt-visual .opt { padding-top: 10px; }
.vs-prev { position: relative; height: 112px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; display: grid; grid-template-columns: 44% 1fr; border: 1px solid rgba(0,0,0,.08); }
.vs-pic { position: relative; }
.vs-txt { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px; min-width: 0; }
.vs-txt small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.vs-txt b { font-size: 15px; line-height: 1.05; }
.vs-txt i { display: block; height: 4px; width: 46%; border-radius: 4px; margin-top: 6px; }
/* clean */
.vs-clean { background: #fff; }
.vs-clean .vs-pic { background: #f3f4f6; margin: 14px 0 14px 14px; border-radius: 6px; }
.vs-clean .vs-pic::after { content: ""; position: absolute; inset: 30% 30%; border-radius: 50%; background: #e5e7eb; }
.vs-clean .vs-txt { padding-left: 16px; }
.vs-clean small { color: #9ca3af; } .vs-clean b { color: #111827; font-weight: 500; font-size: 14px; } .vs-clean i { background: #111827; height: 2px; width: 24px; }
/* bold */
.vs-bold { background: #ffd400; grid-template-columns: 38% 1fr; }
.vs-bold .vs-pic { background: #ff2e2e; }
.vs-bold .vs-pic::after { content: "%"; position: absolute; inset: 0; display: grid; place-items: center; color: #ffd400; font: 900 46px/1 system-ui, sans-serif; }
.vs-bold small { color: #111; font-weight: 800; } .vs-bold b { color: #111; font-weight: 900; font-size: 22px; letter-spacing: -.03em; } .vs-bold i { background: #111; height: 6px; }
/* playful */
.vs-playful { background: #fff4fb; }
.vs-playful .vs-pic { background: radial-gradient(circle at 30% 35%, #ffb3d9 0 22%, transparent 23%), radial-gradient(circle at 70% 65%, #9be7ff 0 26%, transparent 27%), radial-gradient(circle at 75% 25%, #fff176 0 14%, transparent 15%), #c8b6ff; transform: rotate(-4deg) scale(1.08); }
.vs-playful small { color: #ff4fa3; font-weight: 800; } .vs-playful b { color: #5b2bd6; font-weight: 800; font-family: "Comic Sans MS", "Chalkboard SE", "Baloo 2", cursive; font-size: 16px; }
.vs-playful i { background: repeating-linear-gradient(90deg, #ff4fa3 0 8px, #ffd400 8px 16px, #4fc3ff 16px 24px); }
/* luxury */
.vs-luxury { background: #0d0d0d; border-color: #2a2418; }
.vs-luxury .vs-pic { background: linear-gradient(160deg, #2b2b2b, #0d0d0d); border-right: 1px solid #b8975a; }
.vs-luxury .vs-pic::after { content: ""; position: absolute; inset: 22% 28%; border: 1px solid #b8975a; transform: rotate(45deg); }
.vs-luxury small { color: #b8975a; letter-spacing: .3em; } .vs-luxury b { color: #e9d9b5; font-family: "Didot", "Bodoni 72", Georgia, serif; font-weight: 400; font-size: 16px; letter-spacing: .04em; }
.vs-luxury i { background: #b8975a; height: 1px; width: 30px; }
/* natural */
.vs-natural { background: #f3ece0; }
.vs-natural .vs-pic { background: radial-gradient(ellipse at 40% 110%, #6b7d4a 0 45%, transparent 46%), radial-gradient(circle at 70% 30%, #f6d79a 0 16%, transparent 17%), linear-gradient(180deg, #c9b79a, #a88f6a); }
.vs-natural small { color: #7a6a4f; } .vs-natural b { color: #4a3f2c; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; font-size: 16px; }
.vs-natural i { background: #8a9a5b; border-radius: 0; height: 3px; }
/* corporate */
.vs-corporate { background: #fff; grid-template-columns: 1fr 44%; }
.vs-corporate .vs-pic { order: 2; background: linear-gradient(0deg, #1e3a8a 0 35%, transparent 35%) 18% 100% / 14% 100% no-repeat, linear-gradient(0deg, #3b82f6 0 60%, transparent 60%) 43% 100% / 14% 100% no-repeat, linear-gradient(0deg, #1e3a8a 0 85%, transparent 85%) 68% 100% / 14% 100% no-repeat, #eef2f8; }
.vs-corporate .vs-txt { border-left: 6px solid #1e3a8a; }
.vs-corporate small { color: #3b82f6; font-weight: 700; } .vs-corporate b { color: #0f1f4b; font-weight: 700; font-size: 15px; } .vs-corporate i { background: #cbd5e1; }
