/* GrowFleet instance UI - navy command sidebar over a warm light deck.
   Token-matched to growfleet.ai (light theme values + brand navy/amber/mint). */
:root {
  --navy: #070b14; --navy2: #0c1220; --navy-line: #1d2739; --navy-line2: #2a3852;
  --navy-text: #e9eef8; --navy-muted: #93a1b8; --navy-dim: #5b6880;
  --bg: #f7f5f0; --card: #ffffff; --card2: #faf8f4;
  --line: #e4dfd4; --line2: #d2ccbe;
  --text: #131a2a; --muted: #56617a; --dim: #8b93a6;
  --amber: #e08900; --amber-bright: #ffad33; --amber-deep: #c67700;
  --amber-soft: rgba(224, 137, 0, 0.10);
  --green: #14976b; --green-soft: rgba(20, 151, 107, 0.10);
  --red: #d64545; --red-soft: rgba(214, 69, 69, 0.08);
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --shadow: 0 4px 18px rgba(19, 26, 42, 0.07);
  --shadow-lg: 0 18px 44px rgba(19, 26, 42, 0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; }
.mono { font-family: var(--font-mono); letter-spacing: .1em; }
a { color: var(--amber); text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ---------- login (navy backdrop, white card - matches the app shell) ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--navy); }
.login-wrap::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(800px 480px at 12% -5%, rgba(255,173,51,.14), transparent 60%),
              radial-gradient(700px 500px at 95% 12%, rgba(62,207,142,.09), transparent 65%); }
.login-card { position: relative; width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 40px 36px; box-shadow: var(--shadow-lg); }
.login-card .lmark { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-card .lmark svg { width: 42px; height: 42px; border-radius: 10px; }
.login-card .lmark .wm { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--text); }
.login-card .wm b { color: var(--amber); }
.login-sub { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em;
  color: var(--dim); margin-bottom: 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.field .pwrap { position: relative; }
.field input { width: 100%; padding: 13px 15px; border-radius: 12px; background: var(--card2);
  border: 1px solid var(--line2); color: var(--text); font-size: 1rem; font-family: var(--font-body); }
.field input:focus { outline: none; border-color: var(--amber); background: var(--card); }
.pwshow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--dim); font-family: var(--font-mono);
  font-size: .6rem; letter-spacing: .1em; cursor: pointer; padding: 6px; }
.pwshow:hover { color: var(--text); }
.remember { display: flex; align-items: center; gap: 9px; margin: 4px 0 18px;
  color: var(--muted); font-size: .9rem; }
.remember input { accent-color: var(--amber); width: 16px; height: 16px; }
.login-err { display: flex; gap: 8px; align-items: center; background: var(--red-soft);
  border: 1px solid rgba(214,69,69,.3); color: var(--red); border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; margin-bottom: 16px; }
.login-note { margin-top: 20px; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .12em; color: var(--dim); text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 11px 20px; border-radius: 11px; font-weight: 600;
  font-size: .93rem; border: 1px solid var(--line2); background: var(--card);
  color: var(--text); cursor: pointer; transition: all .18s ease; }
.btn:hover { border-color: var(--amber); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.amber { background: linear-gradient(180deg, var(--amber-bright), #f29718);
  color: #1a1206; border-color: transparent; box-shadow: 0 4px 14px rgba(242,151,24,.3); }
.btn.amber:hover { box-shadow: 0 8px 20px rgba(242,151,24,.38); }
.btn.wide { width: 100%; text-align: center; padding: 14px; }
.btn.danger { background: var(--red); border-color: transparent; color: #fff; }
.btn.danger:hover { box-shadow: 0 6px 16px rgba(214,69,69,.3); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: var(--navy-text); padding: 22px 18px 18px;
  display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh;
  overflow: hidden; }
.brandmark { display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; }
.brandmark svg { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.brandmark b { color: var(--amber-bright); }
.tagline { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .22em;
  color: var(--navy-dim); margin: -8px 0 6px 44px; }
.planchip { font-size: .56rem; color: var(--amber-bright); background: rgba(255,173,51,.12);
  border-radius: 999px; padding: 5px 10px; width: fit-content; }
.slabel { font-size: .58rem; color: var(--navy-dim); margin-bottom: -8px; }
.side select { background: var(--navy2); color: var(--navy-text); border: 1px solid var(--navy-line2);
  border-radius: 10px; padding: 9px 10px; font-family: var(--font-body); font-size: .92rem; }
#nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; flex: 1;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--navy-line2) transparent; }
#nav::-webkit-scrollbar { width: 6px; }
#nav::-webkit-scrollbar-thumb { background: var(--navy-line2); border-radius: 999px; }
#nav button { text-align: left; background: none; border: none; color: var(--navy-muted);
  padding: 9px 14px; border-radius: 10px; font-size: .93rem; cursor: pointer; flex: none;
  font-family: var(--font-body); transition: all .15s; }
#nav button:hover { color: #fff; background: rgba(255,255,255,.05); }
#nav button.on { color: #fff; background: var(--navy-line); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--amber-bright); }
.logout { font-family: var(--font-body); font-size: .92rem; color: var(--navy-muted); padding: 8px 14px; }
.logout:hover { color: #fff; }

/* ---------- main + topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 22px 38px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.45rem; }
.topbar .spacer { flex: 1; }
.topsupport { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: 999px; border: 1px solid var(--line2); background: var(--card);
  color: var(--text); font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.topsupport svg { width: 19px; height: 19px; color: #1c2740; }
.topsupport:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateY(-1px); }
@media (max-width: 640px) { .topsupport span { display: none; } .topsupport { padding: 9px 11px; } }
.whoami { text-align: right; line-height: 1.3; }
.whoami b { display: block; font-size: .95rem; }
.whoami span { font-size: .8rem; color: var(--muted); }
.content { padding: 30px 38px 48px; max-width: 1200px; width: 100%; }
.tab { display: none; }
.tab.on { display: block; }
.tab > h1 { display: none; } /* page title lives in the topbar */

/* ---------- panels + cards ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); }
.phead { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; color: var(--dim);
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card2); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 16px; margin-bottom: 22px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow); }
.kcard b { display: block; font-family: var(--font-display); font-size: 1.65rem; }
.kcard span { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em; color: var(--dim); }
.kcard .up { color: var(--green); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.hint { color: var(--dim); font-size: .85rem; margin-top: 10px; }
.empty { color: var(--dim); font-size: .66rem; padding: 34px; text-align: center; }
.statusbars { padding: 18px 20px; display: grid; gap: 11px; }
.sbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: .64rem; color: var(--muted); }
.sbar .track { height: 10px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.sbar .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--amber-bright), var(--amber)); }
.sbar.g .fill { background: linear-gradient(90deg, #2fbf87, var(--green)); }

/* ---------- queue ---------- */
.filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filters button { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); color: var(--muted); cursor: pointer; }
.filters button.on { color: var(--amber-deep); background: var(--amber-soft); border-color: transparent; font-weight: 700; }
/* minmax(0,1fr) not 1fr: plain 1fr tracks default to min-width:auto, so a wide
   child (e.g. the ticket form) blows out its track and crushes the other to a
   sliver - that made the support thread render 2px wide ("nothing happens"). */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px; align-items: start; }
.listpane { max-height: 62vh; overflow-y: auto; }
.qrow { display: flex; gap: 12px; align-items: center; padding: 15px 18px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.qrow:last-child { border-bottom: 0; }
.qrow:hover { background: var(--card2); }
.qrow.sel { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); }
.qrow .t { flex: 1; min-width: 0; }
.qrow .t b { display: block; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .t span { font-family: var(--font-mono); font-size: .6rem; color: var(--dim); letter-spacing: .08em; }
.pill { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .08em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--muted); white-space: nowrap; background: var(--card); }
.pill.idea { color: var(--amber-deep); background: #fdf3e1; border-color: transparent; font-weight: 700; }
.pill.approved, .pill.scheduled { color: var(--green); background: var(--green-soft); border-color: transparent; }
.pill.published { color: var(--green); border-color: transparent; background: var(--card); }
.detail { padding: 18px 20px; }
.detail label { display: block; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .12em; color: var(--dim); margin: 14px 0 5px; }
.detail input[type=text], .detail input[type=email], .detail input[type=url],
.detail input[type=number], .detail input[type=password], .detail input[type=datetime-local],
.detail textarea, .detail select {
  width: 100%; background: var(--card2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-family: var(--font-body); font-size: .92rem; }
.detail input:focus, .detail textarea:focus { outline: none; border-color: var(--amber); background: var(--card); }
.detail textarea { min-height: 110px; resize: vertical; }
.netchips { display: flex; flex-wrap: wrap; gap: 6px; }
.netchip { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .06em;
  padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line2);
  color: var(--dim); cursor: pointer; user-select: none; background: var(--card); }
.netchip.sel { color: var(--green); background: var(--green-soft); border-color: transparent; font-weight: 700; }
.mediarow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mth { width: 74px; height: 74px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card2) center/cover; position: relative; cursor: pointer; }
.mth.vid::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.mth.sel { outline: 2px solid var(--amber); }
.mth .ord { position: absolute; top: 3px; left: 5px; font-family: var(--font-mono);
  font-size: .6rem; color: #fff; background: var(--amber); border-radius: 5px; padding: 1px 5px; }

/* ---------- media grid ---------- */
.uprow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 20px; box-shadow: var(--shadow); }
.uprow input[type=file] { color: var(--muted); font-size: .85rem; }
.uprow input[type=email], .uprow input[type=password], .uprow select {
  background: var(--card2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-family: var(--font-body); }
.mediagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; }
.masset { border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); }
.masset .img { height: 112px; background: var(--card2) center/cover; position: relative; }
.masset .img.vid::after { content: "▶"; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: var(--dim); font-size: 1.2rem; }
.masset .meta { padding: 9px 12px; font-family: var(--font-mono); font-size: .56rem;
  color: var(--dim); letter-spacing: .06em; display: flex; justify-content: space-between; }

/* ---------- outreach ---------- */
.oritem { border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.oritem .top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.oritem .top b { flex: 1; font-size: .93rem; }
.ordraft { border: 1px dashed var(--line2); background: var(--card2); border-radius: 10px;
  padding: 11px 13px; color: var(--muted); font-size: .87rem; margin: 8px 0; }
.oritem .actions { margin: 8px 0 0; }

/* ---------- forms ---------- */
.kvform { padding: 16px 20px; display: grid; gap: 11px; }
.kvform .kv { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: center; }
.kvform .kv > div { min-width: 0; width: 100%; }
.kvform .kv label { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em;
  color: var(--muted); overflow-wrap: anywhere; }
/* one look for every control: full width, same skin (color/checkbox excepted) */
.kvform .kv input:not([type="color"]):not([type="checkbox"]),
.kvform .kv textarea,
.kvform .kv select {
  width: 100%; background: var(--card2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 11px; padding: 11px 14px; font-size: .92rem; font-family: var(--font-body);
  min-width: 0; }
.kvform .kv textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.kvform .kv input:focus, .kvform .kv textarea:focus, .kvform .kv select:focus {
  outline: none; border-color: var(--amber); background: var(--card); }
@media (max-width: 760px) { .kvform .kv { grid-template-columns: 1fr; gap: 5px; } }
.kvform .kv .cfgd { font-family: var(--font-mono); font-size: .54rem; color: var(--green); }
.urow { display: flex; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line);
  font-size: .9rem; align-items: center; }
.urow:last-child { border-bottom: 0; }
.urow span { color: var(--dim); font-family: var(--font-mono); font-size: .6rem; }

/* ---------- skeleton loading ---------- */
.skel { height: 15px; border-radius: 6px; margin: 13px 18px;
  background: linear-gradient(90deg, var(--bg) 25%, #efe9dd 50%, var(--bg) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.qsearch { margin-left: auto; background: var(--card); border: 1px solid var(--line2);
  border-radius: 999px; padding: 8px 16px; font-family: var(--font-body); font-size: .85rem;
  color: var(--text); min-width: 180px; }
.qsearch:focus { outline: none; border-color: var(--amber); }
.empty .btn { margin-top: 14px; }

/* ---------- typed form controls ---------- */
.rowlink { cursor: pointer; }
.klink { cursor: pointer; transition: transform .15s, box-shadow .15s; display: block; color: inherit; }
.klink:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.colorrow { display: flex; gap: 14px; flex-wrap: wrap; }
.cpick { display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: .54rem; letter-spacing: .08em; color: var(--dim); cursor: pointer; }
.cpick input[type=color] { width: 46px; height: 34px; border: 1px solid var(--line2);
  border-radius: 8px; padding: 2px; background: var(--card); cursor: pointer; }
label.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  position: relative; margin: 0; font-family: var(--font-body); }
.switch input { position: absolute; opacity: 0; }
.switch em { font-family: var(--font-body); }
.switch span { width: 44px; height: 25px; border-radius: 999px; background: #cfc8ba;
  border: 1px solid var(--line2); box-sizing: border-box;
  position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #f5f7fb; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 21px; }
.switch em { font-style: normal; font-size: .78rem; color: var(--dim); }

/* ---------- tooltips (every input explains itself) ---------- */
.tipdot { display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 6px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--card); color: var(--dim);
  font-size: .6rem; font-weight: 700; cursor: help; position: relative;
  vertical-align: middle; padding: 0; font-family: var(--font-body); }
.tipdot:hover, .tipdot:focus { color: #1a1206; background: var(--amber-bright); border-color: transparent; }
/* the bubble itself is a single body-level fixed element (#gfTip, ui.js) so
   NO panel, modal or scroll container can ever clip it - do not reintroduce
   ::after bubbles here, they break inside anything with overflow */
#gfTip { position: fixed; z-index: 1000; max-width: 300px; background: var(--navy);
  color: var(--navy-text); font-size: .74rem; font-weight: 400; line-height: 1.45;
  text-align: left; padding: 10px 12px; border-radius: 10px; box-shadow: var(--shadow-lg);
  pointer-events: none; text-transform: none; letter-spacing: 0;
  font-family: var(--font-body); opacity: 0; transition: opacity .12s; }
#gfTip.on { opacity: 1; }
.kvform .fieldrow label { display: flex; align-items: center; }
.formsec { grid-column: 1 / -1; font-size: .58rem; letter-spacing: .16em; color: var(--amber-deep);
  border-bottom: 2px solid var(--amber-soft); padding: 14px 0 5px; margin-top: 6px; }
.formsec:first-child { padding-top: 0; margin-top: 0; }
.opchip { font-size: .5rem; letter-spacing: .1em; color: var(--dim); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; margin-left: 6px; }
.pagesub { display: block; font-size: .8rem; color: var(--dim); margin-top: 1px; }
.upmodal.wide { max-width: 560px; max-height: 86vh; overflow-y: auto; }
.stagefields { padding: 6px 0 0; }
.stagefields .kv { grid-template-columns: 200px 1fr; }
.cfgd { font-family: var(--font-mono); font-size: .54rem; color: var(--green); }

/* ---------- growth-engine pipeline diagram ---------- */
.pipeline { padding: 20px; display: grid; gap: 14px; }
.prow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.pnode { flex: 1 1 150px; min-width: 148px; background: var(--card2); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 14px; cursor: pointer; position: relative;
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.pnode:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--amber); }
.picon { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; color: #1c2740; margin-bottom: 9px; flex: none;
  background: linear-gradient(150deg, #fdf3e1, var(--card2) 80%);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.picon svg { width: 24px; height: 24px; display: block; }
.pnode:hover .picon { border-color: var(--amber); }
.uplab-row { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.uplab-row .picon { margin-bottom: 0; width: 40px; height: 40px; }
.pnode b { display: block; font-size: .9rem; }
.pnode > span:not(.picon):not(.plock) { font-size: .74rem; color: var(--dim); display: block; }
.pnode.locked { opacity: .95; background: repeating-linear-gradient(45deg, var(--card2), var(--card2) 8px, #f1ede4 8px, #f1ede4 16px);
  border-style: dashed; }
.pnode.locked .picon, .pnode.locked b, .pnode.locked > span { filter: grayscale(1); opacity: .55; }
.pnode.locked:hover { border-color: var(--amber); }
.plock { display: inline-block; margin-top: 7px; font-size: .54rem; letter-spacing: .1em;
  color: var(--amber-deep); background: #fdf3e1; border-radius: 999px; padding: 3px 9px; }
.parrow { align-self: center; color: var(--line2); font-size: 1.5rem; font-weight: 700; flex: none; }
#nav button.navlocked { color: var(--navy-dim); }
#nav button.navlocked::after { content: " 🔒"; font-size: .7rem; }

/* ---------- slide-out panels (stage settings + upgrade prompts) ---------- */
.upmodal-overlay { position: fixed; inset: 0; z-index: 70; display: none;
  justify-content: flex-end; background: rgba(7,11,20,.5); backdrop-filter: blur(3px); }
.upmodal-overlay.show { display: flex; }
.upmodal { position: relative; height: 100%; width: min(600px, 96vw); background: var(--card);
  border-left: 1px solid var(--line); border-radius: 0; padding: 34px 36px 44px;
  box-shadow: var(--shadow-lg); overflow-y: auto; animation: panelIn .24s ease; }
@keyframes panelIn { from { transform: translateX(36px); opacity: 0; } to { transform: none; opacity: 1; } }
.upmodal.wide { width: min(680px, 97vw); max-width: none; max-height: none; }
.upmodal h2 { font-family: var(--font-display); margin: 4px 0 8px; }
.upmodal p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.uplab { font-size: .6rem; letter-spacing: .14em; color: var(--amber-deep); }
.paneltop { position: sticky; top: -34px; z-index: 5; display: flex; align-items: center;
  gap: 12px; background: var(--card); margin: -34px -36px 16px; padding: 18px 24px;
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 10px rgba(19,26,42,.04); }
.paneltop .spacer { flex: 1; }
.paneltop .uplab { font-size: .68rem; }
.upclose { background: var(--card); border: 1px solid var(--line2); border-radius: 9px;
  color: var(--dim); font-size: .9rem; cursor: pointer; padding: 6px 11px; flex: none; }
.upclose:hover { color: var(--text); border-color: var(--amber); }

/* drag + drop */
.dropcard { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 24px; margin-bottom: 22px; text-align: center; cursor: pointer;
  background: var(--card); border: 2px dashed var(--line2); border-radius: 18px;
  transition: border-color .18s, background .18s, transform .18s; }
.dropcard svg { width: 44px; height: 44px; color: #1c2740; margin-bottom: 6px; }
.dropcard b { font-family: var(--font-display); font-size: 1.12rem; }
.dropcard > span { color: var(--muted); font-size: .92rem; }
.dropcard .droplimits { font-size: .6rem; letter-spacing: .12em; color: var(--dim); margin-top: 10px; }
.dropcard:hover, #tab-media.dropping .dropcard {
  border-color: var(--amber); background: #fdf3e1; transform: translateY(-2px); }
#tab-media.dropping .mediagrid {
  outline: 2px dashed var(--amber); outline-offset: 4px; border-radius: 16px; }
.mth.dragging { opacity: .45; }
.mth.dragover { outline: 3px solid var(--amber); outline-offset: 1px; }
.mth[draggable="true"] { cursor: grab; }

/* stage-panel fields: stacked labels, generous inputs for real typing */
.stagefields { padding: 10px 0 0; }
.stagefields .kv, .upmodal .fieldrow { grid-template-columns: 1fr; gap: 6px; align-items: start; }
.upmodal .fieldrow { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upmodal .fieldrow:last-of-type { border-bottom: 0; }
.upmodal .fieldrow input:not([type=color]):not([type=checkbox]),
.upmodal .fieldrow textarea, .upmodal .fieldrow select {
  width: 100%; padding: 14px 16px; font-size: 1.02rem; border-radius: 12px; }
.upmodal .fieldrow textarea { min-height: 140px; }
.upmodal .actions { position: sticky; bottom: -44px; background: var(--card);
  padding: 14px 0 10px; margin: 14px 0 0; border-top: 1px solid var(--line); }
/* (tooltip bubbles are body-level - see #gfTip above - so panels and
   slide-outs need no special-casing and can never clip them) */

/* ---------- plan tab ---------- */
.planhero { display: flex; align-items: center; gap: 20px; justify-content: space-between;
  background: var(--navy); color: var(--navy-text); border-radius: 18px; padding: 26px 30px;
  margin-bottom: 22px; flex-wrap: wrap; box-shadow: var(--shadow); }
.planhero h2 { font-family: var(--font-display); color: #fff; font-size: 1.7rem; margin: 2px 0; }
.planhero p { color: var(--navy-muted); font-size: .9rem; }
.planhero .uplab { color: var(--amber-bright); }
.planbig { font-family: var(--font-display); font-size: 2.2rem; color: var(--amber-bright); }
.planbig span { font-size: .8rem; color: var(--navy-dim); }
.tiercards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.tiercard { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 22px; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow); }
.tiercard.current { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), var(--shadow-lg); }
.curtag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--amber-bright), #f29718); color: #1a1206;
  font-size: .56rem; letter-spacing: .12em; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.tiercard h3 { font-family: var(--font-display); font-size: 1.15rem; }
.tierprice { font-family: var(--font-display); font-size: 1.9rem; margin: 4px 0 12px; }
.tierprice small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.tiercard ul { list-style: none; margin: 0 0 18px; flex: 1; display: grid; gap: 6px; }
.tiercard li { padding-left: 22px; position: relative; color: var(--muted); font-size: .86rem;
  text-transform: capitalize; }
.tiercard li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.tiercard li.no { color: var(--dim); opacity: .55; }
.tiercard li.no::before { content: "🔒"; font-size: .7rem; }
@media (max-width: 900px) { .tiercards { grid-template-columns: 1fr; } .parrow { display: none; } }

/* ---------- support tickets ---------- */
.tkmsg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 10px; font-size: .9rem; background: var(--card2); }
.tkmsg.operator { background: var(--amber-soft); border-color: transparent; }
.tkmsg b { display: block; font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .1em; color: var(--dim); margin-bottom: 5px; }
.tkmsg.operator b { color: var(--amber-deep); }

/* ---------- toast ---------- */
.toast { position: fixed; top: 18px; right: 18px; z-index: 50; background: var(--navy);
  border: 1px solid var(--green); color: #7fe0b8; font-size: .64rem; border-radius: 10px;
  padding: 12px 16px; display: none; box-shadow: var(--shadow-lg); max-width: 340px; }
.toast.err { border-color: var(--red); color: #ffb3b3; }
.toast.show { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .tagline { display: none; }
  #nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; }
  .topbar { padding: 16px 18px; }
  .content { padding: 20px 16px 40px; }
  .split, .row2 { grid-template-columns: 1fr; }
}

/* ---------- onboarding checklist ---------- */
.pheadflex { display: flex; align-items: center; gap: 10px; }
.pheadflex .spacer { flex: 1; }
.obpanel { border-color: var(--amber); }
.obbar { width: 120px; height: 8px; border-radius: 6px; background: var(--bg); overflow: hidden; display: inline-block; }
.obbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber-bright), var(--amber)); }
.obsteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 20px; }
.obsteps > * { min-width: 0; }
@media (max-width: 1100px) { .obsteps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .obsteps { grid-template-columns: 1fr; } }
.obstep { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card2);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: .88rem;
  color: var(--text); cursor: pointer; font-family: var(--font-body); transition: border-color .15s, transform .15s; }
.obstep:hover { border-color: var(--amber); transform: translateY(-1px); }
.obstep { align-items: flex-start; }
.obtxt { display: block; min-width: 0; }
.obtxt b { display: block; font-size: .9rem; }
.obtxt small { display: block; color: var(--dim); font-size: .76rem; line-height: 1.4; margin-top: 2px; }
.obstep.done { opacity: .75; }
.obstep.done .obtxt b { text-decoration: line-through; color: var(--muted); }
.obstep.done .obgo { color: var(--green); }
.obtick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--line2); color: var(--dim); }
.obstep.done .obtick { background: var(--green); border-color: transparent; color: #fff; }
.obgo { font-size: .58rem; letter-spacing: .1em; color: var(--amber-deep); margin-left: auto; }

/* ---------- media-required warning ---------- */
.medwarn { margin-top: 8px; padding: 10px 13px; border-radius: 10px; font-size: .84rem;
  background: #fdf3e1; border: 1px solid rgba(224,137,0,.35); color: var(--amber-deep); }

/* ---------- motion + accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  .upmodal, .skel, .klink, .pnode, .obstep, .btn { animation: none !important; transition: none !important; }
}

/* ---------- designed empty states + panel padding ---------- */
.emptybox { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 44px 24px; }
.emptybox .picon { width: 52px; height: 52px; margin-bottom: 12px; }
.emptybox .picon svg { width: 30px; height: 30px; }
.emptybox b { font-family: var(--font-display); font-size: 1.15rem; }
.emptybox > span { color: var(--muted); font-size: .92rem; max-width: 420px; margin-top: 4px; }
.panelpad { padding: 20px; }
.phead .sm-act { padding: 7px 14px; font-size: .8rem; border-radius: 9px; letter-spacing: 0; }

/* unread support reply badge */
.hasreply { position: relative; }
.hasreply::after { content: ""; position: absolute; top: 6px; right: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--amber-bright); box-shadow: 0 0 0 2px #fff; }
#nav button.hasreply::after { top: 12px; right: 12px; box-shadow: 0 0 0 2px var(--navy); }

/* media source chips on the dropzone */
.medmix { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.medmix em { font-style: normal; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .1em; color: var(--amber-deep); background: #fdf3e1;
  border-radius: 999px; padding: 5px 12px; }
.dropcard b .tipdot { vertical-align: 2px; }

/* ---------- help docs ---------- */
.helpdoc h3 { font-family: var(--font-display); font-size: 1.02rem; margin: 22px 0 6px; }
.helpdoc h3:first-child { margin-top: 0; }
.helpdoc p { color: var(--muted); font-size: .92rem; max-width: 76ch; }
.hlink { background: none; border: none; color: var(--amber); font-weight: 600;
  font-size: inherit; font-family: inherit; cursor: pointer; padding: 0; }
.hlink:hover { text-decoration: underline; }

/* media groups in the post editor */
.medgrp { flex-basis: 100%; font-size: .56rem; letter-spacing: .12em; color: var(--dim);
  margin: 6px 0 2px; }
.lockednote { font-size: .56rem; color: var(--dim); letter-spacing: .1em; margin-left: 8px; }
.bkrow { cursor: pointer; align-items: flex-start; }
.bkrow .btn.sm-act { flex: none; margin-left: 10px; }
.bkfull { margin-top: 10px; padding: 12px 14px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; }
.bkfull p { margin: 6px 0; font-size: .9rem; white-space: pre-wrap; }
.bkmeta { font-size: .58rem; letter-spacing: .1em; color: var(--dim); }
.qthumb { flex: none; width: 44px; height: 44px; border-radius: 9px; margin-right: 12px;
  background-color: var(--card2); background-size: cover; background-position: center;
  border: 1px solid var(--line); position: relative; }
.qthumb.none::after { content: "TXT"; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-family: var(--font-mono);
  font-size: .5rem; letter-spacing: .08em; color: var(--dim); }
.qthumb .ord { position: absolute; right: -5px; bottom: -5px; background: var(--amber);
  color: #1a1206; font-family: var(--font-mono); font-size: .56rem; font-weight: 600;
  border-radius: 999px; min-width: 16px; height: 16px; display: flex;
  align-items: center; justify-content: center; padding: 0 3px; }

/* create-with-AI row + library actions */
.genrow textarea { width: 100%; min-height: 64px; margin-bottom: 12px; }
.genopts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stylechips { display: flex; gap: 8px; flex-wrap: wrap; }
.filterchips { display: inline-flex; gap: 6px; margin-right: 12px; }
.filterchips button { background: none; border: 1px solid var(--line2); border-radius: 999px;
  padding: 3px 11px; font-family: var(--font-mono); font-size: .56rem; letter-spacing: .1em;
  color: var(--muted); cursor: pointer; }
.filterchips button.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber-deep); }
.masset { position: relative; }
.masset .img { position: relative; }
.aibadge { position: absolute; left: 8px; top: 8px; background: rgba(7,11,20,.72); color: #ffad33;
  font-size: .52rem; letter-spacing: .12em; border-radius: 6px; padding: 2px 7px; }
.mact { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0;
  transition: opacity .18s; }
.masset:hover .mact, .masset:focus-within .mact { opacity: 1; }
.mbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 8px; background: rgba(255,255,255,.92); border: 1px solid var(--line2);
  color: var(--text); font-size: .85rem; cursor: pointer; text-decoration: none; }
.mbtn:hover { border-color: var(--amber); }
.mbtn.del:hover { border-color: var(--red); color: var(--red); }
.masset .meta .hlink { font-size: .6rem; }
.genph .img { background: linear-gradient(100deg, var(--card2) 40%, #fff 50%, var(--card2) 60%);
  background-size: 200% 100%; animation: genshimmer 1.2s infinite linear; }
@keyframes genshimmer { to { background-position: -200% 0; } }

/* ticket attachments */
.tkattrow { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.tkattrow .btn.dragover { border-color: var(--amber); background: var(--amber-soft); }
.tkatts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.tkatt { position: relative; display: inline-block; }
.tkatt img, .tkmsg .tkatts img { width: 74px; height: 74px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line2); display: block; }
.tkmsg .tkatts { margin-top: 8px; }
.tkmsg .tkatts a:hover img { border-color: var(--amber); }
.tkattdel { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--red);
  font-size: .65rem; cursor: pointer; line-height: 1; }
.notifyrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.notifyrow input[type=email] { flex: 1; min-width: 220px; }

/* content bank: how-it-works strip, clickable topic cards, grouped list */
.bankhow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.hows { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; }
.hows > b { flex: none; width: 26px; height: 26px; border-radius: 999px; background: var(--amber-soft);
  color: var(--amber-deep); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .8rem; }
.hows > div { display: flex; flex-direction: column; gap: 2px; }
.hows > div > b { font-size: .92rem; }
.hows > div > span { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.hows .hlink { align-self: flex-start; margin-top: 4px; }
@media (max-width: 900px) { .bankhow { grid-template-columns: 1fr; } }
.bcard { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bcard:hover { border-color: var(--amber); transform: translateY(-1px); box-shadow: var(--shadow); }
.bcard.sel { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber), var(--shadow); }
.bcat-name { display: block; font-weight: 600; font-size: .92rem; color: var(--text); margin-bottom: 4px; }
.bbar { height: 6px; border-radius: 999px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bbar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-bright), #f29718); }
.bbar-sub { display: block; font-family: var(--font-mono); font-size: .54rem;
  letter-spacing: .08em; color: var(--dim); margin-top: 5px; }
.bkgroup { position: sticky; top: 0; z-index: 5; background: var(--card2);
  border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: .58rem;
  letter-spacing: .12em; color: var(--muted); }

/* media search + names */
.minisearch { width: 190px; padding: 7px 12px; border-radius: 999px; font-size: .82rem;
  font-family: var(--font-body); border: 1px solid var(--line2); background: var(--card);
  color: var(--text); margin-right: 10px; }
.minisearch:focus { outline: none; border-color: var(--amber); }
.mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
  font-size: .72rem; color: var(--text); }

/* media lightbox + sort + unused chip */
.minisort { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); font-family: var(--font-body); font-size: .82rem;
  margin-right: 10px; }
.freechip { font-size: .54rem; letter-spacing: .08em; color: var(--amber-deep);
  background: var(--amber-soft); border-radius: 999px; padding: 3px 9px;
  white-space: nowrap; flex: none; align-self: center; }
.hlink.mono[data-mgo] { white-space: nowrap; flex: none; }
.masset { cursor: pointer; }
.masset:hover { box-shadow: var(--shadow); }
.mlb { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.mlbdim { position: absolute; inset: 0; background: rgba(7, 11, 20, 0.62); }
.mlbcard { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) 320px;
  gap: 0; width: min(980px, 94vw); max-height: 88vh; background: var(--card);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.mlbimg { width: 100%; height: 100%; max-height: 88vh; object-fit: contain; background: #0c1220; display: block; }
.mlbside { display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; min-width: 0; }
.mlbside label { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; color: var(--muted); }
.mlbside input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--text); font-size: .95rem; font-family: var(--font-body); }
.mlbside input:focus { outline: none; border-color: var(--amber); background: var(--card); }
.mlbmeta { font-size: .56rem; letter-spacing: .1em; color: var(--dim); }
.mlbside .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mlbclose { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--text);
  cursor: pointer; font-size: .95rem; }
.mlbclose:hover { border-color: var(--amber); }
@media (max-width: 760px) { .mlbcard { grid-template-columns: 1fr; } .mlbimg { max-height: 44vh; } }
.mlbposts { display: flex; flex-wrap: wrap; gap: 8px; }
.mth { position: relative; }
.mth .aibadge { left: 4px; top: 4px; font-size: .46rem; padding: 1px 5px; }

/* checkbox network chips + per-network preview + voice picker */
.netchip2 { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px;
  border: 1px solid var(--line2); border-radius: 999px; cursor: pointer;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em;
  color: var(--muted); background: var(--card); transition: all .15s; }
.netchip2:hover { border-color: var(--amber); }
.netchip2.sel { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.netchip2 .ncbox { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line2);
  display: inline-flex; align-items: center; justify-content: center; font-size: .62rem;
  font-style: normal; background: var(--card); color: var(--green); flex: none; }
.netchip2.sel .ncbox { border-color: var(--green); background: var(--green-soft); }
.netchip2.ncoff b { text-decoration: underline dotted; text-underline-offset: 3px; }
.netchip2 b { font-weight: 600; }
.connline { font-size: .56rem; letter-spacing: .1em; color: var(--dim); margin: 6px 0 2px; }
.netprev { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--card2); }
.netprev .npbody { padding: 12px 16px; }
.netprev .nptext { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: .92rem; white-space: normal; margin-bottom: 8px; }
.voicerow { display: flex; gap: 10px; align-items: center; }
.voicerow select { flex: 1; }

/* one-screen queue: full-width list, editor in a slide-out, previews in popups */
.qfull { max-height: calc(100vh - 275px); overflow-y: auto; }
.postwrap { position: fixed; inset: 0; z-index: 220; }
.postwrap[hidden] { display: none; }
.postdim { position: absolute; inset: 0; background: rgba(7, 11, 20, 0.55); }
.postpanel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100vw);
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: ppin .22s ease; }
@keyframes ppin { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.postpanel header { display: flex; align-items: center; gap: 12px; padding: 16px 22px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.postpanel header b { font-size: .68rem; letter-spacing: .14em; color: var(--muted); }
.ppclose { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); cursor: pointer; font-size: .9rem; flex: none; }
.ppclose:hover { border-color: var(--amber); }
.ppbody { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.ppbody .detail { max-width: none; }
.npwrap { position: fixed; inset: 0; z-index: 260; display: flex; align-items: center; justify-content: center; }
.npdim { position: absolute; inset: 0; background: rgba(7, 11, 20, 0.45); }
.npmodal { position: relative; width: min(560px, 92vw); max-height: 80vh; overflow-y: auto;
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); animation: ppin .18s ease; }

/* ---------- platform-true preview frames ---------- */
.npmodal { width: 420px; }
.npmodal.tall { width: 320px; }
.pv { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--card); border: 1px solid #e3e6ea; border-radius: 12px; overflow: hidden;
  margin-bottom: 6px; color: #101418; }
.pvhead { display: flex; align-items: center; gap: 10px; padding: 11px 13px; }
.pvhead b { font-size: .86rem; font-weight: 600; }
.pvav { width: 34px; height: 34px; border-radius: 999px; color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; flex: none; }
.pvnames { display: flex; flex-direction: column; line-height: 1.25; }
.pvnames b { font-size: .88rem; }
.pvdim { color: #7a8794; font-size: .78rem; display: inline-flex; align-items: center; gap: 4px; }
.pvdim svg { width: 12px; height: 12px; }
.pvimg { position: relative; background: #0c1220 center/cover no-repeat; }
.pvimg.sq { aspect-ratio: 4 / 5; }
.pvimg.rnd { aspect-ratio: 16 / 9; border-radius: 14px; margin: 0 13px 10px; }
.pvimg.flat { aspect-ratio: 4 / 5; max-height: 420px; }
.pvfit { padding: 6px 12px 0; color: var(--amber-deep); }
.pvimg.wide { aspect-ratio: 16 / 9; }
.pvimg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pvplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pvplay svg { width: 46px; height: 46px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.pvdur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff;
  font-size: .7rem; padding: 1px 5px; border-radius: 4px; }
.pvcount { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff;
  font-size: .72rem; padding: 2px 9px; border-radius: 999px; }
.pvdots { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; gap: 4px; justify-content: center; }
.pvdots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.5); }
.pvdots i.on { background: var(--card); }
.pvacts { display: flex; justify-content: space-between; padding: 10px 13px 6px; }
.pvacts svg { width: 23px; height: 23px; margin-right: 12px; color: #101418; }
.pvacts.pvx { justify-content: space-between; color: #7a8794; font-size: .78rem;
  padding: 4px 13px 12px; }
.pvacts.pvx svg { width: 17px; height: 17px; margin-right: 3px; vertical-align: -3px; color: #7a8794; }
.pvlikes { padding: 0 13px; font-size: .84rem; }
.pvcap { padding: 4px 13px 2px; font-size: .84rem; line-height: 1.45; }
.pvwhen { padding: 4px 13px 12px; font-size: .66rem; color: #7a8794; letter-spacing: .03em; }
.pvmore { background: none; border: none; color: #7a8794; cursor: pointer; font-size: inherit; padding: 0; }
.pvtext { padding: 2px 13px 10px; font-size: .9rem; line-height: 1.45; }
.pvtextx { padding: 2px 13px 10px; font-size: .92rem; line-height: 1.4; }
.pvbar { display: flex; border-top: 1px solid #e3e6ea; }
.pvbar span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 0; font-size: .8rem; color: #5b6673; font-weight: 600; }
.pvbar svg { width: 17px; height: 17px; }
/* TikTok vertical dark frame */
.pv-tt { aspect-ratio: 9 / 16; background: #000 center/cover no-repeat; position: relative;
  color: #fff; border: none; }
.pvttvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pvttside { position: absolute; right: 10px; bottom: 86px; display: flex; flex-direction: column;
  gap: 14px; align-items: center; z-index: 2; }
.pvttside span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pvttside svg { width: 26px; height: 26px; color: #fff; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.pvttside i { font-style: normal; font-size: .64rem; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.pvttcap { position: absolute; left: 12px; right: 58px; bottom: 12px; z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,.75); }
.pvttcap b { font-size: .84rem; }
.pvttcap p { font-size: .78rem; line-height: 1.4; margin: 3px 0; }
.pvttcap .pvmore { color: #d9dde2; }
.pvttmusic { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; }
.pvttmusic svg { width: 13px; height: 13px; }
.pv-tt::after { content: ""; position: absolute; inset: 40% 0 0 0; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.68)); }
.pv-yt .pvythead { display: flex; gap: 10px; padding: 11px 13px; align-items: flex-start; }
.pv-skip { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 20px; color: #7a8794; }
.pv-skip svg { width: 34px; height: 34px; }
.pv-skip b { color: #101418; }

/* preview polish: phone-scale card, breathing room, viewport-safe */
.npmodal { width: 430px; max-height: 90vh; display: flex; flex-direction: column; }
.npmodal .phead { flex: none; }
.npmodal .npbody { background: var(--card2); padding: 22px 24px; overflow-y: auto; }
.npmodal .pv { width: 320px; margin: 0 auto 4px; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(19, 26, 42, 0.14); }
.npmodal.tall { width: 340px; }
.npmodal.tall .pv-tt { width: 250px; border-radius: 16px; }
.npmodal .hint { max-width: 320px; margin: 0 auto; }
.pvhead { padding: 9px 12px; gap: 8px; }
.pvav { width: 30px; height: 30px; font-size: .8rem; }
.pvhead b { font-size: .8rem; }
.pvnames b { font-size: .8rem; }
.pvdim { font-size: .7rem; }
.pvacts { padding: 8px 12px 4px; }
.pvacts svg { width: 20px; height: 20px; margin-right: 10px; }
.pvlikes { font-size: .76rem; }
.pvcap { font-size: .76rem; padding: 3px 12px 2px; }
.pvwhen { font-size: .6rem; padding: 3px 12px 10px; }
.pvtext, .pvtextx { font-size: .8rem; padding: 2px 12px 9px; }
.pvbar span { font-size: .72rem; padding: 8px 0; }
.pvbar svg { width: 15px; height: 15px; }
.pvacts.pvx { font-size: .7rem; padding: 2px 12px 10px; }
.pvacts.pvx svg { width: 15px; height: 15px; }

/* top quick-nav: grouped dropdowns mirroring the sidebar */
.topnav { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.tnd { position: relative; }
.tnd-btn { background: none; border: none; cursor: pointer; padding: 9px 12px;
  border-radius: 10px; font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  color: var(--muted); display: inline-flex; align-items: center; gap: 7px; transition: all .15s; }
.tnd-btn::after { content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .18s; }
.tnd-btn:hover, .tnd.open .tnd-btn { color: var(--text); background: var(--card2); }
.tnd.open .tnd-btn::after { transform: rotate(225deg); margin-top: 3px; }
.tnd-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 186px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 7px; display: none; flex-direction: column;
  z-index: 120; }
.tnd-menu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.tnd.open .tnd-menu { display: flex; }
@media (hover: hover) { .tnd:hover .tnd-menu { display: flex; } .tnd:hover .tnd-btn { color: var(--text); background: var(--card2); } }
.tnd-menu button { text-align: left; background: none; border: none; cursor: pointer;
  padding: 10px 13px; border-radius: 9px; font-family: var(--font-body); font-size: .92rem;
  color: var(--text); white-space: nowrap; }
.tnd-menu button:hover { background: var(--amber-soft); }
@media (max-width: 1080px) { .topnav { display: none; } }
/* clickable brand + plan chip in the rail */
.brandmark { cursor: pointer; border-radius: 10px; }
.brandmark:hover b { color: #fff; }
.brandmark:hover { opacity: .92; }
button.planchip { border: none; cursor: pointer; text-align: left; transition: all .15s; }
button.planchip:hover { background: rgba(255,173,51,.22); color: #ffc46b; }
.tophelp svg circle:first-child { stroke: currentColor; }

/* half-screen slide-outs + drag-resize left edge */
.upmodal, .upmodal.wide { width: clamp(600px, 50vw, 96vw); max-width: 100vw; }
.postpanel { width: clamp(640px, 50vw, 96vw); max-width: 100vw; }
.presize { position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
  cursor: ew-resize; z-index: 30; }
.presize::after { content: ""; position: absolute; left: 3px; top: 50%; height: 56px;
  width: 4px; border-radius: 999px; background: var(--line2); transform: translateY(-50%);
  opacity: 0; transition: opacity .15s; }
.presize:hover::after { opacity: 1; background: var(--amber); }
body.resizing { cursor: ew-resize; user-select: none; }
body.resizing .postpanel, body.resizing .upmodal { animation: none; transition: none; }

/* true carousel + collage + grid inside previews */
.pvcar { overflow: hidden; touch-action: pan-y; }
.pvstrip { display: flex; height: 100%; width: 100%; transition: transform .28s ease; }
.pvimg.pvcar .pvstrip { position: absolute; inset: 0; }
.pv-tt .pvstrip { position: absolute; inset: 0; z-index: 0; }
.pvslide { flex: 0 0 100%; height: 100%; background: #0c1220 center/cover no-repeat; }
.pvnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 28px; height: 28px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: #101418; font-size: 1.1rem; line-height: 1;
  box-shadow: 0 1px 6px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.pvnav.prev { left: 8px; }
.pvnav.next { right: 8px; }
.pvnav:hover { background: var(--card); }
.pv-tt .pvnav { background: rgba(0,0,0,.45); color: #fff; }
.pvdots.tt { position: absolute; bottom: 96px; left: 0; right: 0; z-index: 2; }
.pv-tt .pvcount { z-index: 2; }
.pvcollage { display: grid; gap: 2px; aspect-ratio: 16 / 10; }
.pvcollage.two { grid-template-columns: 1fr 1fr; }
.pvcollage.three { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pvcollage.three .big { grid-row: 1 / 3; }
.pvcollage > div { background: #0c1220 center/cover no-repeat; position: relative; }
.pvgrid { display: grid; gap: 2px; border-radius: 14px; overflow: hidden;
  margin: 0 13px 10px; aspect-ratio: 16 / 10; }
.pvgrid.n2 { grid-template-columns: 1fr 1fr; }
.pvgrid.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pvgrid.n3 > div:first-child { grid-row: 1 / 3; }
.pvgrid.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pvgrid > div { background: #0c1220 center/cover no-repeat; position: relative; }
.pvmoreimg { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(0,0,0,.45); color: #fff;
  font-size: 1.1rem; font-weight: 700; }

/* ---------- queue calendar ---------- */
.viewtoggle { display: inline-flex; gap: 0; margin-left: auto; border: 1px solid var(--line2);
  border-radius: 999px; overflow: hidden; }
.viewtoggle button { background: var(--card); border: none; cursor: pointer; padding: 7px 16px;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; color: var(--muted); }
.viewtoggle button.on { background: var(--amber-soft); color: var(--amber-deep); font-weight: 600; }
.qcalwrap { padding: 18px 20px; max-height: calc(100vh - 275px); overflow-y: auto; }
.calhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.calhead b { font-family: var(--font-display); font-size: 1.1rem; min-width: 150px; text-align: center; }
.callegend { font-size: .56rem; letter-spacing: .08em; color: var(--dim);
  display: inline-flex; align-items: center; gap: 6px; }
.callegend i { width: 9px; height: 9px; border-radius: 999px; display: inline-block; margin-left: 8px; }
.calnote { font-size: .56rem; color: var(--amber-deep); }
.st-idea { background: var(--amber-bright); }
.st-approved { background: #5b8def; }
.st-scheduled { background: var(--green); }
.st-published { background: var(--dim); }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.caldow { text-align: center; font-size: .56rem; letter-spacing: .12em; color: var(--dim); padding: 2px 0 6px; }
.calday { min-height: 96px; background: var(--card2); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.calday.out { opacity: .45; }
.calday.today { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.calday.today .caldate { color: var(--amber-deep); font-weight: 700; }
.caldate { font-size: .72rem; color: var(--muted); }
.calchip { display: flex; align-items: center; gap: 5px; border: none; cursor: pointer;
  background: var(--card); border-radius: 7px; padding: 4px 6px; font-size: .66rem;
  font-family: var(--font-mono); color: var(--text); text-align: left;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(19,26,42,.08); }
.calchip:hover { box-shadow: 0 2px 8px rgba(19,26,42,.16); }
.calchip i { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.calchip.st-idea i { background: var(--amber-bright); }
.calchip.st-approved i { background: #5b8def; }
.calchip.st-scheduled i { background: var(--green); }
.calchip.st-published i { background: var(--dim); }
.livelinks { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
.livelinks .btn { text-decoration: none; }

/* usage meter */
.ubar-big { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ubar-big i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #3ecf8e); transition: width .4s; }
.ubar-big i.warm { background: linear-gradient(90deg, var(--amber-bright), #f29718); }
.ubar-big i.hot { background: linear-gradient(90deg, #f07b7b, var(--red)); }
.urow-meta { font-size: .6rem; letter-spacing: .1em; color: var(--muted); margin-top: 8px; }

/* audit trail */
.audrow { align-items: center; cursor: default; }
.auddot { width: 9px; height: 9px; border-radius: 999px; flex: none; margin-right: 12px; }
.audhint { font-weight: 400; color: var(--muted); font-size: .84rem; }

/* performance tiles + billing table */
.perfrow { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.perftile { flex: 1; min-width: 110px; background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; text-align: center; }
.perftile b { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.perftile span { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .12em; color: var(--dim); }
.perfnote { font-style: normal; font-size: .46rem; opacity: .7; }
.billtbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.billtbl th { text-align: left; font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .12em; color: var(--dim); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.billtbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.billtbl a { text-decoration: none; }
.nplive { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px auto 2px; max-width: 320px; }
.nplivestats { font-size: .6rem; letter-spacing: .08em; color: var(--muted); }
.dropopts { display: flex; gap: 10px; margin-top: 12px; }
.dropopts .btn { font-size: .85rem; padding: 9px 16px; }

/* page-image import picker */
.ipgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.iptile { position: relative; border: 1px solid var(--line2); border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--card2); padding: 0; height: 96px; }
.iptile img, .iptile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.iptile span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(7,11,20,.72);
  color: #fff; font-size: .5rem; letter-spacing: .1em; padding: 3px 0; text-align: center; }
.iptile:hover { border-color: var(--amber); }
.iptile[disabled] { cursor: default; }


/* Creative Studio tab + modal dialogs */
.studiocards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-bottom: 14px; }
.studiocard .stform label { display: block; font-size: .6rem; letter-spacing: .1em;
  font-family: var(--font-mono); color: var(--muted); margin: 12px 0 5px; }
.studiocard .stform input, .studiocard .stform textarea, .studiocard .stform select {
  width: 100%; }
.strow { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.stpick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.sttile { border: 2px solid var(--line2); border-radius: 10px; overflow: hidden; padding: 0;
  cursor: pointer; height: 72px; background: var(--card2); }
.sttile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sttile:hover { border-color: var(--amber); }
.sttile.on { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.costchip { font-size: .54rem; letter-spacing: .08em; font-family: var(--font-mono);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
  background: var(--amber-soft); color: var(--amber-deep); }
.costchip.free { background: rgba(20, 151, 107, .12); color: #14976b; }
.gfdlg .gfmsg { padding: 0 0 14px; white-space: pre-line; }

/* RULE: every text input, textarea and select ANYWHERE in the app wears the
   site field style by default - :where() keeps specificity at zero so scoped
   styles still win, but a browser-default input can never ship again. */
:where(input:not([type]), input[type=text], input[type=email], input[type=url],
  input[type=number], input[type=password], input[type=search],
  input[type=datetime-local], input[type=date], input[type=time], textarea, select) {
  background: var(--card2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-family: var(--font-body);
  font-size: .92rem; max-width: 100%; }
:where(input, textarea, select):focus { outline: none; border-color: var(--amber); }
:where(textarea) { resize: vertical; }
.gfdlg label { display: block; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .12em; color: var(--dim); margin: 12px 0 5px; }
.gfdlg input, .gfdlg textarea, .gfdlg select { width: 100%; }


/* Studio: visual effect picker + multi-select order badges + toggles */
.fxgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fxtile { position: relative; border: 2px solid var(--line2); border-radius: 10px;
  overflow: hidden; padding: 0; cursor: pointer; background: var(--card2); }
.fxtile img { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; }
.fxtile span { position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(7,11,20,.78); color: #fff; font-size: .48rem;
  letter-spacing: .06em; padding: 3px 2px; text-align: center; }
.fxtile:hover { border-color: var(--amber); }
.fxtile.on { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.sttile { position: relative; }
.stord { position: absolute; top: 4px; right: 4px; background: var(--amber);
  color: #1a1206; font-size: .6rem; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stoggles { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 4px; }
.stog { display: flex; align-items: center; gap: 6px; font-size: .6rem;
  letter-spacing: .08em; color: var(--muted); cursor: pointer; }
.stog input { width: auto; }


/* talking avatar: tap-to-place mouth */
.mouthbox { position: relative; border: 1px solid var(--line2); border-radius: 12px;
  overflow: hidden; cursor: crosshair; margin-bottom: 6px; }
.mouthbox { max-width: 680px; }
.mouthbox img { width: 100%; max-height: 380px; object-fit: contain; display: block;
  background: var(--card2); }
.mouthzone { position: absolute; border: 1px dashed rgba(242, 151, 24, .55);
  pointer-events: none; }
.mouthfoot { position: absolute; border: 2px solid var(--amber); border-radius: 50%;
  pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.mouthdot { position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--amber); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--amber);
  pointer-events: none; }

/* video tiles show a real frame (media fragment #t=1.2), play badge on top */
.masset .img video, .mth video { position: absolute; inset: 0; width: 100%;
  height: 100%; object-fit: cover; pointer-events: none; }
.masset .img.vid::after, .mth.vid::after { z-index: 2; }
.masset .img.vid .aibadge, .mth.vid .aibadge, .masset .img.vid .mact { z-index: 3; }


/* Studio tabs + inline build status */
.studiotabs { margin-bottom: 18px; gap: 10px; }
.studiotabs button { font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .08em; padding: 12px 22px; border-radius: 12px;
  border: 2px solid var(--line2); background: var(--card); color: var(--text);
  cursor: pointer; font-weight: 700; }
.studiotabs button:hover { border-color: var(--amber); }
.studiotabs button.on { background: var(--amber); border-color: var(--amber);
  color: #1a1206; box-shadow: var(--shadow); }
.stpanes { grid-template-columns: 1fr; }
.stpane .stform { max-width: none; }
.stpane .stform input:not([type=checkbox]), .stpane .stform select,
.stpane .stform textarea { max-width: 680px; }
@media (min-width: 1100px) {
  .stpane .stpick { grid-template-columns: repeat(8, 1fr); }
  .stpane .fxgrid { grid-template-columns: repeat(8, 1fr); }
}
.stpane { display: none; }
.stpane.on { display: block; }
.stbuild { margin-top: 14px; border-radius: 12px; padding: 12px 16px; font-size: .9rem;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stbuild.pending { background: var(--amber-soft); color: var(--amber-deep); }
.stbuild.done { background: rgba(20, 151, 107, .12); color: #14976b; }
.stbuild.err { background: rgba(190, 40, 40, .1); color: #a33; }
.stbuild .hlink { font-weight: 700; text-decoration: underline; }
.stspin { width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--amber-deep); border-top-color: transparent;
  animation: stspin 1s linear infinite; }
@keyframes stspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stspin { animation: none; } }


/* EDITING FROM strip - the selection the build will actually use */
.stselstrip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 12px;
  padding: 10px 14px; margin: 12px 0 4px; }
.stsel-lab { font-size: .72rem; letter-spacing: .1em; color: var(--muted); flex: none; }
.stsel-name { font-size: .95rem; font-weight: 600; color: var(--text); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.stselthumb { position: relative; width: 54px; height: 54px; border-radius: 10px;
  overflow: visible; flex: none; }
.stselthumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
  border: 2px solid var(--amber); }
.stselthumb i { position: absolute; bottom: -4px; left: -4px; background: var(--amber);
  color: #1a1206; font-style: normal; font-weight: 700; font-size: .58rem;
  width: 18px; height: 18px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; }
.stselthumb button { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: #1a1206; color: #fff; font-size: .6rem;
  cursor: pointer; line-height: 1; }


/* gfForm inline aux action (e.g. AI name beside the NAME field) */
.gfauxrow { display: flex; gap: 8px; align-items: stretch; }
.gfauxrow input { flex: 1; }
.gfauxrow .btn { flex: none; white-space: nowrap; }


/* Studio collapsible media folds */
.stfold { border: 1px solid var(--line2); border-radius: 12px; margin: 12px 0 6px;
  overflow: hidden; }
.stfold-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  cursor: pointer; user-select: none; background: var(--card2);
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em;
  color: var(--muted); }
.stfold-head:hover { color: var(--text); }
.stfold-t { font-weight: 700; }
.stfold-sum { color: var(--amber-deep); letter-spacing: .04em; text-transform: none;
  font-size: .62rem; }
.stfold-chev { flex: none; transition: transform .18s ease; text-transform: lowercase;
  font-family: var(--font-body); font-size: .8rem; }
.stfold:not(.open) .stfold-chev { transform: rotate(-90deg); }
.stfold-body { padding: 12px 14px; }
.stfold:not(.open) .stfold-body { display: none; }
@media (prefers-reduced-motion: reduce) { .stfold-chev { transition: none; } }


/* Voiced narration AI tools */
.stnarr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.stnarr select { width: auto; flex: none; }
.stnarr input { flex: 1; min-width: 200px; }
.stnarr .btn { flex: none; }
.bkpick { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.bkrow { text-align: left; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--card2); padding: 10px 13px; cursor: pointer; display: block; }
.bkrow:hover { border-color: var(--amber); }
.bkrow b { display: block; font-size: .82rem; margin-bottom: 3px; }
.bkrow span { display: block; font-size: .74rem; color: var(--muted); }


/* Support: richer ticket rows + thread navigation */
.tkrow { align-items: flex-start; }
.tkrow .t { flex: 1; min-width: 0; }
.tkrow .tkmeta { display: block; font-family: var(--font-mono); font-size: .58rem;
  color: var(--muted); margin-top: 3px; }
.tkrow .tksnip { display: block; font-size: .78rem; color: var(--dim); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkrow:focus { outline: 2px solid var(--amber); outline-offset: -2px; }
.tkthead { gap: 8px; }
.tkthead .tktitle { font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex;
  align-items: center; gap: 8px; }
.tkalert { font-family: var(--font-mono); font-size: .5rem; letter-spacing: .08em;
  color: #14976b; background: rgba(20,151,107,.12); padding: 2px 7px; border-radius: 999px; }
.tkscroll { max-height: 62vh; overflow-y: auto; }
.tkclosed { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.btn.sm[disabled] { opacity: .4; cursor: default; }


/* RULE: every panel section header collapses/expands. Click the header (not a
   control inside it) to fold the panel; state persists per header. Modals and
   nested non-panel pheads are excluded. */
.panel > .phead { cursor: pointer; }
.panel > .phead > * { cursor: auto; }
.panel > .phead::after { content: "\25be"; margin-left: 10px; flex: none;
  font-family: var(--font-body); font-size: .85rem; color: var(--muted);
  transition: transform .18s ease; }
.panel > .phead:not(.pheadflex)::after { float: right; }
.panel.pcol > .phead::after { transform: rotate(-90deg); }
.panel.pcol > :not(.phead) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .panel > .phead::after { transition: none; } }


/* support thread: clear active focus + comfortable scroll target */
#tkThread { scroll-margin-top: 84px; }
#tkThread .tkthead { border-bottom: 1px solid var(--line2); }
@media (min-width: 901px) {
  /* wide layout: keep the thread beside the list and in view as you scroll,
     so clicking any ticket shows the conversation right there */
  .split #tkThread { position: sticky; top: 84px; align-self: start;
    max-height: calc(100vh - 110px); overflow-y: auto; }
}
@media (max-width: 900px) {
  /* stacked layout: the open thread is the focus, lift it visually */
  #tkThread:not(:empty) { box-shadow: 0 0 0 2px var(--amber-soft); }
}


/* voice select + preview as a tight pair (button next to the input) */
.voicerow { display: flex; gap: 8px; align-items: stretch; max-width: 680px; }
.voicerow select { flex: 1; min-width: 0; }
.voicerow .btn { flex: none; white-space: nowrap; }
/* compact AI-write toolbar reused across studio panes */
.stnarr2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 8px; max-width: 680px; }
.stnarr2 select { width: auto; flex: none; }
.stnarr2 input { flex: 1; min-width: 180px; }
.stnarr2 .btn { flex: none; }


/* Support: single-column form+list; the thread opens in a modal popup */
.tksupport { max-width: 900px; }
.tkmodal { width: min(760px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.tkmodal .npbody.tkscroll { overflow-y: auto; flex: 1; }
.tkmodal .tkthead .tktitle { font-family: var(--font-body); font-weight: 600; font-size: .95rem; }


/* RULE: form fields inside any modal body match the rest of the app - block
   labels above the control, textareas fill the width. Complements the global
   :where(input...) appearance rule so a raw modal never ships bare fields. */
.npbody label { display: block; font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .12em; color: var(--dim); margin: 12px 0 5px; }
.npbody textarea { width: 100%; }
.tkreply { padding-top: 6px; }
.tkreply textarea { min-height: 100px; }


/* web-demo: the frame the AI saw (plan preview) */
.wdshot { max-width: 100%; max-height: 240px; border-radius: 12px;
  border: 1px solid var(--line2); margin: 4px 0 10px; display: block; }

/* ============================ Analytics tab ============================ */
.pagelede { color: var(--muted); max-width: 900px; line-height: 1.55; margin: -4px 0 18px; }
.pagelede b { color: var(--text); }
.antoolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.anfilter { height: 42px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--card); color: var(--text); font-family: var(--font-body); font-size: 14px; }
.anfilter:focus { outline: none; border-color: var(--amber); }
.angrow { flex: 1 1 220px; min-width: 180px; }
.btn.ghost { background: transparent; }
.anmeta { color: var(--dim); margin: 0 0 14px; font-size: 12.5px; }
.anlabel { color: var(--muted); font-size: 12px; letter-spacing: .04em; margin: 18px 0 10px; }
.anmuted { color: var(--dim); font-weight: 400; }
.anengrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.engtile { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px; box-shadow: var(--shadow); }
.engtile b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1;
  color: var(--text); margin-bottom: 7px; }
.engtile span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--muted);
  display: flex; align-items: center; gap: 3px; }
.kcard b.bad { color: var(--red); }
/* top performing post banner */
.antop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 6px;
  padding: 16px 20px; border-radius: 16px; border: 1px solid var(--amber);
  background: linear-gradient(180deg, var(--amber-soft), transparent); }
.antop-badge { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--amber-deep);
  white-space: nowrap; }
.antop b { font-family: var(--font-display); font-size: 16px; color: var(--text); flex: 1 1 260px; }
.antop-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; }
/* network badges */
.annet { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 6px; font: 700 9px/1 var(--font-mono); color: #fff; letter-spacing: .02em; }
.annet.tiktok { background: #111; } .annet.instagram { background: #d6336c; }
.annet.facebook { background: #1877f2; } .annet.twitter { background: #111; }
.annet.linkedin { background: #0a66c2; } .annet.youtube { background: #e23b2e; }
/* post list */
.anlist { display: flex; flex-direction: column; }
.anrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 13px 16px;
  border-top: 1px solid var(--line); }
.anrow:first-child { border-top: 0; }
.anrow-main { flex: 1 1 300px; min-width: 0; }
.anrow-main b { display: block; color: var(--text); font-size: 14px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.anrow-sub { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.anrow-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.anchip { font-family: var(--font-mono); font-size: 10.5px; color: var(--text);
  background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.anrow-links { display: flex; gap: 10px; }
.anlink { font-family: var(--font-mono); font-size: 11px; color: var(--amber-deep); white-space: nowrap; }
.anlink:hover { text-decoration: underline; }

/* analytics: averages strip + per-network + sort */
.anstrip { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 4px; }
.anstat { flex: 1 1 200px; background: var(--card2); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; }
.anstat b { font-family: var(--font-display); font-size: 26px; color: var(--amber-deep); margin-right: 4px; }
.anstat span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--muted);
  display: inline-flex; align-items: center; gap: 3px; }
.ansort { height: 34px; font-size: 12px; padding: 0 10px; }
.anbynet { display: flex; flex-direction: column; }
.bnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px;
  border-top: 1px solid var(--line); }
.bnrow:first-child { border-top: 0; }
.bnhead { display: flex; align-items: center; gap: 9px; flex: 0 0 180px; }
.bnhead b { color: var(--text); font-size: 14px; }
.bnmetrics { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 260px; }

/* ============================ Dark theme ============================ */
:root[data-theme="dark"] {
  --bg: #0a0e18; --card: #121a2b; --card2: #0e1524;
  --line: #212c40; --line2: #30405d;
  --text: #e9eef8; --muted: #98a5bc; --dim: #6b7890;
  --amber-soft: rgba(224, 137, 0, 0.16);
  --green-soft: rgba(20, 151, 107, 0.18);
  --red-soft: rgba(214, 69, 69, 0.18);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] .switch span { background: var(--line2); }
:root[data-theme="dark"] .side { border-right: 1px solid var(--navy-line); }
/* theme toggle button icon swap */
.tptheme .ic-sun { display: none; }
.tptheme .ic-moon { display: inline-flex; }
:root[data-theme="dark"] .tptheme .ic-sun { display: inline-flex; }
:root[data-theme="dark"] .tptheme .ic-moon { display: none; }
.tptheme svg { width: 18px; height: 18px; }

/* dark mode: topbar icons go white (amber accents drop away). The outline
   strokes sit on the <svg> itself as stroke="currentColor", so target the svg
   AND its children; keep fill-only accents (the dot) via the fill rule. */
:root[data-theme="dark"] .topsupport { color: #fff; }
:root[data-theme="dark"] .topsupport svg,
:root[data-theme="dark"] .topsupport svg *:not([stroke="none"]) { stroke: #fff; }
:root[data-theme="dark"] .topsupport svg [fill]:not([fill="none"]) { fill: #fff; }

/* analytics: segmented Organic/Ads switch */
.anseg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--card2); border: 1px solid var(--line); margin: 0 0 16px; }
.anseg button { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding: 8px 18px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-weight: 600; }
.anseg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
:root[data-theme="dark"] .anseg button.on { background: var(--line2); color: #fff; }
/* clickable affordances */
.clik { cursor: pointer; }
.anrow.clik:hover, .antoprow:hover { background: var(--amber-soft); }
.anrow { position: relative; transition: background .12s; }
.anrow-open { font-family: var(--font-mono); font-size: 10.5px; color: var(--amber-deep);
  opacity: 0; transition: opacity .12s; white-space: nowrap; align-self: center; }
.anrow.clik:hover .anrow-open, .antoprow:hover .anrow-open { opacity: 1; }
.annet.clik { text-decoration: none; }
.annet.clik:hover { outline: 2px solid var(--amber); outline-offset: 1px; }
.kcard b.good { color: var(--green); }
/* top 5 posts */
.antoprow { display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-top: 1px solid var(--line); }
.antoprow:first-child { border-top: 0; }
.antop-rank { flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px var(--font-mono); background: var(--card2); color: var(--muted);
  border: 1px solid var(--line2); }
.antop-rank.r1 { background: linear-gradient(180deg, var(--amber-bright), var(--amber));
  color: #3a2600; border-color: transparent; }
.antop-rank.r2 { background: #c9cfdb; color: #2a3140; border-color: transparent; }
.antop-rank.r3 { background: #e0b083; color: #3a2600; border-color: transparent; }
.antop-body { flex: 1 1 auto; min-width: 0; }
.antop-body b { display: block; color: var(--text); font-size: 14px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.antop-sub { display: flex; align-items: center; gap: 7px; margin-top: 4px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.antop-score { flex: none; text-align: right; }
.antop-score b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--text); }
.antop-score em { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em;
  color: var(--dim); font-style: normal; }

/* account: change-password form */
.pwform { max-width: 380px; }
.pwform label { display: block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .05em; color: var(--muted); margin: 12px 0 5px; }
.pwform input { width: 100%; }

/* active-brand cues: topbar chip + overview banner */
.brandtag { display: inline-flex; align-items: center; vertical-align: middle;
  margin-left: 10px; padding: 3px 12px; border-radius: 999px; font-family: var(--font-mono);
  font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--amber-deep); background: var(--amber-soft); border: 1px solid var(--amber);
  position: relative; top: -2px; }
.brandtag:empty { display: none; }
.brandbanner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line2);
  background: var(--card2); }
.brandbanner[hidden] { display: none; }
.brandbanner .bb-dot { flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.brandbanner .bb-txt { display: flex; flex-direction: column; gap: 2px; }
.brandbanner .bb-txt b { color: var(--text); font-size: 1rem; }
.brandbanner .bb-txt span { color: var(--muted); font-size: .84rem; }

/* ==================== Fill-from-website + draft review modal ==================== */
/* URL row on the Brand profile panel */
.furow { display: flex; gap: 10px; flex-wrap: wrap; }
.furow input { flex: 1 1 260px; min-width: 200px; }

/* modal shell - sticky header/footer, scrollable body, on theme */
.fumodal { width: min(720px, 94vw); max-height: 90vh; display: flex; flex-direction: column;
  padding: 0; overflow: hidden; }
.npmhead { display: flex; align-items: center; gap: 14px; padding: 18px 22px; flex: none;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--amber-soft), transparent); }
.npmh-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.05rem; color: #3a2600;
  background: linear-gradient(180deg, var(--amber-bright), var(--amber)); box-shadow: 0 4px 12px var(--amber-soft); }
.npmh-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.npmh-t b { font-family: var(--font-display); font-size: 1.16rem; color: var(--text); }
.npmh-t span { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .05em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npmx { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); color: var(--muted); cursor: pointer; font-size: .95rem; transition: all .15s; }
.npmx:hover { color: var(--text); border-color: var(--amber); transform: rotate(90deg); }
.npmbody { padding: 20px 22px; overflow-y: auto; flex: 1; }
.npmbody::-webkit-scrollbar { width: 12px; }
.npmbody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 999px; border: 4px solid var(--card); }
.npmfoot { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px; flex: none;
  border-top: 1px solid var(--line); background: var(--card2); }

/* hero screenshot of the site we read */
.fuhero { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); margin-bottom: 16px; }
.fushot { display: block; width: 100%; max-height: 200px; object-fit: cover; object-position: top; }
.fuhero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
  background: linear-gradient(transparent, rgba(7, 11, 20, 0.78)); }
.fuhero-cap { position: absolute; left: 13px; bottom: 10px; z-index: 1; color: #fff;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }

/* intro + toolbar */
.fulead { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0 0 16px; }
.fulead b { color: var(--text); }
.futools { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; }
.fulink { background: none; border: 0; padding: 0; cursor: pointer; color: var(--amber-deep);
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .03em; }
.fulink:hover { text-decoration: underline; }
.futools-sep { color: var(--line2); }
.fucount-chip { font-family: var(--font-mono); font-size: .66rem; color: var(--muted);
  background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* field cards */
.fugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ficard { background: var(--card2); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 15px 15px; transition: border-color .15s, opacity .15s; }
.ficard.big { grid-column: 1 / -1; }
.ficard:hover { border-color: var(--line2); }
.ficard.off { opacity: .6; }
.ficard.off:hover { opacity: 1; }
.fic-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.fic-lab { flex: 1; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fic-badge { font-family: var(--font-mono); font-size: .56rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 999px; flex: none; }
.fic-badge.new { color: var(--green); background: var(--green-soft); }
.fic-badge.chg { color: var(--amber-deep); background: var(--amber-soft); }
.fic-badge.same { color: var(--dim); background: transparent; border: 1px solid var(--line); }
.fic-cur { font-size: .74rem; color: var(--dim); margin: -2px 0 9px; }
.fic-cur span { color: var(--muted); }
.fic-sw { display: flex; gap: 6px; margin: 0 0 10px; }
.fic-sw .fusw { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line2); }
.fic-input { width: 100%; font-family: var(--font-body); }
textarea.fic-input { resize: vertical; min-height: 58px; line-height: 1.5; }
/* the include toggle (pill switch) */
.fic-tog { position: relative; flex: none; width: 40px; height: 22px; cursor: pointer; }
.fic-tog input { position: absolute; opacity: 0; margin: 0; }
.fic-tog span { position: absolute; inset: 0; border-radius: 999px; background: var(--line2); transition: background .18s; }
.fic-tog span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.fic-tog input:checked + span { background: var(--amber); }
.fic-tog input:checked + span::after { left: 21px; }
.fic-tog input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

/* logo option */
.fulogo { display: flex; align-items: center; gap: 11px; margin: 16px 0 0; padding: 13px 15px;
  border: 1px dashed var(--line2); border-radius: 12px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.fulogo:hover { border-color: var(--amber); }
.fulogo input { position: absolute; opacity: 0; }
.fulogo-sw { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line2); position: relative; }
.fulogo input:checked + .fulogo-sw { background: var(--amber); border-color: var(--amber); }
.fulogo input:checked + .fulogo-sw::after { content: "✓"; position: absolute; inset: 0; color: #fff;
  font-size: .78rem; display: flex; align-items: center; justify-content: center; }
.fusw { display: inline-block; }

@media (max-width: 560px) {
  .fugrid { grid-template-columns: 1fr; }
  .npmhead, .npmfoot { padding-left: 16px; padding-right: 16px; }
  .npmbody { padding: 16px; }
}

/* draft field source tag (parsed vs AI) */
.fic-src { font-family: var(--font-mono); font-size: .54rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.fic-src.parsed { color: var(--green); }
.fic-lab { min-width: 0; }

/* ============= Posts row: network icons + approval switch ============= */
.qnets { display: flex; gap: 5px; align-items: center; flex: none; }
.qnet { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); color: var(--muted); cursor: pointer; padding: 0; transition: all .14s;
  display: inline-flex; align-items: center; justify-content: center; }
.qnet svg { width: 15px; height: 15px; }
.qnet:hover { color: var(--amber-deep); border-color: var(--amber); transform: translateY(-1px); }
.qnet.instagram:hover { color: #d6336c; border-color: #d6336c; }
.qnet.facebook:hover { color: #1877f2; border-color: #1877f2; }
.qnet.linkedin:hover { color: #0a66c2; border-color: #0a66c2; }
.qnet.youtube:hover { color: #e23b2e; border-color: #e23b2e; }
.qnet.tiktok:hover, .qnet.twitter:hover { color: var(--text); border-color: var(--text); }
/* the row approval switch */
.qapp { position: relative; flex: none; width: 40px; height: 22px; cursor: pointer; margin: 0 2px; }
.qapp input { position: absolute; opacity: 0; margin: 0; }
.qapp span { position: absolute; inset: 0; border-radius: 999px; background: var(--line2); transition: background .18s; }
.qapp span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.qapp input:checked + span { background: var(--green); }
.qapp input:checked + span::after { left: 21px; }
.qapp:hover span { filter: brightness(1.05); }
/* detail: top approve row */
.detailtop { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
/* detail: collapsible attach library */
.medlib-head { cursor: pointer; display: flex; align-items: center; gap: 6px; user-select: none; }
.medlib-head:hover { color: var(--amber-deep); }
.medchev { margin-left: auto; font-size: .72rem; }
.medlib { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.medlib[hidden] { display: none; }
