/* Sinum | FEJLESZTÉS – a Connect/Ajánlatadó palettája: sötét alap, kék üveg, fehér szöveg; betű: Nunito (mint a BMS/Ajánlatadó) */
@font-face { font-family: Nunito; src: url("/fonts/nunito-latin-variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: Nunito; src: url("/fonts/nunito-latin-ext-variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+100-2BA; }

:root {
  --bg: #01070e;
  --panel: color-mix(in srgb, #155693 55%, transparent);
  --panel-2: color-mix(in srgb, #155693 32%, transparent);
  --line: rgb(255 255 255 / 12%);
  --text: #ffffff;
  --muted: #c9d9ec;
  --dim: #97b0cc;
  --brand: #1192e8;
  --accent: #82cdf0;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #ff6b6b;
  --bubble-claude: #f4f8fd;
  --bubble-claude-ink: #0b2f45;
  --radius: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* háttér: lassan sodródó kék fényfoltok (Connect-minta) */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #0a2f52 0%, #03111f 55%, #01070e 100%); }
.bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .32; animation: drift 38s ease-in-out infinite alternate; }
.bg i:nth-child(1) { background: #1192e8; left: -20vmax; top: -25vmax; }
.bg i:nth-child(2) { background: #0d5fa3; right: -25vmax; top: 20vh; animation-duration: 46s; }
.bg i:nth-child(3) { background: #1b7fb8; left: 10vw; bottom: -35vmax; animation-duration: 52s; opacity: .22; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } }

#app { height: 100dvh; display: flex; flex-direction: column; }
.boot { flex: 1; display: grid; place-items: center; opacity: .8; }

/* ── közös elemek ── */
.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.circle { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid rgb(255 255 255 / 55%); background: transparent; padding: 0; }
.circle:hover { background: rgb(255 255 255 / 8%); }
.circle svg { width: 19px; height: 19px; }
.circle.brand { background: var(--brand); border-color: var(--brand); }
.circle.brand:hover { background: #2aa2f0; }
.circle:disabled { opacity: .45; cursor: default; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font-weight: 800; }
.btn:hover { background: #2aa2f0; }
.btn.ghost { background: rgb(255 255 255 / 10%); border: 1px solid var(--line); }
.btn.ghost:hover { background: rgb(255 255 255 / 16%); }
.btn:disabled { opacity: .55; cursor: default; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 22%); background: rgb(1 7 14 / 45%); outline: none; font-size: 16px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(130 205 240 / 25%); }
.err { color: #ffb3b3; font-weight: 700; font-size: 14px; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgb(255 255 255 / 9%); border: 1px solid var(--line); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgb(74 222 128 / 18%); }
.dot.busy { background: var(--warn); box-shadow: 0 0 0 4px rgb(251 191 36 / 18%); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ff4d4f; color: #fff; font-size: 12px; font-weight: 900; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── belépés ── */
.login { flex: 1; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); overflow-y: auto; }
.login form { width: min(400px, 100%); padding: 28px 24px; border-radius: 24px; display: grid; gap: 14px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / 70%); }
.login .logo { display: block; width: 100%; max-width: 270px; height: auto; margin: 0 auto 6px; }
.login p.lead { margin: 0 0 4px; text-align: center; color: var(--muted); font-size: 14px; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.pw svg { width: 20px; height: 20px; }

/* ── fejléc ── */
.top { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; border-bottom: 1px solid var(--line); background: rgb(3 17 31 / 55%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); flex: none; z-index: 5; }
.top .logo { height: 32px; width: auto; }
.top .grow { flex: 1; min-width: 0; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 48px; min-width: 250px; padding: 6px; border-radius: 16px; z-index: 30; box-shadow: 0 20px 60px -20px rgb(0 0 0 / 80%); background: #0c3358; border: 1px solid var(--line); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 700; }
.menu button:hover { background: rgb(255 255 255 / 9%); }
.menu svg { width: 18px; height: 18px; flex: none; }
.menu .who { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ── kezdőlap ── */
.home { flex: 1; overflow-y: auto; padding: 22px 16px calc(28px + var(--safe-b)); }
.home-inner { width: min(1100px, 100%); margin: 0 auto; }
.hello { margin: 0 0 4px; font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.hello-sub { margin: 0 0 20px; color: var(--muted); }
.runner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; margin-bottom: 20px; font-size: 14px; }
.runner b { font-weight: 800; }
.runner .t { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { position: relative; text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 20px; min-height: 220px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #0e3f6e) 0%, color-mix(in srgb, #155693 60%, transparent) 70%); box-shadow: 0 18px 40px -22px rgb(0 0 0 / 80%), inset 0 1px 0 rgb(255 255 255 / 14%); transition: transform .15s ease, box-shadow .15s ease; color: #fff; }
.card:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -22px rgb(0 0 0 / 85%), inset 0 1px 0 rgb(255 255 255 / 18%); }
.card .head { display: flex; align-items: center; gap: 14px; }
.card .ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 85%, #000); border: 2px solid rgb(255 255 255 / 75%); flex: none; }
.card .ic svg { width: 26px; height: 26px; }
.card h2 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.15; }
.card .sub { font-size: 13px; color: var(--muted); }
.card .desc { margin: 0; color: var(--muted); font-size: 14px; }
.card .last { margin-top: auto; padding: 10px 12px; border-radius: 12px; background: rgb(1 7 14 / 35%); font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .last b { color: #fff; }
.card .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .go { margin-left: auto; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.card .go svg { width: 18px; height: 18px; }
.card .badge { position: absolute; top: 14px; right: 14px; }
.tip { margin-top: 22px; padding: 14px 16px; border-radius: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tip b { color: #fff; }

/* ── chat ── */
.chat-layout { flex: 1; min-height: 0; display: flex; }
.rail { display: none; }
@media (min-width: 1000px) {
  .rail { display: flex; flex-direction: column; gap: 8px; width: 290px; flex: none; padding: 14px; border-right: 1px solid var(--line); overflow-y: auto; background: rgb(3 17 31 / 35%); }
  .rail button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: none; text-align: left; }
  .rail button:hover { background: rgb(255 255 255 / 6%); }
  .rail button.on { background: var(--panel-2); border-color: rgb(255 255 255 / 30%); }
  .rail .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 85%, #000); border: 1.5px solid rgb(255 255 255 / 70%); flex: none; }
  .rail .ic svg { width: 19px; height: 19px; }
  .rail .nm { font-weight: 800; font-size: 14px; line-height: 1.2; }
  .rail .st { font-size: 12px; color: var(--muted); }
  .rail .home-link { margin-bottom: 6px; color: var(--muted); font-weight: 700; font-size: 14px; }
  .tabs { display: none !important; }
}
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.chat-head .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 85%, #000); border: 1.5px solid rgb(255 255 255 / 75%); flex: none; }
.chat-head .ic svg { width: 20px; height: 20px; }
.chat-head .t { font-weight: 900; font-size: 16px; line-height: 1.15; }
.chat-head .s { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgb(255 255 255 / 6%); font-weight: 800; font-size: 13px; white-space: nowrap; }
.tabs button.on { background: #fff; color: #0b2f45; border-color: #fff; }
.tabs .badge { min-width: 18px; height: 18px; font-size: 11px; }
.status { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13.5px; background: color-mix(in srgb, var(--brand) 22%, transparent); border-bottom: 1px solid var(--line); flex: none; }
.status svg { width: 17px; height: 17px; flex: none; }
.status .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status .stop { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 40%); background: rgb(1 7 14 / 35%); font-weight: 800; font-size: 12.5px; }
.status.off { background: rgb(255 255 255 / 5%); color: var(--muted); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msgs-inner { width: min(860px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.empty { padding: 18px; border-radius: 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.empty b { color: #fff; }
.m { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.m.mine { align-items: flex-end; }
.m .meta { font-size: 11.5px; color: var(--dim); margin: 0 4px 3px; }
.m .b { max-width: min(88%, 720px); padding: 10px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: rgb(255 255 255 / 10%); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.m.mine .b { background: var(--brand); border-radius: 18px; border-bottom-right-radius: 6px; }
.m.claude .b { background: var(--bubble-claude); color: var(--bubble-claude-ink); white-space: normal; }
.m.claude .b code { background: #e3eef9; padding: 1px 5px; border-radius: 5px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.m.claude .b pre { background: #0b2f45; color: #e6f1fb; padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; white-space: pre; }
.m.claude .b pre code { background: none; padding: 0; color: inherit; }
.m.claude .b ul, .m.claude .b ol { margin: 4px 0; padding-left: 22px; }
.m.claude .b .h { font-weight: 900; margin-top: 6px; }
.m.claude .b .gap { height: 8px; }
.m.claude .b a { color: #0b62b0; }
.m .state { font-size: 11.5px; color: var(--dim); margin: 3px 4px 0; display: flex; align-items: center; gap: 4px; }
.m .state svg { width: 14px; height: 14px; }
.m .state.done { color: var(--ok); }
.sys { align-self: center; text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / 6%); border: 1px dashed var(--line); }
.atts { display: grid; gap: 6px; margin-top: 8px; }
.atts.two { grid-template-columns: 1fr 1fr; }
.atts img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; display: block; background: rgb(0 0 0 / 20%); }
.atts video { width: 100%; max-height: 320px; border-radius: 10px; background: #000; grid-column: 1 / -1; }
.atts .file { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: rgb(0 0 0 / 12%); font-weight: 800; font-size: 13.5px; text-decoration: none; }
.atts .file svg { width: 18px; height: 18px; flex: none; }
.newbelow { position: sticky; bottom: 4px; align-self: center; }
.composer { flex: none; padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: rgb(3 17 31 / 55%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.composer-inner { width: min(860px, 100%); margin: 0 auto; display: grid; gap: 8px; }
.composer .row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 40vh; resize: none; padding: 10px 14px; border-radius: 22px; border: 1px solid rgb(255 255 255 / 25%); background: rgb(1 7 14 / 45%); outline: none; font-size: 16px; line-height: 1.4; }
.composer textarea:focus { border-color: var(--accent); }
.composer .circle { width: 44px; height: 44px; }
.pending { display: flex; flex-wrap: wrap; gap: 8px; }
.pending span { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgb(255 255 255 / 8%); display: grid; place-items: center; font-size: 10px; text-align: center; padding: 4px; }
.pending img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pending button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ff4d4f; display: grid; place-items: center; padding: 0; z-index: 2; }
.pending button svg { width: 12px; height: 12px; }
.drop { outline: 2px dashed var(--accent); outline-offset: -8px; }

/* ── párbeszéd (jelszócsere) ── */
.dlg-back { position: fixed; inset: 0; background: rgb(0 0 0 / 55%); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dlg { width: min(420px, 100%); padding: 22px; border-radius: 22px; display: grid; gap: 12px; background: #0c3358; border: 1px solid var(--line); }
.dlg h3 { margin: 0; font-size: 18px; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: #fff; color: #0b2f45; font-weight: 800; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px -10px rgb(0 0 0 / 60%); max-width: calc(100% - 32px); }

@media (max-width: 520px) {
  .top .logo { height: 26px; }
  .hello { font-size: 22px; }
  .card { min-height: 0; }
  .m .b { max-width: 92%; }
  .runner { align-items: flex-start; }
}
