/* Egyházi ERP — modern, lágyabb megjelenés: kártyás felület, kerekített elemek, finom árnyékok, gördülékeny átmenetek (a nyomtatás változatlan: lásd a @media print blokkot) */
/* Színek: minden szín a témát követő tokenből jön (világos = :root, sötét = [data-theme="dark"] vagy — „Automatikus” esetén — az operációs rendszer beállítása).
   A téma a felhasználói profilban állítható (Világos / Sötét / Automatikus); a /theme.js a lapbetöltés előtt beállítja a data-theme attribútumot. */
:root {
  --g1: #1f9d62; --g2: #1f9d62; --g3: #188652; --g4: #146f44; --g5: #eaf6f0;
  --accent: #1f9d62; --accent-soft: rgba(31, 157, 98, .14); --on-accent: #ffffff;
  --text: #17261f; --muted: #5b6d64; --line: #e1eae5; --line-strong: #cfdcd5; --line-hover: #aebfb6;
  --bg: #f3f7f5;            /* az oldal háttere */
  --surface: #ffffff;       /* kártyák, táblák, beviteli mezők */
  --link: #17784a; --fg-accent: #157a49;
  --btn-bg: #1f9d62; --btn-hover: #188652; --head-bg: #1f9d62;
  --danger: #b3261e; --danger-btn: #b3261e; --danger-hover: #8e1d17;
  --nav-bg: linear-gradient(135deg, #146f44 0%, #188652 45%, #1f9d62 100%); --nav-shadow: 0 2px 14px rgba(20, 70, 45, .28); --nav-ring: #1f8a58;
  --green: #1f8a58; --red: #e5484d; --amber: #ffb703; --fx-line: #e0900b;
  --err-bg: #fdecea; --err-fg: #b3261e; --err-line: #e3a9a4;
  --ok-bg: #e6f6ed; --ok-fg: #1d6b43;
  --warn-bg: #fff3cd; --warn-fg: #7a5f00;
  --info-bg: #e7f1ff; --info-fg: #1a56b8;
  --pf-bg: #efe7ff; --pf-fg: #5b34b0;
  --note-bg: #fffbea; --note-fg: #7a6a1d;
  --panel-bg: #f6faf8; --soft-bg: #fafcfb; --soft: #f2f6f3;
  --clause-bg: #f3faf4; --clause-line: #9bbf9f; --clause-mark-bg: #dff3e3; --clause-mark-fg: #1d6b34;
  --cur-ron-bg: #e3f4ea; --cur-ron-fg: #17683f; --cur-fx-bg: #fff0d9; --cur-fx-fg: #9a5b00;
  --notif-icon-bg: #d9f0e3; --notif-icon-fg: #17703f; --notif-err-bg: #fde2e2; --notif-bubble: rgba(31, 138, 88, .09); --notif-bubble-err: rgba(229, 72, 77, .10);
  --row-hover: rgba(31, 122, 77, .07); --row-sel: rgba(31, 122, 77, .16); --ts-we: rgba(0, 0, 0, .05);
  --overlay: rgba(20, 30, 25, .45); --pencil: #8a96a0;
  --shadow-s: 0 1px 2px rgba(20, 50, 36, .06), 0 1px 3px rgba(20, 50, 36, .05);
  --shadow-m: 0 6px 20px rgba(20, 50, 36, .10);
  color-scheme: light;
  --on-accent: #fff; --on-nav: #fff; --ok-btn: #1a7f3c; --warn-btn: #a86a00; --info-btn: #2563a8; --neutral-btn: #667085; --ink-on-light: #17261f;
  --paper: #ffffff; --paper-ink: #111111; --paper-line: #222222; --paper-head: #eeeeee; --paper-sub: #f5f5f5; --paper-neg: #b42318; --paper-neg-bg: #fdecea;   /* papír-jellegű lapok (nyomtatvány, előnézet): mindkét témában világosak */
  --radius: 10px; --radius-s: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  --g5: #1c2f25; --accent-soft: rgba(52, 190, 120, .2);
  --text: #e6efe9; --muted: #98aaa0; --line: #28392f; --line-strong: #34493d; --line-hover: #4a6354;
  --bg: #101a15; --surface: #17241d;
  --link: #5fd49b; --fg-accent: #5fd49b;
  --btn-bg: #1a8a55; --btn-hover: #167a4a; --head-bg: #176b45;
  --danger: #ef7d74; --danger-btn: #b3261e; --danger-hover: #cf3a30;
  --nav-bg: linear-gradient(135deg, #0e4a30 0%, #125a3a 45%, #176b45 100%); --nav-shadow: 0 2px 14px rgba(0, 0, 0, .5); --nav-ring: #125a3a;
  --green: #3cc58a; --amber: #ffb703; --fx-line: #e0900b;
  --err-bg: #3b1f1c; --err-fg: #ffb4ab; --err-line: #7a3b35;
  --ok-bg: #1c3a2a; --ok-fg: #9be3bb;
  --warn-bg: #3a3112; --warn-fg: #f1d37a;
  --info-bg: #1b2d4a; --info-fg: #9cc3ff;
  --pf-bg: #2c2347; --pf-fg: #cdb8ff;
  --note-bg: #2f2b14; --note-fg: #e3cf86;
  --panel-bg: #1a2b22; --soft-bg: #1a2820; --soft: #1d2c24;
  --clause-bg: #1b2e23; --clause-line: #4a7a58; --clause-mark-bg: #24432f; --clause-mark-fg: #a9e6c0;
  --cur-ron-bg: #1c3a2a; --cur-ron-fg: #9be3bb; --cur-fx-bg: #3d2f12; --cur-fx-fg: #f4c874;
  --notif-icon-bg: #1f4631; --notif-icon-fg: #9be3bb; --notif-err-bg: #4a2220; --notif-bubble: rgba(52, 190, 120, .14); --notif-bubble-err: rgba(239, 125, 116, .16);
  --row-hover: rgba(52, 190, 120, .10); --row-sel: rgba(52, 190, 120, .22); --ts-we: rgba(255, 255, 255, .06);
  --overlay: rgba(0, 0, 0, .6); --pencil: #8fa196;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .35); --shadow-m: 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --g5: #1c2f25; --accent-soft: rgba(52, 190, 120, .2);
    --text: #e6efe9; --muted: #98aaa0; --line: #28392f; --line-strong: #34493d; --line-hover: #4a6354;
    --bg: #101a15; --surface: #17241d;
    --link: #5fd49b; --fg-accent: #5fd49b;
    --btn-bg: #1a8a55; --btn-hover: #167a4a; --head-bg: #176b45;
    --danger: #ef7d74; --danger-btn: #b3261e; --danger-hover: #cf3a30;
    --nav-bg: linear-gradient(135deg, #0e4a30 0%, #125a3a 45%, #176b45 100%); --nav-shadow: 0 2px 14px rgba(0, 0, 0, .5); --nav-ring: #125a3a;
    --green: #3cc58a; --amber: #ffb703; --fx-line: #e0900b;
    --err-bg: #3b1f1c; --err-fg: #ffb4ab; --err-line: #7a3b35;
    --ok-bg: #1c3a2a; --ok-fg: #9be3bb;
    --warn-bg: #3a3112; --warn-fg: #f1d37a;
    --info-bg: #1b2d4a; --info-fg: #9cc3ff;
    --pf-bg: #2c2347; --pf-fg: #cdb8ff;
    --note-bg: #2f2b14; --note-fg: #e3cf86;
    --panel-bg: #1a2b22; --soft-bg: #1a2820; --soft: #1d2c24;
    --clause-bg: #1b2e23; --clause-line: #4a7a58; --clause-mark-bg: #24432f; --clause-mark-fg: #a9e6c0;
    --cur-ron-bg: #1c3a2a; --cur-ron-fg: #9be3bb; --cur-fx-bg: #3d2f12; --cur-fx-fg: #f4c874;
    --notif-icon-bg: #1f4631; --notif-icon-fg: #9be3bb; --notif-err-bg: #4a2220; --notif-bubble: rgba(52, 190, 120, .14); --notif-bubble-err: rgba(239, 125, 116, .16);
    --row-hover: rgba(52, 190, 120, .10); --row-sel: rgba(52, 190, 120, .22); --ts-we: rgba(255, 255, 255, .06);
    --overlay: rgba(0, 0, 0, .6); --pencil: #8fa196;
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .35); --shadow-m: 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
/* papír-jellegű lap (nyomtatvány-előnézet, aláírólap, Registru de casă): a témától függetlenül világos, a benne lévő elemek a világos tokeneket kapják */
.paper, .cbSheet {
  --g1: #1f9d62; --g2: #1f9d62; --g3: #188652; --g4: #146f44; --g5: #eaf6f0;
  --accent: #1f9d62; --accent-soft: rgba(31, 157, 98, .14);
  --text: #17261f; --muted: #66786f; --line: #e1eae5; --line-strong: #cfdcd5; --line-hover: #aebfb6;
  --bg: #f3f7f5;            /* az oldal háttere */
  --surface: #ffffff;       /* kártyák, táblák, beviteli mezők */
  --link: #1a7f50; --fg-accent: #188652;
  --btn-bg: #1f9d62; --btn-hover: #188652; --head-bg: #1f9d62;
  --danger: #b3261e; --danger-btn: #b3261e; --danger-hover: #8e1d17;
  --nav-bg: linear-gradient(135deg, #146f44 0%, #188652 45%, #1f9d62 100%); --nav-shadow: 0 2px 14px rgba(20, 70, 45, .28); --nav-ring: #1f8a58;
  --green: #1f8a58; --red: #e5484d; --amber: #ffb703; --fx-line: #e0900b;
  --err-bg: #fdecea; --err-fg: #b3261e; --err-line: #e3a9a4;
  --ok-bg: #e6f6ed; --ok-fg: #1d6b43;
  --warn-bg: #fff3cd; --warn-fg: #8a6d00;
  --info-bg: #e7f1ff; --info-fg: #1a56b8;
  --pf-bg: #efe7ff; --pf-fg: #5b34b0;
  --note-bg: #fffbea; --note-fg: #7a6a1d;
  --panel-bg: #f6faf8; --soft-bg: #fafcfb; --soft: #f2f6f3;
  --clause-bg: #f3faf4; --clause-line: #9bbf9f; --clause-mark-bg: #dff3e3; --clause-mark-fg: #1d6b34;
  --cur-ron-bg: #e3f4ea; --cur-ron-fg: #17683f; --cur-fx-bg: #fff0d9; --cur-fx-fg: #9a5b00;
  --notif-icon-bg: #d9f0e3; --notif-icon-fg: #17703f; --notif-err-bg: #fde2e2; --notif-bubble: rgba(31, 138, 88, .09); --notif-bubble-err: rgba(229, 72, 77, .10);
  --row-hover: rgba(31, 122, 77, .07); --row-sel: rgba(31, 122, 77, .16); --ts-we: rgba(0, 0, 0, .05);
  --overlay: rgba(20, 30, 25, .45); --pencil: #8a96a0;
  --shadow-s: 0 1px 2px rgba(20, 50, 36, .06), 0 1px 3px rgba(20, 50, 36, .05);
  --shadow-m: 0 6px 20px rgba(20, 50, 36, .10);
  color-scheme: light;
  background: var(--paper); color: var(--paper-ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 14px/1.5 "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#app { min-height: 100vh; }
a { color: var(--link); }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ---- átmenetek ---- */
button, input, select, textarea, a, .navbtn, .navcols a, tr { transition: background-color .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease), transform .12s var(--ease), opacity .16s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.main > * { animation: fadeUp .26s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- felső menüsor ---- */
.layout { display: flex; flex-direction: column; min-height: 100vh; } /* a szerzői jogi sor a lap aljára kerül, rövid tartalomnál is */
.layout > .main { width: 100%; }
.pagewrap { display: flex; flex-direction: column; min-height: 100vh; } .pagewrap > :first-child { width: 100%; }
.app-foot { margin-top: auto; padding: 4px 16px 14px; text-align: center; font-size: 12px; color: var(--muted); }
.topnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 0 14px; min-height: 54px; color: var(--on-nav);
  background: var(--nav-bg); box-shadow: var(--nav-shadow); }
.topnav .brand { font-weight: 700; letter-spacing: .6px; font-size: 14px; padding: 8px 14px; margin-right: 8px; color: var(--on-nav); cursor: pointer; border-radius: var(--radius-s); background: rgba(255, 255, 255, .14); }
.topnav .brand:hover { background: rgba(255, 255, 255, .24); }
.topnav .brand { display: inline-flex; align-items: center; min-height: 36px; background: rgba(0, 0, 0, .12); } /* enyhén sötétített lapka: ezen a logó világoszöld IKS-e és íve látszik, a programzöld sávon elveszne; a fátyol lágyabb, mint a tömör mélyzöld */
.topnav .brand:hover { background: rgba(0, 0, 0, .2); }
.topnav .brand-logo { height: 24px; width: auto; display: block; }
.login-brand { display: flex; justify-content: center; margin: 0 0 18px; }
.login-brand img { height: 40px; width: auto; }
@media (prefers-color-scheme: dark) { .login-brand img { content: url('/brand/pleniks-logo-fekvo-sotet.svg'); } }
:root[data-theme="dark"] .login-brand img { content: url('/brand/pleniks-logo-fekvo-sotet.svg'); }
.navgroups { display: flex; flex-wrap: wrap; gap: 2px; }
.navbtn { position: relative; background: transparent; color: rgba(255, 255, 255, .92); border-radius: var(--radius-s); padding: 8px 12px; font-size: 13px; font-weight: 500; letter-spacing: .15px; text-transform: none; box-shadow: none; }
.navbtn:hover, .navbtn.open { background: rgba(255, 255, 255, .16); color: var(--on-nav); transform: none; }
.navbtn.active { background: rgba(255, 255, 255, .22); color: var(--on-nav); font-weight: 600; box-shadow: inset 0 -2px 0 var(--on-nav); }
.topnav .sp { flex: 1; }
.topnav.subnav { top: 54px; z-index: 19; min-height: 44px; box-shadow: var(--nav-shadow); filter: brightness(.93); }
.toptabs { display: flex; gap: 4px; margin-left: 4px; }
.toptab { background: transparent; border: 0; color: var(--on-nav); padding: 8px 14px; border-radius: var(--radius-s); cursor: pointer; font: inherit; font-weight: 600; opacity: .75; }
.toptab:hover { background: rgba(255, 255, 255, .14); opacity: 1; } .toptab.on { background: rgba(255, 255, 255, .22); opacity: 1; }
.navitem { position: relative; }
.navpanel { display: none; position: absolute; left: 0; top: calc(100% + 8px); min-width: 280px; max-width: 380px; max-height: 72vh; overflow-y: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-m); padding: 8px; animation: dropIn .16s var(--ease) both; z-index: 30; }
.navitem.open > .navpanel { display: block; }
.navpanel::before { content: ""; position: absolute; top: -6px; left: 24px; width: 11px; height: 11px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.navitem:nth-last-child(-n+2):nth-child(n+5) .navpanel { left: auto; right: 0; } .navitem:nth-last-child(-n+2):nth-child(n+5) .navpanel::before { left: auto; right: 24px; }
.navcols { columns: 1; }
.navcols a { display: block; padding: 8px 12px; color: var(--text); cursor: pointer; font-size: 13px; border-radius: 8px; text-decoration: none; }
.navcols a:hover { background: var(--accent-soft); color: var(--fg-accent); }
.navcols a.active { background: var(--btn-bg); color: var(--on-accent); font-weight: 600; }
.navcols a.soon { opacity: .5; cursor: default; }
.navcols a.soon:hover { background: transparent; color: var(--text); }
.navcols a.soon::after { content: var(--txt-soon, " · hamarosan"); font-size: 11px; }

/* ---- tartalom: kártya a háttéren ---- */
.main { max-width: 1400px; margin: 18px auto 44px; padding: 22px 28px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-s); min-width: 0; }
.main > .top { display: none; }
.top { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.top .sp { flex: 1; }
h2 { margin: 2px 0 14px; font-size: 22px; font-weight: 650; letter-spacing: -.2px; }
h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 650; }
h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.main > p.muted { max-width: 980px; }

/* ---- űrlap ---- */
label { display: inline-flex; flex-direction: column; font-size: 12px; font-weight: 500; color: var(--muted); gap: 4px; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
button { font: inherit; font-weight: 500; padding: 8px 16px; border: 0; border-radius: var(--radius-s); background: var(--btn-bg); color: var(--on-accent); cursor: pointer; box-shadow: 0 1px 2px rgba(20, 70, 45, .25); }
button:hover { background: var(--btn-hover); box-shadow: 0 3px 8px rgba(20, 70, 45, .25); transform: translateY(-1px); }
button:active { transform: translateY(0); box-shadow: none; }
button:focus-visible, a:focus-visible, .navbtn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
button.ghost { background: transparent; color: var(--fg-accent); border: 1px solid var(--line-strong); box-shadow: none; }
button.ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--fg-accent); transform: none; box-shadow: none; }
button.danger { background: var(--danger-btn); }
button.danger:hover { background: var(--danger-hover); }
button.small { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

/* ---- táblázatok: finom vonalak, lekerekített keret, lebegő sor-kiemelés ---- */
table { border-collapse: collapse; width: 100%; background: var(--surface); }
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 4px; }
.tableWrap > table, .tableWrap table { border: 0; }
th, td { border: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
th { background: var(--g5); font-size: 11.5px; font-weight: 650; letter-spacing: .3px; color: var(--muted); text-transform: uppercase; position: sticky; top: 0; }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.entry-head td { background: var(--g5); font-weight: 600; }
tr.storno td { color: var(--danger); }
tfoot td { font-weight: 650; background: var(--g5); }
table:not(.tableWrap table) { border-radius: var(--radius); }

/* ---- üzenetek, jelvények, kártyák ---- */
.msg { padding: 10px 14px; border-radius: var(--radius-s); margin: 10px 0; border-left: 4px solid transparent; animation: fadeUp .2s var(--ease) both; }
.msg.err { background: var(--err-bg); color: var(--err-fg); border-left-color: var(--err-fg); }
.msg.ok { background: var(--ok-bg); color: var(--ok-fg); border-left-color: var(--accent); }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--g5); color: var(--fg-accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 14px 16px; }
details { margin: 8px 0; } summary { cursor: pointer; color: var(--fg-accent); font-weight: 500; }

.login { max-width: 380px; margin: 12vh auto; padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-m); animation: fadeUp .3s var(--ease) both; }
.copyright { text-align: center; font-size: 12px; color: var(--muted); margin: -6vh auto 24px; padding: 0 16px; }
.login-langs { position: fixed; top: 14px; right: 16px; display: flex; gap: 6px; z-index: 20; }
.login-langs button { width: 30px; height: 22px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); line-height: 0; cursor: pointer; opacity: .75; }
.login-langs button:hover, .login-langs button:focus-visible { opacity: 1; }
.login-langs button.on { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
.login-langs button img { display: block; width: 100%; height: 100%; border-radius: 2px; object-fit: cover; }
.login label { display: flex; margin-bottom: 14px; }
.login input { width: 100%; }
.printhead { display: none; }
.signs { display: flex; justify-content: space-around; gap: 24px; }

@media (max-width: 800px) { .main { margin: 8px; padding: 14px 14px 22px; border-radius: 12px; } .navitem { position: static; } .navpanel { position: fixed; left: 8px; right: 8px; top: 60px; max-width: none; } .navpanel::before { display: none; } .topnav { padding: 0 8px; } .topnav.subnav { position: static; } } /* keskeny kijelzőn a fejléc több sorba törik (magasabb 54 px-nél): a ragadós almenü alácsúszna, ezért görgetéskor elmegy */

/* ---- nyomtatás: változatlanul egyszerű, fekete-fehér ---- */
@page { size: A4; margin: 18mm 12mm 18mm 25mm; } /* bal oldalon 25 mm: lefűzés, lyukasztás, archiválás */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --g1: #1f9d62; --g2: #1f9d62; --g3: #188652; --g4: #146f44; --g5: #eaf6f0;
    --accent: #1f9d62; --accent-soft: rgba(31, 157, 98, .14);
    --text: #17261f; --muted: #66786f; --line: #e1eae5; --line-strong: #cfdcd5; --line-hover: #aebfb6;
    --bg: #f3f7f5;            /* az oldal háttere */
    --surface: #ffffff;       /* kártyák, táblák, beviteli mezők */
    --link: #1a7f50; --fg-accent: #188652;
    --btn-bg: #1f9d62; --btn-hover: #188652; --head-bg: #1f9d62;
    --danger: #b3261e; --danger-btn: #b3261e; --danger-hover: #8e1d17;
    --nav-bg: linear-gradient(135deg, #146f44 0%, #188652 45%, #1f9d62 100%); --nav-shadow: 0 2px 14px rgba(20, 70, 45, .28); --nav-ring: #1f8a58;
    --green: #1f8a58; --red: #e5484d; --amber: #ffb703; --fx-line: #e0900b;
    --err-bg: #fdecea; --err-fg: #b3261e; --err-line: #e3a9a4;
    --ok-bg: #e6f6ed; --ok-fg: #1d6b43;
    --warn-bg: #fff3cd; --warn-fg: #8a6d00;
    --info-bg: #e7f1ff; --info-fg: #1a56b8;
    --pf-bg: #efe7ff; --pf-fg: #5b34b0;
    --note-bg: #fffbea; --note-fg: #7a6a1d;
    --panel-bg: #f6faf8; --soft-bg: #fafcfb;
    --clause-bg: #f3faf4; --clause-line: #9bbf9f; --clause-mark-bg: #dff3e3; --clause-mark-fg: #1d6b34;
    --cur-ron-bg: #e3f4ea; --cur-ron-fg: #17683f; --cur-fx-bg: #fff0d9; --cur-fx-fg: #9a5b00;
    --notif-icon-bg: #d9f0e3; --notif-icon-fg: #17703f; --notif-err-bg: #fde2e2; --notif-bubble: rgba(31, 138, 88, .09); --notif-bubble-err: rgba(229, 72, 77, .10);
    --row-hover: rgba(31, 122, 77, .07); --row-sel: rgba(31, 122, 77, .16); --ts-we: rgba(0, 0, 0, .05);
    --overlay: rgba(20, 30, 25, .45); --pencil: #8a96a0;
    --shadow-s: 0 1px 2px rgba(20, 50, 36, .06), 0 1px 3px rgba(20, 50, 36, .05);
    --shadow-m: 0 6px 20px rgba(20, 50, 36, .10);
    color-scheme: light;
  }
  .side, .top, .topnav, .noprint { display: none !important; }
  .layout { display: block; min-height: 0; }
  .main { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  .main > * { animation: none; }
  .tableWrap { border: 0; border-radius: 0; overflow: visible; }
  .printhead { display: block; margin-bottom: 10px; }
  body { background: #fff; color: #000; font-size: 12px; }
  th, td { border: 1px solid #000; background: #fff; padding: 4px 6px; }
  th { background: #eee; color: #000; text-transform: none; position: static; }
  tbody tr:hover td { background: #fff; }
  tr.entry-head td { background: #f4f4f4; }
  .printhead.sign, .main > .printhead[style] { display: block !important; }
}

/* felugró ablak és mester–részlet nézet */
.modalBack { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 100; overflow-y: auto; animation: fadeIn .15s ease both; }
.modalCard { background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-m); width: min(920px, 100%); border: 1px solid var(--line); overflow: hidden; }
.modalHead { display: flex; justify-content: space-between; align-items: center; background: var(--head-bg); color: var(--on-accent); padding: 10px 16px; font-weight: 700; }
.modalX { background: transparent; border: 0; color: var(--on-accent); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modalBody { padding: 14px 16px; max-height: 78vh; overflow-y: auto; }
.modalBody .cashForm .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.modalBody .cashForm label { display: flex; flex-direction: column; gap: 3px; }
.modalBody .detailCard { border: 0; padding: 0; }
.detailCard { border: 2px solid var(--g1); border-radius: 10px; padding: 12px; margin: 10px 0; }
.masterWrap { max-height: 30vh; overflow-y: auto; }
.masterWrap thead th { position: sticky; top: 0; z-index: 1; }
tr.clickRow { cursor: pointer; }
tr.clickRow:hover { background: var(--row-hover); }
tr.sel, tr.sel:hover { background: var(--row-sel); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.masterWrap td, .masterWrap th { padding-top: 5px; padding-bottom: 5px; white-space: nowrap; }
.masterWrap td:nth-child(4) { white-space: normal; }
.detailHost { max-height: 52vh; overflow-y: auto; }
.detailHost .detailCard { margin: 8px 0 0; padding: 8px 12px; }

/* fix kétablakos nézet */
.split { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.split > * { flex: 0 0 auto; }
.split > .splitTop { flex: 1 1 45%; min-height: 90px; overflow: auto; }
.split > .splitTop .masterWrap { max-height: none; overflow: visible; border: 0; }
.split > .detailHost { flex: 1 1 55%; min-height: 90px; max-height: none; overflow: auto; border-top: 2px solid var(--g1); }
.split > .detailHost:empty::before { content: var(--txt-pick, "Kattintson egy sorra a részletekhez"); display: block; padding: 12px; color: var(--muted); }
.split > .splitTop thead th { position: sticky; top: 0; z-index: 2; }
.split h2 { font-size: 18px; margin: 0 0 2px !important; }
.split > .row { gap: 6px 8px; margin: 0; align-items: flex-end; }
.split label { font-size: 11px; gap: 1px; }
.split input, .split select { height: 28px; padding: 2px 8px; font-size: 13px; }
.split button { padding: 4px 10px; font-size: 13px; }
.split > details { margin: 0 !important; }
.split > details[open] { max-height: 40vh; overflow: auto; }

/* részletek: a fejléc és az oszlopfejléc fix, csak a tételsorok görögnek */
.split > .detailHost { overflow: hidden; display: flex; flex-direction: column; }
.split > .detailHost:empty { display: block; }
.split > .detailHost:not(:has(> .detailCard)) { display: block; overflow: auto; } /* részletkártya nélküli tartalom (pl. az Új intézmény űrlap): a panel maga görög, különben az alja (a Felvétel gomb) levágódik */
.split .detailCard { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border: 0; margin: 0; padding: 6px 4px 0; }
.split .dcHead { flex: 0 0 auto; }
.split .dcHead p { margin: 4px 0; }
.split .dcHead h3 { margin: 0 0 2px; font-size: 15px; }
.split .dcLines { flex: 1 1 auto; min-height: 70px; overflow: auto; }
.split .dcLines .tableWrap { border: 0; overflow: visible; }
.split .dcLines thead th { position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.split .dcFoot { flex: 0 1 auto; max-height: 50%; overflow: auto; border-top: 1px solid var(--line); }

/* sűrű sorok a kétablakos nézetben */
.split .splitTop table td, .split .splitTop table th, .split .dcLines table td, .split .dcLines table th { padding: 3px 10px; line-height: 1.25; }
.split .splitTop td button, .split .dcLines td button { padding: 2px 8px; font-size: 12px; }
.split .dcLines select { height: 24px; padding: 0 6px; font-size: 12px; max-width: 220px; }
.split .dcHead .badge { margin-right: 4px; }

.main:has(> .split) { margin: 6px auto 0; padding: 8px 14px; max-width: none; border-radius: 12px; }
.split .splitTop table td, .split .splitTop table th { padding: 2px 10px; }
.split .splitTop tbody tr { height: 30px; }
.split .dcLines tbody tr { height: 30px; }

.bulkBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 2px; position: sticky; top: 0; z-index: 3; background: var(--surface); }
.bulkBar select { height: 26px; padding: 0 6px; font-size: 12px; max-width: 260px; }
/* a kódoló sáv és az oszlopfejléc rögzített, csak a tételsorok görögnek (a sáv magassága tetszőleges lehet, több sorba törhet) */
.split .dcLines.hasBulk { display: flex; flex-direction: column; overflow: hidden; }
.split .dcLines.hasBulk > .bulkBar { position: static; flex: 0 0 auto; }
.split .dcLines.hasBulk > .tableWrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.split .dcLines.hasBulk > div:last-child:not(.tableWrap) { flex: 0 0 auto; }
.split .dcLines.hasBulk thead th { top: 0; }

.split .dcFoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 2px; max-height: none; overflow: visible; }
.split .dcFoot .row { margin: 0 !important; }

.splitRow { display: flex; align-items: center; gap: 4px; margin-top: 3px; white-space: nowrap; }
.splitRow select { max-width: 200px; } .splitRow input { width: 80px; text-align: right; }
/* Szállások: foglalási naptár és állapotjelek */
.lgCal { border-collapse: collapse; font-size: .85em; } .lgCal th, .lgCal td { border: 1px solid var(--line); padding: 2px 3px; }
.lgCal .lgRoom { text-align: left; font-weight: 600; min-width: 110px; position: sticky; left: 0; background: var(--surface); z-index: 1; } tr.clickrow { cursor: pointer; } tr.clickrow:hover td { background: var(--accent-soft); } .lgCal th.lgDay { min-width: 30px; text-align: center; font-weight: 500; } .lgCal .lgWe { background: var(--line); } .lgCal .lgToday { outline: 2px solid var(--accent); outline-offset: -2px; }
.lgCal td.lgFree { cursor: pointer; height: 30px; } .lgCal td.lgFree:hover { background: var(--accent-soft); }
.lgCal td.lgCell { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1px; font-weight: 600; border-radius: 4px; }
.lg-opcio { background: var(--warn-bg); color: var(--warn-fg); } .lg-visszaigazolt { background: var(--accent-soft); color: var(--ok-fg); } .lg-megerkezett { background: var(--accent); color: var(--on-accent); }
.lg-tavozott { background: var(--line-strong); color: var(--muted); } .lg-lemondva, .lg-nem_jelent_meg { background: var(--err-bg); color: var(--err-fg); } .lgExp { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0, 0, 0, .08) 6px 9px); opacity: .75; }
.lgCal td.lgYear { cursor: pointer; min-width: 52px; height: 30px; font-weight: 600; } .lgCal th.lgMonth { cursor: pointer; min-width: 52px; }
/* Szállások: havi eseménynaptár és éves idővonal (csoportonként) */
.lgMonthCal { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .88em; } .lgMonthCal th { padding: 4px; text-align: left; } .lgMonthCal td { padding: 1px 2px; vertical-align: top; }
.lgMonthCal tbody.lgWeek { border-top: 1px solid var(--line-strong); } .lgMonthCal td.lgDnum { cursor: pointer; font-weight: 600; padding: 4px 6px 2px; } .lgMonthCal td.lgDnum:hover { background: var(--accent-soft); } .lgMonthCal tbody.lgWeek tr:last-child td { padding-bottom: 8px; }
.lgEv { cursor: pointer; border-radius: 4px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; } .lgEvCont { border-top-left-radius: 0; border-bottom-left-radius: 0; } .lgEvMore { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lgTl { display: grid; gap: 2px; font-size: .88em; } .lgTlRow { display: grid; grid-template-columns: 300px 1fr; align-items: center; gap: 8px; } .lgTlName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgTlTrack { position: relative; height: 22px; background: var(--line); border-radius: 3px; } .lgTlHeadRow .lgTlTrack { background: none; height: 24px; }
.lgTlMonth { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--line-strong); padding-left: 4px; cursor: pointer; color: var(--muted); } .lgTlMonth:hover { color: var(--text); }
.lgTlBar { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; cursor: pointer; min-width: 3px; } .lgTlToday { position: absolute; top: 0; bottom: -4px; border-left: 2px solid var(--accent); }
.lgMeals { max-width: 620px; } .lgMeals td:not(:first-child), .lgMeals th:not(:first-child) { text-align: center; }
.lgCal tr.lgFreeRow td { font-size: .85em; color: var(--muted); background: var(--accent-soft); } .lgCal td.lgOver { color: var(--err-fg); background: var(--err-bg); font-weight: 700; } .lgCal tr.lgUnRow .lgRoom { font-style: italic; color: var(--muted); } .lgCal td.lgUn { border-style: dashed; }
.lgNames { margin-top: 4px; font-size: .88em; max-width: 520px; } .lgNames textarea { display: block; margin-top: 4px; } .lgOverTxt { color: var(--err-fg); font-weight: 700; }
button.lgDel { color: var(--err-fg); border-color: var(--err-line); }
.lgBadge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .85em; margin-right: 4px; } .lgSum { margin: 6px 0 10px; display: grid; gap: 3px; }
.lgTog { display: inline-block; min-width: 22px; text-align: center; padding: 0 4px; } .lgPrintOnly { display: none; } @media print { .lgPrintOnly { display: block; } }
.rcBox { margin-top: 4px; font-size: .92em; } .rcBox .row { gap: 4px; margin: 0 0 3px; flex-wrap: wrap; } .rcBox select { max-width: 220px; } .rcDone { font-size: .92em; min-width: 260px; } .rcDone button { margin: 2px 0; } .rcBox label.rcChk { flex-direction: row; align-items: center; gap: 4px; }
.splitInfo { font-size: 11px; }

.efBadge { background: var(--info-bg); color: var(--info-fg); font-weight: 700; }
.kindBadge { background: var(--warn-bg); color: var(--warn-fg); font-weight: 700; }

.modalCard:has(.manualForm) { width: min(1280px, 96vw); }
.manualForm input.wide { width: 100%; min-width: 280px; }
.manualForm td, .manualForm th { padding: 4px 8px; }
input.dateHu { width: 11.5em; } input.dateHu.bad { border-color: var(--err-fg); background: var(--err-bg); }
button.ghost.danger { background: transparent; color: var(--err-fg); border-color: var(--err-line); }
button.ghost.danger:hover { background: var(--err-bg); }

.kindHint { font-size: 12.5px; color: var(--muted); margin: -2px 0 6px; }
.kindLine { font-size: 12px; margin: 2px 0; }
.manualForm .wideLabel { flex: 1 1 420px; } .manualForm .wideLabel select { width: 100%; }

.pfBadge { background: var(--pf-bg); color: var(--pf-fg); font-weight: 700; }

/* értesítési központ */
.bellWrap { position: relative; margin-right: 6px; }
.bellBtn { position: relative; background: rgba(255, 255, 255, .14); border: 0; color: var(--on-nav); font-size: 17px; width: 38px; height: 34px; border-radius: 10px; cursor: pointer; line-height: 1; padding: 0; }
.bellBtn:hover { background: rgba(255, 255, 255, .26); }
.bellBtn.has { background: rgba(255, 255, 255, .26); }
.bellBadge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--nav-ring); }
.notifPanel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); max-height: 72vh; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-m); z-index: 70; animation: dropIn .16s var(--ease) both; overflow: hidden; }
.notifHead { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.notifList { overflow-y: auto; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.notifMsg { display: flex; gap: 8px; align-items: flex-start; }
.notifIcon { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--notif-icon-bg); color: var(--notif-icon-fg); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.notifMsg.err .notifIcon { background: var(--notif-err-bg); color: var(--err-fg); }
.notifBubble { background: var(--notif-bubble); border-radius: 4px 14px 14px 14px; padding: 7px 11px; font-size: 13px; line-height: 1.4; word-break: break-word; max-width: 100%; }
.notifMsg.err .notifBubble { background: var(--notif-bubble-err); }
.notifTime { font-size: 10.5px; color: var(--muted); margin-top: 2px; text-align: right; }
#toasts { position: fixed; top: 64px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 80; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; max-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; padding: 9px 12px; box-shadow: var(--shadow-m); font-size: 13px; animation: dropIn .18s var(--ease) both; }
.toast.err { border-left-color: var(--red); }
.toastDot { font-weight: 700; color: var(--green); } .toast.err .toastDot { color: var(--red); }

.navpanel .navsec { padding: 8px 12px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.navpanel .navsec:first-child { border-top: 0; margin-top: 0; }

.noMx .mxcol { display: none; }

.tsTable td, .tsTable th { padding: 3px 5px; text-align: center; min-width: 26px; }
.tsTable th:first-child, .tsTable td:first-child { text-align: left; min-width: 150px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tsCell { cursor: pointer; }
.tsCell:hover { outline: 2px solid var(--green); outline-offset: -2px; }
.tsWe { background: var(--ts-we); } .tsHol { background: rgba(229, 72, 77, .13); } .tsSp { background: rgba(255, 193, 7, .30); font-weight: 700; }
/* önkéntes órák havi táblázata (a pontaj mintájára): nem írható nap szürkén, függő óra dőlten, módosított cella kiemelve */
.vgOff { background: repeating-linear-gradient(135deg, var(--soft-bg), var(--soft-bg) 4px, transparent 4px, transparent 8px); color: var(--muted); cursor: default; }
.vgPend { font-style: italic; color: var(--warn-fg); background: var(--warn-bg); border-radius: 3px; padding: 0 2px; }
.vgIn { width: 34px; padding: 1px 2px; text-align: center; font-size: 12px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--text); }
.vgIn:focus { outline: 2px solid var(--green); outline-offset: -1px; background: var(--surface); }
.vgDirty .vgIn { background: var(--info-bg); font-weight: 700; }
.vgAct { width: 140px; font-size: 11px; padding: 1px 3px; margin-top: 2px; }
.vgSum td { font-weight: 700; border-top: 2px solid var(--line-strong); }

/* szervezetválasztó (bejelentkezés után) */
.firmPick { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.firmPickItem { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.firmPickItem:hover, .firmPickItem.first:focus { border-color: var(--g1); background: color-mix(in srgb, var(--g1) 8%, var(--surface)); }
.firmPickItem.first { border-color: var(--g1); }
.lblSum{font-size:12px;font-style:italic;color:var(--muted);border-radius:6px;padding:0 4px;overflow-wrap:anywhere}
.pencil{border:0;background:transparent;box-shadow:none;cursor:pointer;color:var(--pencil);font-size:15px;padding:0 4px;margin-left:4px;line-height:1;vertical-align:baseline} .pencil:hover{color:var(--green);background:transparent} .pencil.has{color:var(--green);font-weight:700}
.split > .splitGrip{flex:0 0 10px;cursor:row-resize;position:relative;touch-action:none;margin:-4px 0} .split > .splitGrip::after{content:'';position:absolute;left:0;right:0;top:4px;height:2px;background:var(--g1)} .split > .splitGrip::before{content:'';position:absolute;left:50%;top:2px;width:44px;height:6px;margin-left:-22px;border-radius:3px;background:var(--g1);opacity:.55;z-index:1} .split > .splitGrip:hover::before{opacity:1} .split > .splitGrip + .detailHost{border-top:0}
/* tömörebb tételsorok a részletező ablakban */
.split .dcLines tbody tr{height:24px} .split .dcLines table td{padding-top:1px;padding-bottom:1px} .split .dcLines td input{height:22px;padding:0 6px} .split .dcLines td .pencil{padding:0 3px}
/* Kassza / Bank felület: pénztár-fülek, bevétel/kiadás váltó, nyomtatás az időszak-ablakból */
.deskAdd { background: transparent; border: 1px dashed var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--g1); }
.seg { display: inline-flex; border: 1px solid var(--g1); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; border-radius: 0; padding: 5px 16px; cursor: pointer; color: var(--g1); box-shadow: none; }
.seg button.on { background: var(--head-bg); color: var(--on-accent); }
@media print { body.printingModal > *:not(.modalBack) { display: none !important; } body.printingModal .modalBack.printModal { position: static; background: none; padding: 0; display: block; overflow: visible; } body.printingModal .modalCard { box-shadow: none; border: 0; width: auto !important; max-width: none; } body.printingModal .modalBody { padding: 0; } }
.modalCard.bigModal{display:flex;flex-direction:column} .modalCard.bigModal .modalBody{flex:1 1 auto;overflow:auto}
/* balanța: az analitikus bontás sorai; Kassza / Bank: 5311 = 5311.0 + 5311.1 … összesítő */
tr.partRow td { font-size: .92em; color: var(--muted); background: var(--soft-bg); } tr.partRow td:first-child { padding-left: 22px; } .partEq { font-size: 11px; }
.deskBtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 auto 0 16px; } @media print { .deskBtns { display: none; } } .deskMid > .row label.inl { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; } .deskMid > .row label.inl input { width: auto; }
.depPanel:not(:empty) { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--g1); border-radius: 8px; background: var(--panel-bg); font-size: 13px; }
tr.draftRow td { color: var(--note-fg); background: var(--note-bg); font-style: italic; } tr.draftHead td { background: var(--warn-bg); color: var(--warn-fg); font-weight: 600; font-style: normal; }
/* Kassza / Bank: tömör táblák (kisebb sor- és oszloptávolság) */
.cashDesk table td, .cashDesk table th { padding: 2px 8px; line-height: 1.25; } .cashDesk table tbody tr { height: auto; } .cashDesk .splitTop tbody tr, .cashDesk .detailHost tbody tr { height: 24px; }
.cashDesk .detailHost h3 { margin: 6px 0 4px; font-size: 14px; } .cashDesk table button.small { padding: 1px 8px; font-size: 12px; } .cashDesk .tableWrap { border-radius: 8px; }
/* Registru de casă (14-4-7A) nyomtatvány */
.cbSheet { page-break-after: always; margin-bottom: 18px; padding: 8px; border-radius: 6px; } .cbSheet:last-child { page-break-after: auto; }
.cbHead { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
table.cbTable { width: 100%; border-collapse: collapse; } table.cbTable th, table.cbTable td { border: 1px solid var(--paper-line); padding: 3px 6px; font-size: 12px; background: var(--paper); color: var(--paper-ink); } table.cbTable th { background: var(--paper-head); text-align: center; }
table.cbTable tr.cn td { background: var(--paper-sub); text-align: center; font-size: 10px; font-style: italic; padding: 0; } table.cbTable tbody tr td { height: 22px; } table.cbTable tr.cbTot td { font-weight: 700; }
.cbSign { display: flex; justify-content: space-around; margin-top: 26px; text-align: center; font-weight: 600; } .cbSign .sl { border-top: 1px solid var(--paper-line); margin-top: 30px; font-size: 10px; font-weight: 400; padding: 1px 40px; }
/* fix oszlopszélességek (Kassza / Bank táblák, Registru de casă nyomtatvány) */
table.fixedCols, table.cbTable { table-layout: fixed; width: 100%; } table.fixedCols td, table.fixedCols th, table.cbTable td, table.cbTable th { overflow-wrap: anywhere; vertical-align: top; }
table.fixedCols td.n, table.fixedCols th.n { text-align: right; white-space: nowrap; }
table.cbTable tr.cbNeg td { color: var(--paper-neg); background: var(--paper-neg-bg); }
table.cbTable th { font-size: 10.5px; padding: 3px 3px; } table.cbTable td { padding: 3px 4px; }
/* még tömörebb sorok a Kassza / Bank és a Registru de casă táblákban */
.cashDesk table td, .cashDesk table th { padding: 1px 6px; line-height: 1.2; } .cashDesk .splitTop tbody tr, .cashDesk .detailHost tbody tr { height: 20px; } .cashDesk table button.small { padding: 0 7px; line-height: 1.5; }
table.cbTable tbody tr td { height: 18px; padding-top: 1px; padding-bottom: 1px; }
/* a nap tételeinek műveleti gombjai: elférnek a cellában (szükség esetén új sorba törnek) */
td.dayAct { white-space: normal; } td.dayAct button { margin: 1px 2px 1px 0 !important; }
/* Kassza / Bank: cím + pénztár-választó egy sorban */
.deskHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; padding-left: 0; } .deskHead.fx { border-left: 4px solid var(--fx-line); padding-left: 8px; } .split .deskHead h2 { margin: 0 !important; }
.deskPick { display: flex; align-items: center; gap: 10px; } .deskSel { width: auto; min-width: 0; max-width: 170px; } .deskName { font-weight: 700; } .curBadge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; } .curBadge.ron { background: var(--cur-ron-bg); color: var(--cur-ron-fg); } .curBadge.fx { background: var(--cur-fx-bg); color: var(--cur-fx-fg); }
/* Kassza / Bank: a betétpanel csak tartalommal foglal helyet (a távolságok így megegyeznek a Bizonylatoknál használtakkal) */
.split.cashDesk > .depPanel:empty { display: none; }

table.fixedCols.dayTop { width: 560px; max-width: 100%; } table.fixedCols.dayTop:has(col:nth-child(9)) { width: 960px; } table.dayTop th, table.dayTop td { padding: 2px 8px; font-size: 12px; }
/* pénztár / bank: felül a gombsor, alatta a napi összesítő a teljes szélességben (a devizás számla 9 oszlopa is elfér) */
.split > .splitTop.deskMid { display: flex; flex-direction: row; align-items: flex-start; gap: 16px; overflow: hidden; }
.deskMid > .row { flex: 0 0 auto; margin: 0 0 0 auto; flex-direction: column; align-items: flex-end; gap: 6px; }
.deskMid > .dayTopBox { flex: 0 1 auto; min-height: 0; overflow: auto; width: fit-content; max-width: 100%; }
.linkedClause { border: 1px dashed var(--clause-line); background: var(--clause-bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: 13px; } .linkedClause table { width: 100%; margin-top: 6px; } .linkedClause th, .linkedClause td { padding: 2px 8px; } .clauseMark { background: var(--clause-mark-bg); color: var(--clause-mark-fg); padding: 0 5px; cursor: help; }
.navcols a { padding: 4px 10px; line-height: 1.25; } .navpanel { padding: 6px; } .navpanel .navsec { padding: 5px 10px 2px; margin-top: 2px; } .navpanel .navsec:first-child { margin-top: 0; }
/* súgó / tudnivaló: kis „i” jel a cím mellett, kattintásra nyílik — nem foglal helyet */
.infoBtn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px; padding: 0; border-radius: 50%; border: 1.5px solid var(--g1); background: transparent; color: var(--g1); font: italic 700 13px/1 Georgia, serif; cursor: pointer; vertical-align: middle; }
.infoBtn:hover, .infoBtn.on { background: var(--head-bg); color: var(--on-accent); }
.infoPop { position: absolute; z-index: 60; left: 0; top: 100%; width: max-content; max-width: min(900px, 92vw); margin: 4px 0 0; box-shadow: 0 6px 22px rgba(0,0,0,.22); font-weight: 400; line-height: 1.45; letter-spacing: normal; text-transform: none; padding: 8px 12px; border: 1px solid var(--g1); border-left-width: 4px; border-radius: 8px; background: var(--clause-bg); font-size: 13px; max-width: 900px; }
.infoPop p { margin: 4px 0; } .infoPop details { margin: 0; } .infoPop summary { display: none; }
.infoPop details > *:not(summary) { display: block; }
@media print { .infoBtn, .infoPop { display: none; } }
/* személy- / nyilvántartás-lap: felül a név és a műveletek, alatta a csoportok egymás mellett */
.sheetCard { overflow: auto; }
.sheetBar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); padding: 4px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sheetBar h3 { margin: 0; } .sheetBar .row { margin: 0; gap: 6px; }
.sheetGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 10px; align-items: start; }
.sheetGroup { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; }
.sheetGroup h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sheetFields { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 10px; }
.sheetFields label { font-size: 12px; margin: 0; } .sheetFields input:not([type=checkbox]), .sheetFields select { width: 100%; box-sizing: border-box; }
.sheetFields input[type=checkbox] { width: auto; }
.masterWrap.sheetList td, .masterWrap.sheetList th, .sheetList.masterWrap td, .tableWrap.sheetList td { white-space: normal; overflow-wrap: anywhere; }
.masterWrap.sheetList td.n, .masterWrap.sheetList th.n, .tableWrap.sheetList td.n, .tableWrap.sheetList th.n { white-space: nowrap; overflow-wrap: normal; }
.sheetList th:not(.n) { white-space: normal; }
.sheetList td:nth-child(3) { min-width: 220px; }
.masterWrap.sheetList td, .tableWrap.sheetList td { overflow-wrap: break-word; word-break: normal; }
.sheetList th:not(.n), .sheetList td:not(.n) { min-width: 96px; }
.sheetList td:nth-child(3) { min-width: 260px; }
/* jogtár: a kijelölt jogszabály lapja (címke + cikklista + szöveg) */
.jtChips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.jtSub { max-width: 38ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.jtNote { color: var(--muted); font-size: 12.5px; text-decoration: underline dotted; text-underline-offset: 2px; } .jtNote:hover { color: var(--g1); }
.jtMeta { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.jtGrid { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 10px; align-items: start; }
.jtSide { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jtSide input { width: 100%; box-sizing: border-box; }
.jtList { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.jtItem { padding: 3px 8px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jtItem:hover { background: var(--row-hover); } .jtItem.sel { background: var(--row-sel); }
.jtBody { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; line-height: 1.45; min-width: 0; }
@media (max-width: 760px) { .jtGrid { grid-template-columns: 1fr; } }
.sheetList td.n, .sheetList th.n { min-width: 84px; }
/* többsoros szöveges mezők (pl. munkaköri leírás): teljes sor szélességben */
.sheetFields label:has(textarea) { grid-column: 1 / -1; }
.sheetFields textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; resize: vertical; }

/* felhasználói menü (felnyíló ikon a fejlécben) */
.userMenu { position: relative; margin-left: 8px; }
.userBtn { width: 36px; height: 36px; border-radius: 50%; padding: 0; border: 2px solid transparent; background: rgba(255, 255, 255, .95); color: var(--ink-on-light); font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: none; }
.userBtn:hover { background: var(--on-nav); }
.userPop { display: none; position: absolute; right: 0; top: 46px; width: 290px; max-width: 92vw; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); z-index: 60; font-size: 13px; }
.userMenu.open .userPop { display: block; }
.userPop label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 10px 0; font-size: 12px; color: var(--muted); }
.userPop select { width: 100%; max-width: none; background: var(--surface); color: var(--text); }
.upHead { display: flex; align-items: center; gap: 10px; }
.upAvatar { width: 40px; height: 40px; border-radius: 50%; background: var(--head-bg); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.upBtns { display: flex; gap: 8px; margin-top: 12px; justify-content: space-between; }
.userPop .navout2 { background: var(--head-bg); color: var(--on-accent); border: 1px solid var(--head-bg); }

/* a Beállítások fogaskerék-ikon az értesítés mellett */
.navitem.gear .navpanel { left: auto; right: 0; } .navitem.gear .navpanel::before { left: auto; right: 14px; }
.navbtn.gearBtn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.navbtn.gearBtn .icon, .bellBtn .icon { display: inline-flex; line-height: 0; }

/* az aktív intézmény neve minden oldal tetején; váltás a felhasználói menüből vagy innen */
.upFirm { margin: 10px 0 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* gyorsbillentyűk: parancs-paletta (Ctrl + K) és súgó */
kbd { display: inline-block; min-width: 22px; padding: 1px 7px; margin: 0 1px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--text); font: 600 12px/1.5 ui-monospace, Consolas, monospace; text-align: center; }
.hkBack { align-items: flex-start; }
.hkCard { width: min(640px, 96vw); }
.hkList { margin-top: 8px; max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.hkItem { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.hkItem:last-child { border-bottom: 0; }
.hkItem.on { background: var(--accent-soft); color: var(--fg-accent); }
.hkGrp { font-size: 12px; }
.hkHint { margin-top: 8px; font-size: 12px; }
.hkTable { width: 100%; margin: 6px 0 10px; } .hkTable td { padding: 5px 8px; vertical-align: middle; }
.jumpBtn { margin-right: 4px; }
@media print { .hkBack, .jumpBtn { display: none !important; } }

/* saját naptár-választó (a dátummező alatt nyílik) */
.datePop { position: absolute; z-index: 5000; width: 260px; padding: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .28); font-size: 14px; }
.datePop .dpHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 500; }
.datePop .dpGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datePop .dpDow { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0; }
.datePop button { font: inherit; cursor: pointer; }
.datePop .dpNav { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; width: 30px; height: 28px; }
.datePop .dpDay { border: 0; background: transparent; color: var(--text); border-radius: 8px; height: 30px; padding: 0; }
.datePop .dpDay:hover, .datePop .dpNav:hover { background: var(--accent-soft); }
.datePop .dpDay.other { color: var(--muted); opacity: .6; }
.datePop .dpDay.today { outline: 1px solid var(--accent); }
.datePop .dpDay.sel { background: var(--btn-bg); color: var(--on-accent); opacity: 1; }
.datePop .dpFoot { display: flex; justify-content: space-between; margin-top: 8px; }
.datePop .dpFoot button { border: 0; background: transparent; color: var(--link); padding: 4px 6px; border-radius: 6px; }
.datePop .dpFoot button:hover { background: var(--accent-soft); }
@media print { .datePop { display: none !important; } }
.attachBtn { margin-left: 4px; }
@media print { .attachBtn { display: none !important; } }
.pickWrap { position: relative; display: inline-block; }
.pickList { position: absolute; z-index: 70; left: 0; top: 100%; min-width: 420px; max-width: 80vw; max-height: 320px; overflow-y: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-m); }
.pickItem { padding: 5px 10px; cursor: pointer; font-size: 13px; }
.pickItem:hover, .pickItem.act { background: var(--soft); }
.pickTag { display: inline-block; min-width: 92px; margin-right: 8px; padding: 1px 6px; border-radius: 4px; font-size: 11px; background: var(--soft); color: var(--muted); }
.headRow { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.rowSel { background: var(--ok-bg); }

/* Platform-felület: a jelölőnégyzet és a felirata egy sorban, normál méretben */
.platformPanel label:has(> input[type=checkbox]) { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; width: auto; white-space: nowrap; }
.platformPanel input[type=checkbox] { width: auto; min-width: 0; height: auto; margin: 0; padding: 0; flex: none; }

/* Platform: menü-szerkesztő — kompakt sorok, összecsukható csoportok, húzás */
.mnuBar { position: sticky; top: 98px; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; background: var(--bg, var(--surface)); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mnuSearch { min-width: 180px; max-width: 260px; }
.mnuSp { flex: 1; }
.mnuList { display: flex; flex-direction: column; gap: 4px; max-width: 860px; }
.mnuGroup { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); overflow: hidden; }
.mnuHead { display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: rgba(127, 127, 127, .12); font-weight: 700; font-size: 15px; cursor: grab; }
.mnuRow { display: flex; align-items: center; gap: 4px; padding: 1px 6px; min-height: 26px; border-top: 1px solid var(--line); font-size: 13px; cursor: grab; }
.mnuRow.off .mnuLabel { opacity: .5; text-decoration: line-through; }
.mnuRow.changed, .mnuHead.changed { box-shadow: inset 3px 0 0 var(--accent); background: rgba(255, 193, 7, .12); }
.mnuRow.dragging { opacity: .4; }
.mnuRow.dropbefore, .mnuHead.dropbefore { box-shadow: inset 0 3px 0 var(--accent); } .mnuBody.dropend { box-shadow: inset 0 -3px 0 var(--accent); }
.mnuGrip { cursor: grab; opacity: .55; user-select: none; }
.mnuLabel { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; cursor: text; }
.mnuEdit { flex: 1; min-width: 0; height: 22px; padding: 0 4px; }
.mnuCount { font-size: 11px; opacity: .6; padding: 0 4px; }
.mnuSec { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; opacity: .6; padding: 3px 8px 1px; }
.mnuTag { font-size: 10px; padding: 0 5px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.mnuBtn { padding: 0 5px; min-width: 22px; height: 22px; line-height: 1; border: 1px solid var(--line); background: transparent; border-radius: 4px; cursor: pointer; color: inherit; font-size: 12px; }
.mnuBtn:hover { background: rgba(127, 127, 127, .2); } .mnuBtn.lock { cursor: default; opacity: .7; display: inline-flex; align-items: center; justify-content: center; }
.mnuEmpty { padding: 6px 10px; font-size: 12px; }
.mnuNew { margin-top: 10px; }
@media (max-width: 640px) { .mnuBar { top: 98px; } .mnuSearch { flex: 1; max-width: none; } }

/* hívek / tagok: fülek egy menüponton belül */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.subtab { background: transparent; color: var(--text); border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; cursor: pointer; font: inherit; font-weight: 600; border-radius: var(--radius-s) var(--radius-s) 0 0; box-shadow: none; }
.subtab:hover { background: var(--accent-soft); transform: none; box-shadow: none; }
.subtab.on { border-bottom-color: var(--accent); color: var(--fg-accent); }
/* beérkezett nyilvános jelentkezések száma a menüben */
.navcount { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--danger-btn); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
/* stratégia: jelzőlámpák, összesítő kártyák, ütemterv-sáv, előirányzat-mátrix */
.stLamp { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--line); }
.stLamp-ok { background: var(--ok-btn); } .stLamp-figyel { background: var(--warn-btn); } .stLamp-elmarad { background: var(--err-fg); }
.stGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0; }
.stCnt { display: flex; gap: 14px; font-size: 20px; font-weight: 700; margin-top: 6px; } .stBig { font-size: 17px; font-weight: 700; margin: 4px 0; }
.stBar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--line); vertical-align: middle; overflow: hidden; }
.stBarFill { display: block; height: 100%; background: var(--ok-btn); } .stBarFill.over { background: var(--err-fg); }
.stCell-ok { background: var(--ok-bg); color: var(--ok-fg); } .stCell-figyel { background: var(--warn-bg); color: var(--warn-fg); } .stCell-elmarad { background: var(--err-bg); color: var(--err-fg); }
.stDec { list-style: none; padding: 0; margin: 6px 0; } .stDec li { padding: 6px 10px; margin: 4px 0; border-left: 4px solid var(--line); background: var(--surface); border-radius: var(--radius-s); }
.stDec-magas { border-left-color: var(--err-fg) !important; } .stDec-kozepes { border-left-color: var(--warn-btn) !important; } .stDec-info { border-left-color: var(--info-btn) !important; }
.stSect td { font-weight: 700; background: var(--accent-soft); } .stTot td { font-weight: 700; border-top: 2px solid var(--line); }
.stForm { margin: 10px 0; } .stTabs { flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.stGantt { margin: 10px 0 16px; font-size: 12px; } .stGtRow { display: flex; align-items: center; min-height: 22px; border-bottom: 1px dashed var(--line); }
.stGtLbl { flex: 0 0 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 8px; } .stGtTrack { position: relative; flex: 1; height: 20px; }
.stGtHead .stGtTrack { height: 18px; } .stGtYear { position: absolute; top: 0; border-left: 1px solid var(--line); padding-left: 4px; opacity: .7; }
.stGtBar { position: absolute; top: 5px; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; } .stGtFill { display: block; height: 100%; background: var(--ok-btn); opacity: .75; }
.stGtBar-figyel .stGtFill { background: var(--warn-btn); } .stGtBar-elmarad .stGtFill { background: var(--err-fg); }
.stGtBar-elmarad { box-shadow: inset 0 0 0 1px var(--err-fg); } .stGtNow { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--info-btn); opacity: .6; }
.stGtMs { position: absolute; top: 4px; width: 9px; height: 9px; margin-left: -5px; transform: rotate(45deg); background: var(--neutral-btn); } .stGtMs.done { background: var(--ok-btn); } .stGtMs.over { background: var(--err-fg); }
@media (max-width: 700px) { .stGtLbl { flex-basis: 120px; } }
@media print { .stReport table { font-size: 11px; } .stGrid { grid-template-columns: repeat(4, 1fr); } }
