/* ===== ollo — чёрный с оранжевым ===== */
:root {
  --bg: #0b0b0b;
  --sidebar: #111111;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --hover: #222222;
  --border: #262626;
  --border-strong: #343434;
  --text: #ededed;
  --text-2: #b9b9b9;
  --muted: #7c7c7c;
  --accent: #ff7a1a;
  --accent-hover: #ff9142;
  --accent-soft: rgba(255, 122, 26, .13);
  --accent-text: #0b0b0b;
  --user-bubble: #1e1e1e;
  --code-bg: #0f0f0f;
  --danger: #ff6a5c;
  --danger-soft: rgba(255, 106, 92, .12);
  --ok: #4fd18b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { flex: 1; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 122, 26, .35); }
* { scrollbar-width: thin; scrollbar-color: #2e2e2e transparent; }

/* ===== логотип ollo ===== */
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #0b0b0b;
  font: 800 17px/1 var(--sans); letter-spacing: -.055em;
  padding: 6px 9px 7px 8px; border-radius: 9px; user-select: none;
}
.logo.lg { font-size: 24px; padding: 8px 12px 9px 11px; border-radius: 12px; }
.logo.xl { font-size: 44px; padding: 11px 18px 14px 16px; border-radius: 18px; box-shadow: 0 10px 50px rgba(255, 122, 26, .25); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; }
.brand.big { justify-content: flex-start; }
.brand-sub { color: var(--text-2); font-weight: 500; font-size: 14px; }

/* ===== кнопки и поля ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 10px; padding: 8px 14px; font-weight: 500; text-decoration: none; color: var(--text); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.wide { width: 100%; padding: 11px; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--text-2); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
input, select, textarea { font: inherit; color: var(--text); }
label { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 12px; }
label input, label select, label textarea, .field {
  display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); outline: none; }
label input:focus, label textarea:focus, label select:focus, .field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.alert { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.alert.ok { background: var(--accent-soft); color: var(--accent); }

/* ===== вход ===== */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(255, 122, 26, .10), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 30px; margin: 22px 0 6px; }
.auth-card p.muted { margin: 0 0 22px; }

/* ===== приложение ===== */
body.app { display: flex; height: 100dvh; overflow: hidden; }
.sidebar { width: 272px; flex: none; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 10px; transition: margin .22s ease; }
body.sb-hidden .sidebar { margin-left: -272px; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px 6px; }
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px; border-radius: 10px; font-weight: 500; color: var(--text); text-align: left; }
.new-chat:hover { background: var(--hover); }
.new-chat .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 17px; line-height: 1; font-weight: 600; }
.sb-label { font-size: 12px; color: var(--muted); padding: 16px 10px 6px; font-weight: 500; }
.chat-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.chat-item { display: flex; align-items: center; border-radius: 9px; }
.chat-item a { flex: 1; min-width: 0; padding: 7px 10px; color: var(--text-2); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item:hover, .chat-item.active { background: var(--hover); }
.chat-item.active a { color: var(--text); }
.ci-btn { display: none; border: 0; background: transparent; padding: 4px 6px; font-size: 12px; color: var(--muted); border-radius: 6px; }
.ci-btn:hover { color: var(--text); background: var(--border); }
.chat-item:hover .ci-btn { display: block; }
.empty-list { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.sb-bottom { position: relative; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; }
.user-card { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px; border-radius: 10px; text-align: left; }
.user-card:hover { background: var(--hover); }
.uc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.uc-text b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-text small { color: var(--muted); font-size: 12px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.menu > button, .menu > a { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.menu > button:hover, .menu > a:hover { background: var(--hover); }
.menu-head { font-size: 13px; color: var(--muted); padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; }
.usage { margin: 2px 4px 6px; padding: 10px; background: var(--surface-2); border-radius: 10px; font-size: 12.5px; }
.u-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: var(--text-2); }
.u-row b { font-weight: 500; color: var(--text); }
.u-bar i { display: block; height: 5px; background: var(--border); border-radius: 5px; margin: 3px 0 5px; overflow: hidden; }
.u-bar s { display: block; height: 100%; background: var(--accent); border-radius: 5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; flex: none; }
#sbOpen { display: none; }
body.sb-hidden #sbOpen { display: inline-grid; }
.chat-title { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.thread { flex: 1; overflow-y: auto; padding: 8px 20px 28px; }
.messages { max-width: 780px; margin: 0 auto; }
.welcome { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.welcome h1 { font-size: clamp(26px, 3.8vw, 38px); margin: 0; font-weight: 400; color: var(--text); }

/* пустой чат — приветствие и поле ввода по центру */
body.empty .thread { flex: 0 1 auto; display: flex; align-items: flex-end; justify-content: center; min-height: 40vh; padding-bottom: 28px; }
body.empty .composer-wrap { flex: 1; align-items: flex-start; }
body.empty .disclaimer { display: none; }
body:not(.empty) .welcome { display: none; }

/* ===== сообщения ===== */
.msg { margin: 0 0 26px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.bubble { max-width: 85%; background: var(--user-bubble); border: 1px solid #262626; padding: 10px 16px; border-radius: 20px 20px 6px 20px; }
.u-text { white-space: pre-wrap; word-break: break-word; }
.msg-files { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px; margin-bottom: 8px; max-width: 85%; }
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; color: var(--muted); font-size: 12.5px; }
.msg:hover .msg-actions, .msg.assistant:last-child .msg-actions { opacity: 1; }
.msg.streaming .msg-actions { opacity: 0 !important; }
.msg-actions .time { padding: 0 8px; }
.act { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); }
.act:hover { background: var(--hover); color: var(--text); }
.act.done { color: var(--ok); }
.m-model { color: var(--muted); padding-left: 8px; }

/* редактирование своего сообщения */
.edit-box { width: min(100%, 680px); background: var(--surface); border: 1px solid var(--accent); border-radius: 16px; padding: 10px 12px; }
.edit-box textarea { width: 100%; background: transparent; border: 0; outline: 0; resize: none; min-height: 60px; font-size: 15px; line-height: 1.5; }
.edit-box .row-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.a-body { font-family: var(--serif); font-size: 17px; line-height: 1.7; word-break: break-word; color: #e9e6e0; }
.a-body > :first-child { margin-top: 0; }
.a-body > :last-child { margin-bottom: 0; }
.a-body h1, .a-body h2, .a-body h3, .a-body h4 { font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 1.3em 0 .5em; color: var(--text); }
.a-body h1 { font-size: 1.45em; } .a-body h2 { font-size: 1.28em; } .a-body h3 { font-size: 1.12em; }
.a-body p { margin: 0 0 .95em; }
.a-body strong { color: #fff; font-weight: 600; }
.a-body ul, .a-body ol { padding-left: 1.5em; margin: 0 0 .95em; }
.a-body li { margin: .3em 0; }
.a-body li::marker { color: var(--accent); }
.a-body blockquote { margin: 0 0 .95em; padding: 2px 14px; border-left: 3px solid var(--accent); color: var(--text-2); }
.a-body hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.a-body table { border-collapse: collapse; margin: 0 0 1em; font-family: var(--sans); font-size: 14px; display: block; overflow-x: auto; max-width: 100%; }
.a-body th, .a-body td { border: 1px solid var(--border-strong); padding: 7px 11px; text-align: left; }
.a-body th { background: var(--surface-2); font-weight: 600; }
.a-body a { color: var(--accent); text-underline-offset: 2px; }
.a-body :not(pre) > code { font-family: var(--mono); font-size: .82em; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; color: #ffb27a; }

/* блоки кода */
.a-body pre { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: 14px; margin: 0 0 1.1em; overflow: hidden; }
.a-body pre code { display: block; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); color: #e6e6e6; background: transparent; }
.a-body pre code.hljs { background: transparent; padding: 14px 16px; }
.code-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; background: #151515; border-bottom: 1px solid var(--border); font: 12.5px var(--sans); color: var(--muted); }
.code-bar .lang { flex: 1; }
.code-bar button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; padding: 4px 8px; border-radius: 7px; }
.code-bar button:hover { background: var(--hover); color: var(--text); }
.code-bar button.done { color: var(--ok); }
.code-bar button.pv { color: var(--accent); }

.gen-img img { max-width: min(100%, 520px); border-radius: 14px; display: block; border: 1px solid var(--border); }
.img-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--sans); font-size: 14px; }
.thinking { display: inline-flex; gap: 5px; padding: 8px 0; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .3; animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
/* мигающий курсор в конце печатаемого текста */
.msg.streaming .a-body .caret { display: inline-block; width: 9px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; background: var(--accent); border-radius: 2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.msg.error .err { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.link { border: 0; background: none; color: inherit; text-decoration: underline; padding: 0; font-weight: 600; }

/* ===== карточки файлов ===== */
.file-card { position: relative; display: flex; align-items: center; gap: 10px; width: 230px; max-width: 100%; padding: 8px 10px 8px 8px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; text-decoration: none; color: var(--text); text-align: left; overflow: hidden; }
a.file-card:hover { border-color: #4a4a4a; background: var(--surface-2); }
.fc-icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; flex: none; font: 700 10.5px/1 var(--sans); letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255, 122, 26, .25); text-transform: uppercase; overflow: hidden; }
.fc-icon img { width: 100%; height: 100%; object-fit: cover; }
.fc-icon.arch { background: rgba(255, 196, 0, .1); color: #ffc400; border-color: rgba(255, 196, 0, .25); }
.fc-icon.doc { background: rgba(90, 150, 255, .1); color: #7aa7ff; border-color: rgba(90, 150, 255, .25); }
.fc-text { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.fc-text b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-text small.warn { color: #e0a33a; }
.fc-text small.bad { color: var(--danger); }
.fc-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #2a2a2a; color: var(--text-2); font-size: 11px; display: grid; place-items: center; opacity: 0; }
.file-card:hover .fc-x { opacity: 1; }
.fc-prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .15s; }
.file-card.img-card { width: auto; padding: 0; border-radius: 12px; }
.file-card.img-card img { display: block; height: 120px; max-width: 240px; object-fit: cover; }

/* ===== композер ===== */
.composer-wrap { flex: none; display: flex; flex-direction: column; align-items: center; padding: 0 20px 10px; }
.composer { width: 100%; max-width: 780px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 12px 10px 16px; transition: border-color .15s; }
.composer:focus-within { border-color: #4a4a4a; }
.att-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-right: 4px; }
.att-row .file-card { flex: none; width: 210px; }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; line-height: 1.5; max-height: 280px; padding: 4px 0; }
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.composer-bar .left, .composer-bar .right { display: flex; align-items: center; gap: 6px; }
.attach { margin-left: -8px; border: 1px solid var(--border-strong); border-radius: 10px; width: 32px; height: 32px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 9px; padding: 5px 8px; font-size: 13px; color: var(--text-2); }
.model-picker { position: relative; }
.model-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 6px 8px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); }
.model-btn:hover { background: var(--hover); color: var(--text); }
.model-menu { position: absolute; right: 0; bottom: calc(100% + 8px); width: 290px; max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
body.empty .model-menu { bottom: auto; top: calc(100% + 8px); }
.mm-label { font-size: 11.5px; color: var(--muted); padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: .05em; }
.mm-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; text-align: left; }
.mm-item:hover { background: var(--hover); }
.mm-item b { font-weight: 500; font-size: 14px; display: block; }
.mm-item small { color: var(--muted); font-size: 12px; }
.mm-item i { color: var(--accent); font-style: normal; }
.mm-item em { font-style: normal; font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.mm-item.locked b { color: var(--muted); }
.send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; }
.send:hover:not(:disabled) { background: var(--accent-hover); }
.send:disabled { opacity: .3; cursor: default; }
body.busy .send svg { display: none; }
body.busy .send::before { content: ""; width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
.disclaimer { font-size: 12px; color: var(--muted); padding-top: 8px; text-align: center; }
.drop-zone { position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 20px; background: rgba(11, 11, 11, .85); display: grid; place-items: center; z-index: 80; font-size: 18px; color: var(--accent); pointer-events: none; }

/* ===== окна ===== */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; padding: 16px; z-index: 100; }
.modal-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-card.wide { max-width: 940px; }
.modal-card h2 { margin: 0 0 18px; font-size: 28px; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-card.preview { max-width: 1200px; height: 88vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); }
.preview iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan { position: relative; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 16px; padding: 20px; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.plan .price { font-size: 22px; font-weight: 700; margin: 6px 0 8px; color: var(--accent); }
.plan p { color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.plan ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.plan li { margin: 4px 0; }
.badge { position: absolute; top: 16px; right: 16px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.pay-info { margin-top: 18px; background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 14px; padding: 14px 18px; font-size: 14px; }
.pay-info:empty { display: none; }
.pay-info p { margin: 0 0 6px; } .pay-info p:last-child { margin: 0; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #f2f2f2; color: #111; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 200; box-shadow: var(--shadow); max-width: 90vw; }
.scrim { display: none; }

@media (max-width: 860px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; margin-left: -280px; width: 280px; box-shadow: var(--shadow); }
  body.sb-open .sidebar { margin-left: 0; }
  body.sb-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; }
  #sbOpen { display: inline-grid !important; }
  .thread { padding: 8px 16px 20px; }
  .composer-wrap { padding: 0 10px calc(8px + env(safe-area-inset-bottom)); }
  .a-body { font-size: 16.5px; }
  .bubble, .msg-files { max-width: 92%; }
  .ci-btn { display: block; }
  .msg-actions { opacity: 1; }
  .model-menu { width: min(290px, calc(100vw - 32px)); }
  .logo.xl { font-size: 36px; }
}

/* ===== админка ===== */
body.admin { min-height: 100vh; }
.adm-top { display: flex; align-items: center; gap: 18px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--sidebar); flex-wrap: wrap; }
.adm-top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.adm-top nav a { text-decoration: none; color: var(--text-2); padding: 6px 12px; border-radius: 9px; font-size: 14px; }
.adm-top nav a:hover { background: var(--hover); }
.adm-top nav a.on { background: var(--accent-soft); color: var(--accent); }
.adm { max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
.adm h1 { font-size: 28px; margin: 0 0 18px; }
.adm h2 { font-size: 19px; margin: 26px 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 26px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl input, .tbl select { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); width: 100%; min-width: 60px; }
.tbl code { color: #ffb27a; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1; min-width: 160px; margin: 0; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.inline { display: inline; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* ===== фото ===== */
.gen-img { display: block; padding: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; overflow: hidden; cursor: zoom-in; max-width: min(100%, 520px); }
.gen-img img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; max-width: none; }
.file-card.img-card { width: auto; padding: 0; border-radius: 14px; cursor: zoom-in; background: var(--surface); }
.file-card.img-card img { display: block; height: 160px; width: auto; max-width: 280px; min-width: 80px; object-fit: cover; }
.img-broken { display: inline-block; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--text-2); font: 14px var(--sans); }
.lightbox { background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 82vh; border-radius: 10px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-bar { display: flex; gap: 10px; cursor: default; }

/* ===== светлая тема ===== */
:root[data-theme="light"] {
  --bg: #f7f5f0; --sidebar: #efece5; --surface: #ffffff; --surface-2: #f1eee7; --hover: #e9e5db;
  --border: #e4dfd4; --border-strong: #d4cdbe; --text: #26231d; --text-2: #55514a; --muted: #8c877c;
  --accent: #e8640a; --accent-hover: #cf580a; --accent-soft: rgba(232, 100, 10, .12); --accent-text: #ffffff;
  --user-bubble: #ece8df; --code-bg: #faf8f4; --danger: #c43c2a; --danger-soft: rgba(196,60,42,.1); --ok: #1f9e5f;
  --shadow: 0 1px 2px rgba(40,35,20,.05), 0 8px 26px rgba(40,35,20,.08); color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f5f0; --sidebar: #efece5; --surface: #ffffff; --surface-2: #f1eee7; --hover: #e9e5db;
    --border: #e4dfd4; --border-strong: #d4cdbe; --text: #26231d; --text-2: #55514a; --muted: #8c877c;
    --accent: #e8640a; --accent-hover: #cf580a; --accent-soft: rgba(232, 100, 10, .12); --accent-text: #ffffff;
    --user-bubble: #ece8df; --code-bg: #faf8f4; --danger: #c43c2a; --danger-soft: rgba(196,60,42,.1); --ok: #1f9e5f;
    --shadow: 0 1px 2px rgba(40,35,20,.05), 0 8px 26px rgba(40,35,20,.08); color-scheme: light;
  }
}
:root[data-theme="light"] .a-body pre code, :root[data-theme="light"] .term-body { color: #2a2a2a; }

/* ===== настройки: шрифт/размер/ширина ===== */
html.font-sans .a-body { font-family: var(--sans); }
html.size-small .a-body { font-size: 15px; }
html.size-medium .a-body { font-size: 17px; }
html.size-large .a-body { font-size: 19px; }
html.size-small .bubble, html.size-small .u-text { font-size: 14px; }
html.size-large .bubble, html.size-large .u-text { font-size: 16.5px; }
html.width-narrow .messages, html.width-narrow .composer, html.width-narrow .welcome, html.width-narrow .project-head { max-width: 780px; }
html.width-medium .messages, html.width-medium .composer, html.width-medium .welcome, html.width-medium .project-head { max-width: 900px; }
html.width-wide .messages, html.width-wide .composer, html.width-wide .welcome, html.width-wide .project-head { max-width: 1080px; }
html.reduce-anim * { animation-duration: .001s !important; transition-duration: .001s !important; }
html.reduce-anim .caret { animation: none; }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-l b { display: block; font-weight: 500; }
.set-l small { color: var(--muted); font-size: 12.5px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: 6px 12px; border-radius: 8px; font-size: 13.5px; display: inline-grid; place-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
:root[data-theme="light"] .seg button.on { background: #fff; }
.seg.mini { margin: 0 0 12px; }

/* ===== сайдбар: проекты и прокрутка ===== */
.sb-scroll { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.sb-section { margin-bottom: 4px; }
.sb-label { display: flex; align-items: center; justify-content: space-between; }
.sb-add { border: 0; background: transparent; color: var(--muted); width: 22px; height: 22px; border-radius: 6px; font-size: 16px; line-height: 1; }
.sb-add:hover { background: var(--hover); color: var(--text); }
.proj-item a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--text-2); text-decoration: none; font-size: 14px; border-radius: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-item a svg { flex: none; color: var(--accent); }
.proj-item:hover a, .proj-item.active a { background: var(--hover); color: var(--text); }

/* ===== шапка проекта ===== */
.project-head { max-width: 780px; margin: 0 auto 10px; padding: 8px 0 18px; border-bottom: 1px solid var(--border); }
.ph-top { display: flex; align-items: center; gap: 12px; }
.ph-top h1 { font-size: 26px; margin: 0; flex: 1; }
.project-head p { margin: 6px 0 0; font-size: 13.5px; }
.ph-chats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ph-chats .pc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; font-size: 13.5px; text-decoration: none; color: var(--text); }
.ph-chats .pc:hover { border-color: var(--accent); }
body.in-project .welcome { display: none; }

/* ===== серверный выбор в композере ===== */
.srv-picker { position: relative; }
.srv-btn { display: inline-flex; align-items: center; gap: 5px; }
.srv-btn.active { border-color: var(--accent); color: var(--accent); }
.srv-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 280px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
body.empty .srv-menu, body.in-project .srv-menu { bottom: auto; top: calc(100% + 8px); }
.srv-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; text-align: left; }
.srv-item:hover { background: var(--hover); }
.srv-item b { font-weight: 500; font-size: 14px; display: block; }
.srv-item small { color: var(--muted); font-size: 12px; }
.srv-item i { color: var(--accent); font-style: normal; }
.srv-mode { padding: 8px 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.srv-mode.off { opacity: .45; pointer-events: none; }
.srv-mode label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin: 0; cursor: pointer; }
.srv-mode input { width: auto; margin: 0; }
.srv-mode small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; padding-left: 24px; }
.srv-manage { width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: 13px; border-top: 1px solid var(--border); margin-top: 4px; }
.srv-manage:hover { background: var(--hover); color: var(--text); }

/* ===== терминальные карточки ===== */
.msg.tool { margin-bottom: 22px; }
.term-card { background: var(--code-bg); border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; margin: 2px 0; max-width: 100%; }
.term-card.cmd { margin: 0 0 1em; }
.term-head { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: rgba(255,122,26,.07); border-bottom: 1px solid var(--border); font: 12.5px var(--sans); color: var(--text-2); }
.term-head .cp { border: 0; background: transparent; color: var(--text-2); padding: 2px; border-radius: 6px; display: inline-grid; place-items: center; }
.term-head .cp:hover { background: var(--hover); color: var(--text); }
.term-head .cp.done { color: var(--ok); }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.term-card.result.ok .tdot { background: var(--ok); }
.term-card.result.bad .tdot { background: var(--danger); }
.term-card.pending .tdot { background: #e8b23a; animation: blink 1.2s infinite; }
.term-card.pending.danger .term-head { background: var(--danger-soft); color: var(--danger); }
.term-cmd { font: 13px/1.5 var(--mono); padding: 10px 14px; color: var(--accent); white-space: pre-wrap; word-break: break-all; border-bottom: 1px solid var(--border); }
.term-body { margin: 0; background: transparent; border: 0; border-radius: 0; }
.term-body code { display: block; padding: 10px 14px; font: 12.5px/1.55 var(--mono); color: #d6d3cc; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; background: transparent; }
.pend-btns { display: flex; gap: 8px; padding: 12px 14px; }
.run-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; padding: 4px 2px; margin-bottom: 14px; }

/* ===== серверы: модалки ===== */
.srv-cards { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 16px; }
.srv-card { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; }
.sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-main b { font-weight: 500; }
.sc-main small { color: var(--muted); font-size: 12.5px; }
.sc-main .pill { align-self: flex-start; margin-top: 4px; }
.sc-btns { display: flex; gap: 6px; flex: none; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.pill.ok { background: var(--accent-soft); color: var(--accent); } .pill.bad { background: var(--danger-soft); color: var(--danger); }
.row2 { display: flex; gap: 10px; } .row2 label { flex: 1; }
.row-btns { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.se-result { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font: 13px/1.5 var(--mono); white-space: pre-wrap; background: var(--surface-2); color: var(--text-2); max-height: 160px; overflow: auto; }
.se-result.ok { background: var(--accent-soft); color: var(--accent); } .se-result.bad { background: var(--danger-soft); color: var(--danger); }
.modal-card textarea { font-family: var(--mono); font-size: 13px; resize: vertical; }

/* кнопка «Новый проект» в сайдбаре */
.new-chat.ghost { color: var(--text-2); font-weight: 500; }
.new-chat.ghost:hover { color: var(--text); }
.plus.pj { background: transparent; border: 1px solid var(--border-strong); color: var(--accent); border-radius: 7px; }

/* гостевой режим */
.guest-cta { display:block; margin:2px 4px 6px; padding:9px 10px; background:var(--accent); color:var(--accent-text)!important; border-radius:9px; font-weight:600; font-size:13.5px; text-align:center; text-decoration:none; }
.guest-cta:hover { background:var(--accent-hover); }
#guestRegister, #guestLogin { text-decoration:none; }

/* несколько чатов в проекте */
.ph-multi { margin:14px 0 4px; background:var(--surface); border:1px solid var(--border-strong); border-radius:12px; padding:12px; }
.ph-multi textarea { width:100%; border:1px solid var(--border); border-radius:9px; background:var(--bg); color:var(--text); padding:9px 11px; font:14px/1.5 var(--sans); resize:vertical; min-height:92px; outline:none; }
.ph-multi textarea:focus { border-color:var(--accent); }
.ph-multi .row-btns { margin-top:10px; align-items:center; }

/* кнопка ZIP в действиях сообщения */
.act.zipbtn { color:var(--accent); }
.act.zipbtn:hover { background:var(--accent-soft); }

/* Interface matched to the supplied desktop reference. */
:root, :root[data-theme="dark"] {
  --bg:#141414; --sidebar:#111111; --surface:#212121; --surface-2:#262626;
  --hover:#2b2b2b; --border:#292929; --border-strong:#353535;
  --text:#f1f0ee; --text-2:#c3c1bb; --muted:#85847f;
  --accent:#c6c3bb; --accent-hover:#e3e0d9; --accent-soft:rgba(200,196,186,.10); --accent-text:#191919;
  --user-bubble:#212121; --code-bg:#191919;
  --sans:Arial,"Segoe UI",sans-serif; --serif:Georgia,"Times New Roman",serif;
  --shadow:0 8px 32px rgba(0,0,0,.22); color-scheme:dark;
}
body.app { font-size:14px; line-height:1.5; }
.sidebar { width:288px; padding:4px 10px 0; border-right:1px solid var(--border); }
body.sb-hidden .sidebar { margin-left:-288px; }
.sb-top { height:32px; padding:0 4px 3px; gap:8px; }
.sb-history { display:flex; gap:2px; align-items:center; }
.sb-top .icon-btn { width:28px; height:26px; border-radius:5px; }
.sb-top svg,.sb-navigation svg,.sb-search svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.sb-top .logo { padding:0; background:none; color:var(--text-2); font-size:17px; font-weight:600; letter-spacing:-1px; border-radius:0; }
.sb-search { display:flex; align-items:center; gap:7px; height:27px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface); padding:0 8px; margin:8px 2px 7px 0; color:var(--muted); }
.sb-search input { width:100%; min-width:0; padding:0; margin:0; border:0; border-radius:0; background:transparent; font:13px var(--sans); outline:none; box-shadow:none; }
.sb-search:focus-within { border-color:#66635c; }
.sb-search input:focus { box-shadow:none; }
.sb-navigation { padding-bottom:12px; }
.new-chat { height:27px; padding:4px 8px; gap:9px; font-size:13px; font-weight:400; border-radius:5px; line-height:19px; text-decoration:none; }
.new-chat .plus { width:18px; height:18px; background:var(--hover); color:var(--text-2); font-size:19px; font-weight:400; margin-left:-1px; margin-right:-1px; }
.nav-badge { font-size:10px; background:var(--surface-2); padding:0 4px; border-radius:3px; line-height:15px; margin-left:0; }
#moreNav { padding-left:25px; margin-top:3px; }
.sb-scroll { margin:0 -4px; padding:0 4px; scrollbar-color:#5d5c58 transparent; }
.sb-label { padding:16px 8px 6px; font-size:12px; font-weight:400; color:var(--muted); }
.chat-list { margin:0; padding:0; overflow:visible; }
.chat-item { border-radius:5px; min-height:27px; }
.chat-item a { display:flex; gap:6px; align-items:center; padding:4px 8px; font-size:13px; line-height:19px; }
.chat-row-title,.project-row-title { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; flex:1; }
.chat-file-icon { width:13px; height:15px; flex:none; fill:none; stroke:var(--muted); stroke-width:1.2; }
.chat-item.active { background:#333331; }
.chat-item.active a { font-weight:500; }
.chat-item:hover .chat-file-icon { display:none; }
.ci-btn { padding:2px 4px; width:23px; flex:none; }
.proj-item a { padding:4px 8px; height:27px; font-size:13px; font-weight:400; gap:8px; border-radius:5px; }
.project-number { width:16px; height:16px; border:1px solid var(--border-strong); border-radius:3px; text-align:center; font-size:10px; line-height:14px; flex:none; }
.project-children { border-left:1px solid var(--border); margin-left:16px; margin-bottom:3px; padding-left:13px; }
.nested-chat a { padding-left:6px; }
.empty-list { padding:6px 8px; font-size:12px; }
.sb-bottom { margin:0 -10px; padding:3px 8px 5px; border-top:1px solid var(--border); }
.user-card { padding:5px 4px; gap:7px; border-radius:5px; }
.avatar { width:21px; height:21px; background:var(--hover); color:var(--text); font-size:10px; }
.uc-text { flex-direction:row; gap:5px; align-items:baseline; }
.uc-text b { font-size:13px; }
.uc-text small { font-size:12px; }
.uc-text small::before { content:'· '; }
.user-card>svg { width:12px; height:12px; margin-right:auto; }
.menu { left:8px; right:8px; border-radius:10px; }
.topbar { height:38px; padding:0 24px; gap:10px; }
.top-home { color:var(--text); text-decoration:none; font-size:14px; }
.top-divider { color:var(--muted); font-size:18px; }
.chat-title { color:var(--text); font-size:14px; }
.chat-title:empty::before { content:'Новый чат'; color:var(--text-2); }
.topbar .icon-btn { height:28px; width:28px; border-radius:6px; }
.topbar .btn.sm { padding:3px 10px; border-radius:6px; font-size:13px; }
.share-btn { background:var(--hover); border:0; }
.thread { padding:0 24px 28px; scrollbar-color:#5d5c58 transparent; }
.messages,.welcome,.project-head,html.width-narrow .messages,html.width-narrow .composer,html.width-narrow .welcome,html.width-narrow .project-head { max-width:768px; }
.msg { margin-bottom:32px; }
.bubble { border:0; border-radius:14px; padding:12px 16px; max-width:81%; font-size:14px; line-height:1.5; }
.a-body,html.size-medium .a-body { font-size:16px; line-height:1.4; color:var(--text); }
.a-body strong { color:var(--text); }
.msg-actions { margin-top:12px; gap:0; }
.act { width:25px; height:25px; border-radius:5px; }
.m-model,.msg-actions .time { font-size:11px; }
.composer-wrap { padding:0 24px 8px; position:relative; }
.composer { position:relative; padding:8px 12px; border-radius:16px; background:var(--surface); box-shadow:none; margin-bottom:38px; }
.composer textarea { padding:4px 0; min-height:29px; font-size:14px; line-height:1.6; }
.composer-bar { position:absolute; top:calc(100% + 5px); left:4px; right:4px; margin:0; height:30px; }
.attach { border:0; background:transparent; margin:0; width:26px; height:26px; border-radius:5px; }
.chip { padding:3px 6px; font-size:12px; border-radius:5px; }
.model-btn { font-size:13px; padding:4px 6px; font-weight:500; }
.send { width:27px; height:27px; border-radius:50%; background:transparent; color:var(--text-2); border:1.5px solid var(--border-strong); }
.send:not(:disabled) { background:var(--text); color:var(--bg); border-color:var(--text); }
.send:disabled { opacity:.45; }
.disclaimer { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); font-size:12px; padding:0; white-space:nowrap; pointer-events:none; }
body.empty .thread { min-height:38vh; padding-bottom:24px; }
body.empty .composer-wrap { align-items:center; }
body.empty .welcome { gap:18px; }
.welcome .logo.xl { background:transparent; color:var(--text-2); box-shadow:none; font-size:36px; padding:0; border-radius:0; }
.welcome h1 { font-size:32px; }
body.empty .disclaimer { display:block; position:static; transform:none; margin-top:12px; }
body.empty .composer { margin-bottom:38px; }
.term-head { background:var(--surface-2); }
.modal-card { border-radius:14px; }
.btn,.seg,.chip { border-radius:7px; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.artifact-grid { display:flex; flex-wrap:wrap; gap:12px; }
.empty-artifacts { padding:24px 0; color:var(--muted); font-size:14px; }
@media(min-width:861px) { body:not(.empty) .messages { padding-top:12px; } }
@media(max-width:1100px) { body:not(.empty) .disclaimer { display:none; } }
@media(max-width:860px) {
 .sidebar { width:288px; margin-left:-288px; }
 body.sb-hidden .sidebar { margin-left:-288px; }
 body.sb-open .sidebar { margin-left:0; }
 .topbar { padding:0 12px; height:44px; }
 .thread { padding:4px 16px 20px; }
 .composer-wrap { padding:0 12px calc(8px + env(safe-area-inset-bottom)); }
 .composer { margin-bottom:37px; border-radius:14px; }
 .chat-item .ci-btn { display:none; }
 .chat-item:focus-within .ci-btn,.chat-item:hover .ci-btn { display:block; }
 .bubble { max-width:92%; }
 .welcome h1 { font-size:28px; }
 .project-head .ph-top { flex-wrap:wrap; gap:8px; }
 .ph-top h1 { flex-basis:100%; }
 .set-row { flex-wrap:wrap; gap:8px; }
 .topbar .top-home,.topbar .top-divider { display:none; }
 .share-btn { display:none; }
 .a-body,html.size-medium .a-body { font-size:16px; line-height:1.5; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }

.composer textarea { display:block; }
.chat-item:focus-within .ci-btn { display:block; }
.chat-item:focus-within .chat-file-icon { display:none; }

body.empty .messages { display:none; }
body.empty .welcome { width:100%; }

/* Original ollo branding across the application and account pages. */
.logo, .sb-top .logo {
 background:#ff7a1a; color:#0b0b0b;
 font:800 17px/1 var(--sans); letter-spacing:-.055em;
 padding:6px 9px 7px 8px; border-radius:9px;
}
.logo.lg { font-size:24px; padding:8px 12px 9px 11px; border-radius:12px; }
.logo.xl, .welcome .logo.xl {
 background:#ff7a1a; color:#0b0b0b; font-size:44px;
 padding:11px 18px 14px 16px; border-radius:18px;
 box-shadow:0 10px 50px rgba(255,122,26,.25);
}
.sb-top .logo { font-size:15px; padding:4px 7px 5px 6px; border-radius:6px; }
.top-home { display:inline-flex; align-items:center; justify-content:center;
 background:#ff7a1a; color:#0b0b0b; font:800 15px/1 var(--sans);
 letter-spacing:-.055em; padding:4px 7px 5px 6px; border-radius:6px;
}
@media(max-width:860px) { .welcome .logo.xl { font-size:36px; } }
/* Account access stays inside the chat interface. */
.auth-dialog { max-width:440px; padding:28px; }
.auth-dialog h2 { margin:20px 0 8px; font-size:27px; }
.auth-dialog>p { font-size:13px; margin:0 0 18px; }
.auth-dialog .btn.primary { background:#ff7a1a; border-color:#ff7a1a; color:#0b0b0b; }
.social-buttons { display:grid; gap:8px; }
.social-buttons form { margin:0; }
.social-btn { width:100%; justify-content:flex-start; min-height:42px; font-size:13px; gap:10px; }
.social-btn:disabled { opacity:.5; cursor:default; }
.social-btn small { margin-left:auto; color:var(--muted); font-size:10px; }
.social-mark { width:24px; font-weight:700; font-size:17px; text-align:center; }
.social-mark.google { color:#4285f4; }
.social-mark.yandex { color:#fc3f1d; }
.social-mark.github { font-size:12px; }
.auth-divider { display:flex; align-items:center; gap:12px; color:var(--muted); margin:18px 0; font-size:12px; }
.auth-divider::before,.auth-divider::after { content:''; flex:1; height:1px; background:var(--border-strong); }
.text-link { border:0; background:none; padding:0; color:var(--text); text-decoration:underline; font:inherit; }
.auth-dialog .center { margin:16px 0 0; }
.logout-form { margin:0; }
.logout-form button { width:100%; text-align:left; padding:8px 10px; border:0; border-radius:8px; background:none; font-size:14px; }
.logout-form button:hover { background:var(--hover); }
@media(max-width:480px) { .auth-dialog { padding:24px 18px; } }
