/* WellSync · közös stílus
   Arculat v1.1 (brand/): alapszín mélykék #244C73, zöld #27836D (szövegben a sötétebb #1F6B58),
   piros #C94F4F csak jelre és díszítésre, háttér meleg törtfehér #F4F2EC.
   Állapotszínek csak adatra: probléma, fejlesztendő, megfelelő. */
:root {
  --bg: #F4F2EC; --surface: #FFFFFF; --band: #EDEAE2; --line: #DCD7CC; --grid: #E8E4DA;
  --ink: #16344A; --muted: #5E6862; --brand: #244C73; --brand-ink: #FFFFFF; --accent: #1F6B58;
  --obj: #244C73; --subj: #B07A45; --bordo: #7E3A4A;
  --sel: var(--brand); --sel-ink: var(--brand-ink); /* kijelölt válasz; white labelnél külön állítható */
  --p: #A8323F; --p-bg: #F6DDE0; --f: #7A5400; --f-bg: #FBEBB5; --f-fill: #E3A91F; --m: #2E6B3B; --m-bg: #DCEBDD;
  --zp: #F3DADD; --zf: #F4E9D4; --zm: #DEEBDF;
  --supp: #ECE8DF; --supp-ink: #6F6A61;
  --warn-bg: #F5E6CB; --warn-ink: #5A3A10;
  --display: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18201C; --surface: #222B26; --band: #2A332D; --line: #3A453E; --grid: #323C35;
    --ink: #ECE7DF; --muted: #A9B2AB; --brand: #9CC2E6; --brand-ink: #10233A; --accent: #7CCBB3;
    --obj: #9CC2E6; --subj: #E0AE78; --bordo: #D9899A;
    --p: #EE8E9A; --p-bg: #43262C; --f: #E6B866; --f-bg: #3D3221; --f-fill: #E6B866; --m: #8FCB98; --m-bg: #233A28;
    --zp: #3A272B; --zf: #383024; --zm: #24352A;
    --supp: #2C332E; --supp-ink: #A1A9A3; --warn-bg: #3D3221; --warn-ink: #F0D5A8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18201C; --surface: #222B26; --band: #2A332D; --line: #3A453E; --grid: #323C35;
  --ink: #ECE7DF; --muted: #A9B2AB; --brand: #9CC2E6; --brand-ink: #10233A; --accent: #7CCBB3;
  --obj: #9CC2E6; --subj: #E0AE78; --bordo: #D9899A;
  --p: #EE8E9A; --p-bg: #43262C; --f: #E6B866; --f-bg: #3D3221; --f-fill: #E6B866; --m: #8FCB98; --m-bg: #233A28;
  --zp: #3A272B; --zf: #383024; --zm: #24352A;
  --supp: #2C332E; --supp-ink: #A1A9A3; --warn-bg: #3D3221; --warn-ink: #F0D5A8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 6vw, 32px); font-weight: 800; line-height: 1.15; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
p { margin: 0; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.eyebrow { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.stack { display: grid; gap: 12px; align-content: start; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* fejléc és jel */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.logo-mark { height: 32px; width: auto; display: block; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* kártyák, gombok, űrlapok */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card.soft { background: var(--band); border-color: transparent; }
.card.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.card.dashed { border-style: dashed; border-color: var(--accent); }
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font: 800 16px var(--display); text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
}
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 700; }
.btn.ghost { background: transparent; color: var(--brand); min-height: 44px; padding: 0 8px; }
.btn.danger { background: var(--p); color: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { appearance: none; background: none; border: 0; padding: 8px 0; font: 700 15px var(--body); color: var(--brand); text-decoration: underline; cursor: pointer; min-height: 44px; }
label.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
select, input[type=text], input[type=email], input[type=number], input[type=month], input[type=date], input[type=datetime-local], textarea {
  font: 600 16px var(--body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 50px; width: 100%;
}
textarea { font-weight: 400; line-height: 1.5; resize: vertical; box-sizing: border-box; }
/* Szöveges válaszok a riportban és az akciótervben */
.quotes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.quotes li { background: var(--band); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; }
.quotes li.hidden { opacity: .55; text-decoration: line-through; }
.topics .btn.on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.quotes li .lvl { margin-right: 4px; }
.quotes li.flagged { box-shadow: inset 3px 0 0 var(--p); }
.textctl { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; vertical-align: middle; }
.textctl select { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: auto; max-width: 190px; min-height: 30px; height: 30px; }
.quotes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.quotes li[hidden], .quotes[hidden] { display: none; }
.textctl .btn { min-height: 30px; padding: 2px 10px; font-size: 12px; }
.lvl.warnlvl { background: var(--f-bg); color: var(--f); }
.focuslist { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.focuslist li { font-size: 15px; }
.flagnote { display: block; color: var(--p); margin-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.error { color: var(--p); font-weight: 700; font-size: 14.5px; }
.notice { font-size: 14px; }

/* sávok, értékek */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.p { background: var(--p-bg); color: var(--p); } .pill.f { background: var(--f-bg); color: var(--f); } .pill.m { background: var(--m-bg); color: var(--m); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: inherit; }
button.pillar { cursor: pointer; }
.pillar .lab { font-weight: 700; font-size: 13.5px; }
.pillar .big { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.pillar .big small { font-size: 14px; color: var(--muted); }
.top3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.top3 .pillar { padding: 12px 10px; }
.top3 .pillar .lab { font-size: 14px; line-height: 1.25; }
.pillars .pillar .pill { justify-self: start; }
.top3 .pillar .big { font-size: clamp(26px, 7vw, 36px); }
/* Keskeny kijelzőn és nagy betűméret-beállításnál a három fő mutató ne lógjon ki:
   a felirat elválasztható, a kártya nem szélesebb a helyénél, telefonon egymás alatt, soros elrendezésben. */
.pillar { min-width: 0; }
.pillar .lab { overflow-wrap: anywhere; hyphens: auto; }
.pillars .pillar .pill { max-width: 100%; }
@media (max-width: 560px) {
  .top3 { grid-template-columns: 1fr; }
  .top3 .pillar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab big" "pill big"; align-items: center; column-gap: 12px; row-gap: 6px; }
  .top3 .pillar .lab { grid-area: lab; }
  .top3 .pillar .big { grid-area: big; }
  .top3 .pillar .pill { grid-area: pill; }
}
.tops { font-family: var(--display); font-weight: 800; font-size: 20px; display: inline-flex; align-items: center; gap: 8px; }
.minis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr)); gap: 8px; }
.pillar.mini { padding: 8px 10px; gap: 4px; border-radius: 12px; }
.pillar.mini .lab { font-size: 12px; color: var(--muted); }
.pillar.mini .big { font-size: 20px; }
.pillar.mini .pill { font-size: 11px; padding: 1px 7px; }
.tops small { font-size: 12px; color: var(--muted); }
.scale { position: relative; height: 16px; display: flex; }
.scale .z { height: 100%; }
.scale .z.p { background: var(--zp); width: 35%; border-radius: 8px 0 0 8px; }
.scale .z.f { background: var(--zf); width: 31%; }
.scale .z.m { background: var(--zm); width: 34%; border-radius: 0 8px 8px 0; }
.mk { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 13px; height: 13px; border-radius: 2px; background: var(--obj); border: 2px solid var(--surface); z-index: 2; }  /* objektív: négyzet */
.mk.s { background: var(--subj); border-radius: 50%; width: 14px; height: 14px; }  /* szubjektív: kör */
.mk.me { background: var(--ink); width: 16px; height: 16px; border-radius: 50%; }
.connector { position: absolute; top: 50%; height: 3px; transform: translateY(-50%); background: var(--muted); opacity: .55; border-radius: 2px; z-index: 1; }
.connector.gap { background: var(--bordo); opacity: .85; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dist { display: flex; height: 14px; border-radius: 5px; overflow: hidden; background: var(--grid); }
.dist span { height: 100%; display: block; font-size: 10.5px; font-weight: 700; color: var(--surface); line-height: 14px; text-align: center; overflow: hidden; white-space: nowrap; }
.dist span + span { margin-left: 2px; }
.dist-cap { font-size: 12px; color: var(--muted); margin: 6px 0 3px; }
.dist .p { background: var(--p); } .dist .f { background: var(--f-fill); color: #3B2A05; } .dist .m { background: var(--m); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.o { border-radius: 2px; background: var(--obj); }
.legend i.s { background: var(--subj); border-radius: 50%; }
.rows { display: grid; }
.drow { display: grid; grid-template-columns: minmax(130px, 220px) minmax(0, 1fr) 96px; gap: 14px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.drow .nm { font-size: 14.5px; }
.drow .vv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.drow .vv small { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) {
  .drow { grid-template-columns: minmax(0, 1fr) 84px; }
  .drow .viz { grid-column: 1 / -1; order: 3; }
}
.grouphead { padding: 14px 4px 2px; font-family: var(--display); font-weight: 700; color: var(--brand); font-size: 14px; }
.supp { border: 1px dashed var(--line); background: var(--supp); color: var(--supp-ink); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.scroll { overflow-x: auto; min-width: 0; }

/* Közös: fülek, kulcs–érték és rács táblák, szerkesztő párbeszédablak (riport, admin) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tab { all: unset; cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab[aria-pressed="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
table.kv, table.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.kv th, .kv td, .grid th, .grid td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.kv th { width: 30%; min-width: 150px; color: var(--muted); font-weight: 700; }
.grid thead th { color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.grid td { font-variant-numeric: tabular-nums; }
.kv th .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kv tr.out th, .kv tr.out td { background: var(--band); }
.grid tr.off th, .grid tr.off td { color: var(--supp-ink); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.acts { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
dialog.mjdlg { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.mjdlg::backdrop { background: rgba(22, 52, 74, .45); }
dialog.mjdlg textarea, dialog.mjdlg input, dialog.mjdlg select { width: 100%; box-sizing: border-box; }
dialog.mjdlg .field .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
dialog.mjdlg fieldset.group { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; margin: 0; }
dialog.mjdlg fieldset.group legend { font-weight: 800; padding: 0 6px; }
dialog.mjdlg fieldset.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
dialog.mjdlg fieldset.checks legend { font-size: 13.5px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 4px; width: 100%; }
dialog.mjdlg .checks label, dialog.mjdlg .checkline { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink); font-weight: 600; }
dialog.mjdlg .checks input, dialog.mjdlg .checkline input { width: auto; }
dialog.mjdlg .rowfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: center; }
dialog.mjdlg .rowfields .rl { font-weight: 700; font-size: 13.5px; }
dialog.mjdlg input, dialog.mjdlg select, dialog.mjdlg textarea { font: 400 15px var(--body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 42px; }
.todo { color: var(--supp-ink); font-style: italic; font-size: 13.5px; }
h4 { margin: 0; font: 800 16px var(--display); color: var(--ink); }
@media (max-width: 640px) { .kv th { width: auto; min-width: 0; display: block; border-bottom: 0; padding-bottom: 0; } .kv td { display: block; } }

/* Visszajelzés a dolgozóknak (dolgozói oldal és HR-előnézet) */
.fb p { margin: 0; }
.fb .chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--band); color: var(--brand); border: 1px solid var(--line); white-space: nowrap; }
.fb section > p + p { margin-top: 6px; }
.fbchg { display: grid; }
.fbchg > div { padding: 9px 2px; border-bottom: 1px solid var(--line); gap: 12px; }
.fbchg .acts { display: inline-flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.fbact h3 { margin: 0; }
.fbact p { font-size: 14.5px; }
.fb ul.links-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Kérdőív 2. változat: nyelvváltó, számmezők, többválasztós */
.langbar { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.langbar .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.langbar .btn.on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.numfield { display: flex; flex-direction: column; gap: 4px; }
.numfield input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; max-width: 220px; background: var(--surface); color: var(--ink); }
.opts input[type="checkbox"] { accent-color: var(--brand); }
.choicebar { height: 10px; border-radius: 6px; background: var(--band); overflow: hidden; }
.choicebar span { display: block; height: 100%; background: var(--brand); }
.choicebar.pos span { background: var(--m); }
.choicebar.neg span { background: var(--p); }
.tone { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.tone.pos { background: var(--m-bg); color: var(--m); }
.tone.neg { background: var(--p-bg); color: var(--p); }
.lvl { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--band); color: var(--muted); vertical-align: middle; }
details.qa { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
details.qa summary { cursor: pointer; font-weight: 700; }
details.qa p { margin: 8px 0 0; }

/* Arculat (white label): partnerlogó a fejlécben */
.logo-partner { height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.logo-x { color: var(--muted); font-weight: 700; margin: 0 2px; }
.logo-name { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--brand); }
.brand-preview { max-width: 620px; }
.colorrow { display: flex; flex-wrap: wrap; gap: 14px; }
.colorrow .cfield { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.colorrow input[type=color] { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* Kompakt táblák és sávsorok széles képernyőn (Steve, 2026. 11. 24.): a számok a címkék mellett maradnak. */
table.heat.cmpt { width: auto; min-width: 0; }
.heat.cmpt th, .heat.cmpt td { padding: 6px 14px; }
.heat.cmpt th[scope="row"] { text-align: left; }
.rows { max-width: 1040px; }
.topics td:last-child { text-align: right; }
.incident { background: var(--p-bg); color: var(--ink); border-left: 4px solid var(--p); border-radius: 10px; padding: 12px 14px; }
.incident > b:first-child { color: var(--p); }
