/* ============================================================
   MFQ WORKSPACE v1 — the MessageFlowQ product design language.
   Replit-grade workspace chrome: dark shell, slim brand top bar,
   crisp panels, eyebrow labels in mono, bottom status bar.
   Brand: navy base + sky→violet gradient accent (www.messageflowq.com).
   ============================================================ */
:root {
  --ws-bg: #eef1fd;            /* workspace backdrop (bubble light) */
  --panel: #ffffff;            /* panel surface */
  --panel-2: #f6f7ff;          /* recessed surface (messages, body) */
  --panel-3: #eef0ff;          /* raised surface (hover, inputs) */
  --line: rgba(79, 70, 229, .14);
  --line-soft: rgba(79, 70, 229, .07);
  --ink: #23264d;
  --muted: #5d648f;
  --dim: #8b90b4;
  --brand1: #7dd3fc;           /* MFQ sky */
  --brand2: #a78bfa;           /* MFQ violet */
  --grad: linear-gradient(135deg, var(--brand1), var(--brand2));
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --user-bub: linear-gradient(135deg, #4338ca, #6d28d9);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: transparent;
  line-height: 1.55;
  font-size: 14.5px;
}
button, input, textarea { font: inherit; }
::selection { background: rgba(167, 139, 250, .35); }

/* ---------- scrollbars (subtle, Replit-ish) ---------- */
* { scrollbar-width: thin; scrollbar-color: #c9cdf0 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c9cdf0; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- primitives ---------- */
button {
  cursor: pointer;
  background: var(--panel-3);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .48rem 1rem;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
button:hover { background: #e9ecff; border-color: rgba(148,163,184,.28); filter: none; }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
button.ghost:hover { color: var(--ink); background: var(--panel-3); }
button.primary {
  background: var(--grad);
  color: #0a0f1e;
  border: 0;
  font-weight: 800;
}
button.primary:hover { filter: brightness(1.1); }
input, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .5rem .75rem;
  background: var(--panel-2);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #9aa3c9; }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid rgba(125, 211, 252, .5); outline-offset: 1px; }
a { color: var(--brand1); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--bad); }

/* ---------- brand lockup (the MessageFlowQ logo) ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand svg { display: block; }
.brandtext { font-weight: 800; letter-spacing: -.015em; font-size: .98rem; white-space: nowrap; }
.brandtext em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topdiv { width: 1px; height: 22px; background: var(--line); flex: 0 0 auto; }
.projname { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.acts { display: flex; gap: .4rem; align-items: center; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: .7rem;
  padding: 0 1rem;
  height: 52px;
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px) saturate(1.4);
}
.top h1 { font-size: .98rem; margin: 0; flex: 0 0 auto; font-weight: 700; }
.top button { border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 6px rgba(79,70,229,.10); border-radius: 999px; padding: .3rem .9rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.top .sp { flex: 1; }
.linkbtn {
  display: inline-block; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: .42rem .8rem;
  font-weight: 600; text-decoration: none; font-size: .87rem; white-space: nowrap;
}
.linkbtn:hover { color: var(--ink); background: var(--panel-3); }

/* ---------- pills ---------- */
.pill {
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 999px; background: var(--panel-3); color: var(--muted);
  border: 1px solid var(--line); white-space: nowrap;
}
.pill.published { background: rgba(52, 211, 153, .12); color: var(--ok); border-color: rgba(52, 211, 153, .35); }
.pill.building { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.pill.trial { background: rgba(125, 211, 252, .1); color: var(--brand1); border-color: rgba(125, 211, 252, .3); }
.pill.guest { background: rgba(167, 139, 250, .12); color: var(--brand2); border-color: rgba(167, 139, 250, .35); }

/* ---------- dashboard ---------- */
.wrap { max-width: 1060px; margin: 0 auto; padding: 2rem 1.4rem 3rem; }
.heroline { margin: 0 0 1.3rem; }
.heroline h2 { margin: 0 0 .15rem; font-size: 1.35rem; letter-spacing: -.01em; }
.heroline p { margin: 0; color: var(--muted); }
.newrow {
  display: flex; gap: .6rem; margin: 1.2rem 0 1.4rem;
  padding: .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.newrow input { flex: 1; background: var(--panel-2); }
.connectrow {
  display: flex; gap: .6rem; margin: -.7rem 0 1.4rem; align-items: center;
  padding: .75rem; background: linear-gradient(120deg, rgba(125, 211, 252, .07), rgba(167, 139, 250, .09));
  border: 1px solid rgba(125, 211, 252, .3); border-radius: 12px;
}
.connectrow .cglow { filter: drop-shadow(0 0 6px rgba(125, 211, 252, .8)); }
.connectrow input { flex: 1; background: var(--panel-2); font-size: .93rem; }
.ctab { border-color: rgba(125, 211, 252, .45); color: var(--brand1); white-space: nowrap; }
.ctab:hover { border-color: var(--brand1); }

/* ---------- WhatsApp-native guest gate ---------- */
.wa-form {
  display: flex; gap: .6rem; margin: 1.2rem 0 1.4rem; flex-wrap: wrap;
  padding: .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.wa-form input { flex: 1; min-width: 180px; background: var(--panel-2); }
.wa-form button { flex: none; }
.wa-phonerow { display: flex; gap: .5rem; flex: 1; min-width: 220px; }
.wa-ccselect {
  flex: none; width: auto; max-width: 180px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 .5rem; font-size: .92rem;
}
.wa-phonerow input { flex: 1; min-width: 140px; }
.wa-previewwrap {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: 0 10px 34px rgba(3, 7, 18, .08); margin-top: .6rem;
}
.wa-previewwrap iframe { width: 100%; height: 70vh; border: 0; display: block; }
.brief { display: flex; gap: .9rem; align-items: flex-start; margin: 1rem 0; padding: .9rem; background: var(--panel-2, #f6f8fb); border: 1px solid var(--line); border-radius: 10px; }
.briefimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: #eef1f6; }
.briefmeta b { font-size: 1.02rem; }
.briefmeta .pill.cat { margin-left: .5rem; background: rgba(167, 139, 250, .12); color: var(--brand2); border-color: rgba(167, 139, 250, .35); }
.briefmeta p { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.cards .empty { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; padding: 2.2rem 1rem; text-align: center; color: var(--muted); background: rgba(255, 255, 255, .72); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: rgba(125, 211, 252, .4); transform: translateY(-1px); }
.card h3 { margin: 0 0 .2rem; font-size: 1rem; }
.card .slug { color: var(--dim); font-size: .82rem; font-family: var(--mono); word-break: break-all; }
.card .row { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }

/* ============================================================
   EDITOR — chat (Agent panel) | preview (Preview panel)
   ============================================================ */
.ed {
  display: grid; grid-template-columns: minmax(400px, 640px) 1fr;
  gap: .8rem; padding: .8rem 1rem calc(.8rem + 30px);
  height: calc(100vh - 52px);
}
body.chatwide .ed { grid-template-columns: minmax(480px, 860px) 1fr; }

/* ---------- panels share chrome ---------- */
.chat, .prev {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 28px rgba(3, 7, 18, .45);
}
/* Editor fits the viewport exactly: both panels stretch to fill the row and
   .msgs scrolls internally — no page scroll, composer always in view. */

/* ---------- chat panel ---------- */
.chathead {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .8rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-size: .72rem; font-weight: 800; letter-spacing: .07em;
  color: var(--ok);
}
.paneltitle { color: var(--ink); letter-spacing: .09em; font-family: var(--mono); font-size: .68rem; }
.livtext { letter-spacing: .08em; }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; animation: livedot 1.6s ease-in-out infinite; }
@keyframes livedot { 0%,100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .45); } 50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, .1); } }

.modeswitch { display: inline-flex; background: var(--ws-bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.modeswitch button { background: transparent; color: var(--muted); border: 0; border-radius: 999px; padding: .16rem .7rem; font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.modeswitch button.on { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(148,163,184,.25); }
.modeswitch button:not(.on):hover { color: var(--ink); }
.widebtn { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: .06rem .5rem; font-size: .85rem; line-height: 1.3; }
.widebtn:hover { color: var(--ink); background: var(--panel-3); }

.msgs { flex: 1; overflow-y: auto; padding: 1rem .9rem; display: flex; flex-direction: column; gap: .5rem; background: var(--panel-2); }
.bub {
  max-width: 88%;
  padding: .55rem .8rem;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .92rem;
  border: 1px solid var(--line-soft);
}
.bub.user { align-self: flex-end; background: var(--user-bub); color: #fff; border-color: rgba(129, 140, 248, .4); }
.bub.assistant { align-self: flex-start; background: var(--panel-3); }
.bub.system {
  align-self: center; background: rgba(251, 191, 36, .08); color: var(--warn);
  font-size: .8rem; border-radius: 999px; padding: .22rem .8rem; border-color: rgba(251, 191, 36, .25);
}

/* agent badges */
.agentbadge {
  display: inline-block; font-size: .6rem; font-weight: 800; letter-spacing: .09em;
  border-radius: 999px; padding: .12rem .5rem; margin-right: .45rem; vertical-align: 1px;
  font-family: var(--mono);
}
.agent-scout { background: rgba(125, 211, 252, .14); color: var(--brand1); border: 1px solid rgba(125, 211, 252, .35); }
.agent-builder { background: rgba(167, 139, 250, .14); color: var(--brand2); border: 1px solid rgba(167, 139, 250, .35); }

/* plan card */
.bub.plan { max-width: 94%; background: rgba(99, 102, 241, .08); border: 1px solid rgba(129, 140, 248, .35); padding: .7rem .85rem; }
.plantitle { font-weight: 800; font-size: .86rem; color: #c7d2fe; margin-bottom: .35rem; }
.bub.plan ul { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .9rem; }
.bub.plan li { margin: .18rem 0; }
.planacts { display: flex; gap: .5rem; }
.planacts .apply { background: var(--grad); color: #0a0f1e; border: 0; padding: .35rem 1rem; font-size: .84rem; font-weight: 800; }
.planacts .drop { padding: .35rem .8rem; font-size: .84rem; }

/* suggestion chips */
.chips { display: flex; gap: .45rem; padding: .55rem .8rem; flex-wrap: wrap; border-top: 1px solid var(--line-soft); background: var(--panel); }
.chips:empty { display: none; }
.chip {
  background: rgba(125, 211, 252, .07); color: var(--brand1);
  border: 1px solid rgba(125, 211, 252, .3); border-radius: 999px;
  padding: .26rem .8rem; font-size: .77rem; font-weight: 700;
}
.chip:hover { background: rgba(125, 211, 252, .14); }

/* composer */
#cf {
  display: flex; gap: .5rem; padding: .65rem .7rem;
  border-top: 1px solid var(--line); align-items: center;
  background: var(--panel);
}
#cf textarea {
  flex: 1;
  background: var(--panel-2);
  min-height: 10.7rem; /* 2× the old 3-row box (~85px → ~171px) */
  font-size: .95rem;
  padding: .9rem 1.1rem;
  resize: none;
}
#cf > button { align-self: center; min-height: 2.7rem; padding: .65rem 1.3rem; border-radius: 10px; }

/* attach */
.attach { position: relative; }
.attachbtn {
  background: rgba(125, 211, 252, .08); color: var(--brand1);
  border: 1px solid rgba(125, 211, 252, .3);
  border-radius: 999px; width: 2.2rem; height: 2.2rem; font-size: 1.3rem; line-height: 1;
  padding: 0; display: flex; align-items: center; justify-content: center;
}
.attachbtn:hover { background: rgba(125, 211, 252, .16); }
.attachmenu {
  display: none; position: absolute; bottom: calc(100% + .5rem); left: 0; z-index: 30;
  background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(3, 7, 18, .6); padding: .35rem; min-width: 265px;
}
.attachmenu.open { display: flex; flex-direction: column; }
.attachmenu button { background: transparent; color: var(--ink); text-align: left; border: 0; border-radius: 8px; padding: .5rem .7rem; font-size: .88rem; font-weight: 600; }
.attachmenu button:hover { background: rgba(125, 211, 252, .1); }

/* ---------- preview panel ---------- */
.prevbadge {
  position: static;
  display: flex; align-items: center; gap: .45rem;
  padding: .5rem .8rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-size: .72rem; font-weight: 800; letter-spacing: .07em;
  color: var(--ok);
  flex: 0 0 auto;
}
.prevbadge .paneltitle { color: var(--ink); }
.prev iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.prev { position: relative; }
.prev::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: linear-gradient(transparent, rgba(238, 241, 253, .92)); pointer-events: none; z-index: 1; border-radius: 0 0 var(--radius) var(--radius); }
/* Flash the preview panel's border when a build just landed, so it's noticed even
   when the visitor isn't reading the chat column. */
.prev.flash { animation: prevflash 1.8s ease-out; }
@keyframes prevflash {
  0% { box-shadow: 0 0 0 3px rgba(52, 211, 153, .9), 0 24px 70px rgba(3, 7, 18, .5); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
/* "Preview ready" CTA under a completed build's chat reply */
.previewcta { margin-top: .5rem; }
.previewcta .previewopen { font-weight: 700; }
.shimmer {
  display: none; position: absolute; top: 33px; left: 0; right: 0; bottom: 0; z-index: 2;
  align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .84rem; color: var(--brand1);
  background: linear-gradient(100deg, rgba(13, 20, 40, .82) 30%, rgba(23, 32, 62, .92) 50%, rgba(13, 20, 40, .82) 70%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
.shimmer.on { display: flex; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- bottom status bar (Replit-style) ---------- */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  height: 30px;
  display: flex; align-items: center; gap: 1.1rem;
  padding: 0 1rem;
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .75rem; letter-spacing: .02em;
  color: #5d648f;
  backdrop-filter: blur(10px) saturate(1.3);
}
.statusbar .sp { flex: 1; }
.statusbar .okdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: .35rem; }
.statusbar .baddot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: inline-block; margin-right: .35rem; animation: livedot 1.2s ease-in-out infinite; }
.statusbar b { color: #23264d; font-weight: 700; }

/* ---------- auth + modals ---------- */
.authcard {
  max-width: 400px; margin: 10vh auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(3, 7, 18, .6);
  padding: 2rem;
}
.authcard h1 { margin: 0 0 .3rem; font-size: 1.4rem; }
.authcard form { display: grid; gap: .7rem; margin-top: 1.2rem; }
.authcard input { width: 100%; }
.authcard button { margin-top: .3rem; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(4, 8, 20, .66); display: flex; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(3px); }
.modalcard {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.6rem; width: min(440px, 94vw);
  box-shadow: 0 24px 70px rgba(3, 7, 18, .7);
  display: flex; flex-direction: column; gap: .7rem;
}
.modalcard h2 { margin: 0; font-size: 1.15rem; }
.modalcard input { width: 100%; background: var(--panel-2); }
.modalcard button[type=submit] { width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ed { grid-template-columns: 1fr; height: auto; }
  .prev { height: 60vh; position: relative; }
  .msgs { max-height: 40vh; }
  .chat { height: auto; overflow: hidden; }
  .chathead, .composer { position: static; border-radius: 0; }
  .projname { max-width: 30vw; }
  .statusbar { display: none; }
  .ed { padding-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .livedot, .shimmer, .statusbar .baddot, .prev.flash { animation: none; } }

/* ---------- bubble field (v2 light) ---------- */
body::before, body::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
body::before { width: 44vw; height: 44vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 35% 35%, rgba(125,211,252,.75), rgba(125,211,252,0) 70%); animation: drift1 26s ease-in-out infinite alternate; }
body::after { width: 50vw; height: 50vw; right: -16vw; bottom: -18vw; background: radial-gradient(circle at 60% 60%, rgba(167,139,250,.65), rgba(167,139,250,0) 70%); animation: drift2 32s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(6vw, 4vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-5vw, -6vh) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

/* ---------- v2.1: bubble visibility (html owns base, body transparent) + frost ---------- */
html { background: radial-gradient(1100px 500px at 85% -10%, rgba(167, 139, 250, .20), transparent 60%), radial-gradient(900px 460px at -10% 0%, rgba(125, 211, 252, .22), transparent 55%), linear-gradient(180deg, #f3f5ff, #eef1fd); }
body::before { opacity: .85; width: 52vw; height: 52vw; }
body::after { opacity: .78; width: 58vw; height: 58vw; }

/* ---------- v2.2: distinct bubble orbs + button definition ---------- */
html::before { content: ""; position: fixed; z-index: -1; width: 22vw; height: 22vw; left: 55vw; top: 8vh; border-radius: 50%; filter: blur(50px); opacity: .8; background: radial-gradient(circle at 40% 40%, rgba(244, 114, 182, .55), transparent 70%); animation: drift1 30s ease-in-out infinite alternate; }
html::after { content: ""; position: fixed; z-index: -1; width: 16vw; height: 16vw; right: 30vw; bottom: 14vh; border-radius: 50%; filter: blur(45px); opacity: .75; background: radial-gradient(circle at 40% 40%, rgba(125, 211, 252, .65), transparent 70%); animation: drift2 24s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { html::before, html::after { animation: none; } }

/* ---------- v2.3: orb presence + card frost ---------- */
body::before { opacity: .95; }
body::after { opacity: .9; }
html::before { opacity: .95; width: 26vw; height: 26vw; }
html::after { opacity: .9; width: 20vw; height: 20vw; }
.authcard, .cards .empty, .panelcard { background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); box-shadow: 0 10px 34px rgba(79, 70, 229, .13); }
/* ---------- v2.6: true glass — prescribed: alpha .6, blur24+sat, border, orb overlap ---------- */
.authcard { background: rgba(255, 255, 255, .6) !important; backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 18px 50px rgba(79, 70, 229, .18); }
html::before { left: 56vw; top: 30vh; }
body::after { right: 6vw; bottom: 2vh; }
.authcard input { background: rgba(255,255,255,.75); }
/* ---------- v2.7: hero bloom behind the card ---------- */
html::before { left: 50%; top: 42vh; transform: translate(-50%, -50%); width: 36vw; height: 36vw; animation: none; opacity: .95; background: radial-gradient(circle at 40% 40%, rgba(217, 70, 239, .5), rgba(217, 70, 239, 0) 70%); }
.authcard { box-shadow: 0 18px 50px rgba(79, 70, 229, .18), inset 0 1px 0 rgba(255,255,255,.7); }
/* ---------- v2.8: bloom alignment + link styling (final) ---------- */
html::before { left: 56vw; top: 26vh; }
.authcard { background: rgba(255, 255, 255, .5) !important; box-shadow: 0 18px 50px rgba(79, 70, 229, .18), inset 0 1px 0 rgba(255,255,255,.75), inset 0 0 60px rgba(180,120,255,.16); border: 1px solid rgba(255,255,255,.6); }
.authwrap a, .authcard a { color: var(--brand, #4f46e5); font-weight: 700; text-decoration: none; }
.authwrap a:hover { text-decoration: underline; }

/* MFQ TEAM (ops-chat: team notes + team co-builds) */
.agent-team { background: rgba(244, 114, 182, .16); color: #be185d; border: 1px solid rgba(244, 114, 182, .4); }
.bub.teamuser { align-self: flex-start; background: rgba(244, 114, 182, .07); border: 1px solid rgba(244, 114, 182, .3); }

/* A-103: quoted "reply on top of" preview + emoji picker */
.quoteref { font-size: .72rem; color: #64748b; background: rgba(100, 116, 139, .09); border-left: 2px solid #94a3b8; border-radius: 4px; padding: .25rem .5rem; margin-bottom: .3rem; }
.emojipop { position: fixed; z-index: 2000; display: grid; grid-template-columns: repeat(6, 1fr); gap: .15rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: .4rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.emojipop button { background: none; border: 0; font-size: 1.2rem; padding: .25rem; border-radius: 6px; cursor: pointer; line-height: 1; }
.emojipop button:hover { background: rgba(125, 211, 252, .16); }

/* ---------- custom domain modal ---------- */
.tiny { font-size: .78rem; }
.pill.error { background: rgba(248, 113, 113, .12); color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.domaincard { width: min(520px, 94vw); }
.domaincard form { display: flex; gap: .5rem; }
.domaincard form button { flex: none; white-space: nowrap; }
.domaincard p { margin: 0; }
.domaincard a { color: #4f46e5; font-weight: 700; }
.domrow { display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; word-break: break-all; }
.dnsrec { display: grid; grid-template-columns: max-content 1fr; gap: .45rem .9rem; align-items: baseline; padding: .8rem .9rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.dnsrec > span { color: var(--muted); font-size: .8rem; }
.dnsrec b { font-family: var(--mono); word-break: break-all; }
.dnsrec small { display: block; color: var(--muted); font-size: .76rem; }
.dnsrec .copy { padding: .1rem .5rem; font-size: .74rem; margin-left: .3rem; }
.domacts { display: flex; gap: .5rem; }
#chg { align-self: flex-start; border: 0; padding: 0; color: var(--muted); }
