:root {
  --bg: #090d0b;
  --bg2: #0d1310;
  --panel: #111915;
  --panel2: #16211b;
  --line: #1f2c25;
  --line2: #2a3b32;
  --text: #e7f0eb;
  --muted: #93a89c;
  --dim: #627568;
  --accent: #2fd27a;
  --accent2: #5fde94;
  --brand-dark: #00943e;
  --hover: #142019;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
  --info: #60a5fa;
  --add-bg: rgba(74, 222, 128, .10);
  --del-bg: rgba(248, 113, 113, .10);
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; overflow: hidden; }
a { color: var(--accent2); }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent2); }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #24332b; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel2); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent2); }
.btn.primary { background: linear-gradient(135deg, #5fde94 0%, #20ad5b 55%, #00943e 100%); border: 0; color: #04210f; font-weight: 650; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--panel2); }

/* ---------- login ---------- */
.login { height: 100%; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% 0%, #0f2a1b 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #0a2316 0%, transparent 60%), var(--bg); }
.login-card { width: min(400px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-card h1 { margin: 10px 0 4px; font-size: 22px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.login-card label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 10px; }
.err-text { color: var(--err); font-size: 13px; margin-top: 10px; min-height: 18px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.logo svg { width: 28px; height: 28px; }
.logo small { color: var(--muted); font-weight: 500; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-rows: 52px 1fr; height: 100%; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg2); min-width: 0; }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }
.dot.busy { background: var(--accent); box-shadow: 0 0 0 0 rgba(61,220,132,.55); animation: pulse 1.4s infinite; }
.dot.queued { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 7px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.meter { width: 70px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent2); }
.avatars { display: flex; }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #111; border: 2px solid var(--bg2); margin-left: -6px; flex: none; }
.av:first-child { margin-left: 0; }
.av.sm { width: 20px; height: 20px; font-size: 9.5px; border-width: 1.5px; }

.main { display: grid; grid-template-columns: 290px 1fr; min-height: 0; }
.main.with-right { grid-template-columns: 290px 1fr 360px; }
.sidebar { border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.sidebar .sb-top { padding: 12px; display: flex; gap: 8px; }
.sidebar .sb-top .btn.primary { flex: 1; justify-content: center; }
.sb-scroll { overflow: auto; flex: 1; padding: 0 8px 12px; }
.sb-h { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); margin: 14px 6px 6px; display: flex; justify-content: space-between; align-items: center; cursor: default; }
.sb-h .count { background: var(--panel2); padding: 0 6px; border-radius: 6px; }
.s-item { display: block; padding: 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; margin-bottom: 3px; }
.s-item:hover { background: var(--panel); }
.s-item.active { background: var(--panel2); border-color: var(--line2); }
.s-item .t { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; min-width: 0; }
.s-item .t span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.s-item .sub { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; margin-top: 3px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.folder { color: #86efac; border-color: #1f5a38; background: #0f2a1b; }
.tag.web { color: #5eead4; border-color: #155e57; background: #0b2522; }
.tag.term { color: #93c5fd; border-color: #24406a; background: #13233b; }
.tag.hist { color: var(--dim); }
.tag.ok { color: var(--ok); border-color: #1f4a30; background: #11261a; }
.tag.err { color: var(--err); border-color: #5a2525; background: #2a1414; }
.tag.warn { color: var(--warn); border-color: #5a4a1a; background: #2a2210; }
.mini-prog { height: 3px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.mini-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .8s; }

.content { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.right { border-left: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tab { padding: 7px 10px; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--muted); font-size: 13px; border: 1px solid transparent; border-bottom: 0; white-space: nowrap; background: none; }
.tab.active { color: var(--text); background: var(--panel); border-color: var(--line); }
.tab .badge { background: var(--accent); color: #04210f; border-radius: 8px; padding: 0 5px; font-size: 10.5px; font-weight: 700; margin-left: 4px; }
.tab-body { flex: 1; overflow: auto; padding: 12px; min-height: 0; }

/* ---------- session header ---------- */
.s-head { padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; }
.s-head .row1 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s-head h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.s-head .actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.s-head .row2 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; align-items: center; color: var(--muted); font-size: 12px; }
.statusbar { margin-top: 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.statusbar .st { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.statusbar .st small { font-weight: 400; color: var(--muted); }
.bigprog { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; position: relative; }
.bigprog i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 6px; transition: width .9s; }
.bigprog.indet i { width: 30% !important; animation: indet 1.6s infinite ease-in-out; }
@keyframes indet { 0% { left: -30%; } 100% { left: 100%; } }
.statusbar .times { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.statusbar .times b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- feed ---------- */
.feed { flex: 1; overflow: auto; padding: 18px 18px 8px; min-height: 0; position: relative; }
.feed-inner { max-width: 980px; margin: 0 auto; }
.msg { margin: 0 0 12px; }
.msg.user { display: flex; justify-content: flex-end; gap: 8px; }
.msg.user .bubble { background: linear-gradient(135deg, #10291c, #0d2117); border: 1px solid #1f4a33; border-radius: 14px 14px 4px 14px; padding: 9px 13px; max-width: 78%; white-space: pre-wrap; word-break: break-word; }
.msg.user .who { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.msg.user .when { font-size: 11px; color: var(--dim); margin-top: 3px; text-align: right; }
.msg.text { display: flex; gap: 10px; }
.claude-av { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #d97757, #e88d6b); display: grid; place-items: center; flex: none; margin-top: 2px; }
.claude-av svg { width: 15px; height: 15px; }
.md { min-width: 0; word-break: break-word; flex: 1; }
.md p { margin: 0 0 8px; }
.md p:last-child { margin-bottom: 0; }
.md pre { background: #070b09; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 6px 0 10px; }
.md code { background: #1a2620; padding: 1px 5px; border-radius: 5px; }
.md pre code { background: none; padding: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 12px 0 6px; font-size: 15px; }
.md h1 { font-size: 17px; } .md h2 { font-size: 16px; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 22px; }
.md table { border-collapse: collapse; margin: 6px 0 10px; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line2); padding: 4px 8px; text-align: left; }
.md th { background: var(--panel2); }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line2); color: var(--muted); }
.think { color: var(--dim); font-size: 12.5px; margin: 0 0 8px 36px; cursor: pointer; user-select: none; }
.think pre { white-space: pre-wrap; color: var(--muted); font-family: inherit; font-size: 12.5px; margin: 4px 0 0; border-left: 2px solid var(--line2); padding-left: 10px; }
.sysmsg { text-align: center; margin: 10px 0; }
.sysmsg span { display: inline-block; font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 3px 11px; border-radius: 999px; max-width: 90%; white-space: pre-wrap; text-align: left; }
.sysmsg.error span { color: var(--err); border-color: #5a2525; }
.sysmsg.summary span { border-radius: 10px; color: var(--text); }
.turnend { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 11.5px; margin: 14px 0; }
.turnend::before, .turnend::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tool { margin: 0 0 6px 36px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; overflow: hidden; }
.tool.err { border-color: #5a2525; }
.tool .th { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; min-width: 0; }
.tool .th:hover { background: var(--panel2); }
.tool .tn { font-weight: 700; color: var(--accent2); flex: none; font-size: 12.5px; }
.tool .ts { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.tool .tst { flex: none; font-size: 11.5px; }
.tool .tb { border-top: 1px solid var(--line); padding: 8px 10px; display: none; max-height: 520px; overflow: auto; }
.tool.open .tb { display: block; }
.tool pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12px; color: #c8d6ce; }
.tool .lbl { font-size: 11px; text-transform: uppercase; color: var(--dim); margin: 8px 0 3px; letter-spacing: .6px; }
.tool .lbl:first-child { margin-top: 0; }
.tool.agent { border-color: #1f5a38; }
.tool.agent .tn { color: #86efac; }
.spin { width: 12px; height: 12px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.diff { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; overflow: auto; }
.diff div { white-space: pre-wrap; word-break: break-word; padding: 0 8px; }
.diff .a { background: var(--add-bg); color: #b8f5cb; }
.diff .d { background: var(--del-bg); color: #fbc0c0; }
.diff .c { color: #8aa094; }
.diff .gap { color: var(--dim); background: var(--bg2); text-align: center; }
.linkish { color: var(--info); cursor: pointer; text-decoration: none; }
.linkish:hover { text-decoration: underline; }

.partial { margin: 0 0 12px; display: flex; gap: 10px; }
.partial .md { opacity: .9; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.older { text-align: center; margin-bottom: 14px; }
.jump { position: sticky; bottom: 8px; margin-left: auto; display: block; width: max-content; }

/* ---------- composer ---------- */
.composer { border-top: 1px solid var(--line); padding: 10px 18px 14px; background: var(--bg2); flex: none; }
.composer-inner { max-width: 980px; margin: 0 auto; }
.queue { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.queue .q { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px dashed var(--line2); border-radius: 8px; padding: 5px 9px; font-size: 12.5px; }
.queue .q span.tx { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.cbox { display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 8px; }
.cbox:focus-within { border-color: var(--accent2); }
.cbox textarea { flex: 1; border: 0; background: transparent; resize: none; max-height: 240px; min-height: 24px; padding: 4px 6px; }
.thumbs { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.thumbs .th { position: relative; }
.thumbs img { height: 54px; border-radius: 6px; border: 1px solid var(--line2); display: block; }
.thumbs button { position: absolute; top: -6px; right: -6px; background: var(--err); border: 0; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; cursor: pointer; color: #fff; line-height: 18px; padding: 0; }
.hint { font-size: 11.5px; color: var(--dim); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.ro-banner { display: flex; gap: 12px; align-items: center; background: #13233b; border: 1px solid #24406a; color: #bfdbfe; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.ro-banner .btn { margin-left: auto; }

/* ---------- right panel content ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.card h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.todo { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 13px; }
.todo .ck { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line2); flex: none; margin-top: 2px; display: grid; place-items: center; font-size: 11px; }
.todo.completed { color: var(--dim); text-decoration: line-through; }
.todo.completed .ck { background: var(--ok); border-color: var(--ok); color: #0b1a10; }
.todo.in_progress { color: var(--text); font-weight: 600; }
.todo.in_progress .ck { border-color: var(--accent); }
.todo.in_progress .ck::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--muted); }
.kv span:nth-child(even) { font-variant-numeric: tabular-nums; text-align: right; }
.agent-row { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; cursor: pointer; background: var(--panel); }
.agent-row:hover { border-color: var(--accent2); }
.agent-row .t { display: flex; gap: 7px; align-items: center; font-weight: 600; font-size: 13px; }
.agent-row .t span:not(.dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-row .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.file-row { display: flex; gap: 8px; align-items: center; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.file-row:last-child { border-bottom: 0; }
.file-row .p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; font-family: var(--mono); font-size: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; font-size: 12.5px; margin: 3px 0; }
.bar-row .b { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-row .b i { display: block; height: 100%; background: var(--accent2); }
.bar-row span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.log { font-family: var(--mono); font-size: 11.5px; line-height: 1.45; }
.log .ln { white-space: pre-wrap; word-break: break-word; padding: 1px 4px; border-radius: 4px; display: flex; gap: 6px; }
.log .ln:hover { background: var(--panel); }
.log .ln .tx { flex: 1; }
.log .ln.e { color: var(--err); }
.log .ln.w { color: var(--warn); }
.log .ln .send { visibility: hidden; flex: none; }
.log .ln:hover .send { visibility: visible; }
.log-tools { display: flex; gap: 6px; margin-bottom: 8px; position: sticky; top: -12px; background: var(--bg2); padding: 4px 0; z-index: 1; }
.log-tools input { flex: 1; padding: 5px 8px; font-size: 12px; }
.log-tools select { padding: 5px; font-size: 12px; }

/* ---------- overview ---------- */
.overview { overflow: auto; padding: 22px; min-height: 0; flex: 1; }
.overview h1 { margin: 0 0 4px; font-size: 22px; }
.overview .lead { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.scard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.scard:hover { border-color: var(--accent2); transform: translateY(-1px); }
.scard .t { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.scard .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .lp { color: var(--muted); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 36px; }
.scard .foot { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; }
.section-h { margin: 24px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.conflict { background: #2a2210; border: 1px solid #5a4a1a; color: #fde68a; border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font-size: 13px; }
.folder-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.folder-card .fn { font-weight: 700; color: #86efac; display: flex; justify-content: space-between; }
.folder-card .rs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.empty { color: var(--dim); text-align: center; padding: 30px 10px; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(3,6,4,.72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.modal.wide { width: min(1100px, 100%); }
.modal .mh { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal .mh h3 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .mb { padding: 16px 18px; overflow: auto; }
.modal .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; }
.field .help { font-size: 12px; color: var(--dim); margin-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; font-size: 12.5px; }
.chip:hover, .chip.on { border-color: var(--accent); color: #86efac; }
.preview-path { font-family: var(--mono); font-size: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: #86efac; word-break: break-all; }
.codeview { font-family: var(--mono); font-size: 12px; background: #070b09; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.codeview table { border-collapse: collapse; width: 100%; }
.codeview td { padding: 0 10px; white-space: pre; vertical-align: top; }
.codeview td.n { color: var(--dim); text-align: right; user-select: none; border-right: 1px solid var(--line); width: 1%; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 360px; font-size: 13px; cursor: pointer; animation: tin .25s; }
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- online / tagok ---------- */
.sb-online { border-top: 1px solid var(--line); padding: 4px 8px 10px; max-height: 34%; overflow: auto; flex: none; }
.on-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: default; }
.on-row[data-go] { cursor: pointer; }
.on-row:hover { background: var(--panel); }
.on-row .on-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.on-row .on-t b { font-size: 13px; }
.on-row .on-t span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-row .av.sm { margin-left: 0; }
.req-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; background: #10291c; border: 1px solid #1f5a38; border-radius: 10px; padding: 7px 10px; font-size: 13px; }

/* ---------- kódszerkesztő ---------- */
.ed { display: grid; grid-template-columns: 270px 1fr; flex: 1; min-height: 0; }
.ed-explorer { border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.ed-exh { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 12px; font-size: 11px; letter-spacing: .8px; color: var(--muted); }
.ed-exb .icon-btn { font-size: 12px; padding: 3px 5px; }
.ed-search { margin: 4px 8px 6px; padding: 6px 9px; font-size: 12.5px; }
.ed-tree { flex: 1; overflow: auto; padding-bottom: 20px; font-size: 13px; }
.tr { display: flex; align-items: center; gap: 5px; padding: 2px 6px; cursor: pointer; white-space: nowrap; border: 1px solid transparent; min-width: 0; }
.tr:hover { background: var(--panel); }
.tr.sel { background: #10291c; border-color: #1f5a38; }
.tr.act .tn { color: #86efac; }
.tr .caret { width: 10px; color: var(--dim); font-size: 10px; flex: none; }
.tr .fi { font-size: 13px; flex: none; }
.tr .dotf { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin: 0 3px; }
.tr .tn { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.tr .tn.grp { color: #86efac; font-weight: 600; }
.tr .tpath { color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; margin-left: 6px; }
.tr .tdirty { color: var(--warn); font-size: 11px; }
.tr .tmore { margin-left: auto; visibility: hidden; padding: 0 5px; }
.tr:hover .tmore { visibility: visible; }
.ed-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0b110e; }
.ed-tabs { display: flex; overflow-x: auto; background: var(--bg2); border-bottom: 1px solid var(--line); flex: none; min-height: 36px; }
.etab { display: flex; align-items: center; gap: 6px; padding: 7px 10px 7px 12px; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); color: var(--muted); white-space: nowrap; user-select: none; }
.etab.on { background: #0b110e; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.etab .tdirty { color: var(--warn); }
.etab .tclose { opacity: .5; padding: 0 3px; border-radius: 4px; }
.etab .tclose:hover { opacity: 1; background: var(--panel2); }
.ed-bar { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line); font-size: 12px; min-height: 36px; flex-wrap: wrap; flex: none; }
.ed-bar .crumbs { color: var(--muted); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ed-bar .crumbs i { font-style: normal; color: var(--dim); margin: 0 4px; }
.ed-bar .crumbs span:last-child { color: var(--text); }
.ed-host { flex: 1; min-height: 0; position: relative; }
.ed-mon { position: absolute; inset: 0; }
.ed-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.ed-empty h3 { color: var(--text); margin: 8px 0; }
.ed-img { position: absolute; inset: 0; display: grid; place-items: center; overflow: auto; background: repeating-conic-gradient(#121a16 0% 25%, #0d1411 0% 50%) 0 0 / 20px 20px; }
.ed-img img { max-width: 95%; max-height: 95%; }
.ed-plain { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: #0b110e; font-family: var(--mono); font-size: 13px; resize: none; padding: 10px 14px; tab-size: 4; white-space: pre; }
.ed-status { display: flex; gap: 16px; align-items: center; padding: 3px 12px; font-size: 11.5px; color: var(--muted); background: var(--bg2); border-top: 1px solid var(--line); flex: none; min-height: 24px; }
.ctx { position: fixed; z-index: 70; background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 4px; min-width: 200px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.ctx .ci { padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ctx .ci:hover { background: var(--panel); }
.ctx .ci.danger { color: var(--err); }

.mob-only { display: none; }
@media (max-width: 1050px) {
  .ed { grid-template-columns: 1fr; grid-template-rows: 36% 1fr; }
  .ed-explorer { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 1250px) {
  .main.with-right { grid-template-columns: 260px 1fr 320px; }
}
@media (max-width: 1050px) {
  .main, .main.with-right { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 52px; bottom: 0; left: 0; width: 290px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .right { position: fixed; top: 52px; bottom: 0; right: 0; width: min(380px, 100%); z-index: 30; transform: translateX(100%); transition: transform .2s; }
  .right.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
  .mob-only { display: inline-flex; }
  .hide-mob { display: none !important; }
  .feed, .composer, .s-head { padding-left: 16px; padding-right: 16px; }
  .statusbar { grid-template-columns: 1fr; }
  .tool, .think { margin-left: 0; }
  .msg.user .bubble { max-width: 92%; }
  .overview { padding: 16px; }
}

/* ---------- nem szöveges fájlok nézete ---------- */
.ed-view { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; background: #0b110e; }
.ed-view .vh { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; flex: none; }
.ed-view .vh b { color: var(--text); }
.ed-view .vh a { text-decoration: none; }
.ed-view .vimg { flex: 1; display: grid; place-items: center; overflow: auto; background: repeating-conic-gradient(#121a16 0% 25%, #0d1411 0% 50%) 0 0 / 20px 20px; }
.ed-view .vimg img { max-width: 95%; max-height: 95%; image-rendering: auto; }
.ed-view .vnote { padding: 6px 14px; font-size: 12px; color: #fde68a; background: #2a2210; border-bottom: 1px solid #5a4a1a; flex: none; }
.ed-view .vhex { flex: 1; display: grid; grid-template-columns: 1fr 240px; min-height: 0; }
.ed-view .hexbox { overflow: auto; padding: 10px 14px; }
.ed-view .hex { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: #c8d6ce; white-space: pre; }
.ed-view .hex .ho { color: var(--dim); }
.ed-view .hex .ha { color: #93c5fd; }
.ed-view .hexmore { padding: 10px 0 20px; }
.ed-view .strs { border-left: 1px solid var(--line); overflow: auto; padding: 10px 12px; font-family: var(--mono); font-size: 11.5px; color: #c8d6ce; }
.ed-view .strs .strl div { padding: 1px 0; word-break: break-all; }
@media (max-width: 1050px) { .ed-view .vhex { grid-template-columns: 1fr; } .ed-view .strs { display: none; } }

/* ---------- ikonok ---------- */
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.ic.xs { width: 13px; height: 13px; vertical-align: -2px; }
.ic.sm { width: 14.5px; height: 14.5px; }
.ic.lg { width: 20px; height: 20px; vertical-align: -5px; }
.ii { display: inline-flex; align-items: center; gap: 5px; }
.icon-btn { display: inline-grid; place-items: center; }
.icon-btn .ic { width: 18px; height: 18px; }
.tab { display: inline-flex; align-items: center; gap: 6px; }
.tab .ic { opacity: .75; }
.tab.active .ic { opacity: 1; color: var(--accent2); }
.tool .tic { color: var(--muted); }
.tool.agent .tic { color: #86efac; }
.tool.err .tic { color: var(--err); }
.tool .tst { display: inline-flex; align-items: center; gap: 4px; }
.think { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.think .ic { color: var(--accent2); }
.sysmsg span .ic { vertical-align: -2px; }
.stat { position: relative; }
.stat .si { position: absolute; top: 12px; right: 12px; color: var(--muted); opacity: .9; }
.stat .si .ic { width: 20px; height: 20px; }
.section-h .ic { color: var(--accent2); }
.ro-banner > .ic { flex: none; color: #93c5fd; }
.sb-h .ii .ic { opacity: .8; }
.ed-exb .icon-btn .ic { width: 15px; height: 15px; }
.tr .fi { display: inline-flex; }
.tr .fi .ic { width: 15px; height: 15px; }
.tr .caret { display: inline-flex; }
.etab .ic { width: 14px; height: 14px; }
.etab .tclose { display: inline-flex; }
.ctx .ci { display: flex; align-items: center; gap: 8px; }
.ctx .ci .ic { color: var(--muted); }
.ctx .ci.danger .ic { color: var(--err); }
.modal .mh h3 { display: flex; align-items: center; gap: 8px; }
.file-row > span:first-child { display: inline-flex; }
.when .ic { vertical-align: -2px; }
.btn .ic { vertical-align: 0; }
.log-cmd { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line2); border-radius: 9px; padding: 4px 4px 4px 9px; color: var(--accent2); }
.log-cmd input { flex: 1; border: 0; background: transparent; padding: 4px 2px; font-family: var(--mono); font-size: 12px; }

/* ---------- MTA konzol ---------- */
.con { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #080c0a; }
.con-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; flex: none; }
.con-st { display: flex; align-items: center; gap: 10px; min-width: 0; }
.con-st .dot { width: 10px; height: 10px; }
.con-st b { display: block; font-size: 15px; }
.con-st span { font-size: 12px; color: var(--muted); }
.con-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.con-tools, .con-res { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; font-size: 12.5px; background: var(--bg2); }
.con-tools input.con-q { flex: 1; min-width: 160px; padding: 5px 9px; font-size: 12.5px; }
.con-tools select { padding: 5px; font-size: 12.5px; }
.con-f { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; }
.con-res .con-rn { width: 200px; padding: 5px 9px; font-size: 12.5px; font-family: var(--mono); }
.con-res .sep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.con-out { flex: 1; overflow: auto; padding: 10px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; min-height: 0; }
.con-out .cl { white-space: pre-wrap; word-break: break-word; color: #c8d6ce; }
.con-out .cl .ct { color: #56695e; }
.con-out .cl.e { color: #fca5a5; }
.con-out .cl.w { color: #fde68a; }
.con-out .cl.i { color: #a5b4fc; }
.con-out .cl.h { color: #86efac; background: rgba(95,222,148,.06); border-left: 2px solid var(--accent); padding-left: 6px; margin-left: -8px; }
.con-form { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: var(--bg2); flex: none; }
.con-pr { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.con-input { flex: 1; font-family: var(--mono); font-size: 13px; }
@media (max-width: 1050px) { .con-res .con-rn { width: 140px; } .con-btns { margin-left: 0; } }
.ic.fold path { fill: currentColor; fill-opacity: .2; }

/* ---------- automatikus újraindítás kapcsoló ---------- */
.sw { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel2); cursor: pointer; font-size: 13px; user-select: none; white-space: nowrap; }
.sw:hover { border-color: var(--accent2); }
.sw.on { border-color: #1f5a38; background: linear-gradient(135deg, rgba(95,222,148,.12), rgba(0,148,62,.16)); }
.sw.on .ic { color: var(--warn); }
.sw.ro { cursor: default; opacity: .75; }
.switch { position: relative; width: 32px; height: 18px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line2); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dbe7e0; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch input:checked + i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.switch input:checked + i::after { transform: translateX(14px); background: #fff; }
.zapb { color: var(--warn); display: inline-flex; flex: none; }
.chk { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; font-size: 13px; color: var(--muted); cursor: pointer; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.chk input { margin-top: 2px; accent-color: var(--accent); }
.chk .ic { color: var(--warn); margin-top: 1px; }
.chk b { color: var(--text); }
.dep { border-top: 1px solid var(--line); padding: 8px 0 6px; font-size: 12.5px; }
.dep:first-of-type { border-top: 0; }
.dep .dh { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.dep .dh .ic { color: var(--ok); }
.dep.bad .dh .ic { color: var(--err); }
.dep .da { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dep .dn { color: var(--warn); margin-top: 4px; }
.dep .de { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; font-family: var(--mono); font-size: 11.5px; color: #fca5a5; }
.dep .de span { flex: 1; word-break: break-word; }

/* ---------- körök visszavonása / Hub üzenetek ---------- */
details.turn { border-top: 1px solid var(--line); padding: 6px 0; font-size: 12.5px; }
details.turn:first-of-type { border-top: 0; }
details.turn summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; flex-wrap: wrap; }
details.turn summary::-webkit-details-marker { display: none; }
details.turn .tw { color: var(--dim); font-variant-numeric: tabular-nums; }
details.turn .tt { flex: 1; min-width: 80px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.turn.undone { opacity: .55; }
details.turn.undone .tt { text-decoration: line-through; }
details.turn .tf { padding: 6px 0 2px 4px; display: flex; flex-direction: column; gap: 3px; }
.msg.user.hubmsg .bubble { background: linear-gradient(135deg, #2a2210, #0f2a1b); border-color: #5a4a1a; }
.msg.user.hubmsg .who { color: var(--warn); }

/* ---------- LotusMTA logó ---------- */
.logo img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(47,210,122,.25)); }
.login-card .logo img { width: 44px; height: 44px; }
.logo { color: var(--text); }
.logo small { color: var(--accent2); font-weight: 600; }

/* ---------- egységes hover / fókusz állapotok ---------- */
.btn, .icon-btn, button.pill, .s-item, .scard, .tool .th, .tr, .agent-row, .on-row, .chip, .ctx .ci, .tab, .etab, .stat, .sw, .file-row, .folder-card, .linkish, .cbox, details.turn summary {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, filter .15s ease, transform .15s ease;
}
.btn:hover { border-color: var(--accent); background: #1a2a21; color: #fff; }
.btn.primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, #6ce6a0 0%, #26b864 55%, #009e42 100%); color: #04210f; box-shadow: 0 6px 22px rgba(47,210,122,.28); }
.btn.primary:active { transform: translateY(1px); }
.btn.danger:hover { background: #2a1414; border-color: var(--err); color: #fca5a5; }
.btn:disabled, .btn:disabled:hover { border-color: var(--line2); background: var(--panel2); color: var(--muted); box-shadow: none; filter: none; transform: none; }
.btn.primary:disabled, .btn.primary:disabled:hover { background: linear-gradient(135deg, #5fde94, #00943e); color: #04210f; }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--accent); color: var(--text); background: var(--hover); }
.icon-btn:hover { color: var(--accent2); background: var(--hover); }
.tab:hover:not(.active) { color: var(--text); background: rgba(95,222,148,.06); }
.tab.active { box-shadow: inset 0 2px 0 var(--accent); }
.etab:hover:not(.on) { color: var(--text); background: var(--hover); }
.s-item:hover { background: var(--hover); border-color: var(--line); }
.s-item.active { background: linear-gradient(90deg, rgba(47,210,122,.12), transparent 75%), var(--panel2); border-color: #1f5a38; box-shadow: inset 3px 0 0 var(--accent); }
.scard:hover { border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(47,210,122,.14); }
.tool .th:hover { background: var(--hover); }
.tool:hover { border-color: var(--line2); }
.tr:hover { background: var(--hover); }
.tr.sel { background: #12301f; border-color: #1f5a38; }
.tr.act .tn { color: var(--accent2); }
.agent-row:hover { border-color: var(--accent); background: var(--hover); }
.on-row:hover { background: var(--hover); }
.chip:hover, .chip.on { border-color: var(--accent); color: #86efac; background: #10291c; }
.ctx .ci:hover { background: #1a2a21; color: #fff; }
.ctx .ci.danger:hover { background: #2a1414; color: #fca5a5; }
.linkish:hover { color: #7dd3fc; }
.file-row:hover { background: var(--hover); }
.stat[onclick]:hover, .stat[style*="cursor:pointer"]:hover { border-color: var(--accent); }
.folder-card:hover { border-color: var(--line2); }
.sw:hover { border-color: var(--accent); }
.sw.on { border-color: #1f5a38; }
.sw.on .ic { color: var(--accent2); }
.cbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,210,122,.10); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
details.turn summary:hover { color: var(--text); }
.con-out .cl:hover { background: rgba(255,255,255,.025); }
.log .ln:hover { background: var(--hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cbox textarea:focus-visible, .con-input:focus-visible, .log-cmd input:focus-visible { outline: none; }
::selection { background: rgba(47,210,122,.35); }
.dot.busy { background: var(--accent2); }
.todo.completed .ck { background: var(--accent); border-color: var(--accent); }
.msg.user .who { color: var(--accent2); }
.logo span { white-space: nowrap; }
.section-h .btn .ic, .btn.primary .ic { color: inherit; }
@media (max-width: 1450px) { .topbar .logo small { display: none; } }
.login-card { text-align: center; }
.login-card .logo { flex-direction: column; gap: 10px; font-size: 18px; }
.login-card .logo img { width: 84px; height: 84px; filter: drop-shadow(0 6px 24px rgba(47,210,122,.35)); }
.login-card label, .login-card .err-text { text-align: left; }

/* ---------- oldalsáv / jobb panel összecsukása (asztali nézet) ---------- */
.main { transition: grid-template-columns .2s ease; }
.main.side-collapsed { grid-template-columns: 0 1fr; }
.main.with-right.side-collapsed { grid-template-columns: 0 1fr 360px; }
.main.with-right.right-collapsed { grid-template-columns: 290px 1fr 0; }
.main.with-right.side-collapsed.right-collapsed { grid-template-columns: 0 1fr 0; }
.main.side-collapsed > .sidebar, .main.right-collapsed > .right { overflow: hidden; border: 0; min-width: 0; visibility: hidden; }
#sbt.on, #rpt.on { color: var(--accent2); }
@media (max-width: 1250px) {
  .main.with-right.side-collapsed { grid-template-columns: 0 1fr 320px; }
  .main.with-right.right-collapsed { grid-template-columns: 260px 1fr 0; }
}
@media (max-width: 1050px) {
  .main, .main.with-right, .main.side-collapsed, .main.with-right.side-collapsed, .main.with-right.right-collapsed, .main.with-right.side-collapsed.right-collapsed { grid-template-columns: 1fr; }
  .main.side-collapsed > .sidebar, .main.right-collapsed > .right { visibility: visible; overflow: visible; }
  .icon-btn.mob-only { display: inline-grid; }
}
.icon-btn.mob-only { display: none; }
/* gondolkodás sor: csak akkor kattintható, ha van szöveg */
.think { cursor: default; }
.think.has { cursor: pointer; }
.think.has:hover { color: var(--muted); }
.think .thx { color: var(--accent2); display: inline-flex; align-items: center; gap: 2px; }
.think.open .thx .ic { transform: rotate(90deg); }
.think .thx .ic { transition: transform .15s; }

/* ---------- profilkép ---------- */
.av.img { background: #0d1310 !important; overflow: hidden; padding: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av.lg { width: 44px; height: 44px; font-size: 15px; margin-left: 0; border-width: 2px; }
.me-pill { padding: 2px 10px 2px 3px; gap: 7px; }
.me-pill .av.sm { margin-left: 0; width: 22px; height: 22px; }
.pf { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.pf-stage { position: relative; width: 240px; height: 240px; border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#121a16 0% 25%, #0d1411 0% 50%) 0 0 / 16px 16px; border: 1px solid var(--line2); }
.pf-stage.drop { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,210,122,.2); }
.pf-stage canvas { width: 240px; height: 240px; display: block; cursor: grab; touch-action: none; }
.pf-stage canvas:active { cursor: grabbing; }
.pf-ring { position: absolute; inset: 8px; border-radius: 50%; box-shadow: 0 0 0 400px rgba(3,6,4,.6); border: 2px solid var(--accent); pointer-events: none; }
.pf-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; text-align: center; padding: 30px; pointer-events: none; }
.pf-side { display: flex; flex-direction: column; gap: 8px; }
.pf-side .btn { align-self: flex-start; }
.pf-side .help { font-size: 12px; color: var(--dim); }
.pf-l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pf-side input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.pf-me { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pf-me b { display: block; }
.pf-me span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .pf { grid-template-columns: 1fr; justify-items: center; } }

/* ---------- csatolmányok ---------- */
.att-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-imgs img { max-width: 220px; max-height: 160px; border-radius: 9px; border: 1px solid var(--line2); cursor: zoom-in; object-fit: cover; background: #0b110e; transition: transform .15s, border-color .15s; }
.att-imgs img:hover { border-color: var(--accent); transform: translateY(-1px); }
.att-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-file { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(0,0,0,.25); color: var(--text); cursor: pointer; font-size: 12.5px; max-width: 100%; transition: border-color .15s, background-color .15s; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.att-file small { color: var(--muted); }
.att-file:hover:not(:disabled) { border-color: var(--accent); background: var(--hover); }
.att-file:disabled { opacity: .55; cursor: default; }
.thumbs .th.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 26px 6px 9px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); font-size: 12px; max-width: 260px; }
.thumbs .th.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs .th.fchip small { color: var(--muted); flex: none; }
.thumbs button { display: grid; place-items: center; }
.thumbs .th.fchip button { top: 50%; right: 4px; transform: translateY(-50%); }
.lb { display: grid; place-items: center; min-height: 200px; background: repeating-conic-gradient(#121a16 0% 25%, #0d1411 0% 50%) 0 0 / 18px 18px; border-radius: 10px; }
.lb-img { max-width: 100%; max-height: calc(100vh - 220px); border-radius: 6px; cursor: zoom-in; display: block; }

/* ---------- ötletek ---------- */
.ideas-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ideas-row .ir-l { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-right: 2px; }
.ideas-row .ir-l .ic { color: var(--warn); }
.ichip { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 12.5px; cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s; }
.ichip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ichip:hover { border-color: var(--accent); background: var(--hover); transform: translateY(-1px); }
.ichip.p4 { border-color: #7f1d1d; box-shadow: inset 3px 0 0 #f87171; }
.ichip.p3 { border-color: #78350f; box-shadow: inset 3px 0 0 #fbbf24; }
.ichip.p2 { box-shadow: inset 3px 0 0 var(--accent); }
.ichip.p1 { box-shadow: inset 3px 0 0 #64748b; color: var(--muted); }
.ichip.add { border-style: dashed; color: var(--accent2); }
.ichip.more { color: var(--muted); }
.bulbb { display: inline-flex; align-items: center; gap: 2px; color: var(--warn); font-size: 11px; font-weight: 700; flex: none; }
.idea-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; margin-left: auto; }
.seg button { background: none; border: 0; padding: 4px 9px; font-size: 12px; color: var(--muted); cursor: pointer; }
.seg button span { opacity: .7; margin-left: 2px; }
.seg button.on { background: var(--panel2); color: var(--text); }
.seg button:hover:not(.on) { background: var(--hover); color: var(--text); }
.idea { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; transition: border-color .15s, opacity .15s; }
.idea:hover { border-color: var(--line2); }
.idea.p4 { box-shadow: inset 3px 0 0 #f87171; } .idea.p3 { box-shadow: inset 3px 0 0 #fbbf24; } .idea.p2 { box-shadow: inset 3px 0 0 var(--accent); } .idea.p1 { box-shadow: inset 3px 0 0 #64748b; }
.idea .ih { display: flex; align-items: flex-start; gap: 7px; flex-wrap: wrap; }
.idea .it { flex: 1; min-width: 120px; font-size: 13.5px; line-height: 1.35; }
.prio { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; flex: none; margin-top: 1px; }
.prio.p4 { background: #3b1212; color: #fca5a5; } .prio.p3 { background: #3a2a0c; color: #fde68a; } .prio.p2 { background: #10291c; color: #86efac; } .prio.p1 { background: #1e2530; color: #94a3b8; }
.ist { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--muted); flex: none; }
.ist.doing { color: #7dd3fc; border-color: #1e4a63; } .ist.done { color: var(--ok); border-color: #1f5a38; } .ist.bad, .ist.dislike { color: #fca5a5; border-color: #5a2525; }
.idea .ip { margin-top: 7px; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; max-height: 74px; overflow: hidden; mask-image: linear-gradient(180deg, #000 60%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); }
.idea .im { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.idea .im b { color: var(--muted); }
.idea .im .av.sm { margin-left: 0; }
.idea .ihist { margin-top: 6px; font-size: 11.5px; color: var(--dim); }
.idea .ihist summary { cursor: pointer; }
.idea .ihist summary:hover { color: var(--text); }
.idea .ihist div { padding: 2px 0 0 10px; }
.idea .ia { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.idea .ia select { padding: 3px 6px; font-size: 12px; border-radius: 7px; }
/* lezárt ötlet: szürkén megmarad */
.idea.st-done, .idea.st-bad, .idea.st-dislike { opacity: .5; filter: grayscale(.85); box-shadow: none; }
.idea.st-done:hover, .idea.st-bad:hover, .idea.st-dislike:hover { opacity: .85; }
.idea.st-bad .it, .idea.st-dislike .it { text-decoration: line-through; }
.prio-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.prio-pick .pp { display: inline-flex; align-items: center; cursor: pointer; }
.prio-pick .pp input { display: none; }
.prio-pick .pp span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line2); font-size: 12.5px; color: var(--muted); transition: all .15s; }
.prio-pick .pp:hover span { border-color: var(--accent); color: var(--text); }
.prio-pick .pp.p4 input:checked + span { background: #3b1212; color: #fca5a5; border-color: #7f1d1d; }
.prio-pick .pp.p3 input:checked + span { background: #3a2a0c; color: #fde68a; border-color: #78350f; }
.prio-pick .pp.p2 input:checked + span { background: #10291c; color: #86efac; border-color: #1f5a38; }
.prio-pick .pp.p1 input:checked + span { background: #1e2530; color: #cbd5e1; border-color: #334155; }
a.btn { text-decoration: none; }
.idea .ia select { flex: 1 1 100px; min-width: 0; max-width: 140px; }
/* ---------- ötlet kinyitása / teljes nézet ---------- */
.idea .ih[data-itog], .idea .ip[data-itog], .idea .ihint { cursor: pointer; }
.idea .ih[data-itog]:hover .it { color: var(--accent2); }
.idea .itog { display: inline-flex; color: var(--dim); margin-top: 3px; transition: transform .15s, color .15s; flex: none; }
.idea .ih:hover .itog { color: var(--accent2); }
.idea.open .itog { transform: rotate(90deg); color: var(--accent2); }
.idea.open { border-color: #1f5a38; background: #0f1a14; }
.idea.open .ip { max-height: none; mask-image: none; -webkit-mask-image: none; color: var(--text); background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13px; line-height: 1.55; cursor: text; user-select: text; }
.idea .ip.none { font-style: italic; color: var(--dim); }
.idea .ihint { margin-top: 6px; font-size: 11.5px; color: var(--dim); display: inline-flex; align-items: center; gap: 3px; }
.idea .ihint:hover { color: var(--accent2); }
.ihist-full { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.ihist-full b { color: var(--text); }
.idea .ihist-full { margin-top: 10px; }
.idea .ihist-full .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin-bottom: 2px; }
.iopen-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.idea.st-done.open, .idea.st-bad.open, .idea.st-dislike.open { opacity: 1; filter: none; }
.iv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.iv-by { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-left: auto; }
.iv-by .av.sm { margin-left: 0; }
.iv-prompt { white-space: pre-wrap; word-break: break-word; background: #0b110e; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; max-height: 55vh; overflow: auto; margin-bottom: 14px; user-select: text; }
.iv-prompt.none { color: var(--dim); font-style: italic; }
.modal .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin: 4px 0 6px; }
.ichip .ich-open { display: inline-flex; margin-left: 2px; padding: 2px; border-radius: 5px; color: var(--dim); font-style: normal; }
.ichip .ich-open:hover { color: var(--accent2); background: rgba(95,222,148,.12); }
/* ---------- MTA összekötés (profil) ---------- */
.pf-link { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pf-link .lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.pf-link .help { font-size: 12.5px; color: var(--muted); }
.pf-serials { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.pf-serial { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; }
.pf-serial span { flex: 1; min-width: 0; }
.pf-serial.none { color: var(--dim); }
.pf-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-code { display: flex; align-items: center; gap: 12px; background: #10291c; border: 1px solid #1f5a38; border-radius: 10px; padding: 8px 14px; }
.pf-code b { font-family: var(--mono); font-size: 22px; letter-spacing: 4px; color: var(--accent2); }
.pf-code span { font-size: 12px; color: var(--muted); }
/* ---------- auto-görgetés + ugrás az aljára ---------- */
.feed-ctrl { position: sticky; bottom: 12px; height: 0; display: flex; justify-content: flex-end; pointer-events: none; z-index: 5; }
.feed-ctrl-in { position: absolute; bottom: 0; right: 2px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.feed-ctrl-in > * { pointer-events: auto; }
.jump-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 11px; justify-content: center; border-radius: 999px; border: 1px solid #1f5a38; background: linear-gradient(135deg, #5fde94, #20ad5b 55%, #00943e); color: #04210f; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 4px rgba(47,210,122,.12); transition: transform .15s, box-shadow .15s, filter .15s; animation: jin .18s ease-out; }
.jump-btn[hidden] { display: none; }
.jump-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.jump-btn:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 0 5px rgba(47,210,122,.18); }
.jump-btn .jc { font-weight: 700; font-size: 12.5px; }
.jump-btn .jc:empty { display: none; }
.jump-btn.has-new { animation: jin .18s ease-out, jpulse 1.8s ease-in-out infinite; }
@keyframes jin { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes jpulse { 0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 4px rgba(47,210,122,.12); } 50% { box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 9px rgba(47,210,122,.05); } }
.as-tog { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 7px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(13,19,16,.88); backdrop-filter: blur(6px); font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; transition: border-color .15s, color .15s; }
.as-tog:hover { border-color: var(--accent); color: var(--text); }
.as-tog.on { color: var(--accent2); border-color: #1f5a38; }
.switch.sm { width: 26px; height: 15px; }
.switch.sm i::after { width: 11px; height: 11px; }
.switch.sm input:checked + i::after { transform: translateX(11px); }
/* ---------- profil megtekintése ---------- */
.av[data-u] { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.av[data-u]:hover { transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); position: relative; z-index: 1; }
.av.xl { width: 84px; height: 84px; font-size: 28px; border-width: 3px; margin-left: 0; box-shadow: 0 8px 30px rgba(0,0,0,.4), 0 0 0 3px rgba(47,210,122,.18); }
.av.xl:hover { transform: none; }
.modal.up-modal { width: min(620px, 100%); }
.up-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.up-id h3 { margin: 0 0 6px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.up-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.up-tags .tag { display: inline-flex; align-items: center; gap: 4px; }
.up-status { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.up-on { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.up-off { color: var(--dim); font-weight: 600; }
.up-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.up-stats div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; }
.up-stats b { font-size: 17px; }
.up-stats span { font-size: 11.5px; color: var(--muted); }
.up .lbl { display: flex; align-items: center; gap: 5px; margin: 12px 0 6px; }
.up-s { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 5px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.up-s:hover { border-color: var(--accent); background: var(--hover); }
.up-st { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.up-st b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-st > span { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.up-s > .ic { color: var(--dim); }
.up-none { font-size: 12.5px; color: var(--dim); }
.up-modal .mf select { padding: 6px 8px; margin-right: auto; max-width: 260px; }
@media (max-width: 600px) { .up-stats { grid-template-columns: repeat(2, 1fr); } }
/* ---------- képnéző nagyítás + profilkép nagyítás ---------- */
.lb { overflow: hidden; position: relative; height: calc(100vh - 240px); min-height: 260px; touch-action: none; }
.lb-img { max-width: 100%; max-height: 100%; transform-origin: center center; transition: transform .12s ease-out; user-select: none; -webkit-user-drag: none; cursor: zoom-in; }
.lb.zoomed .lb-img { max-width: 100%; max-height: 100%; }
.lb-zoom { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.lb-zoom .btn.small { min-width: 30px; justify-content: center; font-weight: 700; }
.lb-pct { font-size: 12px; color: var(--muted); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.up-head .av.zoomable { cursor: zoom-in; }
.up-head .av.zoomable:hover { box-shadow: 0 8px 30px rgba(0,0,0,.4), 0 0 0 3px var(--accent); }
.older-left { font-size: 12px; color: var(--dim); margin-left: 6px; }
.older-end { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 4px; }
#older { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- GUI tervek lista ---------- */
.gl { overflow: auto; padding: 22px; flex: 1; min-height: 0; }
.gl-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.gl-head h1 { margin: 0 0 4px; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.gl-head h1 .ic { color: var(--accent2); width: 22px; height: 22px; }
.gl-head .lead { color: var(--muted); margin: 0; max-width: 760px; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.gl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.gl-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.gl-thumb { display: grid; place-items: center; padding: 10px; background: #070b09; border-bottom: 1px solid var(--line); }
.gt { position: relative; overflow: hidden; border-radius: 6px; }
.gt-in { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.gl-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.gl-meta span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.gl-meta .av.sm { margin-left: 0; }
.gl-act { display: flex; align-items: center; gap: 4px; padding: 4px 8px 10px 12px; }
.gl-act .tag { margin-right: auto; }

/* ---------- GUI elemek (a vásznon és a bélyegképeken) ---------- */
.gx { position: absolute; box-sizing: border-box; overflow: hidden; }
.gx-checkbox { overflow: visible; display: flex; align-items: center; }
.gx-t { position: absolute; inset: 0; display: flex; white-space: pre-wrap; word-break: break-word; line-height: 1.25; box-sizing: border-box; }
.gx-checkbox .gx-t { position: static; flex: 1; align-self: stretch; }
.gx-cb { flex: none; display: grid; place-items: center; box-sizing: border-box; }
.gx-noimg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #627568; font-size: 22px; background: repeating-conic-gradient(#16211b 0% 25%, #111915 0% 50%) 0 0 / 24px 24px; border: 2px dashed #2a3b32; border-radius: inherit; }
.gx-noimg .ic { width: 40px; height: 40px; }
.gx-hidden { opacity: .18 !important; }

/* ---------- GUI szerkesztő ---------- */
.ge { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ge-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; flex: none; }
.ge-top .sep { width: 1px; height: 22px; background: var(--line2); }
.ge-name { width: 240px; font-weight: 700; padding: 6px 10px; }
.ge-save { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; min-width: 110px; }
.ge-save.dirty { color: var(--warn); }
.ge-tg { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ge-tg input { accent-color: var(--accent); }
.ge-zoom { font-size: 12px; color: var(--muted); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.ge-editors { display: inline-flex; align-items: center; gap: 6px; }
.ge-here { display: inline-flex; }
.ge-conflict { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #2a2210; border-bottom: 1px solid #5a4a1a; color: #fde68a; font-size: 13px; flex-wrap: wrap; flex: none; }
.ge-conflict[hidden] { display: none; }
.ge-body { display: grid; grid-template-columns: 250px 1fr 320px; flex: 1; min-height: 0; }
.ge-left, .ge-right { background: var(--bg2); overflow: auto; min-height: 0; }
.ge-left { border-right: 1px solid var(--line); padding: 8px; }
.ge-right { border-left: 1px solid var(--line); padding: 10px 12px 30px; }
.ge-sec { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); margin: 12px 4px 6px; }
.ge-sec:first-child { margin-top: 4px; }
.ge-cnt { background: var(--panel2); padding: 0 6px; border-radius: 6px; }
.ge-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ge-tool { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 12.5px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.ge-tool:hover:not(:disabled) { border-color: var(--accent); background: var(--hover); }
.ge-tool .ic { color: var(--accent2); }
.ge-tool:disabled { opacity: .45; cursor: default; }
.ge-layers { display: flex; flex-direction: column; gap: 1px; max-height: 38vh; overflow: auto; }
.ge-ly { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; }
.ge-ly span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-ly > .ic { color: var(--dim); flex: none; }
.ge-ly i { display: inline-flex; color: var(--warn); }
.ge-ly .icon-btn { padding: 2px; }
.ge-ly:hover { background: var(--hover); }
.ge-ly.on { background: #12301f; border-color: #1f5a38; }
.ge-ly.hid span { opacity: .45; text-decoration: line-through; }
.ge-none { font-size: 12px; color: var(--dim); padding: 6px; }
.ge-assets { display: flex; flex-direction: column; gap: 5px; }
.ge-as { display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ge-as img, .ge-as .ge-font { width: 38px; height: 38px; object-fit: contain; border-radius: 5px; background: repeating-conic-gradient(#16211b 0% 25%, #111915 0% 50%) 0 0 / 10px 10px; flex: none; display: grid; place-items: center; font-size: 18px; }
.ge-as > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ge-as b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-as span { font-size: 11px; color: var(--muted); }
.ge-stage { overflow: auto; background: #050806; position: relative; min-width: 0; min-height: 0; padding: 20px; }
.ge-wrap { position: relative; margin: 0 auto; box-shadow: 0 0 0 1px #2a3b32, 0 20px 60px rgba(0,0,0,.6); touch-action: none; user-select: none; }
.ge-canvas, .ge-ov { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.ge-canvas { overflow: hidden; }
.ge-canvas.grid { background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important; background-size: 40px 40px !important; }
.ge-ov { pointer-events: none; }
.ge-ov .ge-h { pointer-events: auto; }
.ge-ref { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ge-sel { position: absolute; border: solid #5fde94; box-sizing: border-box; }
.ge-h { position: absolute; background: #fff; border: solid #00943e; border-radius: 2px; box-sizing: border-box; }
.ge-h.nw { left: 0; top: 0; cursor: nwse-resize; } .ge-h.n { left: 50%; top: 0; cursor: ns-resize; } .ge-h.ne { left: 100%; top: 0; cursor: nesw-resize; }
.ge-h.e { left: 100%; top: 50%; cursor: ew-resize; } .ge-h.se { left: 100%; top: 100%; cursor: nwse-resize; } .ge-h.s { left: 50%; top: 100%; cursor: ns-resize; }
.ge-h.sw { left: 0; top: 100%; cursor: nesw-resize; } .ge-h.w { left: 0; top: 50%; cursor: ew-resize; }
.ge-lbl { position: absolute; left: 0; white-space: nowrap; background: #00943e; color: #fff; padding: 0 .4em; border-radius: 3px; line-height: 1.5; }
.ge-guide { position: absolute; background: #f472b6; }
.ge-marq { position: absolute; border: dashed #5fde94; background: rgba(95,222,148,.08); }
.ge-canvas.preview .gx-button:hover { background: var(--hbg) !important; }
.ge-canvas.preview .gx-button:hover .gx-t { color: var(--hcol) !important; }
.ge-canvas.preview .gx-button:active { background: var(--abg) !important; }
.ge.ro .ge-wrap { cursor: default; }
.gp-h { display: flex; align-items: center; gap: 7px; font-weight: 700; margin-bottom: 8px; }
.gp-h .ic { color: var(--accent2); }
.gp-sec { display: flex; align-items: center; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.gp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
.gp-row > label { flex: 0 0 112px; color: var(--muted); }
.gp-row.col { flex-direction: column; align-items: stretch; }
.gp-row.col > label { flex: none; }
.gp-row input:not([type=checkbox]):not([type=color]):not([type=range]), .gp-row select, .gp-row textarea { flex: 1; min-width: 0; padding: 5px 8px; font-size: 12.5px; }
.gp-row input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.gp-v { color: var(--text); }
.gp-col { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.gp-col input[type=color] { width: 34px; height: 26px; padding: 0 2px; border-radius: 6px; flex: none; cursor: pointer; }
.gp-col input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.gp-a { font-size: 11px; color: var(--muted); width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.gp-none { font-size: 10.5px; color: var(--dim); }
.gp-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 8px; }
.gp-grid4 label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--dim); }
.gp-grid4 input { padding: 5px 6px; font-size: 12.5px; width: 100%; }
.gp-note { width: 100%; font-size: 12.5px; resize: vertical; border-color: #5a4a1a; background: #15130b; }
.gp-note:focus { border-color: var(--warn); }
.gp-help { font-size: 11.5px; color: var(--dim); margin: -2px 0 8px; line-height: 1.45; }
.gp-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.gp-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; flex: 1; }
.gp-seg button { flex: 1; background: none; border: 0; padding: 4px 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.gp-seg button.on { background: #12301f; color: var(--accent2); }
.gp-seg button:hover:not(.on) { background: var(--hover); color: var(--text); }
.gs-sum { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.gs-sum .ic { flex: none; color: var(--accent2); margin-top: 2px; }
@media (max-width: 1250px) { .ge-body { grid-template-columns: 210px 1fr 280px; } }
@media (max-width: 1050px) { .ge-body { grid-template-columns: 1fr; grid-template-rows: auto 60vh auto; } .ge-left, .ge-right { max-height: none; } }

/* ---------------------------------------------------------------- Központ (hub.js) */
.hub { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.hub-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.hub-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid transparent; border-bottom: none; border-radius: 9px 9px 0 0; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; font: inherit; }
.hub-tab:hover { color: var(--text); background: var(--panel); }
.hub-tab.on { color: var(--text); background: var(--panel); border-color: var(--line); margin-bottom: -1px; box-shadow: inset 0 2px 0 var(--accent); }
.hub-badge { background: var(--err); color: #1a0707; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 0 6px; }
.hub-body { flex: 1; overflow: auto; padding: 16px; min-height: 0; }
.hn { color: var(--dim); font-size: 12px; }
.hub-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hub-row h3 { margin: 0; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.hub-in { padding: 6px 9px; font-size: 13px; }
.hub-ta { width: 100%; resize: vertical; font-size: 13px; line-height: 1.5; }
.hub-ta.mono, .hub-pre { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
.hub-pre { white-space: pre-wrap; word-break: break-word; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 6px 0; max-height: 320px; overflow: auto; color: var(--muted); }
.hub-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #5a4a1a; background: #1e1a0d; border-radius: 10px; margin-bottom: 14px; color: #fde68a; flex-wrap: wrap; }
.hub-banner a { color: var(--accent2); }
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.hub-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.hub-tile.warn { border-color: #5a4a1a; }
.ht-l { font-size: 12px; color: var(--muted); }
.ht-v { font-size: 24px; font-weight: 700; margin: 4px 0 2px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ht-u { font-size: 13px; font-weight: 500; color: var(--muted); }
.ht-s { font-size: 11.5px; color: var(--dim); min-height: 14px; }
.hub-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-bottom: 18px; }
.hub-chart { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 6px; }
.hc-h { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.hc-v { color: var(--text); font-variant-numeric: tabular-nums; }
.hc-p { position: relative; }
.hc-svg { width: 100%; height: 130px; display: block; overflow: visible; }
.hc-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-ax { fill: var(--dim); font-size: 10px; }
.hc-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hc-area { fill: var(--accent); opacity: .12; }
.hc-x { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.hc-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.hc-tip { position: absolute; top: 0; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 9px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.hub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hub-cols.kb { grid-template-columns: minmax(300px, 420px) 1fr; }
.hub-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.hub-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hub-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
.hub-tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hub-tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-tbl tr.click { cursor: pointer; }
.hub-tbl tr.click:hover td { background: var(--panel2); }
.hub-bar { display: inline-block; width: 60px; height: 6px; background: var(--bg2); border-radius: 3px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.hub-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.hub-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.hub-crash { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 12.5px; }
.hub-crash summary { cursor: pointer; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.empty.small { padding: 14px; font-size: 13px; }
.hub-err { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.he-top, .he-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.he-file { color: var(--accent2); font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
.he-msg { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12.5px; margin: 8px 0; color: var(--text); word-break: break-word; }
.he-meta { color: var(--muted); }
.hub-vcs { max-width: 1100px; }
.hv-day { font-size: 12px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; text-transform: capitalize; }
.hv-c { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 5px; cursor: pointer; }
.hv-c:hover { border-color: var(--line2); background: var(--panel2); }
.hv-ic { width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); flex: none; }
.hv-m { flex: 1; min-width: 0; }
.hv-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-m .hn { display: block; margin-top: 2px; }
.hv-n { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hv-files { max-height: 50vh; overflow: auto; }
.hv-f { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
.hv-f a { color: var(--accent2); word-break: break-all; }
.hub-aud { max-width: 1200px; }
.ha-r { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
.ha-r.hot .ha-x { color: #fde68a; }
.ha-t { color: var(--dim); min-width: 112px; font-variant-numeric: tabular-nums; }
.ha-u { min-width: 80px; font-weight: 600; }
.ha-x { flex: 1; min-width: 200px; word-break: break-word; color: var(--muted); }
.kb-hit { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 12.5px; flex-wrap: wrap; }
.kb-hit:hover { background: var(--panel2); }
.kb-hit code, .modal code { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
.db { display: grid; grid-template-columns: 250px 1fr; gap: 14px; height: 100%; min-height: 0; }
.db-side { display: flex; flex-direction: column; min-height: 0; }
.db-tl { overflow: auto; flex: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.db-t { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; cursor: pointer; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.db-t:hover { background: var(--panel2); }
.db-t.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.db-main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.db-grid { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); max-height: calc(100vh - 230px); }
.db-tbl td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
.db-tbl th { cursor: pointer; }
.db-null { color: var(--dim); font-style: italic; }
.db-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.db-fl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.db-fl input, .db-fl textarea { width: 100%; font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; }
/* kódszerkesztő: ki írta (blame), ütközés */
.blame-tag::after { color: var(--dim); font-style: italic; font-size: 11.5px; margin-left: 3em; opacity: .85; }
.blame-head { border-left: 2px solid var(--accent); margin-left: 3px; }
.blame-cont { border-left: 2px solid var(--line2); margin-left: 3px; }
.ed-clash { border-color: #5a2525 !important; color: #fecaca !important; background: #2a1212 !important; }
@media (max-width: 900px) {
  .hub-cols, .hub-cols.kb { grid-template-columns: 1fr; }
  .db { grid-template-columns: 1fr; height: auto; }
  .db-tl { max-height: 220px; }
  .hub-body { padding: 12px; }
}
