/* Emglare // Code — vzhled podle Mac aplikace Workspace (barvy Brand z Theme.swift, oranžový akcent, jemné linky)
   a rozložení inspirované aplikacemi Claude a ChatGPT: postranní panel s projekty a konverzacemi, chat uprostřed,
   pole pro zprávu dole s výběrem modelu. Světlý i tmavý režim podle systému. */

@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Book.otf') format('opentype'); font-weight: 300 450; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Medium.otf') format('opentype'); font-weight: 500 550; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Bold.otf') format('opentype'); font-weight: 600 800; font-display: swap; }

:root {
  --orange: #f18c15; --orange-dark: #db7713; --orange-soft: #fdf1e3; --orange-text: #c56a0a;
  --ink: #17191c; --green: #1aa053; --green-soft: #e3f5ea; --red: #e34948; --red-soft: #fdeaea; --blue: #2a78d6; --blue-soft: #e6f0fb; --yellow: #c28a00; --yellow-soft: #fbf3dc;
  --bg: #ffffff; --bg-subtle: #f7f8f9; --surface: #ffffff; --field: #f3f4f6; --hover: #f1f2f4; --selected: #fff3e6;
  --text: #17191c; --text2: #4b5260; --text3: #8a8f96; --hairline: #eef0f2; --border: #e3e5e8; --check: #b9bec6;
  --code-bg: #f6f7f9; --code-head: #eceef1;
  --shadow: 0 1px 2px rgba(23,25,28,.04), 0 6px 24px rgba(23,25,28,.06);
  --shadow-pop: 0 10px 40px rgba(23,25,28,.16), 0 2px 6px rgba(23,25,28,.06);
  --r: 10px; --r-l: 14px; --r-xl: 22px;
  --side-w: 276px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand-font: 'Gotham', Poppins, var(--font);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --orange-soft: #3a2a17; --orange-text: #f5a54a; --green-soft: #17311f; --red-soft: #3a1d1d; --blue-soft: #18283c; --yellow-soft: #33290f;
    --bg: #1b1d20; --bg-subtle: #222428; --surface: #25282c; --field: #2b2e33; --hover: #2a2d31; --selected: #33291f;
    --text: #eceef0; --text2: #b4b9c1; --text3: #858a92; --hairline: #303338; --border: #3a3e44; --check: #6b7078;
    --code-bg: #202226; --code-head: #2a2d32;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 6px 24px rgba(0,0,0,.25);
    --shadow-pop: 0 12px 44px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--orange-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(241,140,21,.25); }
.muted { color: var(--text3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 15px; height: 15px; }
svg.i.xs { width: 13px; height: 13px; }

.boot { height: 100%; display: grid; place-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--orange); animation: spin .8s linear infinite; display: inline-block; }
.spinner.s { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ——— rozložení ——— */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.side { width: var(--side-w); flex: none; background: var(--bg-subtle); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; min-height: 0; transition: margin-left .2s ease; }
.app.side-hidden .side { margin-left: calc(-1 * var(--side-w)); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }
.side-scrim { display: none; }

/* ——— postranní panel ——— */
.sb-top { display: flex; align-items: center; gap: 10px; padding: 14px 12px 8px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; min-width: 0; }
.logo-chip { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #f7a03c, #f18c15 55%, #db7713); display: grid; place-items: center; flex: none; box-shadow: 0 3px 10px rgba(241,140,21,.35); }
.logo-chip img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.brand b { font: 600 15px/1.1 var(--brand-font); letter-spacing: -.01em; display: block; }
.brand small { display: block; font: 500 9.5px/1.2 var(--brand-font); letter-spacing: .16em; color: var(--orange-text); text-transform: uppercase; margin-top: 2px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--text2); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.on { color: var(--orange-text); }
.sb-new { margin: 6px 12px 6px; display: flex; gap: 6px; }
.btn-new { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.btn-new:hover { border-color: var(--check); }
.btn-new kbd { margin-left: auto; font: 11px var(--mono); color: var(--text3); }
.sb-search { margin: 4px 12px 8px; position: relative; }
.sb-search input { width: 100%; padding: 7px 10px 7px 32px; border-radius: 9px; border: 1px solid transparent; background: var(--field); outline: none; font-size: 13px; }
.sb-search input:focus { border-color: var(--orange); background: var(--surface); }
.sb-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 0 8px 12px; min-height: 0; }
.sb-section { margin-top: 12px; }
.sb-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; font-size: 11.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.sb-h button { opacity: .7; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--text2); cursor: pointer; text-decoration: none !important; font-size: 13.5px; min-width: 0; position: relative; user-select: none; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--selected); color: var(--text); font-weight: 500; }
.nav-item.active svg.i { color: var(--orange-text); }
.nav-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .badge { margin-left: auto; }
.nav-item .chev { color: var(--text3); transition: transform .15s; }
.nav-item.open .chev { transform: rotate(90deg); }
.nav-sub { padding-left: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text3); }
.dot.s { width: 7px; height: 7px; }
.company-h { padding: 8px 8px 3px; font-size: 12px; color: var(--text3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.conv-item .run { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
.conv-item .more { opacity: 0; }
.conv-item:hover .more, .conv-item.active .more { opacity: 1; }
.sb-bottom { border-top: 1px solid var(--hairline); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.runner-strip { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 6px; }
.runner-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); padding: 3px 8px; border-radius: 99px; background: var(--field); cursor: pointer; }
.runner-pill .st { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); }
.runner-pill.on .st { background: var(--green); box-shadow: 0 0 0 3px rgba(26,160,83,.15); }
.runner-pill.busy .st { background: var(--orange); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.me:hover { background: var(--hover); }
.me .who { flex: 1; min-width: 0; line-height: 1.25; }
.me .who b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--text3); font-size: 11.5px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: none; letter-spacing: .02em; }
.avatar.s { width: 22px; height: 22px; font-size: 10px; }
.avatar.l { width: 40px; height: 40px; font-size: 15px; }

/* ——— horní lišta ——— */
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 52px; border-bottom: 1px solid transparent; flex: none; }
.topbar.line { border-bottom-color: var(--hairline); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--text2); flex: 1; }
.crumbs a { color: var(--text2); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .sep { color: var(--check); }
.crumbs > * { flex: none; }
.crumbs .cur { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 40px; cursor: pointer; }
.crumbs a.nowrap { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs .cur[contenteditable="true"] { outline: none; border-bottom: 1px dashed var(--orange); }
.page { flex: 1; overflow-y: auto; min-height: 0; }
.page-in { max-width: 1080px; margin: 0 auto; padding: 8px 28px 48px; }
.page-in.narrow { max-width: 820px; }
h1.title { font: 600 24px/1.25 var(--brand-font); letter-spacing: -.015em; margin: 6px 0 4px; }
h2.sub { font-size: 15px; font-weight: 600; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.lead { color: var(--text2); margin: 0 0 18px; }

/* ——— tlačítka a prvky ——— */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13.5px; white-space: nowrap; color: var(--text); text-decoration: none !important; }
.btn:hover { border-color: var(--check); background: var(--hover); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 2px 8px rgba(241,140,21,.3); }
.btn.primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--field); color: var(--text2); white-space: nowrap; line-height: 17px; }
.badge.orange { background: var(--orange-soft); color: var(--orange-text); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 16px 18px; }
.card.hover:hover { border-color: var(--check); box-shadow: var(--shadow); cursor: pointer; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.empty { text-align: center; color: var(--text3); padding: 36px 16px; }
.empty svg.i { width: 34px; height: 34px; color: var(--check); margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text2); }
.field small { color: var(--text3); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); outline: none; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,140,21,.15); }
textarea.input { resize: vertical; min-height: 70px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { accent-color: var(--orange); width: 15px; height: 15px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--field); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin: 14px 0 16px; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--text2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--text); border-bottom-color: var(--orange); }
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th { text-align: left; font-weight: 500; color: var(--text3); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--hairline); }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--hover); }

/* ——— nabídky a dialogy ——— */
.menu { position: fixed; z-index: 60; min-width: 220px; max-width: 360px; max-height: min(520px, 70vh); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 5px; }
.menu .mi { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.menu .mi:hover, .menu .mi.focus { background: var(--hover); }
.menu .mi.on { background: var(--selected); }
.menu .mi .d { display: block; color: var(--text3); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.menu .mi .ok { margin-left: auto; color: var(--orange-text); }
.menu .mh { padding: 8px 10px 4px; font-size: 11.5px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.menu .sep { height: 1px; background: var(--hairline); margin: 5px 4px; }
.menu .mi.danger { color: var(--red); }
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(15,16,18,.42); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s ease; }
.modal.wide { width: min(880px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.modal-h h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.modal-b { padding: 8px 18px 14px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--hairline); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-pop); display: none; max-width: calc(100vw - 32px); }
@media (prefers-color-scheme: dark) { #toast { background: #3a3e44; } }

/* ——— chat ——— */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: auto; }
.thread { max-width: 800px; margin: 0 auto; padding: 18px 24px 24px; }
.msg { margin: 0 0 22px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .bubble { background: var(--field); border-radius: 18px 18px 6px 18px; padding: 10px 15px; max-width: min(85%, 640px); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.msg.user .meta { margin: 0 4px 5px; }
.msg .meta .eng { font-weight: 600; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; }
.eng-mark { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; flex: none; }
.eng-mark.claude { background: #d97757; } .eng-mark.codex { background: #10a37f; } .eng-mark.ella { background: linear-gradient(135deg, #7c5cff, #2a78d6); } .eng-mark.ollama { background: #4b5260; }
.msg .actions { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity .15s; }
.msg:hover .actions, .msg.last .actions { opacity: 1; }
.msg .actions .icon-btn { width: 28px; height: 28px; }
.answer { font-size: 15px; line-height: 1.65; word-wrap: break-word; overflow-wrap: anywhere; }
.answer > *:first-child { margin-top: 0; }
.answer > *:last-child { margin-bottom: 0; }
.answer p { margin: 0 0 12px; }
.answer h1, .answer h2, .answer h3, .answer h4 { font-weight: 600; line-height: 1.3; margin: 20px 0 8px; }
.answer h1 { font-size: 21px; } .answer h2 { font-size: 18px; } .answer h3 { font-size: 16px; } .answer h4 { font-size: 15px; }
.answer ul, .answer ol { margin: 0 0 12px; padding-left: 24px; }
.answer li { margin: 3px 0; }
.answer li > p { margin: 0; }
.answer blockquote { margin: 0 0 12px; padding: 2px 14px; border-left: 3px solid var(--border); color: var(--text2); }
.answer hr { border: 0; border-top: 1px solid var(--hairline); margin: 18px 0; }
.answer table { border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; display: block; overflow-x: auto; max-width: 100%; }
.answer th, .answer td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.answer th { background: var(--bg-subtle); font-weight: 600; }
.answer code { font-family: var(--mono); font-size: .86em; background: var(--field); padding: 1.5px 5px; border-radius: 5px; }
.answer a { text-decoration: underline; text-underline-offset: 2px; }
.code { margin: 0 0 14px; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: var(--code-bg); }
.code-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 12px; background: var(--code-head); font: 12px var(--mono); color: var(--text3); }
.code-h button { border: 0; background: transparent; color: var(--text2); cursor: pointer; font: 12px var(--font); display: inline-flex; gap: 5px; align-items: center; padding: 3px 7px; border-radius: 6px; }
.code-h button:hover { background: var(--hover); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font: 13px/1.55 var(--mono); }
.code pre code { background: none; padding: 0; font-size: inherit; }
.cursor-host > :last-child::after { content: ''; display: inline-block; width: 8px; height: 15px; background: var(--orange); border-radius: 2px; vertical-align: -2px; margin-left: 2px; animation: pulse 1s ease-in-out infinite; }
.thinking { margin: 0 0 12px; border-left: 2px solid var(--border); padding-left: 12px; }
.thinking summary { cursor: pointer; color: var(--text3); font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.thinking summary::-webkit-details-marker { display: none; }
.thinking[open] summary svg { transform: rotate(90deg); }
.thinking .tx { color: var(--text2); font-size: 13.5px; white-space: pre-wrap; margin-top: 6px; max-height: 360px; overflow-y: auto; line-height: 1.55; }
.tool { margin: 0 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-subtle); font-size: 13px; overflow: hidden; }
.tool > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 11px; cursor: pointer; user-select: none; min-width: 0; }
.tool > summary::-webkit-details-marker { display: none; }
.tool .nm { font-weight: 600; flex: none; }
.tool .arg { color: var(--text2); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tool .st { flex: none; }
.tool .st.ok { color: var(--green); } .tool .st.err { color: var(--red); }
.tool pre { margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); font: 12px/1.5 var(--mono); max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--surface); }
.tools-group { margin: 0 0 10px; }
.tools-more { font-size: 12.5px; color: var(--text3); cursor: pointer; padding: 2px 0 6px; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--text3); font-size: 13px; margin: 4px 0 8px; }
.err-box { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin: 6px 0; }
.git-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0 4px; background: var(--surface); }
.git-card .h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.git-card .files { margin: 8px 0 10px; font: 12.5px/1.7 var(--mono); max-height: 180px; overflow-y: auto; }
.git-card .files .add { color: var(--green); } .git-card .files .del { color: var(--red); }
.usage { font-size: 11.5px; color: var(--text3); }
.empty-chat { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }

/* ——— pole pro zprávu ——— */
.composer-wrap { padding: 0 24px 18px; flex: none; }
.composer { max-width: 800px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 10px 10px 8px 16px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--check); box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 10px 32px rgba(23,25,28,.09); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; background: transparent; font-size: 15px; line-height: 1.5; max-height: 40vh; min-height: 26px; padding: 4px 0 6px; display: block; }
.composer textarea::placeholder { color: var(--text3); }
.composer .bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border); background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text2); max-width: 260px; }
.pill:hover { background: var(--hover); color: var(--text); }
.pill .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.on { background: var(--orange-soft); border-color: transparent; color: var(--orange-text); }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; display: grid; place-items: center; cursor: pointer; margin-left: auto; flex: none; transition: transform .1s, background .15s; }
.send:hover { background: var(--orange-dark); }
.send:disabled { background: var(--border); color: var(--text3); cursor: default; }
.send.stop { background: var(--text); }
.send svg.i { stroke-width: 2.2; }
.hint { max-width: 800px; margin: 6px auto 0; text-align: center; font-size: 11.5px; color: var(--text3); }
.home-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 24px 8vh; min-height: 0; overflow-y: auto; }
.home-hero h1 { font: 600 30px/1.2 var(--brand-font); letter-spacing: -.02em; margin: 0 0 6px; display: flex; align-items: center; gap: 12px; }
.home-hero .lead { margin-bottom: 22px; text-align: center; }
.home-hero .composer-wrap { width: 100%; padding: 0; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; max-width: 800px; }
.suggest button { border: 1px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 99px; cursor: pointer; font-size: 13px; color: var(--text2); display: inline-flex; align-items: center; gap: 7px; }
.suggest button:hover { color: var(--text); border-color: var(--check); }
.home-strip { width: 100%; max-width: 800px; margin-top: 30px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mini { border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; background: var(--surface); cursor: pointer; text-align: left; min-width: 0; }
.mini:hover { border-color: var(--check); box-shadow: var(--shadow); }
.mini b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini small { color: var(--text3); font-size: 12px; }

/* ——— služby, vydání, počítače ——— */
.svc-card { display: flex; flex-direction: column; gap: 10px; }
.svc-card .h { display: flex; align-items: center; gap: 10px; }
.svc-card .h b { font-size: 15px; font-weight: 600; }
.kind-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--field); display: grid; place-items: center; color: var(--text2); flex: none; }
.envs { display: flex; flex-direction: column; gap: 6px; }
.env-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 9px; background: var(--bg-subtle); border-radius: 9px; }
.env-row .k { font-weight: 600; width: 44px; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; color: var(--text2); }
.health { width: 8px; height: 8px; border-radius: 50%; background: var(--check); flex: none; }
.health.ok { background: var(--green); } .health.bad { background: var(--red); }
.env-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.env-card .h { display: flex; align-items: center; gap: 8px; }
.env-card .h b { font-size: 14px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--text3); }
.commit-list { font-size: 13px; }
.commit-list .c { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--hairline); align-items: baseline; }
.commit-list .c:last-child { border-bottom: 0; }
.commit-list .c .h { font-family: var(--mono); font-size: 12px; color: var(--orange-text); flex: none; }
.commit-list .c .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-status { display: inline-flex; align-items: center; gap: 6px; }
.log { background: #111315; color: #d6d9de; font: 12px/1.55 var(--mono); padding: 12px 14px; border-radius: 10px; max-height: 55vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.runner-card .h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.runner-card .h b { font-size: 15px; }
.eng-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.eng-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.eng-row .models { color: var(--text3); font-size: 12.5px; }
.meter { height: 6px; border-radius: 99px; background: var(--field); overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; }
.meter > i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.token-box { font-family: var(--mono); font-size: 12.5px; background: var(--field); padding: 10px 12px; border-radius: 9px; word-break: break-all; user-select: all; }
.diff { font: 12px/1.5 var(--mono); white-space: pre; overflow: auto; max-height: 60vh; border: 1px solid var(--border); border-radius: 10px; background: var(--code-bg); }
.diff div { padding: 0 12px; }
.diff .a { background: rgba(26,160,83,.12); } .diff .d { background: rgba(227,73,72,.12); } .diff .f { background: var(--code-head); font-weight: 600; padding: 4px 12px; } .diff .h { color: var(--blue); }

/* ——— úzké obrazovky (telefon, malé okno) ——— */
@media (max-width: 900px) {
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; box-shadow: var(--shadow-pop); margin-left: calc(-1 * var(--side-w) - 10px); }
  .app.side-open .side { margin-left: 0; }
  .app.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.3); }
  .page-in { padding: 8px 16px 40px; }
  .thread { padding: 14px 16px 18px; }
  .composer-wrap { padding: 0 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .cols { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 24px; }
  .kv { grid-template-columns: 90px 1fr; }
}
@media (min-width: 901px) { .app:not(.side-hidden) .side-btn { display: none; } }
