/* AdlogicERPNew – egyetlen központi stíluslap. Minden szín és méret token; komponens nyers értéket nem használ.
   Arculat: Adlogic (bordó + navy + oliva pöttyök + zöld kiemelés; Quicksand + Oswald). Betűk: fonts.css. */
@import url("fonts.css");

:root {
  /* Adlogic-arculat — forrás: Drive › Pontit › Sales › Ajanlatok › Ajanlat-sablon (ajanlat.html.j2, logo.svg.j2) */
  --brand-bordo: #581041;
  --brand-bordo-dark: #3d0b2d;
  --brand-bordo-light: #7a2a63;
  --brand-green: #6fe882;
  --brand-olive-1: #c9d1b4;
  --brand-olive-2: #a8b28e;
  --brand-olive-3: #7f8d59;
  --brand-olive-4: #546921;

  --c-paper: #f7f7f8;
  --c-panel: #ffffff;
  --c-sunken: #f0f1f3;
  --c-line: #e4e6ea;
  --c-line-strong: #c9ccd2;
  --c-ink: #1d1d1b;
  --c-ink-soft: #4b5361;
  --c-muted: #6f7682;
  --c-heading: #293d5f;
  --c-accent: #581041;
  --c-accent-strong: #3d0b2d;
  --c-accent-soft: #f6eef3;
  --c-accent-ink: #ffffff;
  --c-navy: #293d5f;
  --c-ok: var(--brand-olive-4);
  --c-ok-soft: #eef1e6;
  --c-warn: #9a6512;
  --c-warn-soft: #f8ecd5;
  --c-danger: #b23a32;
  --c-danger-soft: #f7e0dd;
  --c-info: #293d5f;
  --c-info-soft: #e6eaf1;
  --c-user-bubble: #293d5f;
  --c-user-bubble-ink: #ffffff;

  --font: "Quicksand", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-head: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-small: 6px;
  --shadow: 0 1px 2px rgba(29, 29, 27, .06), 0 4px 16px rgba(41, 61, 95, .06);
  --sidebar-w: 288px;
  --outputs-w: 440px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-paper: #141016;
    --c-panel: #1c171e;
    --c-sunken: #18131a;
    --c-line: #2e2730;
    --c-line-strong: #453b48;
    --c-ink: #ecebee;
    --c-ink-soft: #c6c2ca;
    --c-muted: #9a94a0;
    --c-heading: #b9c7e0;
    --c-accent: #d58ab8;
    --c-accent-strong: #e3a6cb;
    --c-accent-soft: #3a1a30;
    --c-accent-ink: #1d1d1b;
    --c-navy: #a9bbd9;
    --c-ok: #a8c26a;
    --c-ok-soft: #263018;
    --c-warn: #e2b462;
    --c-warn-soft: #362c18;
    --c-danger: #ef8a80;
    --c-danger-soft: #3a1f1d;
    --c-info: #a9bbd9;
    --c-info-soft: #1f2738;
    --c-user-bubble: #2c3a55;
    --c-user-bubble-ink: #ecebee;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--c-paper); color: var(--c-ink);
  font: 500 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; overflow: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-family: var(--font-head); font-size: 24px; font-weight: 600; letter-spacing: .01em; color: var(--c-heading); }
h2 { font-size: 13px; font-weight: 700; }
strong, b { font-weight: 700; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--c-sunken); padding: 1px 5px; border-radius: 4px; }
a { color: var(--c-info); }
.muted { color: var(--c-muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* ---- gombok, chipek ---------------------------------------------------- */
.btn {
  font: inherit; font-weight: 600; border-radius: var(--radius-small); cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--c-line-strong); background: var(--c-panel); color: var(--c-ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--c-ink-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.btn--primary:hover { background: var(--c-accent-strong); border-color: var(--c-accent-strong); }
.btn--ghost { background: transparent; }
.btn--small { padding: 4px 10px; font-size: 12.5px; }
.btn--danger { color: var(--c-danger); }
.icon-btn { border: 0; background: none; color: var(--c-muted); cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.icon-btn:hover { color: var(--c-ink); background: var(--c-sunken); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px; background: var(--c-sunken); color: var(--c-ink-soft); white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { background: var(--c-ok-soft); color: var(--c-ok); }
.chip--adaptalt, .chip--info { background: var(--c-info-soft); color: var(--c-info); }
.chip--windows, .chip--amber, .chip--warn { background: var(--c-warn-soft); color: var(--c-warn); }
.chip--korlatozott, .chip--hibas, .chip--danger { background: var(--c-danger-soft); color: var(--c-danger); }

/* ---- felső sáv (bordó, mint az ajánlat borítója) ------------------------------ */
.topbar {
  height: 56px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px;
  background: linear-gradient(100deg, var(--brand-bordo-dark) 0%, var(--brand-bordo) 55%, var(--brand-bordo-light) 100%);
  color: #ffffff; position: relative; overflow: hidden;
}
.topbar::after {
  /* a sablon borítójának körei, halványan */
  content: ""; position: absolute; left: 46%; top: -46px; width: 150px; height: 150px; pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.05) 0 21px, transparent 22px),
    radial-gradient(circle at 62% 30%, rgba(255,255,255,.05) 0 21px, transparent 22px),
    radial-gradient(circle at 46% 60%, rgba(255,255,255,.05) 0 21px, transparent 22px);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; z-index: 1; }
.brand-logo { display: block; height: 38px; width: auto; }
.brand-product {
  font-family: var(--font-head); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .85);
}
.topbar-spacer { flex: 1; }
.topbar-note { font-size: 12.5px; color: rgba(255, 255, 255, .78); z-index: 1; }
.topbar-note--warn { color: #ffd38a; font-weight: 700; }
.topbar .btn--ghost { color: #ffffff; border-color: rgba(255, 255, 255, .4); z-index: 1; }
.topbar .btn--ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, .08); }
.topbar .chip { z-index: 1; }

/* ---- keret ------------------------------------------------------------------ */
.shell { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: var(--sidebar-w); flex: none; border-right: 1px solid var(--c-line); background: var(--c-panel);
  display: flex; flex-direction: column; min-height: 0;
}
.side-section { padding: 14px 10px 8px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.side-group + .side-group { margin-top: 14px; }
.side-group-head {
  width: 100%; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-small); text-align: left;
  background: linear-gradient(100deg, var(--brand-bordo-dark) 0%, var(--brand-bordo) 70%, var(--brand-bordo-light) 100%);
  color: #ffffff; font-family: var(--font-head); font-size: 13px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; box-shadow: 0 1px 2px rgba(61, 11, 45, .25);
}
.side-group-head:hover { filter: brightness(1.12); }
.side-group-head:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.side-group-caret { color: var(--brand-green); font-size: 11px; transition: transform .15s; width: 12px; }
.side-group.is-closed .side-group-caret { transform: rotate(-90deg); }
.side-group.is-closed .side-group-head { background: var(--brand-bordo-light); box-shadow: none; }
.side-group-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; background: rgba(255, 255, 255, .18); color: #ffffff;
  font-family: var(--font); font-size: 11.5px; font-weight: 700; letter-spacing: 0;
}
.side-group > .side-list { margin: 6px 0 0 10px; padding-left: 6px; border-left: 2px solid rgba(168, 178, 142, .55); }

.topbar-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 999px; background: var(--brand-green); color: var(--brand-bordo-dark);
  font-size: 11px; font-weight: 800;
}
.topbar-badge.is-waiting { background: #ffd38a; }
.topbar .btn--ghost.is-active { background: rgba(255, 255, 255, .14); border-color: #ffffff; }

.archive-tools { display: flex; align-items: center; gap: 12px; max-width: 900px; margin-bottom: 14px; }
.archive-tools input { max-width: 420px; }
.archive-list { list-style: none; margin: 0; padding: 0; max-width: 900px; display: flex; flex-direction: column; gap: 6px; }
.archive-item {
  width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; display: grid;
  grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 14px; border-radius: var(--radius-small);
  border: 1px solid var(--c-line); background: var(--c-panel);
}
.archive-item:hover { border-color: var(--c-accent); }
.archive-title { font-weight: 700; }
.archive-meta, .archive-request { grid-column: 1 / -1; color: var(--c-muted); font-size: 12.5px; }
.archive-request { color: var(--c-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; }
.side-head h2 { font-family: var(--font-head); font-weight: 500; text-transform: uppercase; font-size: 12px; letter-spacing: .14em; color: var(--c-accent); }
.side-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.side-list li + li { margin-top: 2px; }
.side-item {
  width: 100%; text-align: left; font: inherit; color: inherit; border: 0; background: none; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-small); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
}
.side-item:hover { background: var(--c-sunken); }
.side-item.is-active { background: var(--c-accent-soft); box-shadow: inset 3px 0 0 var(--c-accent); }
.side-item-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item-sub {
  grid-column: 1 / -1; color: var(--c-muted); font-size: 12px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-empty { color: var(--c-muted); font-size: 12.5px; padding: 4px 10px; }

.main { flex: 1; min-width: 0; overflow: hidden; display: flex; }
.view { flex: 1; overflow-y: auto; padding: 28px 32px 40px; }
.view--empty { display: flex; align-items: center; justify-content: center; }
.empty-card { max-width: 460px; }
.empty-card--fatal { margin: 80px auto; padding: 0 20px; }
.empty-card h1 { margin-bottom: 14px; }
.empty-card h1::after, .view-head h1::after {
  /* zöld kiemelősáv a címek alatt — az ajánlat szakaszcímeinek mintája */
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--brand-green); margin-top: 10px;
}
.brand-dots { display: flex; gap: 8px; margin-bottom: 18px; }
.brand-dots span { width: 16px; height: 16px; border-radius: 50%; }
.brand-dots span:nth-child(1) { background: var(--brand-olive-2); }
.brand-dots span:nth-child(2) { background: var(--brand-olive-3); }
.brand-dots span:nth-child(3) { background: var(--brand-olive-4); }
.brand-tagline {
  margin-top: 18px; font-family: var(--font-head); font-size: 12px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--c-muted);
}
.empty-card p { color: var(--c-ink-soft); }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; font-size: 12px; letter-spacing: .16em; color: var(--c-accent); font-weight: 500; margin-bottom: 4px; }
.lede { color: var(--c-ink-soft); margin-top: 6px; max-width: 760px; }
.view-head { margin-bottom: 22px; }

.panel { background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-head); font-size: 16px; font-weight: 500; letter-spacing: .02em; color: var(--c-heading); }

/* ---- skill-nézet ------------------------------------------------------------ */
.skill-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; max-width: 1180px; }
textarea, input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], input[type=month], select {
  width: 100%; font: inherit; color: var(--c-ink); background: var(--c-paper);
  border: 1px solid var(--c-line-strong); border-radius: var(--radius-small); padding: 9px 11px;
}
textarea { resize: vertical; }
textarea:focus, input:focus { outline: 2px solid var(--c-accent); outline-offset: -1px; border-color: transparent; }
.dropzone {
  display: block; margin-top: 10px; border: 1.5px dashed var(--c-line-strong); border-radius: var(--radius-small);
  padding: 12px; text-align: center; cursor: pointer; color: var(--c-ink-soft);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--c-accent); background: var(--c-accent-soft); }
.dropzone input { display: none; }
.file-chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.file-chips li { font-size: 12px; background: var(--c-sunken); border-radius: 999px; padding: 2px 6px 2px 10px; display: flex; align-items: center; gap: 4px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.form-error { color: var(--c-danger); font-size: 12.5px; }

.compat-list { list-style: none; padding: 0; margin: 0; }
.compat-list li { padding: 10px 0; border-top: 1px solid var(--c-line); }
.compat-list li:first-child { border-top: 0; padding-top: 0; }
.compat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.compat-list .compat-title { font-weight: 600; }
.compat-list .compat-note { color: var(--c-ink-soft); font-size: 12.5px; margin-top: 3px; }
.skill-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.release-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: 12.5px; }
.release-facts dt { color: var(--c-muted); font-weight: 700; }
.release-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.release-blockers { list-style: none; margin: 0 0 8px; padding: 0; }
.release-blockers li { font-size: 12.5px; color: var(--c-danger); background: var(--c-danger-soft); border-radius: var(--radius-small); padding: 6px 9px; margin-bottom: 6px; }
.release-warnings li { color: var(--c-warn); background: var(--c-warn-soft); }
.release-list li b { font-family: var(--font); font-weight: 700; margin-right: 6px; }
.skill-files { margin-top: 14px; font-size: 12.5px; color: var(--c-muted); }
.skill-files summary { cursor: pointer; }
.skill-files ul { margin: 6px 0 0; padding-left: 18px; font-family: var(--mono); font-size: 12px; }

/* ---- futás-nézet ------------------------------------------------------------ */
.view--run { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.run-head {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 24px;
  border-bottom: 1px solid var(--c-line); background: var(--c-panel);
}
.run-head-title { min-width: 0; }
.run-head-title h1 { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-cost { color: var(--c-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.run-actions { margin-left: auto; display: flex; gap: 8px; }
.run-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--outputs-w); }
.timeline-wrap { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--c-line); }
.timeline { list-style: none; margin: 0; padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.ev-text { color: var(--c-ink); max-width: 760px; }
.ev-text p + p, .ev-text ul, .ev-text ol { margin-top: 8px; }
.ev-text ul, .ev-text ol { padding-left: 20px; margin-bottom: 0; }
.ev-text h3, .ev-text h4 { margin: 12px 0 4px; font-size: 14px; }
.ev-user {
  align-self: flex-end; max-width: 620px; background: var(--c-user-bubble); color: var(--c-user-bubble-ink);
  padding: 9px 13px; border-radius: 12px 12px 3px 12px;
}
.ev-user .ev-files { font-size: 12px; opacity: .8; margin-top: 4px; }

.ev-tool {
  display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--c-muted);
  padding: 2px 0 2px 10px; border-left: 2px solid var(--c-line); max-width: 760px;
}
.ev-tool b { color: var(--c-ink-soft); font-weight: 600; flex: none; }
.ev-tool code { background: none; padding: 0; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; min-width: 0; }
.ev-tool--error { border-left-color: var(--c-danger); color: var(--c-danger); }
.ev-tool--error code { color: var(--c-danger); white-space: pre-wrap; }

.ev-banner { padding: 9px 12px; border-radius: var(--radius-small); font-size: 13px; max-width: 760px; }
.ev-banner--error { background: var(--c-danger-soft); color: var(--c-danger); }
.ev-banner--warning { background: var(--c-warn-soft); color: var(--c-warn); }
.ev-banner--info { background: var(--c-info-soft); color: var(--c-info); }

.ev-result { display: flex; align-items: center; gap: 10px; color: var(--c-muted); font-size: 12px; margin: 4px 0; }
.ev-result::before, .ev-result::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

.ev-output button {
  font: inherit; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-align: left;
  border: 1px solid var(--c-line); background: var(--c-panel); color: var(--c-ink); border-radius: var(--radius-small); padding: 7px 11px;
}
.ev-output button:hover { border-color: var(--c-accent); }
.ev-output .ev-output-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-accent); font-weight: 700; }

/* kártyák (kérdés, jóváhagyás) */
.card {
  max-width: 760px; background: var(--c-panel); border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.card--done { border-left-color: var(--c-line-strong); box-shadow: none; }
.card-kicker { font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--c-accent); font-weight: 500; margin-bottom: 6px; }
.card--done .card-kicker { color: var(--c-muted); }
.q-block + .q-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.q-text { font-weight: 600; margin-bottom: 8px; }
.q-hint { font-weight: 400; color: var(--c-muted); font-size: 12px; margin-left: 6px; }
.q-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.q-option {
  display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-small); cursor: pointer; background: var(--c-paper);
}
.q-option:hover { border-color: var(--c-ink-soft); }
.q-option:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.q-option input { margin-top: 3px; accent-color: var(--c-accent); }
.q-option-label { font-weight: 600; display: block; }
.q-option-desc { font-size: 12px; color: var(--c-ink-soft); display: block; }
.q-other { margin-top: 8px; }
.q-other input { font-size: 13px; padding: 7px 10px; }
.choice-search { margin: 4px 0 10px; }
.choice-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.choice-option[hidden] { display: none; }
.form-intro { color: var(--c-ink-soft); font-size: 13px; margin: -2px 0 10px; }
.form-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.form-row label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.form-row input, .form-row textarea { font-size: 13.5px; padding: 8px 10px; }
.card-answer dd { white-space: pre-wrap; }
.card-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.card-answer { margin-top: 8px; font-size: 13px; color: var(--c-ink-soft); }
.card-answer dt { font-weight: 600; color: var(--c-ink); }
.card-answer dd { margin: 0 0 6px; }
.perm-summary { font-family: var(--mono); font-size: 12.5px; background: var(--c-sunken); border-radius: var(--radius-small); padding: 8px 10px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.perm-tool { font-weight: 650; }

.typing { color: var(--c-muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.typing::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-olive-3); box-shadow: 12px 0 0 var(--brand-olive-2), 24px 0 0 var(--brand-olive-1); margin-right: 24px; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.composer { flex: none; display: flex; gap: 10px; align-items: flex-end; padding: 12px 24px 16px; border-top: 1px solid var(--c-line); background: var(--c-panel); }
.composer textarea { resize: none; }

/* kimenetek */
.outputs { display: flex; flex-direction: column; min-height: 0; background: var(--c-panel); }
.outputs-head h2 { font-family: var(--font-head); font-weight: 500; text-transform: uppercase; font-size: 12px; letter-spacing: .14em; color: var(--c-accent); }
.outputs-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 16px 8px; }
.output-list { list-style: none; margin: 0; padding: 0 8px; max-height: 32%; overflow-y: auto; flex: none; }
.output-item {
  width: 100%; font: inherit; color: inherit; text-align: left; border: 0; background: none; cursor: pointer;
  display: grid; grid-template-columns: 44px 1fr; gap: 0 10px; align-items: center; padding: 7px 8px; border-radius: var(--radius-small);
}
.output-item:hover { background: var(--c-sunken); }
.output-item.is-active { background: var(--c-accent-soft); }
.output-kind {
  grid-row: span 2; height: 34px; border-radius: 5px; background: var(--c-sunken); color: var(--c-accent);
  font-size: 10.5px; font-weight: 750; letter-spacing: .05em; display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.output-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.output-meta { color: var(--c-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--c-line); margin-top: 8px; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.preview-bar strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.preview-actions { display: flex; gap: 6px; }
.preview-body { flex: 1; min-height: 0; background: var(--c-sunken); display: flex; }
.preview-body iframe { flex: 1; border: 0; background: #fff; }
.preview-body img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.preview-body pre { margin: 0; padding: 14px; overflow: auto; font: 12px/1.5 var(--mono); flex: 1; white-space: pre-wrap; }
.preview-none { margin: auto; color: var(--c-muted); font-size: 13px; padding: 20px; text-align: center; }

/* ---- beállítások ----------------------------------------------------------- */
.dialog { border: 1px solid var(--c-line); border-radius: 14px; padding: 0; width: min(620px, 92vw); background: var(--c-panel); color: var(--c-ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(17, 21, 27, .45); }
.dialog form { padding: 22px 24px; }
.dialog h2 { font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--c-heading); margin-bottom: 14px; }
.dialog fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.dialog legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.dialog label { display: block; font-size: 12.5px; color: var(--c-ink-soft); margin-top: 8px; }
.dialog label input { margin-top: 4px; }
.dialog .row { display: flex; gap: 10px; align-items: flex-end; margin-top: 6px; }
.dialog .row > * { flex: 1; }
.dialog .row > .btn { flex: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
#key-msg { margin-top: 6px; }
.msg-ok { color: var(--c-ok); }
.msg-err { color: var(--c-danger); }

@media (max-width: 1180px) {
  :root { --outputs-w: 360px; --sidebar-w: 248px; }
  .skill-grid { grid-template-columns: 1fr; }
}

/* „Az összes kiadása” sáv az oldalsáv tetején (csak ha van ki nem adott skill) */
.release-all { margin: 0 8px 10px; padding: 10px 12px; border-radius: 10px; background: rgba(163, 38, 42, .07);
  border: 1px solid rgba(163, 38, 42, .18); }
.release-all p { margin: 0 0 8px; }
.release-all-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn--small { padding: 5px 10px; font-size: 13px; }
.release-all-result { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; max-height: 220px; overflow-y: auto; }
.release-all-result li { margin: 3px 0; }
.release-all-result .ok { color: var(--c-ok); }
.release-all-result .hiba { color: var(--c-danger, #a3262a); }

/* ---- webes mód (AdlogicERP-web): belépés, felhasználó a fejlécben, beállítás-lapok, mátrix, modul-űrlap ---- */
[hidden] { display: none !important; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--c-paper); padding: 16px; }
.login-wrap { width: min(400px, 100%); }
.login-card { display: flex; flex-direction: column; gap: 6px; padding: 28px; }
.login-card h1 { font-family: var(--font-head); font-size: 26px; font-weight: 600; color: var(--c-heading); }
.login-card label { font-size: 12.5px; color: var(--c-ink-soft); margin-top: 8px; }
.login-card .btn { margin-top: 10px; justify-content: center; }
.topbar-user { font-weight: 600; }
.dialog--wide { width: min(1080px, 96vw); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 16px; }
.tab { border: 0; background: transparent; font: inherit; padding: 8px 12px; color: var(--c-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--c-accent); border-bottom-color: var(--c-accent); font-weight: 600; }
.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid th, .grid td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.grid thead th { color: var(--c-muted); font-weight: 600; font-size: 12px; }
.grid tr.is-inactive td { color: var(--c-muted); }
.user-form { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.dialog label.check, label.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-ink); }
.matrix-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--c-line); border-radius: var(--radius-small); }
.matrix th.matrix-user { text-align: center; white-space: nowrap; position: sticky; top: 0; background: var(--c-panel); }
.matrix td { text-align: center; }
.matrix th.matrix-skill { font-weight: 500; white-space: nowrap; }
.matrix tr.matrix-group th { background: var(--c-sunken); color: var(--c-heading); font-family: var(--font-head);
  font-weight: 500; letter-spacing: .02em; }
.module-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.module-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--c-ink-soft); }
.module-row input, .module-row select { max-width: 320px; }
.module-check .chip { margin-left: 6px; }
.module-write-note { color: var(--c-warn); background: var(--c-warn-soft); padding: 8px 10px; border-radius: var(--radius-small); }
.run-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.run-filters label { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 130px; }
.run-filters .btn { margin-left: auto; }
.grid .num { text-align: right; white-space: nowrap; }
.runs-grid th[data-sort] { cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--c-panel); }
.runs-grid th[data-sort]::after { content: attr(data-dir); margin-left: 4px; color: var(--c-accent); }
.runs-grid tfoot th { border-top: 2px solid var(--c-line-strong); color: var(--c-heading); }
.grid tr.is-clickable { cursor: pointer; }
.grid tr.is-clickable:hover td { background: var(--c-accent-soft); }
.account-row select { max-width: 320px; }
