/* oaf ai — modern studio. Aaploo green + gold, Geist. */
:root {
  --night: #06130F;
  --base: #081A15;
  --panel: #0B1F1A;
  --raised: #13302A;
  --raised-2: #1A3D34;
  --line: #13302A;
  --line-2: #1F4A3F;
  --brand: #0E2A24;
  --text: #EEF2EF;
  --muted: #8FA69D;
  --gold: #C8A55A;
  --gold-hi: #D8B96E;
  --ink: #0E2A24;
  --ok: #9FD8A8;
  --danger: #E8907F;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --rail: 84px;
  --ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--night);
  color: var(--text);
  font: 400 15px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
svg { flex: none; }
.mobile-only { display: none !important; }

/* ---------- brand ---------- */
.mark { width: 40px; height: 40px; display: block; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.ai-badge {
  background: var(--gold); color: var(--ink); font-weight: 600;
  border-radius: 7px; line-height: 1; padding: 5px 7px; font-size: 12px; letter-spacing: 0.02em;
}
.brand-lg .mark { width: 64px; height: 64px; }
.brand-lg .brand-name { font-size: 48px; }
.brand-lg .ai-badge { font-size: 16px; padding: 6px 9px; border-radius: 9px; }
.brand-sm .mark { width: 30px; height: 30px; }
.brand-sm .brand-name { font-size: 22px; }
.brand-sm .ai-badge { font-size: 10px; padding: 4px 6px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn-gold {
  background: var(--gold); color: var(--ink); border: 0; border-radius: var(--r);
  padding: 12px 20px; font-weight: 600; transition: background .15s;
}
.btn-gold:hover { background: var(--gold-hi); }
.btn-gold:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost, .btn-danger {
  background: var(--raised); border: 1px solid transparent; border-radius: var(--r);
  padding: 11px 18px; color: var(--text); text-align: center; text-decoration: none; font-weight: 500;
}
.btn-ghost:hover { background: var(--raised-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(232,144,127,.35); }
.btn-danger:hover { background: rgba(232,144,127,.08); }
.ghost-sm { background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--muted); padding: 8px 12px; font-size: 13px; }
.ghost-sm:hover { color: var(--danger); border-color: rgba(232,144,127,.4); }
.link-btn { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--danger); }
.icon-btn {
  background: none; border: 0; color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--raised); }
.icon-btn svg, .search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--gold); color: var(--ink); font-weight: 600; font-size: 15px;
}

/* ---------- login ---------- */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 50% 110%, rgba(200,165,90,.12), transparent 60%), var(--night);
}
.login-card { width: min(380px, 100%); text-align: center; }
.login-sub { color: var(--muted); margin: 16px 0 36px; }
.login-form { display: grid; gap: 8px; text-align: left; }
.login-form label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.login-form input {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 13px 14px; outline: none;
}
.login-form input:focus { border-color: var(--gold); }
.login-form .btn-gold { margin-top: 14px; padding: 14px; }
.login-alt { display: block; margin: 18px auto 0; font-size: 14px; }
.login-msg { min-height: 1.5em; color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- layout ---------- */
.app { min-height: 100dvh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 10;
  background: var(--base); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0;
}
.rail-logo { margin-bottom: 16px; }
.rail-btn {
  width: 64px; min-height: 58px; border-radius: var(--r); border: 0; background: none;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 10.5px; font-weight: 500;
}
.rail-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rail-btn:hover { color: var(--text); background: var(--panel); }
.rail-btn.is-active { color: var(--text); background: var(--raised); }
.rail-btn.is-active svg { stroke: var(--gold); }
.rail .avatar { margin-top: auto; }

.stage { margin-left: var(--rail); padding: 22px 32px 240px; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; width: 300px; max-width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--muted);
}
.search:focus-within { border-color: var(--line-2); }
.search input { background: none; border: 0; outline: none; width: 100%; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.spend-chip {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13px; color: var(--muted);
}
.spend-chip strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- feed ---------- */
.feed { columns: 4 240px; column-gap: 14px; }
.tile {
  break-inside: avoid; margin: 0 0 14px; position: relative; display: block; width: 100%;
  border-radius: var(--r-lg); overflow: hidden; background: var(--panel); border: 0; padding: 0;
}
.tile img { display: block; width: 100%; height: auto; transition: transform .45s ease; }
.tile:hover img { transform: scale(1.02); }
.tile-cap {
  position: absolute; inset: auto 0 0 0; padding: 32px 14px 12px;
  background: linear-gradient(transparent, rgba(4,14,11,.88));
  font-size: 12.5px; text-align: left; display: flex; justify-content: space-between; gap: 10px;
  opacity: 0; transition: opacity .2s;
}
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
.tile-cap .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cap .who { color: var(--muted); white-space: nowrap; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-wrap: wrap; pointer-events: none; }
.badge {
  font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 8px;
  background: rgba(6,19,15,.74); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.badge-star { color: var(--gold); }
.badge-ok { color: var(--ok); }
.badge-no { color: var(--danger); }

.tile.is-pending { border: 1px solid var(--line-2); cursor: default; }
.tile.is-pending::after {
  content: ""; position: absolute; left: 50%; top: calc(50% - 34px); width: 120px; height: 4px; margin-left: -60px;
  border-radius: 4px; background: linear-gradient(90deg, var(--gold) 0 40%, var(--raised) 40%);
  background-size: 250% 100%; animation: load 1.6s ease-in-out infinite;
}
.pending-label {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px;
  text-align: center; font-size: 13px; color: var(--muted); padding-top: 10px;
}
.pending-label strong { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.tile.is-failed {
  display: grid; place-content: center; gap: 8px; padding: 20px; text-align: center;
  font-size: 13px; color: var(--muted); background: transparent; border: 1px dashed rgba(232,144,127,.4);
}
.tile.is-failed strong { color: var(--danger); font-weight: 500; }
@keyframes load { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .tile.is-pending::after, .enhance-btn.is-busy svg { animation: none; }
  .tile img { transition: none; }
}

.empty { text-align: center; color: var(--muted); padding: 16vh 20px 0; }
.empty-mark { width: 52px; height: 52px; opacity: .9; }
.empty-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin: 16px 0 4px; }
.empty p { margin: 0; }
.load-more {
  display: block; margin: 24px auto 0; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); border-radius: var(--r); padding: 11px 20px;
}

/* ---------- composer ---------- */
.composer {
  position: fixed; z-index: 20;
  left: calc(var(--rail) + 32px); right: 32px; bottom: 24px;
  max-width: 1000px; margin: 0 auto;
  background: rgba(14,42,36,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.composer.is-drop { border-color: var(--gold); }
.composer-main { display: flex; gap: 10px; align-items: flex-start; }
.refs { display: flex; gap: 6px; }
.ref { position: relative; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--raised); flex: none; }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref.is-uploading img { opacity: .4; }
.ref button {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: rgba(6,19,15,.85); color: var(--text); font-size: 10px; line-height: 18px; padding: 0;
}
.add-ref {
  flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  border: 1px dashed #2C5C50; color: var(--muted); cursor: pointer;
}
.add-ref svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.add-ref:hover { color: var(--gold); border-color: var(--gold); }
#prompt {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent;
  padding: 12px 2px; max-height: 180px; min-height: 48px; font-size: 16px; line-height: 1.45;
}
#prompt::placeholder { color: var(--muted); }
.enhance-btn {
  flex: none; display: flex; align-items: center; gap: 6px; height: 40px; margin-top: 4px; padding: 0 14px;
  border-radius: 12px; border: 1px solid #2C5C50; background: none; color: var(--gold); font-size: 13px; font-weight: 500;
}
.enhance-btn svg { width: 15px; height: 15px; fill: var(--gold); }
.enhance-btn:hover { border-color: var(--gold); }
.enhance-btn.is-busy svg { animation: spin 1s linear infinite; }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.chip {
  position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px;
  background: var(--raised); border-radius: 11px; font-size: 13px; cursor: pointer;
}
.chip:hover { background: var(--raised-2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.ratio-icon { display: inline-block; border: 1.5px solid var(--text); border-radius: 2px; width: 12px; height: 12px; }
.chip select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: none;
  height: 38px; padding: 0 24px 0 0; font-weight: 500; cursor: pointer; max-width: 190px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 17px, calc(100% - 9px) 17px; background-size: 4px 4px; background-repeat: no-repeat;
}
.chip select option, .chip select optgroup { background: var(--brand); color: var(--text); }
#style { max-width: 160px; }
.seg { display: flex; height: 40px; padding: 3px; background: var(--raised); border-radius: 11px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 0 11px; font-size: 13px; color: var(--muted); font-weight: 500; }
.seg button.is-on { background: var(--line-2); color: var(--gold); font-weight: 600; }
.stepper { display: flex; align-items: center; height: 40px; background: var(--raised); border-radius: 11px; font-size: 13px; }
.stepper button { width: 32px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 17px; }
.stepper button:hover { color: var(--text); }
#count { min-width: 14px; text-align: center; font-weight: 600; }
.btn-generate { display: flex; align-items: center; gap: 10px; flex: none; height: 48px; padding: 0 24px; font-size: 15px; }
.cost { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }

/* ---------- viewer ---------- */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(4,12,10,.96); color: var(--text);
}
.viewer::backdrop { background: rgba(0,0,0,.6); }
.viewer-body { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
.viewer-img { display: grid; place-items: center; padding: 32px; min-height: 0; }
.viewer-img img { max-width: 100%; max-height: calc(100dvh - 64px); object-fit: contain; border-radius: var(--r); }
.viewer-side {
  background: var(--panel); border-left: 1px solid var(--line);
  padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px;
}
.viewer-top { display: flex; align-items: center; gap: 10px; }
.viewer-top .viewer-close { margin-left: auto; }
.icon-btn svg { fill: none; }
.star-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 0; background: var(--raised); color: var(--muted);
}
.star-btn svg { width: 19px; height: 19px; fill: currentColor; }
.star-btn.is-on { color: var(--gold); background: var(--line-2); }
.review-seg button[data-review="approved"].is-on { color: var(--ok); }
.review-seg button[data-review="rejected"].is-on { color: var(--danger); }
.viewer-prompt { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 15px; }
.viewer-meta { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: 13px; }
.viewer-meta dt { color: var(--muted); }
.viewer-meta dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.field-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.field-row label { color: var(--muted); }
.field-row select, .field-row input, .edit-box textarea, .expand-row select,
.add-member input, .add-member select, .members select, .members input, .pass-form input {
  background: var(--base); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 9px 11px; outline: none; width: 100%; min-width: 0;
}
.field-row select:focus, .field-row input:focus, .edit-box textarea:focus, .members input:focus,
.add-member input:focus, .pass-form input:focus { border-color: var(--gold); }
.tools { background: var(--base); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.tools h2 { font-size: 13px; font-weight: 600; margin: 0; }
.edit-box { display: grid; gap: 8px; }
.edit-box textarea { resize: vertical; min-height: 58px; line-height: 1.45; }
.tool-grid { display: grid; gap: 8px; }
.expand-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.tool-note { margin: 0; font-size: 12px; color: var(--muted); }
.viewer-actions { display: grid; gap: 8px; margin-top: auto; }

/* ---------- sheets ---------- */
.sheet {
  border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 0;
  background: var(--panel); color: var(--text);
  width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
}
.sheet::backdrop { background: rgba(2,8,6,.7); backdrop-filter: blur(4px); }
.sheet-sm { width: min(440px, calc(100vw - 32px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 16px 4px 24px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#account-email { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.sheet-note { margin: 6px 24px 0; font-size: 13px; color: var(--muted); }
.sheet-foot { padding: 12px 24px 24px; display: grid; }
.board-list { display: grid; gap: 4px; padding: 14px 16px 0; max-height: 50dvh; overflow-y: auto; }
.board-list:empty::after { content: "No boards yet."; color: var(--muted); font-size: 14px; padding: 8px; }
.board-item {
  display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: none;
  padding: 12px; border-radius: var(--r-sm); font-weight: 500;
}
.board-item svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.board-item:hover, .board-item.is-active { background: var(--raised); }
.add-member { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; padding: 12px 24px 0; }
.cred-box { margin: 16px 24px 0; padding: 16px; border: 1px solid var(--gold); border-radius: var(--r); background: rgba(200,165,90,.06); }
.cred-box p { margin: 0 0 8px; }
.cred-box pre { margin: 0 0 12px; white-space: pre-wrap; font: 14px/1.5 var(--ui); }
.cred-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.members-wrap { padding: 16px 24px 24px; overflow-x: auto; }
.members { width: 100%; border-collapse: collapse; font-size: 14px; }
.members th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.members td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.members .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.members .m-limit, .members .m-role { width: 120px; }
.m-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.m-email { word-break: break-all; }
.m-actions { display: flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }
.muted { color: var(--muted); }
.pass-form { display: grid; gap: 8px; padding: 12px 24px 24px; font-size: 13px; }
.pass-form label { color: var(--muted); }
.pass-form .btn-gold { margin-top: 10px; }
.account-spend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 24px 0; }
.stat { background: var(--base); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 2px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.account-actions { display: grid; gap: 8px; padding: 16px 24px 24px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: 14px;
  background: var(--raised); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: var(--r);
  font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.toast.is-error { border-color: rgba(232,144,127,.5); color: var(--danger); }
.toast .link-btn { color: var(--gold); }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .desktop-only { display: none; }
  .search { width: 220px; }
  .controls { flex-wrap: wrap; }
  .btn-generate { margin-left: auto; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .mobile-only { display: revert !important; }
  .rail { display: none; }
  .stage { margin-left: 0; padding: 0 12px 260px; }
  .topbar { gap: 10px; margin-bottom: 12px; }
  .view-title { font-size: 22px; max-width: 60vw; }
  .topbar-right { width: 100%; margin: 0; }
  .topbar-right .search { flex: 1; width: auto; }
  .feed { columns: 2 140px; column-gap: 8px; }
  .tile { margin-bottom: 8px; border-radius: 14px; }
  .tile-cap { display: none; }
  .composer { left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 8px); border-radius: 20px; padding: 10px; }
  .composer-main { flex-wrap: wrap; }
  .refs:empty { display: none; }
  .add-ref, .ref { width: 42px; height: 42px; }
  #prompt { min-height: 42px; padding: 9px 2px; font-size: 16px; }
  .enhance-btn { width: 40px; padding: 0; justify-content: center; margin-top: 1px; }
  .enhance-btn span { display: none; }
  .controls { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 8px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip, .seg, .stepper { flex: none; }
  .chip select { max-width: 120px; }
  #style { max-width: 110px; }
  .btn-generate { justify-content: center; width: 100%; margin: 0; }
  .viewer-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .viewer-img { padding: 12px; }
  .viewer-img img { max-height: 56dvh; }
  .viewer-side { border-left: 0; border-top: 1px solid var(--line); padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px); max-height: 50dvh; }
  .viewer-close { position: fixed; top: calc(env(safe-area-inset-top) + 8px); right: 8px; background: rgba(6,19,15,.8); }
  .viewer-actions { grid-template-columns: 1fr 1fr; }
  .viewer-actions .btn-gold { grid-column: 1 / -1; }
  .sheet, .sheet-sm { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .add-member { grid-template-columns: 1fr 110px; padding: 12px 16px 0; }
  .add-member .btn-gold { grid-column: 1 / -1; }
  .sheet-note, .cred-box { margin-left: 16px; margin-right: 16px; }
  .members-wrap, .account-actions, .pass-form, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .account-spend { padding: 12px 16px 0; }
  .members thead { display: none; }
  .members tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .members td { border: 0; padding: 0; }
  .members td:first-child, .members td:last-child { grid-column: 1 / -1; }
  .members .m-actions { justify-content: flex-start; }
  .members .m-limit, .members .m-role { width: 100%; }
}

/* =================== workspace (v4) =================== */
.mhead { display: none; }
.rail { overflow-y: auto; scrollbar-width: none; }
.rail-btn { position: relative; }
.rail-dot { position: absolute; top: 9px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
body:not([data-section="studio"]) .composer { display: none; }
body:not([data-section="studio"]) .stage { padding-bottom: 40px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.small { font-size: 12px; }
.pad { padding: 10px 12px; margin: 0; }
.late { color: var(--danger) !important; }
.mini-av {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--raised-2); color: var(--gold); font-size: 12px; font-weight: 600;
}

.tabs { display: flex; gap: 4px; margin: -6px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px;
}
.tab:hover { color: var(--text); background: var(--panel); }
.tab.is-active { color: var(--text); background: var(--raised); }

/* Home */
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.page-sub { margin: 4px 0 0; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.card-wide { grid-column: 1 / -1; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head .link-btn { font-size: 13px; text-decoration: none; color: var(--gold); }
.card-note { margin: 0; font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.list li.muted { font-size: 14px; padding: 6px 0; }
.li-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; padding: 9px 8px; margin: 0 -8px; border-radius: var(--r-sm); text-align: left; font-size: 14px;
  width: calc(100% + 16px);
}
.li-btn:hover { background: var(--raised); }
.li-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-btn small { color: var(--muted); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--base); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 2px; }
.kpi strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.strip-item { flex: none; width: 132px; height: 165px; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; background: var(--base); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Split pages (assistant, messages) */
.page-split { display: grid; grid-template-columns: 260px 1fr; gap: 0; height: 100dvh; margin: -22px -32px -40px; }
.side-list { border-right: 1px solid var(--line); padding: 18px 12px; overflow-y: auto; background: var(--base); }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; margin-top: 6px; }
.side-head h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.thread-list { display: grid; gap: 2px; margin-bottom: 10px; }
.thread {
  display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; color: var(--muted);
  padding: 9px 10px; border-radius: var(--r-sm); font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.thread:hover { background: var(--panel); color: var(--text); }
.thread.is-active { background: var(--raised); color: var(--text); }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { padding: 18px 28px 14px; border-bottom: 1px solid var(--line); }
.chat-head h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px 28px; }
.chat-log { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.chat-intro { max-width: 680px; margin: 8vh auto 0; text-align: center; }
.chat-intro h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin: 14px 0 6px; }
.starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 26px; text-align: left; }
.starter { border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--r); padding: 12px 14px; font-size: 14px; color: var(--text); text-align: left; }
.starter:hover { border-color: var(--gold); }
.bubble { max-width: 88%; border-radius: 18px; padding: 12px 16px; line-height: 1.6; font-size: 15px; overflow-wrap: anywhere; }
.bubble-me { align-self: flex-end; background: var(--raised-2); border-bottom-right-radius: 6px; }
.bubble-ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble-ai ul { margin: 6px 0; padding-left: 20px; }
.bubble-ai pre { background: var(--base); padding: 10px; border-radius: 8px; white-space: pre-wrap; font-size: 13px; }
.bubble-ai code { background: var(--base); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.bubble-tools { margin-top: 8px; display: flex; gap: 14px; font-size: 13px; }
.bubble.is-typing .bubble-tools { display: none; }
.bubble.is-typing .bubble-text::after { content: "▍"; color: var(--gold); animation: blink 1s steps(2) infinite; }
.bubble.is-error { border-color: rgba(232,144,127,.5); color: var(--danger); }
@keyframes blink { 50% { opacity: 0; } }
.chat-input {
  display: flex; align-items: flex-end; gap: 8px; padding: 14px 28px 20px; border-top: 1px solid var(--line);
  max-width: 880px; width: 100%; margin: 0 auto; box-sizing: border-box; border-top: 0;
}
.chat-input textarea {
  flex: 1; resize: none; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--r);
  padding: 12px 14px; outline: none; max-height: 200px; line-height: 1.45; font-size: 15px;
}
.chat-input textarea:focus { border-color: var(--gold); }
.chat-input .btn-gold { height: 46px; }
.chip-sm { height: 46px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.is-grouped { padding-left: 36px; margin-top: -10px; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-meta strong { font-size: 14px; }
.msg-meta small { color: var(--muted); font-size: 12px; }
.msg-body { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-body a { color: var(--gold); }

/* Calendar */
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-nav .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-dow { background: var(--base); padding: 10px 12px; font-size: 12px; color: var(--muted); font-weight: 500; }
.cal-cell { background: var(--panel); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell.is-out { background: var(--base); }
.cal-cell.is-out .cal-day { color: #4D6A61; }
.cal-day { align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; width: 28px; height: 28px; border-radius: 8px; }
.cal-day:hover { background: var(--raised); color: var(--text); }
.cal-cell.is-today .cal-day { background: var(--gold); color: var(--ink); }
.cal-post {
  border: 0; text-align: left; font-size: 12px; line-height: 1.3; padding: 5px 7px; border-radius: 7px;
  background: var(--raised); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--muted);
}
.cal-post small { color: var(--muted); }
.st-idea { border-left-color: #8FA69D; } .st-draft { border-left-color: #7FA3D9; } .st-review { border-left-color: #D9A65F; }
.st-scheduled { border-left-color: var(--gold); } .st-published { border-left-color: var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.lg { border-left-width: 3px; border-left-style: solid; padding-left: 8px; }
.ideas { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ideas h3 { flex-basis: 100%; margin: 6px 0 2px; font-size: 13px; font-weight: 600; color: var(--text); }
.ideas .cal-post { max-width: 260px; }

/* Tasks */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.col { background: var(--base); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 200px; }
.col.is-over { border-color: var(--gold); }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; }
.col-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.col-head span { color: var(--muted); font-size: 13px; }
.col-body { display: grid; gap: 8px; }
.tcard {
  display: grid; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r);
  padding: 12px; cursor: grab; border-left: 3px solid transparent;
}
.tcard:hover { border-color: var(--line-2); }
.tcard.pr-high { border-left-color: var(--danger); }
.tcard.is-drag { opacity: .5; }
.tcard-title { font-size: 14px; font-weight: 500; line-height: 1.4; }
.tcard-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tcard-meta .hi { color: var(--danger); }
.tag { justify-self: start; font-size: 11px; background: var(--raised); color: var(--gold); padding: 3px 8px; border-radius: 6px; }
.col-add { width: 100%; margin-top: 8px; border: 1px dashed var(--line-2); background: none; color: var(--muted); border-radius: var(--r); padding: 10px; font-size: 13px; }
.col-add:hover { color: var(--text); border-color: var(--muted); }

/* People */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.stage-pill { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 12px 14px; border-left: 3px solid var(--muted); }
.stage-pill strong { font-size: 22px; font-weight: 700; }
.stage-pill span { font-size: 12px; color: var(--muted); }
.stage-pill.is-on { border-color: var(--gold); }
.st-new { border-left-color: #8FA69D; } .st-contacted { border-left-color: #7FA3D9; } .st-negotiating { border-left-color: #D9A65F; }
.st-deal { border-left-color: var(--ok); } .st-declined { border-left-color: var(--danger); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover { background: var(--raised); }
.ptable tbody tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--raised); border: 0; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.st-new { color: #A9BDB5; } .pill.st-contacted { color: #9DBBE6; } .pill.st-negotiating { color: #E2B877; }
.pill.st-deal { color: var(--ok); } .pill.st-declined { color: var(--danger); }
.empty-line { padding: 30px; text-align: center; }

/* Editors */
.editor { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.editor-body { display: grid; grid-template-columns: 1fr 280px; gap: 22px; padding: 10px 24px 8px; overflow-y: auto; }
.editor-main, .editor-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.editor-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.editor-foot .btn-danger[hidden] + .btn-gold { margin-left: auto; }
.fld { display: grid; gap: 6px; font-size: 13px; color: var(--muted); border: 0; padding: 0; margin: 0; min-width: 0; }
.fld legend { padding: 0; margin-bottom: 6px; }
.fld input, .fld select, .fld textarea, .write-body textarea {
  background: var(--base); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px;
  color: var(--text); font-size: 14px; outline: none; width: 100%; min-width: 0;
}
.fld textarea { resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .write-body textarea:focus { border-color: var(--gold); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; }
.check span { display: inline-block; padding: 7px 12px; border-radius: 9px; background: var(--raised); color: var(--muted); font-size: 13px; cursor: pointer; }
.check input:checked + span { background: var(--line-2); color: var(--gold); font-weight: 500; }
.check input:focus-visible + span { outline: 2px solid var(--gold); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.attach { display: flex; flex-wrap: wrap; gap: 8px; }
.att { position: relative; width: 72px; height: 90px; border-radius: 10px; overflow: hidden; background: var(--base); }
.att img { width: 100%; height: 100%; object-fit: cover; }
.att button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(6,19,15,.85); color: var(--text); font-size: 10px; padding: 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; padding: 12px 24px; max-height: 60dvh; overflow-y: auto; }
.pick { aspect-ratio: 4 / 5; border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: var(--base); }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick.is-on { border-color: var(--gold); }
.write-body { padding: 10px 24px 0; }
.write-body textarea { min-height: 260px; line-height: 1.55; resize: vertical; }
.two-btns { grid-template-columns: 1fr 1fr; gap: 8px; }

/* Comments */
.comments { display: grid; gap: 10px; }
.comments h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.c-list { display: grid; gap: 10px; max-height: 260px; overflow-y: auto; }
.c-item { display: flex; gap: 8px; align-items: flex-start; }
.c-item p { margin: 2px 0 0; font-size: 14px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.c-form { display: flex; gap: 6px; }
.c-form input { flex: 1; min-width: 0; background: var(--base); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; outline: none; color: var(--text); font-size: 14px; }
.c-form input:focus { border-color: var(--gold); }
.viewer-side .comments { border-top: 1px solid var(--line); padding-top: 14px; }

/* Phone nav */
.nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 16px 24px; }
.nav-tile { display: grid; justify-items: center; gap: 6px; border: 0; background: var(--raised); color: var(--text); border-radius: var(--r); padding: 16px 6px; font-size: 13px; font-weight: 500; }
.nav-tile svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

@media (max-width: 1100px) {
  .editor-body { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mhead {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    position: sticky; top: 0; z-index: 15; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
    background: rgba(6,19,15,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .mhead .icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mhead .avatar { width: 36px; height: 36px; }
  .stage { padding-top: 14px; }
  .page-head h1 { font-size: 24px; }
  .home-grid { grid-template-columns: 1fr; }
  .page-split { grid-template-columns: 1fr; height: calc(100dvh - 60px - env(safe-area-inset-top)); margin: -14px -12px -40px; }
  .side-list { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .side-list .side-head { flex: none; margin: 0; padding: 0 4px; }
  .side-list .side-head h2 { display: none; }
  .thread-list { display: flex; gap: 4px; margin: 0; }
  .thread { flex: none; max-width: 180px; }
  .page-split { grid-template-rows: auto 1fr; }
  .chat-scroll { padding: 16px 12px; }
  .chat-head { padding: 12px; }
  .chat-input { padding: 10px 10px calc(env(safe-area-inset-bottom) + 10px); }
  .chat-intro { margin-top: 3vh; }
  .chat-intro h1 { font-size: 24px; }
  .starters { grid-template-columns: 1fr; }
  .bubble { max-width: 94%; }
  .cal-grid { font-size: 11px; }
  .cal-cell { min-height: 74px; padding: 3px; }
  .cal-dow { padding: 6px; font-size: 11px; }
  .cal-post { font-size: 10px; padding: 3px 4px; }
  .cal-post small { display: none; }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px; }
  .col { scroll-snap-align: start; }
  .pipeline { grid-template-columns: repeat(5, 120px); overflow-x: auto; }
  .ptable th:nth-child(2), .ptable td:nth-child(2), .ptable th:nth-child(5), .ptable td:nth-child(5) { display: none; }
  .two { grid-template-columns: 1fr; }
  .editor-body { padding: 8px 16px; }
  .editor-foot { padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px); }
  .topbar .cal-nav { order: 2; }
}

/* =================== video + sales (v5) =================== */
.vform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 22px; }
.vform > * { min-width: 0; }
.vform-row { display: flex; gap: 14px; align-items: stretch; }
.vstart { flex: none; width: 96px; }
.vstart-add {
  height: 100%; min-height: 96px; border: 1px dashed #2C5C50; border-radius: var(--r); color: var(--muted);
  display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12px; cursor: pointer; text-align: center;
}
.vstart-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.vstart-add:hover { color: var(--gold); border-color: var(--gold); }
.vstart-img { position: relative; height: 100%; min-height: 96px; border-radius: var(--r); overflow: hidden; background: var(--base); }
.vstart-img img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.vstart-img button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(6,19,15,.85); color: var(--text); font-size: 11px; padding: 0; }
#vid-prompt {
  flex: 1; min-width: 0; resize: vertical; background: var(--base); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 12px 14px; outline: none; font-size: 15px; line-height: 1.5; color: var(--text);
}
#vid-prompt:focus { border-color: var(--gold); }
.vform .controls { margin-top: 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.vcard video { width: 100%; display: block; background: #000; max-height: 70vh; object-fit: contain; }
.vph { display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 16px; background: var(--base); color: var(--muted); font-size: 13px; position: relative; }
.vph strong { color: var(--text); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.vph.is-pending::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 30%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) 0 40%, var(--raised) 40%); background-size: 250% 100%; animation: load 1.6s ease-in-out infinite; }
.vcard.is-failed .vph strong { color: var(--danger); }
.vcap { padding: 12px 14px; display: grid; gap: 8px; }
.vcap p { margin: 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.vact { display: flex; gap: 12px; }
.vact .link-btn { font-size: 12px; color: var(--gold); text-decoration: none; }
.vact .link-btn.danger { color: var(--danger); }

.sales { display: grid; gap: 14px; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.bars { margin: 0; background: var(--base); border-radius: var(--r-sm); padding: 12px 12px 8px; }
.bars svg { width: 100%; height: 120px; display: block; }
.bars rect { fill: var(--gold); opacity: .85; }
.bars rect:hover { opacity: 1; }
.bars figcaption { margin-top: 6px; }
.top { background: var(--base); border-radius: var(--r-sm); padding: 12px 14px; }
.top h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.top ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.top li { display: flex; justify-content: space-between; gap: 10px; }
.top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .vform-row { flex-direction: column; }
  .vstart { width: 100%; }
  .vstart-add, .vstart-img { min-height: 72px; }
  .vstart-img { height: 140px; }
  .vgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpis-4 { grid-template-columns: 1fr 1fr; }
  .sales-row { grid-template-columns: 1fr; }
}
