/* ==========================================================================
   Teszt Cég demó. Szekciókra bontva: minden nézetnek saját, névvel jelölt blokkja
   van, a reszponzív szabályaival együtt. Új szabály a saját blokkjába kerüljön.
   ========================================================================== */

/* == 1. Alap: tokenek, tipográfia, gombok, űrlapelemek == */
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --panel: #111113;
  --raised: #19191c;
  --border: rgba(245, 245, 243, .12);
  --line: #343437;
  --text: #f5f5f3;
  --soft: #dcdbd8;
  --muted: #b6b5b5;
  --faint: #929294;
  --accent: #f0a84b;
  --accent-deep: #e07b39;
  --green: #a3c8a7;
  --red: #e9a394;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: #f0a84b40; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
svg { flex-shrink: 0; vertical-align: middle; }
button svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: 'Clash Display', 'Instrument Sans', sans-serif; font-weight: 600; font-size: clamp(27px, 2.8vw, 38px); line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: 16px; font-weight: 600; line-height: 1.4; }
h3 { font-size: 16px; font-weight: 550; }
input, select, textarea { width: 100%; min-width: 0; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; outline: none; }
/* Állandó szabály: a szövegmező fix magasságú, nem méretezhető, a tartalom belül görget. */
textarea { resize: none; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #f0a84b29; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[readonly], textarea[readonly] { color: var(--muted); background: var(--panel); }
select { cursor: pointer; min-height: 43px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 20000; top: 12px; left: 12px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: var(--accent); color: #1a1206; border-radius: 7px; }
.skip:focus { width: auto; height: auto; clip-path: none; padding: 12px 20px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.late { color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; background: transparent; font-size: 13px; font-weight: 550; text-align: center; line-height: 1.4; transition: background .15s, border-color .15s; }
.btn:hover { background: #ffffff09; border-color: var(--faint); }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #1a1206; border-color: #ffffff24; box-shadow: inset 0 1px 0 #ffffff33; }
.btn.primary:hover { background: linear-gradient(180deg, #f6b96a, #e7954d); }
.btn.quiet { border-color: var(--border); }
.btn svg { width: 17px; height: 17px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); flex-shrink: 0; }
.icon-btn:hover { color: var(--text); background: #ffffff0a; }
.text-button { padding: 0; display: inline-flex; align-items: center; gap: 6px; text-align: left; line-height: 1.5; font-weight: 500; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; color: var(--accent); }
.text-button svg { width: 16px; height: 16px; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #cecccc; font-size: 11px; white-space: nowrap; }
.status > i { display: block; width: 5px; height: 5px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.status.green { color: var(--green); }
.status.red { color: var(--red); }
.status.amber { color: var(--accent); }
.owner { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-size: 11px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 9px; font-weight: 650; background: #242427; color: #cecccc; flex-shrink: 0; }
.due { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.count { font-size: 10px; font-weight: 500; border: 1px solid var(--line); border-radius: 5px; color: #cecccc; min-width: 22px; text-align: center; padding: 0 4px; line-height: 18px; }
.empty { padding: 28px 22px; text-align: center; color: var(--muted); }
.empty > span { display: inline-flex; padding: 8px; border: 1px dashed var(--line); border-radius: 50%; color: var(--muted); margin-bottom: 12px; }
.empty > span svg { width: 17px; height: 17px; }
.empty h3 { font-size: 13px; color: #cecccc; font-weight: 500; }
.empty p { font-size: 12px; margin: 7px auto 0; max-width: 260px; line-height: 1.7; }
.section { border: 1px solid var(--border); border-radius: 10px; min-width: 0; background: var(--bg); overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); min-height: 56px; }
.section-head h2 { font-size: 14px; letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }

/* == 2. Keret: fejléc, felső fülek, mobilmenü, munkaterület, értesítés == */
.demo-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; min-height: 68px; padding: 10px 28px; background: #0a0a0bf2; border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.sidekick-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sidekick-brand img { display: block; width: 34px; height: auto; }
.brand-word { font-family: 'Clash Display', 'Instrument Sans', sans-serif; font-size: 21px; line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.brand-sub { display: block; font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: 7px; letter-spacing: .25em; line-height: 1; margin-top: 5px; color: #a7a6a6; }
.top-nav { display: flex; align-items: stretch; gap: 4px; margin-inline: auto; min-width: 0; }
.nav-item { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 42px; border-radius: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.nav-item svg { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { color: var(--text); background: #ffffff08; }
.nav-item.active { color: var(--accent); background: #f0a84b12; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.top-search svg { width: 19px; height: 19px; }
.top-consult { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 10px 15px; border-radius: 10px; border: 1px solid #ffffff24; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #1a1206; box-shadow: inset 0 1px 0 #ffffff33; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.top-consult:hover { background: linear-gradient(180deg, #f6b96a, #e7954d); }
.top-consult svg { width: 16px; height: 16px; }
.mobile-menu { display: none; }
main { flex: 1; outline: none; }
.workspace-inner { width: 100%; max-width: 1450px; margin: 0 auto; padding: 34px 40px 56px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading > div { min-width: 0; }
.page-heading > .btn { flex-shrink: 0; }
.page-subtitle { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 70ch; line-height: 1.7; }
.storage-note { display: flex; align-items: center; gap: 12px; padding: 10px 40px; background: var(--raised); color: #cecccc; border-bottom: 1px solid var(--border); font-size: 12px; }
.storage-note > span { flex: 1; }
.assistant-launch { position: fixed; bottom: 24px; right: 28px; z-index: 25; display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; border-radius: 10px; border: 1px solid #f0a84b60; background: var(--panel); color: var(--accent); box-shadow: 0 4px 20px #0005; font-size: 12.5px; }
.assistant-launch:hover { background: var(--raised); }
.assistant-launch svg { width: 17px; height: 17px; }
.toast:empty { display: none; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 200; max-width: min(550px, calc(100vw - 32px)); width: max-content; display: flex; align-items: center; gap: 10px; background: #cecccc; color: #19191c; padding: 10px 12px 10px 18px; border-radius: 8px; box-shadow: 0 10px 40px #0004; font-size: 12.5px; }
.toast .icon-btn { color: #242427; width: 28px; height: 28px; }
.nav-dialog { display: none; }
.nav-dialog[open] { display: flex; flex-direction: column; gap: 22px; position: fixed; inset: 0 auto 0 0; width: 295px; max-width: 85vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 20px 18px 28px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: var(--bg); color: var(--text); }
.nav-dialog::backdrop { background: #090a09ae; backdrop-filter: blur(3px); }
.nav-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.nav-dialog nav { display: grid; gap: 6px; }
.nav-dialog .nav-item { font-size: 15px; min-height: 48px; }
.boot { max-width: 800px; min-height: 380px; margin: 6vh auto 0; padding: 35px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.boot p { color: var(--muted); }
@media (max-width: 1180px) {
  .nav-item svg { display: none; }
  .nav-item { padding-inline: 10px; }
  .topbar { gap: 14px; padding-inline: 20px; }
}
@media (max-width: 980px) {
  .top-nav { display: none; }
  .mobile-menu { display: inline-flex; margin-left: -8px; }
  .top-actions { margin-left: auto; }
  .workspace-inner { padding: 28px 24px 56px; }
  .storage-note { padding-inline: 24px; }
}
@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 8px 12px; min-height: 60px; }
  .brand-word { font-size: 17px; }
  .brand-sub { font-size: 5.5px; }
  .sidekick-brand img { width: 27px; }
  .top-consult { font-size: 11.5px; padding: 9px 11px; min-height: 40px; }
  .top-consult svg { display: none; }
  .workspace-inner { padding: 22px 16px 48px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > .btn { min-height: 40px; font-size: 12px; }
  .assistant-launch { right: 16px; bottom: 16px; padding: 10px 14px; }
  .storage-note { padding-inline: 16px; }
}
@media (max-width: 380px) {
  .top-consult { font-size: 0; }
  .top-consult::before { content: 'Konzultáció'; font-size: 11px; }
  .brand-sub { display: none; }
}

/* == 3. Áttekintés: érkezés, kérdésmező, kérdéskártyák == */
.arrival { max-width: 1080px; margin: 0 auto; padding-top: clamp(8px, 5vh, 64px); display: grid; gap: 30px; }
.arrival-ask { width: 100%; max-width: 820px; justify-self: center; display: grid; gap: 18px; }
.arrival h1 { font-size: clamp(31px, 4vw, 46px); line-height: 1.12; }
.composer { display: grid; gap: 12px; min-width: 0; }
.chat-form { position: relative; }
/* 5 sor: 14 px × 1,55 × 5 + 2 × 14 px = 137 px. */
.chat-form textarea { height: 137px; font-size: 14px; padding: 14px 100px 14px 14px; background: var(--bg); border-color: #4a4a4e; border-radius: 12px; overflow-y: auto; }
/* Nagy mező: 16 px × 1,55 × 5 + 2 × 16 px = 156 px. */
.composer.big .chat-form textarea { height: 156px; font-size: 16px; padding: 16px 110px 16px 18px; background: var(--panel); border-radius: 16px; box-shadow: 0 22px 60px #0008, 0 0 0 1px #f0a84b12; }
.composer-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.voice-input, .chat-send { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; }
.voice-input { border: 1px solid #3f3f42; color: var(--muted); background: var(--raised); }
.voice-input:hover { border-color: var(--accent); color: var(--accent); }
.voice-input.listening { color: #1a1206; background: var(--accent); border-color: var(--accent); animation: voice-pulse 1.25s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 7px #f0a84b1f; } }
.chat-send { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #1a1206; box-shadow: inset 0 1px 0 #ffffff33; }
.chat-send:hover { background: linear-gradient(180deg, #f6b96a, #e7954d); }
.voice-input svg, .chat-send svg { width: 18px; height: 18px; }
.chat-notes { display: grid; gap: 8px; }
.privacy-note { font-size: 12px; color: var(--muted); line-height: 1.65; }
.privacy-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.q-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.q-card { position: relative; display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); transition: border-color .15s, background .15s; }
.q-card:hover { border-color: #f0a84b70; background: #141416; }
.q-card:has(.q-button:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.q-card h2 { font-family: 'Clash Display', 'Instrument Sans', sans-serif; font-weight: 600; font-size: 17px; line-height: 1.3; }
.q-button { padding: 0; text-align: left; font: inherit; color: inherit; text-wrap: balance; }
.q-button::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.q-button:focus-visible { outline: none; }
.q-card dl { margin: 0; }
.q-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #ffffff0d; font-size: 12.5px; }
.q-card dt { color: var(--muted); min-width: 0; }
.q-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-run { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; }
.q-run svg { width: 15px; height: 15px; }
.resume { justify-self: center; font-size: 13px; color: var(--muted); }
.activity { border-top: 1px solid var(--border); padding-top: 20px; display: grid; gap: 10px; }
.activity h2 { font-size: 13px; color: var(--muted); font-weight: 500; }
.activity-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.activity-row > i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
@media (max-width: 900px) {
  .q-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .arrival { gap: 24px; }
  .arrival h1 { font-size: 30px; }
  .composer.big .chat-form textarea { height: 137px; font-size: 14px; padding: 14px 100px 14px 14px; border-radius: 14px; }
  .q-card { padding: 16px; }
}

/* == 4. Beszélgetés, asszisztenspanel és forráspanele == */
/* A bal oldali chat egyoszlopos, forrás nélküli (2026-09-15); a szélesség a korábbi fő oszlopé. */
.conversation { max-width: 832px; margin: 0 auto; }
.conv-main { display: grid; gap: 18px; min-width: 0; }
.conv-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 32px; }
.chat-messages { display: grid; gap: 18px; min-width: 0; }
.message { min-width: 0; }
.message-label { display: block; margin-bottom: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.message.user { justify-self: end; max-width: 85%; padding: 12px 16px; border: 1px solid var(--line); background: var(--raised); border-radius: 14px 14px 4px 14px; }
.message.user .message-label { color: var(--muted); }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.75; }
.message.user .message-text { font-size: 14px; }
.message-text strong { font-weight: 600; color: var(--text); }
#live-response[hidden] { display: none; }
.sources, .model-detail { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.sources summary, .model-detail summary { cursor: pointer; }
.sources > div { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.source-link { font-size: 11.5px; color: #cecccc; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.source-link:hover { border-color: var(--accent); }
.model-detail > span { display: block; margin-top: 7px; line-height: 1.7; }
.next-questions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--faint); }
.next-q { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--raised); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; color: var(--soft); text-align: left; }
.next-q:hover { border-color: #f0a84b70; }
.next-q.accent { color: var(--accent); border-color: #f0a84b66; }
.next-q svg { width: 15px; height: 15px; }
.context-chip { display: inline-flex; align-items: center; gap: 6px; justify-self: start; max-width: 100%; border: 1px solid #f0a84b55; background: #f0a84b0d; border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 12.5px; color: var(--soft); }
.context-chip > span { min-width: 0; overflow-wrap: anywhere; }
.context-chip strong { font-weight: 600; }
.chip-clear { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); flex-shrink: 0; }
.chip-clear:hover { color: var(--text); background: #ffffff0f; }
.chip-clear svg { width: 14px; height: 14px; }
.fallback-box { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.fallback-box strong { color: var(--text); font-weight: 550; }
.fallback-box .btn { align-self: flex-start; margin-top: 8px; min-height: 38px; font-size: 12.5px; border-color: #f0a84b66; color: var(--accent); }
.chat-error { font-size: 12.5px; color: #e5b0a0; line-height: 1.7; }
.src-panel { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.src-panel > summary { position: relative; list-style: none; cursor: pointer; display: grid; gap: 3px; padding-right: 26px; }
.src-panel > summary::-webkit-details-marker { display: none; }
/* Lenyitható jelzés: összecsukva lefelé, nyitva felfelé mutat. */
.src-panel > summary::after { content: ''; position: absolute; right: 4px; top: 8px; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.src-panel[open] > summary::after { top: 12px; transform: rotate(-135deg); }
.src-heading { font-family: 'Clash Display', 'Instrument Sans', sans-serif; font-size: 17px; font-weight: 600; }
.src-count { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--faint); }
.src-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; max-height: min(58vh, 560px); overflow: auto; }
.src { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); transition: border-color .3s, box-shadow .3s; }
.src-state { width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; }
.src-state svg { width: 13px; height: 13px; }
.src.passed .src-state { border: 1px dashed #5a5a5d; color: transparent; }
.src.used .src-state { background: #a3c8a722; color: var(--green); }
.src.fresh { border-color: #f0a84b88; box-shadow: 0 0 0 3px #f0a84b14; }
.src-body { display: grid; gap: 2px; min-width: 0; }
.src-title { justify-self: start; padding: 0; text-align: left; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.src-title:hover { color: var(--accent); }
.src small { font-size: 11.5px; color: var(--muted); }
.src-more { margin-top: 10px; font-size: 12px; color: var(--muted); }
.src-more summary { cursor: pointer; }
.src-legend { margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: var(--faint); }
.assistant-panel { position: fixed; inset: 0 0 0 auto; margin: 0; width: 470px; max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: var(--panel); color: var(--text); }
.assistant-panel::backdrop { background: #07080750; }
.chat-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.chat-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.chat-panel-head > span { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.chat-panel-head > span svg { color: var(--accent); width: 19px; height: 19px; }
.chat-panel-head > div { display: flex; align-items: center; gap: 12px; }
.chat-panel-head .text-button { font-size: 12px; color: var(--accent); }
.assistant-panel .context-chip { margin: 12px 20px 0; }
.assistant-panel .chat-messages { flex: 1; min-height: 0; overflow: auto; align-content: start; padding: 18px 20px; }
.assistant-panel .composer { padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.panel-hint { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .message.user { max-width: 92%; }
  .assistant-panel { width: 100vw; }
  .chat-panel-head { padding-inline: 16px; }
  .assistant-panel .chat-messages, .assistant-panel .composer { padding-inline: 16px; }
}

/* == 5. Sütidöntés a demón: a mező alatt, nem lebegő rétegként == */
.consent-slot .sk-consent { position: static; inset: auto; z-index: auto; display: block; padding: 0; pointer-events: auto; }
.consent-slot .sk-consent[hidden] { display: none; }
.consent-slot .sk-consent__card { box-sizing: border-box; width: 100%; max-width: none; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; transform: none; opacity: 1; }
.consent-slot .sk-consent__body { flex: 1 1 280px; }
.consent-slot .sk-consent__eyebrow { display: none; }
.consent-slot .sk-consent__text { font-size: 12px; line-height: 1.65; color: var(--muted); }
.consent-slot .sk-consent__actions { width: auto; gap: 8px; }
/* A két gomb egyforma méretű és súlyú: az elutasítás nem nehezebb az elfogadásnál. */
.consent-slot .sk-btn, .consent-slot .sk-btn--solid, .consent-slot .sk-btn--ghost { flex: 0 0 auto; height: 34px; padding: 0 15px; border-radius: 999px; font-size: 12.5px; background: transparent; border: 1px solid #4a4a4e; color: var(--text); box-shadow: none; transform: none; }
.consent-slot .sk-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.view-consent { max-width: 1450px; margin: 0 auto; padding: 0 40px 36px; }
@media (max-width: 980px) { .view-consent { padding-inline: 24px; } }
@media (max-width: 520px) { .view-consent { padding-inline: 16px; } }

/* == 6. Nézet: Ügyfelek és rekordlapok (F3/A) == */
.list-workspace { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.tabs-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 20px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.tabs button { display: flex; gap: 9px; align-items: center; padding: 12px 2px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px; }
.tabs button.selected { color: var(--accent); border-color: var(--accent); }
.tabs span { font-size: 10px; border-radius: 4px; background: var(--raised); padding: 0 5px; }
.list-toolbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.list-search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 390px; border: 1px solid var(--border); border-radius: 8px; padding-left: 13px; background: var(--panel); color: var(--muted); }
.list-search svg { width: 16px; height: 16px; }
.list-search input { border: 0; background: none; font-size: 13px; min-height: 42px; box-shadow: none; }
.filter-label { min-width: 170px; }
.filter-label select { font-size: 13px; padding: 9px 12px; border-color: var(--border); background: var(--panel); }
.table-wrap { overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 11px; color: var(--muted); font-weight: 500; padding: 13px 16px; background: var(--panel); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 17px 16px; border-bottom: 1px solid #ffffff0d; font-size: 12.5px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.record-title { text-align: left; font-weight: 550; font-size: 13.5px; padding: 0; min-width: 110px; }
.record-title:hover { color: var(--accent); }
td .owner .avatar { width: 24px; height: 24px; font-size: 8px; }
td.next-step { max-width: 240px; min-width: 130px; font-size: 12px; color: #cecccc; line-height: 1.6; }
.list-count { font-size: 11px; color: var(--muted); padding: 13px 20px; border-top: 1px solid var(--border); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; margin-bottom: 20px; padding: 0; font-size: 12px; color: var(--muted); }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 15px; height: 15px; }
.record-overview { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--border); font-size: 12px; }
.record-overview strong { font-weight: 500; }
.record-overview .status { font-size: 12px; }
.record-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
/* Összecsukható szekció (levelezés, anyagok): a fejléc a lenyitó, a nyíl az állapotot jelzi. */
.fold > summary { list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.fold[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.fold:not([open]) > summary { border-bottom: 0; }
.fold > summary:hover h2 { color: var(--accent); }
.fold > summary:focus-visible { outline-offset: -3px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; margin-top: 26px; }
.detail-main, .detail-aside, .detail-grid > aside { display: grid; gap: 22px; min-width: 0; }
.quote-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; width: 100%; padding: 20px; text-align: left; }
.quote-row:hover, .material-row:hover, .email-row:hover, .knowledge-row:hover, .task-row:hover { background: #ffffff04; }
.quote-row strong { font-size: 13px; font-weight: 500; }
.quote-row small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.quote-icon { display: inline-flex; padding: 10px; background: #242427; border-radius: 6px; color: var(--accent); }
.quote-amount { margin-left: auto; font-size: 18px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.quote-amount small { text-align: right; }
.quote-row > svg { width: 15px; color: var(--muted); }
.project-link { display: flex; gap: 15px; align-items: center; justify-content: space-between; padding: 18px 20px; font-size: 13px; }
.contact-card { padding: 22px 20px; }
.contact-kicker { font-size: 12px; color: var(--muted); }
.contact-avatar { display: grid; place-items: center; width: 48px; height: 48px; margin: 18px 0 12px; border-radius: 50%; font-size: 16px; background: #242427; color: #cecccc; }
.contact-card h2 { font-size: 17px; }
.contact-card p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.contact-email { display: block; margin-top: 18px; font-size: 12px; overflow-wrap: anywhere; }
.contact-note { margin-top: 5px; font-size: 11px; color: var(--muted); }
.material-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.material-row:last-child { border: 0; }
.material-row > svg { width: 18px; color: var(--muted); }
.material-row > svg:last-child { width: 13px; color: var(--faint); margin-left: auto; }
.material-row strong { display: block; font-size: 12px; font-weight: 500; }
.material-row small { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.email-row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 19px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.email-row:last-child { border: 0; }
.email-row > svg { width: 17px; color: var(--muted); }
.email-row > span:nth-child(2) { flex: 1; min-width: 0; }
.email-row strong { display: block; font-size: 12.5px; font-weight: 500; }
.email-row small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.email-date { flex-shrink: 0; font-size: 11px; text-align: right; }
.approval-row { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.approval-row small { font-size: 11px; color: var(--muted); }
.project-progress { max-width: 550px; margin: 24px 0; }
.project-progress > div { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; background: #2c2c2f; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #2c2c2f; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
progress::-moz-progress-bar { background: var(--accent); }
.related-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 24px; font-size: 13px; }
.related-bar > svg { width: 14px; color: var(--faint); }
.related-bar .text-button { color: var(--accent); }
.email-meta { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; font-size: 12.5px; color: var(--muted); }
.document-paper { max-width: 850px; padding: 30px 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.paper-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.paper-top svg { width: 18px; height: 18px; }
.document-content { padding: 26px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.95; }
.paper-bottom { padding-top: 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.document-next { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.task-list { background: var(--bg); }
.task-row { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; }
.task-check { display: grid; place-items: center; width: 18px; height: 18px; min-width: 18px; padding: 0; border: 1px solid #555558; border-radius: 4px; }
.task-check:hover { border-color: var(--accent); }
.task-check.checked { border-color: #849a73; background: #242427; color: #c6d8ba; }
.task-check svg { width: 13px; height: 13px; }
.task-main { flex: 1; min-width: 0; }
.task-main .text-button { font-size: 13px; }
.task-main > span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.task-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.task-meta .owner { font-size: 0; gap: 0; }
.task-meta .due { min-width: 62px; text-align: right; }
.edit-task { width: 24px; height: 28px; margin-right: -8px; }
.edit-task svg { width: 14px; }
/* Kész feladat: halványabb szín átlátszóság helyett, hogy a kontraszt WCAG AA maradjon. */
.completed .task-main .text-button { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.completed .task-main > span { color: var(--faint); }
@media (max-width: 1020px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside, .detail-grid > aside { grid-template-columns: 1fr 1fr; align-items: start; }
  .table-wrap table { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: grid; grid-template-columns: 1fr 1fr; }
  .table-wrap tr { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 20px; border-bottom: 1px solid var(--border); }
  .table-wrap tr:nth-child(odd) { border-right: 1px solid var(--border); }
  .table-wrap td { padding: 0; border: 0; }
  .table-wrap td:first-child, .table-wrap td.next-step { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .table-wrap td:nth-child(2) { grid-column: 1; }
  .table-wrap td:nth-child(3) { grid-row: 4; grid-column: 1; }
  .table-wrap td:nth-child(5) { grid-column: 2; grid-row: 4; text-align: right; }
  td .owner { font-size: 11px; gap: 6px; }
}
@media (max-width: 760px) {
  .list-toolbar { padding: 14px 16px; }
  .tabs-line { padding: 0 16px; }
  .document-paper { padding: 24px; }
}
@media (max-width: 520px) {
  /* Keskeny kijelzőn egymás alatt: a kereső helykitöltője így nem vágódik le. */
  .list-toolbar { flex-wrap: wrap; gap: 9px; }
  .list-search { flex: 1 1 100%; max-width: none; }
  .filter-label { min-width: 0; width: 100%; }
  .filter-label select { font-size: 13px; }
  .table-wrap tbody { grid-template-columns: 1fr; }
  .table-wrap tr:nth-child(odd) { border-right: 0; }
  .table-wrap tr:last-child { border-bottom: 0; }
  .record-title { font-size: 16px; }
  .detail-aside, .detail-grid > aside { grid-template-columns: 1fr; }
  .record-actions .btn { min-height: 40px; font-size: 12px; }
  .quote-row { align-items: flex-start; }
  .quote-row > .quote-amount { width: calc(100% - 54px); margin-left: 48px; font-size: 22px; }
  .quote-row > svg { display: none; }
  .email-row { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 18px 16px; }
  .email-date { width: 100%; margin-left: 27px; text-align: left; display: flex; gap: 12px; }
  .task-row { flex-wrap: wrap; gap: 9px; padding: 14px 15px; }
  .task-row .edit-task { display: none; }
  .record-overview { gap: 12px; }
  .record-overview strong { width: 100%; line-height: 1.65; font-weight: 400; color: var(--muted); }
  .document-paper { padding: 20px; }
  .document-next .btn { width: 100%; }
}

/* == 7. Nézet: Csapat (F3/B) == */
.department-list { display: grid; gap: 20px; }
.team-section { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-card { min-width: 0; padding: 20px; background: var(--panel); }
.person-card:nth-child(2n) { border-left: 1px solid var(--border); }
.person-card:nth-child(n+3) { border-top: 1px solid var(--border); }
.person-card:nth-last-child(1):nth-child(odd) { grid-column: 1 / -1; }
.person-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-top > div { min-width: 0; }
.person-top p { margin-top: 2px; font-size: 11px; color: var(--muted); }
.person-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: #2a2a2d; color: #cecccc; font-size: 10px; font-weight: 700; }
.person-focus { margin-top: 16px; padding-top: 14px; border-top: 1px solid #ffffff0b; }
.person-focus span, .person-focus strong { display: block; }
.person-focus span { font-size: 10px; color: var(--muted); }
.person-focus strong { margin-top: 5px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.workload { margin-top: 15px; }
.workload > div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; color: var(--muted); }
.workload strong { color: #cecccc; }
@media (max-width: 1020px) {
  .team-grid { grid-template-columns: 1fr; }
  .person-card:nth-child(n) { border-left: 0; }
  .person-card:nth-child(n+2) { border-top: 1px solid var(--border); }
}

/* == 8. Nézet: Tudástár (F3/B) == */
.knowledge-workspace { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.knowledge-list { background: var(--bg); }
.knowledge-row { display: flex; align-items: center; gap: 18px; width: 100%; padding: 18px 22px; text-align: left; border-bottom: 1px solid var(--border); }
.knowledge-row:last-child { border: 0; }
.doc-type-icon { display: flex; align-items: center; padding: 9px; border-radius: 6px; background: #242427; color: var(--muted); }
.doc-type-icon svg { width: 19px; }
.knowledge-title { flex: 1; min-width: 0; }
.knowledge-title strong { font-size: 13.5px; font-weight: 500; }
.knowledge-title small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.knowledge-meta { display: grid; grid-template-columns: 150px 90px 18px; align-items: center; gap: 13px; margin-left: auto; font-size: 11px; color: var(--muted); }
.knowledge-meta > svg { width: 15px; color: var(--faint); }
@media (max-width: 1020px) {
  .knowledge-meta { grid-template-columns: 90px 78px 15px; }
}
@media (max-width: 600px) {
  .knowledge-row { flex-wrap: wrap; gap: 12px; padding: 18px 15px; }
  .knowledge-title { flex-basis: calc(100% - 60px); }
  .knowledge-meta { flex-basis: 100%; display: flex; justify-content: flex-end; gap: 10px; margin-left: 48px; margin-top: -6px; min-width: 0; }
}

/* == 9. Nézet: Eszközök (F3/B) == */
.tools-list { border-top: 1px solid var(--border); }
/* Soronként három elem: eszköz, mit ad az AI-nak, példarekord. */
.tool-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 12px 40px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.tool-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tool-brand > svg { width: 24px; height: 24px; color: var(--accent); }
.tool-brand h2 { font-size: 20px; font-weight: 500; }
.tool-row > p { max-width: 68ch; font-size: 14px; line-height: 1.65; color: #cecccc; }
.tool-row > .text-button { justify-self: end; }
@media (max-width: 1020px) {
  .tool-row { grid-template-columns: 160px minmax(0, 1fr); }
  .tool-row > .text-button { grid-column: 2; justify-self: start; }
}
@media (max-width: 760px) {
  .tool-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 0; }
  .tool-row > .text-button { grid-column: auto; min-height: 44px; }
}

/* == 10. Nézet: AI-agentek (F3/C) == */
.agents-list { display: grid; gap: 12px; }
/* Az egész kártya kattintható: a címgomb ::after rétege fedi, mint a .q-card-nál. */
.agent-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); transition: border-color .15s, background .15s; }
.agent-row:hover { border-color: #f0a84b70; background: #141416; }
.agent-row:has(.agent-button:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.agent-icon { display: flex; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); color: var(--accent); }
.agent-icon svg { width: 22px; height: 22px; }
.agent-copy { display: grid; gap: 6px; }
.agent-row h2 { font-size: 18px; font-weight: 550; line-height: 1.35; letter-spacing: -.015em; }
.agent-button { padding: 0; text-align: left; }
.agent-button::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.agent-button:focus-visible { outline: none; }
.agent-copy p { font-size: 13px; color: var(--muted); }
.agent-copy .agent-human { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid #ffffff0d; font-size: 12.5px; line-height: 1.6; color: var(--soft); }
.agent-human svg { width: 15px; height: 15px; margin-top: 2px; color: var(--accent); }
.agent-run { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; white-space: nowrap; }
.agent-run svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .agent-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px 14px; padding: 16px; }
  .agent-icon { padding: 10px; }
  .agent-icon svg { width: 20px; height: 20px; }
  .agent-run { grid-column: 2; }
}

/* == 11. Nézet: Keresés (F3/C) == */
.search-group { margin-bottom: 20px; }
.search-result { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
.search-result:last-child { border: 0; }
#search-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }

/* == 12. Ablakok == */
dialog { max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); width: 590px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 20px 120px #0006; overscroll-behavior: contain; }
dialog::backdrop { background: #090a09ae; backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.modal-head h2 { font-size: 21px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.modal-sub { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-head > .icon-btn { margin-right: -10px; }
.modal form { display: grid; gap: 16px; }
.modal label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: #cecccc; }
/* 5 sor: 14 px × 1,55 × 5 + 2 × 11 px ≈ 131 px; a 10 soros levél 239 px. */
.modal textarea { height: 131px; font-size: 14px; overflow-y: auto; }
.modal textarea[rows="10"] { height: 239px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.modal-actions .btn { font-size: 12.5px; }
.form-error { font-size: 12.5px; color: #edac9e; line-height: 1.65; }
.form-error:empty { display: none; }
.draft-steps { display: flex; gap: 18px; flex-wrap: wrap; margin-top: -4px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.draft-steps .done { color: var(--accent); }
/* Az e-mail-tervezet ablakának „mintaválasz / élő AI” jelzése. */
.sample-label { display: block; margin: 0; font-size: 11px; color: var(--muted); }
.modal .sample-label { margin: 14px 0; }
.completion-check { display: grid; place-items: center; width: 56px; height: 56px; margin: 5px 0 22px; border: 1px solid #657552; border-radius: 50%; background: #242427; color: #c3d3b0; }
.completion-check svg { width: 28px; height: 28px; }
.completion-check + p { margin-bottom: 14px; line-height: 1.8; }
.modal > .small + .btn { margin-top: 20px; }
@media (max-width: 520px) {
  .modal { padding: 20px; max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .modal input, .modal select, .modal textarea { font-size: 14px; }
  .modal-actions > .btn { flex: 1; min-height: 44px; }
  .modal-actions > .btn.primary { min-width: 100%; }
  .form-grid { gap: 11px; }
  #search-form { grid-template-columns: 1fr; }
}

/* == 13. Mozgás == */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
