/* Minimal v2 styles to ensure pages render under /chatv2 */
:root{
	--bg:#0b0c0f; --text:#e7e9ea; --surface:#13151a; --border:#2a2d36;
	--primary:#0b93f6; --muted:#9aa0a6;
	--s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-6:24px;
}
[data-theme="light"]:root{ --bg:#ffffff; --text:#0b0c0f; --surface:#f6f7f9; --border:#e5e7eb; }
html,body{ height:100%; }
body{ margin:0; background:var(--bg); color:var(--text); font:14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.container{ max-width:960px; margin:0 auto; padding:0 var(--s-4); }
.topbar{ position:sticky; top:0; z-index:20; background:var(--surface); border-bottom:1px solid var(--border); }
.topbar__inner{ display:flex; align-items:center; justify-content:space-between; height:56px; }
.brand{ text-decoration:none; color:var(--text); font-weight:600; }
.menu__btn{ background:transparent; border:1px solid var(--border); color:var(--text); padding:6px 10px; border-radius:8px; cursor:pointer; }
.menu__panel{ position:absolute; right:16px; top:56px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:8px; display:none; min-width:200px; box-shadow:0 10px 30px rgba(0,0,0,.3); }
.menu__panel.is-open{ display:block; }
.menu__list{ list-style:none; margin:0; padding:0; }
.menu__item{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; color:var(--text); text-decoration:none; }
.menu__item:hover{ background:rgba(255,255,255,.06); }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:var(--s-4); }
.btn{ background:var(--primary); color:#fff; border:none; padding:8px 12px; border-radius:8px; cursor:pointer; text-decoration:none; display:inline-block; }
.btn--text{ background:transparent; color:var(--text); border:1px solid var(--border); }
.muted{ color:var(--muted); }
.list{ display:flex; flex-direction:column; gap:8px; }
.list-item{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px; background:var(--surface); border:1px solid var(--border); border-radius:12px; color:var(--text); text-decoration:none; }
.badge{ background:#ef4444; color:#fff; border-radius:999px; padding:2px 8px; font-weight:600; font-size:12px; }

/* Chat */
.chat{ display:flex; flex-direction:column; gap:var(--s-2); height:calc(100vh - 56px); }
.chat__header{ display:flex; align-items:center; gap:12px; }
.chat__messages{ flex:1; overflow:auto; display:flex; flex-direction:column; gap:6px; padding:var(--s-2); background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.group{ display:flex; }
.bubble{ max-width:70%; padding:8px 10px; border-radius:14px; background:#23262f; }
.bubble--me{ margin-left:auto; background:var(--primary); color:#fff; }
.bubble--other{ margin-right:auto; }
.chat__input{ display:flex; gap:8px; align-items:center; border:1px solid var(--border); border-radius:12px; padding:6px; background:var(--surface); }
.chat__input textarea{ flex:1; min-height:36px; max-height:120px; resize:vertical; border:none; outline:none; background:transparent; color:var(--text); }

@media (max-width:640px){ .container{ padding:0 var(--s-2); } .topbar__inner{ height:52px; } }

/* v2 Design System - no build, single file */
:root { --brand:#e45735; --bg:#0b0f16; --surface:#0f1420; --surface-2:#0b111a; --text:#e5e7eb; --text-muted:#97a0ad; --border:#1f2a37; --r-sm:8px; --r-md:12px; --r-lg:16px; --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --shadow-sm:0 2px 8px rgba(0,0,0,.3); --shadow-md:0 10px 30px rgba(0,0,0,.45); }
[data-theme="light"] { --bg:#f6f7fb; --surface:#fff; --surface-2:#eef1f6; --text:#0f172a; --text-muted:#64748b; --border:#e5e7eb; }
*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial;background:var(--bg);color:var(--text)}a{color:inherit;text-decoration:none}
.container{max-width:960px;margin:0 auto;padding:var(--s-4)}
.topbar{position:sticky;top:0;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--shadow-sm);z-index:30}
.topbar__inner{display:flex;align-items:center;gap:var(--s-3);height:56px}
.brand{font-weight:700}
.menu{margin-left:auto;position:relative}
.menu__btn{background:transparent;border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;color:var(--text);cursor:pointer}
.menu__panel{position:absolute;right:0;top:calc(56px + 6px);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);box-shadow:var(--shadow-md);width:220px;display:none}
.menu__panel.is-open{display:block}
.menu__list{list-style:none;margin:0;padding:6px}
.menu__item{display:grid;grid-template-columns:24px 1fr;gap:10px;align-items:center;padding:10px 12px;border-radius:var(--r-sm)}
.menu__item:hover{background:var(--surface-2)}
.btn{background:var(--brand);color:#fff;border:0;border-radius:var(--r-md);padding:10px 14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.btn--text{background:transparent;color:var(--text)}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:var(--s-5);margin:var(--s-4) 0}
.muted{color:var(--text-muted)}
.form label{display:grid;gap:6px;margin-bottom:var(--s-3)}
.form input,.form textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface);color:var(--text)}
.list{display:grid;gap:var(--s-2)}
.list-item{display:grid;grid-template-columns:1fr auto;gap:var(--s-2);align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:var(--s-3)}
.badge{background:#ef4444;color:#fff;border-radius:999px;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 6px;font-size:11px}
.chat{height:calc(100vh - 56px - 24px);display:grid;grid-template-rows:auto 1fr auto;gap:var(--s-2)}
.chat__messages{overflow:auto;display:flex;flex-direction:column;gap:4px;padding:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-md)}
.bubble{max-width:80%;padding:8px 10px;border-radius:16px;margin:2px 0;box-shadow:var(--shadow-sm)}
.bubble--me{background:var(--brand);color:#fff;margin-left:auto;border-bottom-right-radius:8px}
.bubble--other{background:var(--surface);color:var(--text);margin-right:auto;border-bottom-left-radius:8px}
.chat__input{display:grid;grid-template-columns:1fr auto;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:4px}
.chat__input textarea{resize:none;border:0;background:transparent;color:var(--text);padding:8px 10px;outline:none}
@media (max-width:600px){.container{padding:var(--s-3)}.chat{height:calc(100vh - 56px - 12px)}}

