/* alta v2 – kiegészítő stílusok az egyoldalas felülethez */
#app { max-width: none; width: 100%; margin: 0; padding: 1rem clamp(.75rem, 2vw, 2rem); } /* teljes képernyő-szélesség (a táblázatok sok oszlopa miatt) */
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.bar .who { font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: .5rem 0; }
.row label { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.fp { font-family: ui-monospace, Consolas, monospace; font-size: .9em; letter-spacing: .02em; }
.pill { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #eef1f6; font-size: .8em; margin-right: .25rem; }
.pill.ok { background: var(--in-bg); color: var(--in); }
.pill.warn { background: #fff4d6; color: #8a5a00; }
.pill.off { background: var(--out-bg); color: var(--out); }
.invite-url { word-break: break-all; user-select: all; background: #f1f5ff; padding: .5rem; border-radius: 6px; }
.site-list { margin: .25rem 0 .75rem 1rem; padding: 0; }
.btn.small { padding: .15rem .6rem; font-size: .85em; }
table.data td, table.data th { vertical-align: top; }

/* ---- 4. lépés: tételek, riportok */
.navlink { padding: .25rem .7rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.navlink.active { background: var(--primary); color: #fff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.archived td { opacity: .55; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1rem 0; }
.tile { background: var(--card); border-radius: var(--radius); padding: .75rem 1rem; border: 1px solid var(--line); }
.tile strong { display: block; font-size: 1.25rem; }
.tile.in strong { color: var(--in); }
.tile.out strong { color: var(--out); }
.card.inner { background: #fafbfc; margin: .25rem 0; }
.btn.danger { background: var(--out); color: #fff; border-color: var(--out); }
ul.history { margin: .5rem 0; padding-left: 1.1rem; }
ul.history li { margin-bottom: .4rem; }
textarea { width: 100%; font: inherit; padding: .4rem; border: 1px solid var(--line); border-radius: 6px; }
@media print {
  .noprint, .topbar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
  #app { max-width: none; padding: 0; }
}

/* ---- Súgó */
.help-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: .6rem 0; padding: .1rem 1rem; }
.help-sec summary { cursor: pointer; font-weight: 600; padding: .6rem 0; }
.help-body { padding-bottom: .75rem; }
.help-body li { margin-bottom: .4rem; }

/* ---- Bevétel nézet */
.hidden { display: none; }
table.income { font-size: .88em; }
table.income td, table.income th { padding: .3rem .45rem; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f6f8fc; }
tr.plan td { background: #fffaf0; font-style: italic; }
tr.detail-row > td { background: #fafbfc; padding: .75rem; }
.detail h3 { margin: .2rem 0 .5rem; font-size: 1rem; }
details.card > summary { cursor: pointer; font-weight: 600; }

/* ---- Bevétel: piros-szerű fejléc, kijelölés, beszúrás */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
td.chk, th.chk { width: 2rem; text-align: center; padding-left: .4rem; padding-right: .2rem; }
tr.cursor:not(.is-open) > td:first-child { box-shadow: inset 4px 0 0 #9fb4e8; } /* kijelölt, de becsukott sor: csak egy vékony jelzés, nem kék háttér */
tr.hl td { background: #fff7c2; transition: background 1.5s; }
tr.insert-row > td { background: #f4f8ff; padding: .5rem .75rem; }
tr.insert-row .card.inner { margin: 0; }
.selbar { background: #eef3ff; padding: .5rem .85rem; margin: .5rem 0; }

/* ---- összecsukható szakaszok: ▸ zárt, ▾ nyitott (minden <details> egységesen) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '▸'; display: inline-block; width: 1.2em; color: var(--muted); }
details[open] > summary::before { content: '▾'; }
details.sec { padding: .4rem .8rem; }
details.sec > summary { font-weight: 600; padding: .25rem 0; }

/* összegek: a fejléc ugyanúgy jobbra igazított, mint az érték */
table.data th.num { text-align: right; }

/* Beérkezett bruttó: a szám kattintható (új beérkezés), nincs zöld háttér */
button.linknum { font-weight: 700; border: 0; background: none; padding: 0; font: inherit; font-variant-numeric: tabular-nums; color: var(--primary); cursor: pointer; text-decoration: underline dotted; }
button.linknum:hover { text-decoration: underline; }
tr.pay-row > td { background: #f4f8ff; padding: .5rem .75rem; }

/* ---- soron belüli szerkesztés (új bevétel és módosítás a táblázatban) */
tr.edit-row > td { background: #f4f8ff; vertical-align: top; padding: .35rem .4rem; }
tr.edit-row .ie { width: 100%; min-width: 5.5rem; padding: .25rem .35rem; font: inherit; border: 1px solid #b8c4de; border-radius: 5px; background: #fff; box-sizing: border-box; }
tr.edit-row input.num { text-align: right; }
tr.edit-row td .combo { min-width: 8rem; }
tr.edit-row td.num .combo { min-width: 4.5rem; }

/* havi gyors összesítő sor */
tr.month-sum > td { background: #e9edf5; font-weight: 600; border-top: 2px solid #c9d2e6; padding: .35rem .5rem; }

/* az aktív (kinyitott / szerkesztett / beszúrás alatt álló) sor kiemelése: erősebb háttér, kék keret, bal oldali sáv */
tr.is-open > td, tr.edit-row > td, tr.pay-row > td, tr.detail-row > td { background: #e1ebff; }
tr.is-open > td { border-top: 2px solid #2f63d6; font-weight: 500; }
tr.is-open > td:first-child, tr.edit-row > td:first-child, tr.pay-row > td:first-child, tr.detail-row > td:first-child { box-shadow: inset 5px 0 0 #2f63d6; }
tr.edit-row > td { border-top: 2px solid #2f63d6; border-bottom: 2px solid #2f63d6; background: #dbe7ff; }
tr.detail-row > td { border-bottom: 2px solid #2f63d6; background: #eef4ff; padding: .75rem .9rem; }
tr.pay-row > td { border-bottom: 2px solid #2f63d6; }
tr.detail-row > td details.sec { background: #fff; }

/* terv/tény kapcsoló (szegmentált gomb) */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented .seg { border: 0; background: transparent; padding: .45rem .8rem; cursor: pointer; font: inherit; color: var(--text); border-right: 1px solid var(--line); }
.segmented .seg:last-child { border-right: 0; }
.segmented .seg.on { background: var(--primary); color: #fff; }

/* ---- szerkesztés: csak a fókuszban lévő mező kék, a többi semleges; kompakt, az oszlopokhoz igazított beviteli mezők */
.ie { font: inherit; border: 1px solid #c9d0dd; border-radius: 5px; background: #fff; padding: .3rem .45rem; box-sizing: border-box; width: 100%; }
.ie.sm { height: 1.9rem; padding: .1rem .35rem; }
.ie.num { text-align: right; }
.ie:focus, .combo:focus-within .ie { outline: 2px solid rgba(47, 99, 214, .28); border-color: #2f63d6; background: #eaf1ff; }
table.income tr.edit-row > td, table.income tr.pay-row > td { background: #f6f7fa; border-top: 1px solid #d5dae4; border-bottom: 1px solid #d5dae4; padding: .3rem .4rem; vertical-align: middle; }
table.income tr.edit-row > td:first-child, table.income tr.pay-row > td:first-child { box-shadow: inset 5px 0 0 #2f63d6; }
table.income tr.pay-row > td .ie, table.income tr.edit-row > td .ie { min-width: 0; }

/* a részletek: teljes szélességű, jól olvasható függőleges táblázat (a betűméret változatlan) */
.detail .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.detail table.vt { width: 100%; table-layout: fixed; }
.detail table.vt td { padding: .3rem .5rem; vertical-align: middle; }
.detail table.vt td.lab { width: 14rem; color: var(--muted); }
.detail table.vt td.tsc { width: 11rem; text-align: right; }
.detail table.vt td.val .ie, .detail table.vt td.val .combo { width: 100%; max-width: 34rem; }
.detail .payform { gap: .4rem; align-items: center; }
.detail .payform .ie { width: 9rem; }
@media (max-width: 1100px) { .detail .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* ---- modális ablak (klónozás) */
.modal-back { position: fixed; inset: 0; background: rgba(20, 28, 45, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem; z-index: 100; overflow-y: auto; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); padding: 1.25rem 1.5rem; width: min(760px, 100%); }
.modal h2 { margin-top: 0; }
.modal .row label { min-width: 9rem; }
.modal label.rad { min-width: 0; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.modal label.rad:has(input:checked) { border-color: #2f63d6; background: #eaf1ff; }
.modal .data { margin-top: .25rem; }

/* teljesült (vagy túlteljesült) sor: halványzöld háttér (a kijelölt / kinyitott sor kiemelése erősebb marad) */
table.income tr.done:not(.is-open):not(.hl) > td { background: #eaf7ee; }

/* ---- egységes vezérlő-magasság: a Terv/tény kapcsoló a referencia (fejléc-gombok, szűrők, Alaphelyzet) */
:root { --ctl-h: 2.6rem; }
.page-head .head-actions { align-items: center; }
.page-head .head-actions > .btn, .segmented { height: var(--ctl-h); box-sizing: border-box; }
.page-head .head-actions > .btn { display: inline-flex; align-items: center; padding: 0 1rem; }
.segmented .seg { height: 100%; display: inline-flex; align-items: center; }
.fbar { align-items: flex-end; }
.fbar select, .fbar input { height: var(--ctl-h); box-sizing: border-box; }
.fbar > .btn { height: var(--ctl-h); box-sizing: border-box; padding: 0 1.1rem; font-size: inherit; display: inline-flex; align-items: center; }

/* ---- részletek: Adatok 2/3, Módosítási napló 1/3 */
.detail .grid-21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .detail .grid-21 { grid-template-columns: minmax(0, 1fr); } }
.detail .payline { display: flex; align-items: center; gap: .5rem; }
.btn.toggle { min-width: 2.1rem; font-weight: 700; }

/* ---- csak az aktív (kijelölt) sor kék; a többi nyitva maradó sor semleges */
table.income tr.detail-row:not(.active) > td { background: #f7f8fb; border-bottom: 1px solid #d5dae4; }
table.income tr.detail-row:not(.active) > td:first-child, table.income tr.pay-row:not(.active) > td:first-child { box-shadow: inset 3px 0 0 #c9d0dd; }
table.income tr.open-other > td { border-top: 1px solid #c9d0dd; }

/* ---- rögzített oszlopszélességek (a lenyitás nem változtatja meg őket) */
table.data.income { table-layout: fixed; width: 100%; min-width: 88rem; /* a rögzített oszlopok (~74rem) + legalább 14rem a Jogcímnek */ }
table.income td { overflow-wrap: anywhere; }
table.income col.c-chk { width: 2.3rem; }
table.income col.c-per { width: 7.6rem; }
table.income col.c-terv { width: 7.2rem; }
table.income col.c-jog { width: auto; }
table.income col.c-net { width: 7.2rem; }
table.income col.c-rate { width: 4.8rem; }
table.income col.c-brt { width: 8.4rem; }
table.income col.c-vat { width: 6.4rem; }
table.income col.c-szsz { width: 9rem; }
table.income col.c-szdt { width: 6.8rem; }
table.income col.c-grp { width: 5rem; }
table.income col.c-bank { width: 5.6rem; }
table.income col.c-act { width: 5.4rem; }
table.income td.nowrap { overflow-wrap: normal; }

/* ---- fejléc és szűrők: alacsonyabb, egységes magasság, függőlegesen középre igazítva (a régi .segmented margója/igazítása kikapcsolva) */
:root { --ctl-h: 2.15rem; }
.page-head .segmented { margin: 0; align-self: center; }
.page-head .head-actions { align-items: center; gap: .5rem; }
.page-head .head-actions > .btn, .page-head .segmented { height: var(--ctl-h); }
.page-head .head-actions > .btn, .segmented .seg { padding: 0 .85rem; line-height: 1; }
.fbar { align-items: flex-end; gap: .5rem .75rem; }
.fbar label { margin-bottom: 0; }
.fbar select, .fbar input { height: var(--ctl-h); padding-top: 0; padding-bottom: 0; }
.fbar > .btn { height: var(--ctl-h); padding: 0 .9rem; line-height: 1; }

/* hónapok: 10 px szünet a hónapok között, bal oldalon havi színkód (függőleges sáv; minden hónap mindig ugyanazzal a színnel) */
table.income tr.month-gap > td { height: 10px; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; }
table.income tbody tr > td:first-child { border-left: 4px solid var(--mc, transparent); }
table.income tr.m1 { --mc: #2f9e44; }  table.income tr.m2 { --mc: #1c7ed6; }  table.income tr.m3 { --mc: #7048e8; }
table.income tr.m4 { --mc: #f2b705; }  table.income tr.m5 { --mc: #f08c00; }  table.income tr.m6 { --mc: #e64980; }
table.income tr.m7 { --mc: #0c8599; }  table.income tr.m8 { --mc: #82c91e; }  table.income tr.m9 { --mc: #ae3ec9; }
table.income tr.m10 { --mc: #a0522d; } table.income tr.m11 { --mc: #364fc7; } table.income tr.m12 { --mc: #c92a2a; }
table.income tr.month-sum > td { border-top: 0; }

/* modális űrlapok (új bevétel, nyilvántartott tétel, hónap-klón, csempék) */
.modal.wide { width: min(980px, 100%); }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; align-items: end; }
.grid-form > label, .grid-form > div { margin: 0; }
.grid-form .span2 { grid-column: span 2; }
.grid-form .ie, .modal .extra .ie { width: 100%; box-sizing: border-box; }
.row.tight { gap: .4rem; flex-wrap: nowrap; align-items: center; }
.row.tight > * { margin: 0; }
.row.tight .combo { flex: 1; }
label.chk-label { display: flex; align-items: center; gap: .4rem; }
.modal .extra .row.tight { margin-bottom: .35rem; }
.card.due { border-left: 4px solid #f2b705; background: #fffbea; }
.card.due > div + div { margin-top: .35rem; }
table.data td.warn { color: #b45309; font-weight: 600; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } .grid-form .span2 { grid-column: auto; } }

/* dátummezők: saját „éééé.hh.nn” szövegmező + naptár gomb; a natív mező rejtve (a naptárhoz) */
.date-wrap { position: relative; display: inline-flex; align-items: center; gap: .15rem; max-width: 100%; }
.date-wrap > input.date-txt { width: 7.2rem; min-width: 0; }
.date-wrap > input.date-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; }
.date-wrap > .date-btn { border: 0; background: transparent; cursor: pointer; padding: 0 .15rem; font-size: .85rem; line-height: 1; }
.date-wrap > input.date-txt.bad { border-color: #c92a2a; background: #fff5f5; }
.grid-form .date-wrap { display: flex; }
.grid-form .date-wrap > input.date-txt { flex: 1; width: auto; }
table.income .date-wrap > input.date-txt { width: 6.3rem; }
.fbar .date-wrap > input.date-txt { height: var(--ctl-h); box-sizing: border-box; }

/* a beállított szűrők felsorolása a szűrősor alatt: feltűnő színnel, kis betűvel */
.fsum { margin-top: .5rem; font-size: .85rem; color: #7a3e00; background: #fff4e0; border-left: 3px solid #f08c00; padding: .3rem .6rem; border-radius: 4px; }
.fsum .fchip { margin-right: .45rem; white-space: nowrap; }
.fsum .fchip button { border: 0; background: none; cursor: pointer; color: #7a3e00; padding: 0 .15rem; font-weight: 700; line-height: 1; }
.fsum .fchip button:hover { color: #c92a2a; }

/* bizonylatok a lenyitott sorban */
.att-block { border: 1px dashed transparent; border-radius: 6px; padding: .25rem; }
.att-block.drop { border-color: #2f63d6; background: #eef4ff; }
.att-block table.att td { padding: .25rem .4rem; vertical-align: middle; }
.att-block .att-up { gap: .4rem; align-items: center; margin-top: .35rem; }
input.hidden-file { display: none; }
.pill.att { background: #eef4ff; color: #2f63d6; }

/* címkék (#címke) a nyilvántartásban */
.tags { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin: .15rem 0; }
.tag { display: inline-flex; align-items: center; gap: .15rem; font-size: .8rem; background: #f1f3f9; color: #364fc7; border: 1px solid #d5dbf0; border-radius: 999px; padding: 0 .45rem; line-height: 1.5; cursor: default; }
button.tag { cursor: pointer; }
.tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .1rem; font-weight: 700; }
.tag-input { display: flex; flex-direction: column; gap: .25rem; }
.alert.warn { background: #fff4e0; border: 1px solid #f5c26b; color: #7a3e00; }
.pill.pkg { background: #f3f0ff; color: #6741d9; }

/* Beérkezett levelek */
.inbox-detail h3 { margin: .5rem 0 .35rem; font-size: 1rem; }
.inbox-detail pre.mailtext { white-space: pre-wrap; word-break: break-word; max-height: 22rem; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; font-size: .85rem; }
.inbox-detail ul.plain { list-style: none; padding: 0; margin: 0; }
.card.inner.proposal { background: #fff; margin-bottom: .6rem; }
.card.inner.proposal.locked { background: #f4faf6; }
.grid-form.prop { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-form.prop .span2 { grid-column: span 4; }
@media (max-width: 900px) { .grid-form.prop { grid-template-columns: 1fr 1fr; } .grid-form.prop .span2 { grid-column: span 2; } }
.ie.unsure, select.unsure { background: #fff3bf !important; border-color: #f2b705 !important; }
.ai-note { margin: 0 0 .4rem; color: #364fc7; }

/* kiadás: lejárt fizetési határidő (még nincs teljesen kifizetve) */
table.income td.overdue { color: #c92a2a; font-weight: 600; }

/* projektek: lista, adatlap, költségvetési fa, havi bontás, hozzárendelés */
.proj-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem 1rem; }
.proj-info small { display: block; }
table.budget tr.grp > td { background: #f4f6fb; }
table.budget tr.dir-bevetel td:nth-child(2) { color: var(--in); }
table.budget .indent { display: inline-block; width: 0; }
table.budget .indent[data-d="1"] { width: 1.2rem; } table.budget .indent[data-d="2"] { width: 2.4rem; } table.budget .indent[data-d="3"] { width: 3.6rem; }
table.budget .indent[data-d="4"] { width: 4.8rem; } table.budget .indent[data-d="5"] { width: 6rem; } table.budget .indent[data-d="6"] { width: 7.2rem; }
table.data td.neg, .tile strong.neg { color: #c92a2a; }
table.monthly input.ie.sm { width: 6.5rem; }
table.monthly td.warn { background: #fff3bf; }
.proj-share .row.tight { margin-bottom: .3rem; flex-wrap: wrap; }
.proj-share select.ie { max-width: 14rem; }
.proj-share input.ie.sm { width: 4.5rem; }
.pill.proj { background: #e6fcf5; color: #087f5b; }
table.income tr.proj-sum > td { background: #e6fcf5; }

/* Ütemezés: pénzforgalmi diagram és táblázat, projekt-idővonal */
.chart-wrap { overflow-x: auto; }
svg.sched-chart { width: 100%; min-width: 480px; height: auto; max-height: 260px; }
svg.sched-chart .axis { stroke: #adb5bd; stroke-width: 1; }
svg.sched-chart .bar-in { fill: #2f9e44; }
svg.sched-chart .bar-out { fill: #e03131; }
svg.sched-chart .line-cum { fill: none; stroke: #364fc7; stroke-width: 2; }
svg.sched-chart .dot-cum { fill: #364fc7; }
svg.sched-chart .lbl { font-size: 10px; fill: #495057; }
svg.sched-chart .lbl.end { text-anchor: end; }
svg.sched-chart .lbl.mid { text-anchor: middle; }
.legend { display: flex; gap: 1rem; margin-bottom: .3rem; }
.legend .lg::before { content: ''; display: inline-block; width: .8rem; height: .8rem; margin-right: .3rem; vertical-align: -1px; border-radius: 2px; }
.legend .lg.in::before { background: #2f9e44; } .legend .lg.out::before { background: #e03131; } .legend .lg.cum::before { background: #364fc7; height: .2rem; vertical-align: 3px; }
table.sched td, table.sched th { padding: .3rem .45rem; font-size: .85rem; }
table.sched tr.bal td { border-top: 2px solid #ced4da; font-weight: 600; }
table.sched tr.cum td { font-weight: 600; color: #364fc7; }
table.sched tr.terv td:not(:first-child) { color: #868e96; font-style: italic; }
table.sched tr.proj-head td { background: #f1f3f5; border-top: 2px solid #dee2e6; }
table.sched tr.proj-head td.gantt.on { background: #c5f6fa; }
table.sched tr.sub td:first-child { padding-left: 1.2rem; }
table.sched tr.sub.kiadas td:first-child { color: #c92a2a; } table.sched tr.sub.bevetel td:first-child { color: #2b8a3e; }
table.data tr.late td { background: #fff5f5; }

/* speciális szűrő (Riport) */
.adv-conds { margin: .5rem 0; }
.adv-row { margin-bottom: .35rem; flex-wrap: wrap; }
.adv-row .adv-join { min-width: 3rem; text-align: right; }
.adv-row select.ie, .adv-row input.ie { max-width: 16rem; }

/* Riport szűrő (a piros Bevét riportja szerint): első sor + külön blokk a projekt / cég / telephely szűrőknek */
.fbar.rep { align-items: flex-end; }
.fbar.rep .segmented { align-self: flex-end; margin: 0; }
.fbar.rep label.chk-label { align-self: center; margin-top: 1.2rem; }
.fbar.rep .combo { min-width: 12rem; }
.card.fblock2 { background: #f8f9fb; border-left: 3px solid #adb5bd; }

/* Riport v2: egy szűrősor (a második csoport saját háttérrel), a dátum-felirat a mező fölött, kis gombok a címsorban */
.fbar label > .date-wrap { display: flex; }
.fbar.rep { align-items: flex-end; flex-wrap: wrap; gap: .5rem .75rem; }
.fbar.rep .fbtns { display: flex; flex-direction: column; gap: .15rem; }
.fbar.rep .fbtns label.chk-label { margin: 0; font-size: .8rem; color: var(--muted); }
.fbar.rep .fgroup2 { background: #f1f3f8; border: 1px solid #e3e7ef; border-radius: 8px; padding: .35rem .6rem; margin: 0; align-items: flex-end; gap: .5rem; }
.card.fblock2 { display: none; }
.page-head h1 .sub { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.head-actions.small-btns { align-items: center; gap: .4rem; }
.head-actions.small-btns .btn.small { height: auto; padding: .2rem .65rem; }
.head-actions.small-btns label.inline { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .85rem; }
.head-actions.small-btns select { padding: .15rem .4rem; height: 1.8rem; }
.fbar.rep { gap: .4rem .55rem; }
.fbar.rep .combo { min-width: 9.5rem; max-width: 11rem; }
.fbar.rep .date-wrap > input.date-txt { width: 6.6rem; }
.fbar.rep .fgroup2 { padding: .3rem .45rem; gap: .4rem; }
.fbar.rep .fgroup2 select { max-width: 9rem; }
details.card.sumsec > summary { cursor: pointer; padding: .2rem 0; }
details.card.sumsec[open] > summary { margin-bottom: .5rem; }
.fbar.rep .fseg { display: flex; flex-direction: column; gap: .2rem; }
.fbar.rep .fseg label.chk-label { margin: 0; font-size: .8rem; color: var(--muted); }
.fbar.rep .fseg .segmented { align-self: flex-start; }
.fbar.rep > .btn { align-self: flex-end; }
/* a címsor kis gombjai ugyanakkorák, mint a Bontás választó */
.head-actions.small-btns select, .head-actions.small-btns .btn.small { height: 2rem; box-sizing: border-box; padding-top: 0; padding-bottom: 0; line-height: 1; display: inline-flex; align-items: center; }
.head-actions.small-btns select { padding-left: .5rem; padding-right: .5rem; }
.head-actions.small-btns select { margin: 0; width: auto; }
.head-actions.small-btns .btn.small { margin: 0; }

/* ügyfélszint */
.tenant-name { display: inline-block; margin-right: .6rem; padding: .05rem .5rem; border-radius: .3rem; background: var(--accent-soft, #e8f0fe); font-weight: 600; font-size: .85rem; }
.mailbox-row { border-top: 1px solid var(--line, #ddd); padding-top: .5rem; margin-top: .5rem; }
.mailbox-row h3 .pill { margin-left: .4rem; font-weight: normal; }
.tblock { padding: 0; }
.tblock > summary { cursor: pointer; padding: .7rem 1rem; list-style: none; display: flex; align-items: baseline; gap: .3rem; }
.tblock > summary::-webkit-details-marker { display: none; }
.tblock > summary::before { content: '▸'; display: inline-block; width: 1rem; color: var(--muted, #888); transition: transform .15s; }
.tblock[open] > summary::before { transform: rotate(90deg); }
.tblock-title { font-weight: 600; font-size: 1.05rem; }
.tblock-body { padding: 0 1rem 1rem; }
.inline-form { display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin: .2rem 0; }
.inline-form .ie { width: auto; }
.users-table td { vertical-align: top; }
.users-table .access { margin: .15rem 0; }
.users-table td.actions .btn { margin: 0 .2rem .2rem 0; }

/* jogcím-fa, projekt-mátrix */
.pill.jc { background: #eef3fb; color: #2a4a7f; margin-left: .35rem; font-size: .75rem; }
table.matrix th, table.matrix td { white-space: nowrap; }
table.matrix td.num div + div { font-size: .78rem; }
table.jc-tree td { vertical-align: top; }
table.sched .indent { display: inline-block; width: 0; }
table.sched .indent[data-d="1"] { width: 1rem; } table.sched .indent[data-d="2"] { width: 2rem; } table.sched .indent[data-d="3"] { width: 3rem; }
table.sched .indent[data-d="4"] { width: 4rem; } table.sched .indent[data-d="5"] { width: 5rem; } table.sched .indent[data-d="6"] { width: 6rem; }
table.sched tr.line td.gantt-line { background: #e3fafc; box-shadow: inset 0 -3px 0 #66d9e8; }
table.sched .btn.tog { padding: 0 .35rem; min-width: 1.4rem; }
.card h3 select { width: auto; display: inline-block; margin: 0 0 0 .5rem; font-size: .85rem; font-weight: normal; padding: .1rem .3rem; }
.bar select.gproj { width: auto; max-width: 16rem; margin: 0 .4rem 0 0; padding: .15rem .3rem; font-size: .85rem; }
.bar select.gproj.on { background: #fff3bf; border-color: #f59f00; font-weight: 600; }

/* pályázói megosztás (portál) */
.share-card > summary { cursor: pointer; }
.share-card h3 { margin-top: 1rem; }
pre.portal-req { white-space: pre-wrap; font: inherit; background: #f8f9fa; border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; }
tr.hl-soft td { background: #fff9db; }
.portal-file { margin: .25rem 0 0 .5rem; }
.portal-file .hianypotlas, .small.hianypotlas { color: #c92a2a; }
table.sched th.today, table.sched td.today { box-shadow: inset 2px 0 0 #e8590c; }
.login-box .brand { font-weight: 800; letter-spacing: .18em; font-size: 1.6rem; color: var(--accent, #364fc7); margin-bottom: .2rem; }
a.tile-link { text-decoration: none; color: inherit; display: block; }
a.tile-link .tile:hover { border-color: var(--accent, #364fc7); }
.tile.warn { background: #fff4e6; border-color: #ffc078; }

/* értesítések: csengő, teendőlista */
.bell-wrap { position: relative; display: inline-block; }
.btn.bell { position: relative; }
.btn.bell .badge { position: absolute; top: -6px; right: -8px; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: #e03131; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(420px, 90vw); max-height: 60vh; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.15); text-align: left; }
ul.task-list { list-style: none; padding: 0; margin: .4rem 0; }
ul.task-list li { padding: .35rem .2rem; border-bottom: 1px solid var(--line); display: flex; gap: .4rem; align-items: baseline; }
ul.task-list li.urgent a { font-weight: 600; }
ul.task-list li .ti { width: 1.3rem; text-align: center; }
ul.task-list li .btn { margin-left: auto; }
.btn.remind { padding: 0 .35rem; }
.btn.remind.on { background: #fff3bf; }

/* pályázói felület */
.navlink .cnt { display: inline-block; margin-left: .3rem; min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: #e8590c; color: #fff; font-size: .7rem; line-height: 1.1rem; text-align: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.grid2 > .card { margin: 0; }
.prog { margin: .6rem 0; }
.prog-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; margin-bottom: .2rem; }
.prog-bar { height: .55rem; background: #e9ecef; border-radius: 999px; overflow: hidden; }
.prog-bar > span { display: block; height: 100%; background: var(--accent, #364fc7); border-radius: 999px; }
.prog.docs .prog-bar > span { background: #2f9e44; } .prog.tasks .prog-bar > span { background: #1c7ed6; } .prog.time .prog-bar > span { background: #868e96; }
.prog-bar.sm { height: .35rem; flex: 1 1 120px; min-width: 120px; }
.now-card { border-left: 4px solid #e8590c; }
ul.task-list.big li { padding: .55rem .3rem; align-items: center; }
ul.task-list li .grow { flex: 1; }
ul.task-list li .done { text-decoration: line-through; color: var(--muted, #868e96); }
ul.task-list li input[type=checkbox] { width: 1.1rem; height: 1.1rem; }
.doc-card { border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; padding: .55rem .7rem; margin: .5rem 0; }
.doc-card.st-hianypotlas { border-left-color: #e03131; background: #fff5f5; }
.doc-card.st-hiany { border-left-color: #e8590c; }
.doc-card.st-uj { border-left-color: #f59f00; }
.doc-card.st-elfogadva { border-left-color: #2f9e44; }
.doc-card .doc-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.money-group { border-bottom: 1px solid var(--line); padding: .4rem 0; }
.money-group > summary { cursor: pointer; list-style: none; }
.money-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.money-row .num { margin-left: auto; white-space: nowrap; }

/* Szervezet oldal: áttekinthető cégblokkok, gombokkal nyíló ablakok */
.orgbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.orgco > summary { cursor: pointer; padding: 2px 0; }
.orgsites { margin-bottom: 8px; }
.orgsite { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.orgf { display: block; margin: 0 0 10px; font-weight: 600; font-size: .92rem; }
.orgf input, .orgf select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.orgf .small { font-weight: 400; display: block; margin-top: 2px; }
