/* ==========================================================================
   Munkaidő-nyilvántartó – Túrkeve
   Alapszínek: kun kék és arany, meleg papírszínű háttér.
   ========================================================================== */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --kun-900: #0e254b;
    --kun-800: #14336a;
    --kun-700: #1b4587;
    --kun-600: #2557a3;
    --kun-200: #c9d7ee;
    --kun-100: #e5ecf7;
    --kun-50: #f2f6fc;

    --gold-600: #a97b14;
    --gold-500: #d3a12b;
    --gold-200: #f1ddaa;
    --gold-100: #faf1db;

    --ink: #17202d;
    --ink-2: #3a4456;
    --muted: #687183;
    --line: #dfdbd0;
    --line-soft: #ebe8df;
    --paper: #f5f3ed;
    --surface: #ffffff;

    --ok: #2c7a4c;
    --ok-bg: #e6f2ea;
    --warn: #96600a;
    --warn-bg: #fcf2da;
    --err: #ad3628;
    --err-bg: #fae8e4;

    --radius: 8px;
    --radius-sm: 5px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --font: "Barlow", "Segoe UI", system-ui, sans-serif;
    --font-head: "Barlow Semi Condensed", "Barlow", "Segoe UI", sans-serif;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 14.5px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
    font-feature-settings: "tnum" 1;
}

a { color: var(--kun-700); text-decoration: none; }
a:hover { color: var(--kun-600); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--kun-600); outline-offset: 2px; }
img, svg { vertical-align: middle; }

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 700; margin: 0; letter-spacing: -.005em; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .65rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
h2 .aside { margin-left: auto; font-family: var(--font); font-weight: 500; font-size: .85rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-err { color: var(--err); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fejléc ---------- */
.site-header { background: var(--kun-700); color: #fff; position: sticky; top: 0; z-index: 30; }
.site-header::after { content: ""; display: block; height: 3px; background: var(--gold-500); }
.header-inner { max-width: 1320px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: stretch; gap: 1.2rem; min-height: 52px; }

.brand { display: flex; align-items: center; gap: .6rem; color: #fff; padding: .3rem 0; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark { height: 40px; width: auto; flex-shrink: 0; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7)) drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.brand-mark.large { height: 150px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.brand-text span { font-size: .75rem; color: var(--kun-200); letter-spacing: .02em; }

.nav { display: flex; align-items: stretch; gap: .1rem; flex: 1; }
.nav > a, .nav-group > summary {
    display: flex; align-items: center; gap: .35rem;
    padding: 0 .8rem;
    color: #e8eefa;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    list-style: none;
    white-space: nowrap;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav > a:hover, .nav-group > summary:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav > a.active, .nav-group.active > summary { color: #fff; }
.nav > a.active::after, .nav-group.active > summary::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 3px; background: var(--gold-500);
}
.nav-group { position: relative; display: flex; }
.chev { width: .7em; height: .7em; opacity: .75; transition: transform .2s var(--ease); }
.nav-group[open] .chev, .menu[open] .chev { transform: rotate(180deg); }

.dropdown {
    position: absolute; top: calc(100% + 3px); left: 0;
    min-width: 230px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold-500);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 14px 30px -12px rgba(14, 37, 75, .35);
    padding: .4rem;
    display: grid;
    animation: drop .16s var(--ease);
}
.dropdown.right { left: auto; right: 0; }
.dropdown.wide { min-width: 460px; grid-template-columns: 1fr 1fr; column-gap: .4rem; }
.dropdown .dd-label { grid-column: 1 / -1; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-600); font-weight: 600; padding: .55rem .6rem .2rem; }
.dropdown a, .dropdown button.link {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .45rem .6rem; border-radius: var(--radius-sm); color: var(--ink); font: inherit; text-align: left;
}
.dropdown a:hover, .dropdown button.link:hover { background: var(--kun-50); color: var(--kun-800); text-decoration: none; }
.dropdown hr { grid-column: 1 / -1; border: 0; border-top: 1px solid var(--line-soft); margin: .3rem 0; width: 100%; }

@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.header-tools { display: flex; align-items: stretch; gap: .1rem; }
.header-tools > a, .header-tools .menu > summary {
    display: flex; align-items: center; gap: .45rem; padding: 0 .7rem; color: #e8eefa; cursor: pointer; list-style: none; position: relative;
}
.header-tools .menu > summary::-webkit-details-marker { display: none; }
.header-tools > a:hover, .header-tools .menu > summary:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.menu { position: relative; display: flex; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold-500); color: var(--kun-900); font-weight: 700; font-size: .85rem; }
.count-dot { position: absolute; top: 8px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--gold-500); color: var(--kun-900); font-size: .7rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.nav .count { background: var(--gold-500); color: var(--kun-900); border-radius: 9px; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; }
.dropdown .count { background: var(--kun-700); color: #fff; border-radius: 9px; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; }

.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 0 .4rem; cursor: pointer; }

/* ---------- Oldal ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 1.1rem 1.25rem 2.5rem; animation: rise .28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.eyebrow { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-600); font-weight: 600; margin-bottom: .25rem; }
.page-head p { margin: .3rem 0 0; color: var(--muted); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.footer { max-width: 1320px; margin: 0 auto; padding: 1rem 1.25rem 2rem; color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); }

.grid { display: grid; gap: .8rem; margin-bottom: .8rem; }
.grid > * { min-width: 0; margin-bottom: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .8rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: .8rem 1rem 0; }
.card.narrow { max-width: 720px; }
.card-accent { border-top: 3px solid var(--kun-700); }
.card-gold { border-top: 3px solid var(--gold-500); }
.card-foot { border-top: 1px solid var(--line-soft); margin: .8rem -1rem -.85rem; padding: .55rem 1rem; background: #fbfaf7; border-radius: 0 0 var(--radius) var(--radius); }

.pill { display: inline-block; padding: .05rem .5rem; border-radius: 4px; background: var(--kun-50); color: var(--kun-700); font-size: .76rem; font-weight: 600; }

/* ---------- Statisztika-csempék ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem; }
.stat .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; color: var(--kun-800); line-height: 1.15; margin-top: .15rem; }
.stat .value.neg { color: var(--err); }
.stat .value.pos { color: var(--ok); }
.stat .hint { font-size: .78rem; color: var(--muted); }

/* ---------- Gombok ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    height: 32px; padding: 0 .8rem;
    font: inherit; font-weight: 600; font-size: .9rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink);
    cursor: pointer; white-space: nowrap;
    transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .08s;
}
.btn:hover { background: #faf9f5; border-color: #cfcabd; text-decoration: none; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 27px; padding: 0 .6rem; font-size: .82rem; }
.btn-lg { height: 38px; padding: 0 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--kun-700); border-color: var(--kun-700); color: #fff; }
.btn-primary:hover { background: var(--kun-800); border-color: var(--kun-800); color: #fff; }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: var(--kun-900); }
.btn-gold:hover { background: #c4931f; border-color: #c4931f; color: var(--kun-900); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #246541; border-color: #246541; color: #fff; }
.btn-danger { color: var(--err); border-color: #e7c2bb; }
.btn-danger:hover { background: var(--err-bg); border-color: #dca99f; color: var(--err); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--kun-700); }
.btn-ghost:hover { background: var(--kun-50); border-color: transparent; color: var(--kun-800); }
.btn:disabled { opacity: .55; cursor: default; }
.button-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--kun-700); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }

/* ---------- Űrlapok ---------- */
.form { display: grid; gap: .7rem; }
.field { display: grid; gap: .3rem; }
.field > span, .field > label, .legend { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field .help, .help { font-size: .8rem; color: var(--muted); font-weight: 400; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number],
input[type=search], input[type=month], input[type=tel], input[type=file], select, textarea {
    font: inherit; font-size: .92rem; color: var(--ink);
    width: 100%; min-height: 34px; padding: .3rem .6rem;
    border: 1px solid #cfcabd; border-radius: var(--radius-sm); background: #fff;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type=file] { padding: .35rem; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--kun-600); box-shadow: 0 0 0 3px rgba(37, 87, 163, .15); }
input[type=color] { width: 54px; height: 40px; padding: 2px; border: 1px solid #cfcabd; border-radius: var(--radius-sm); background: #fff; }
select[multiple] { padding: .3rem; min-height: 160px; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: .3rem; accent-color: var(--kun-700); width: 16px; height: 16px; }
.segmented { display: inline-flex; border: 1px solid #cfcabd; border-radius: var(--radius-sm); overflow: hidden; flex-wrap: wrap; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: .45rem .85rem; font-size: .9rem; border-right: 1px solid #e3dfd4; transition: background-color .15s; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--kun-700); color: #fff; }
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--gold-500); }
.segmented input:disabled + span { color: #b9b4a8; cursor: not-allowed; }
.w-auto { width: auto !important; }
.w-num { width: 5.2rem !important; text-align: right; }
.w-time { width: 6.5rem !important; }

.toolbar { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-bottom: .7rem; }
.toolbar input, .toolbar select { width: auto; min-width: 0; }
.toolbar .grow { flex: 1; }
.monthnav { display: inline-flex; align-items: center; gap: .3rem; }
.monthnav strong { font-family: var(--font-head); font-size: 1rem; min-width: 8.5rem; text-align: center; }

/* ---------- Üzenetek ---------- */
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .8rem; border-radius: var(--radius-sm); margin-bottom: .7rem; border: 1px solid; border-left-width: 4px; animation: rise .25s var(--ease); }
.alert ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.alert-ok { background: var(--ok-bg); border-color: #bcdcc8; border-left-color: var(--ok); color: #1d4f32; }
.alert-err { background: var(--err-bg); border-color: #edc5bd; border-left-color: var(--err); color: #6e2117; }
.alert-warn { background: var(--warn-bg); border-color: #edd9a6; border-left-color: var(--gold-500); color: #5f3e05; }
.alert-info { background: var(--kun-50); border-color: var(--kun-200); border-left-color: var(--kun-700); color: var(--kun-900); }

/* ---------- Táblázatok ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .42rem .6rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.table th.num, .table td.num { text-align: right; }
.table .right { text-align: right; }
.table thead th { background: #faf8f3; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: var(--kun-50); }
.table tfoot td { font-weight: 600; background: #faf8f3; border-top: 1px solid var(--line); }
.table.compact th, .table.compact td { padding: .28rem .45rem; }
.table tr.is-off td { background: #f7f5ef; color: var(--muted); }
.table tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--gold-500); }
.table tr.is-missing td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.table tr.inactive td { color: var(--muted); }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 1rem; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 1rem; }

.swatch { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; margin-right: .45rem; vertical-align: 1px; }

.status { display: inline-block; padding: .1rem .5rem; border-radius: 4px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.status-pending { background: var(--gold-100); color: #7a5508; }
.status-approved { background: var(--ok-bg); color: var(--ok); }
.status-rejected { background: var(--err-bg); color: var(--err); }
.status-cancelled, .status-withdrawn { background: #eeece6; color: #5f6672; }
.status-withdrawal_requested { background: #fbe7d3; color: #8c4a10; }

.list { display: grid; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .42rem 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { color: var(--kun-800); text-decoration: none; background: linear-gradient(90deg, var(--kun-50), transparent); }
.list-item.unread { font-weight: 600; }
.person { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.person .avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--kun-100); color: var(--kun-800); font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.person .meta { min-width: 0; }
.person .meta div { font-size: .82rem; color: var(--muted); }

.details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.4rem; margin: 0; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; }

.empty { color: var(--muted); padding: .8rem 0; }
.code { background: #f7f5ef; border: 1px solid var(--line-soft); padding: .75rem; border-radius: var(--radius-sm); font-size: .83rem; overflow-x: auto; font-family: Consolas, monospace; }

.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; padding: .9rem 0 .2rem; }
.pagination .disabled { color: #b2ad9f; }

/* ---------- Óra (Megkezdés/Befejezés) ---------- */
.clock { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.clock-face { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--kun-50); border: 2px solid var(--kun-100); position: relative; }
.clock-face.running { border-color: var(--ok); background: #f0f8f3; }
.clock-face.paused { border-color: var(--gold-500); background: var(--gold-100); }
.clock-face.running::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(44, 122, 76, .35); animation: pulse 2.4s ease-out infinite; }
.clock-face .time { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--kun-800); line-height: 1; }
.clock-face .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .2rem; }
@keyframes pulse { 0% { transform: scale(.96); opacity: .9; } 100% { transform: scale(1.12); opacity: 0; } }

.edit-row > td { background: var(--kun-50) !important; padding: .6rem .8rem !important; border-bottom: 2px solid var(--kun-200); }
.edit-row:not([hidden]) { animation: rise .18s var(--ease); }
.quick-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; padding: .35rem 0; }
.quick-edit + .quick-edit { border-top: 1px dashed var(--kun-200); }
.qf { display: grid; gap: .15rem; font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.qf input, .qf select { min-height: 34px; padding: .25rem .5rem; font-size: .92rem; width: auto; text-transform: none; letter-spacing: 0; }
.qf input[type=time] { width: 7rem; }
.qf-breaks input { width: 12.5rem; }
.qf-note input { width: 14rem; }
.ts-table tr.is-today + .edit-row > td { box-shadow: inset 3px 0 0 var(--gold-500); }

.clock-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.clock-form { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.clock-form input[type=time] { border: 0; border-right: 1px solid var(--line); border-radius: 0; min-height: 46px; font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; color: var(--kun-800); }
.clock-form input[type=time]:focus { box-shadow: inset 0 0 0 2px var(--kun-200); }
.clock-form .btn { border-radius: 0; border: 0; }
.daylock { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); }
.daylock.open { color: var(--ok); }
.inline-actions { display: inline-flex; gap: .3rem; }
.inline-actions form { display: inline; }
.weekday-pick { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.weekday-pick label { position: relative; cursor: pointer; }
.weekday-pick input { position: absolute; opacity: 0; }
.weekday-pick span { display: grid; place-items: center; width: 40px; height: 34px; border: 1px solid #cfcabd; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600; background: #fff; transition: background-color .15s; }
.weekday-pick input:checked + span { background: var(--kun-700); border-color: var(--kun-700); color: #fff; }
.weekday-pick input:focus-visible + span { box-shadow: 0 0 0 2px var(--gold-500); }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.week .d { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: .3rem .3rem; text-align: center; background: #fff; min-height: 58px; }
.week .d.off { background: #f7f5ef; color: var(--muted); }
.week .d.today { border-color: var(--gold-500); box-shadow: 0 0 0 1px var(--gold-500); }
.week .d .dn { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.week .d .dd { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.week .d .sh { font-size: .76rem; margin-top: .15rem; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.quick a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.quick a:hover { border-color: var(--kun-200); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(14, 37, 75, .45); color: var(--kun-800); }
.quick .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--kun-50); color: var(--kun-700); }
.quick .ico .icon { width: 20px; height: 20px; }

/* ---------- Rácsok (naptár, beosztás) ---------- */
.grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.mgrid { border-collapse: separate; border-spacing: 0; font-size: .82rem; width: 100%; }
.mgrid th, .mgrid td { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 0; text-align: center; min-width: 30px; height: 29px; }
.mgrid thead th { position: sticky; top: 0; background: #faf8f3; font-weight: 600; padding: .25rem 0; line-height: 1.1; z-index: 2; }
.mgrid thead th small { display: block; font-weight: 500; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.mgrid .name { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; padding: 0 .75rem; white-space: nowrap; min-width: 170px; font-weight: 500; }
.mgrid thead .name { z-index: 3; background: #faf8f3; }
.mgrid .name small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.mgrid .off { background: #f6f4ee; }
.mgrid .today { box-shadow: inset 0 -3px 0 var(--gold-500); }
.mgrid .sum { font-weight: 600; padding: 0 .5rem; white-space: nowrap; }
.cellmark { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 28px; background: var(--c, transparent); color: var(--on, #fff); font-weight: 600; font-size: .72rem; letter-spacing: .02em; }
.cellmark.pending { background: repeating-linear-gradient(135deg, var(--c) 0 5px, #fff 5px 9px); color: #111; box-shadow: inset 0 0 0 2px var(--c); text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.cellmark.partial { background: linear-gradient(135deg, var(--c) 50%, transparent 50%); color: #111; box-shadow: inset 0 0 0 1px var(--c); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.cellmark.pending span, .cellmark.partial span { background: rgba(255, 255, 255, .92); color: #111; padding: 0 2px; border-radius: 2px; line-height: 1.25; text-shadow: none; }
.cellmark.partial.pending { background: linear-gradient(135deg, transparent 50%, #fff 50%), repeating-linear-gradient(135deg, var(--c) 0 5px, #fff 5px 9px); }
a.cellmark:hover { text-decoration: none; filter: brightness(1.08); }

.sched-cell { cursor: pointer; user-select: none; transition: background-color .12s; }
.sched-cell:hover { background: var(--kun-50); }
.sched-cell .tag { display: flex; align-items: center; justify-content: center; min-height: 28px; font-weight: 600; font-size: .74rem; color: #fff; background: var(--c, transparent); }
.sched-cell .tag.rest { background: transparent; color: var(--muted); font-weight: 500; }
.sched-cell .tag.abs { outline: 2px dashed var(--err); outline-offset: -3px; }
.sched-cell.busy { opacity: .45; }
.sched-cell.locked { cursor: not-allowed; }
.brushes { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.brush { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: .85rem; font-weight: 500; }
.brush .sw { width: 22px; height: 18px; border-radius: 3px; display: grid; place-items: center; color: #fff; font-size: .66rem; font-weight: 700; background: var(--c, #ccc); }
.brush.selected { border-color: var(--kun-700); box-shadow: 0 0 0 2px var(--kun-200); }

.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .8rem; color: var(--muted); margin-top: .7rem; }
.legend i { display: inline-block; width: 14px; height: 12px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }

/* ---------- Diagram ---------- */
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .6rem; align-items: end; height: 260px; padding: .5rem .2rem 0; border-bottom: 1px solid var(--line); }
.chart .col { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.chart .seg { width: 100%; transition: filter .15s; transform-origin: bottom; animation: grow .5s var(--ease) both; }
.chart .seg:hover { filter: brightness(1.12); }
.chart .seg:last-child { border-radius: 3px 3px 0 0; }
.chart-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .6rem; text-align: center; font-size: .78rem; color: var(--muted); padding-top: .35rem; }
.chart-labels b { display: block; color: var(--ink); font-weight: 600; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.tree { list-style: none; margin: 0; padding: 0; }
.tree .node { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem; border-bottom: 1px solid var(--line-soft); }
.tree .node:hover { background: var(--kun-50); }
.tree .depth { display: inline-block; flex-shrink: 0; border-left: 2px solid var(--kun-200); height: 1.4rem; }
.tree .title { font-weight: 600; }
.tree .people { color: var(--muted); font-size: .85rem; }
.members { margin-top: .3rem; font-size: .88rem; }
.members summary { cursor: pointer; color: var(--kun-700); font-weight: 500; width: fit-content; }
.members ul { list-style: none; margin: .35rem 0 .1rem; padding: 0 0 0 .9rem; border-left: 2px solid var(--kun-100); columns: 2 16rem; column-gap: 1.5rem; }
.members li { padding: .12rem 0; break-inside: avoid; }
.members li .tiny { margin-left: .3rem; }
.members .tag { margin-left: .35rem; font-size: .7rem; padding: .05rem .4rem; border-radius: 999px; background: #f6ecd2; color: #7a5a12; }

/* ---------- Belépés ---------- */
body.guest { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--kun-700); position: relative; overflow-x: hidden; }
body.guest::before { content: ""; position: fixed; right: -160px; top: -160px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(211, 161, 43, .12); pointer-events: none; }
body.guest::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gold-500); }
.guest-side { color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; position: relative; }
.guest-side .brand-text strong { font-size: 1.35rem; }
.guest-side h1 { color: #fff; font-size: 2.4rem; max-width: 13ch; margin-top: 1.5rem; }
.guest-side p { color: var(--kun-200); max-width: 34ch; }
.guest-main { display: grid; place-items: center; padding: 2rem; position: relative; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 12px; padding: 2rem 2rem 1.6rem; border-top: 4px solid var(--gold-500); box-shadow: 0 30px 60px -25px rgba(5, 18, 40, .6); animation: rise .35s var(--ease); }
.auth-card h2 { font-size: 1.5rem; margin-bottom: .3rem; display: block; }
.auth-card .sub { color: var(--muted); margin: 0 0 1.4rem; }
.code-input { font-family: var(--font-head); font-size: 1.9rem !important; letter-spacing: .45em; text-align: center; font-weight: 600; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
    .nav-toggle { display: flex; align-items: center; }
    .nav { display: none; position: absolute; top: 55px; left: 0; right: 0; background: var(--kun-800); flex-direction: column; padding: .4rem; max-height: calc(100vh - 55px); overflow-y: auto; }
    .nav.open { display: flex; animation: drop .16s var(--ease); }
    .nav > a, .nav-group > summary { padding: .7rem .8rem; }
    .nav-group { flex-direction: column; }
    .dropdown, .dropdown.wide { position: static; min-width: 0; grid-template-columns: 1fr; box-shadow: none; border-radius: var(--radius-sm); margin: 0 .4rem .4rem; }
    .nav > a.active::after, .nav-group.active > summary::after { display: none; }
    .header-inner { gap: .8rem; }
    .header-tools { margin-left: auto; }
}
@media (max-width: 860px) {
    .g-2, .g-3, .g-21, .g-12, .row, .row-3, .quick { grid-template-columns: 1fr; }
    body.guest { grid-template-columns: 1fr; }
    .guest-side { padding: 1.5rem 1.5rem 0; }
    .brand-mark.large { height: 90px; }
    .guest-side h1 { font-size: 1.6rem; margin-top: 1rem; }
    .page { padding: 1.1rem .9rem 2rem; }
    .brand-text span { display: none; }
    .clock { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

.print-head, .print-ribbon { display: none; }

@media print {
    .site-header, .footer, .page-actions, .toolbar, form, .btn { display: none !important; }
    body { background: #fff; }
    .card { border: 0; padding: 0; }
    .page { animation: none; padding: 0; }
    .print-head { display: flex; align-items: center; gap: 10px; }
    .print-head img { height: 46px; }
    .print-head strong { display: block; font-size: 13pt; color: #14336a; }
    .print-head span { font-size: 9pt; color: #5d6575; }
    /* Piros–fehér–zöld szalag */
    .print-ribbon { display: block; height: 7px; margin: 6px 0 12px; background: linear-gradient(#c8102e 0 33.3%, #fff 33.3% 66.6%, #477050 66.6% 100%); border-top: .5px solid #d6d2c7; border-bottom: .5px solid #d6d2c7; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Munkarend-szerkesztő ---------- */
.seg-link { display: block; padding: .32rem .75rem; font-size: .88rem; border-right: 1px solid #e3dfd4; color: var(--ink); }
.segmented .seg-link:last-child { border-right: 0; }
.seg-link:hover { background: var(--kun-50); text-decoration: none; }
.seg-link.on { background: var(--kun-700); color: #fff; }
.pattern-tools { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .4rem; }
.pattern-tools select { width: auto; }
.pattern-quick { display: inline-flex; align-items: center; gap: .25rem; }
.pattern-quick input[type=time] { width: 6.6rem; }
.pattern-quick input[type=number] { width: 4.2rem; }
.pattern-grid { display: grid; grid-template-columns: 4.5rem repeat(7, minmax(0, 1fr)); gap: .35rem; margin-top: .4rem; }
.pattern-grid.monthly { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pg-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .2rem .3rem; text-align: center; }
button.pg-col { background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 700; }
button.pg-col:hover { background: var(--kun-50); color: var(--kun-800); }
.pg-week { display: flex; align-items: center; font-size: .78rem; font-weight: 600; color: var(--muted); }
.pg-cell { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: .35rem .4rem; display: grid; gap: .25rem; transition: background-color .12s, border-color .12s; }
.pg-cell.weekend { background: #fbfaf6; }
.pg-cell.rest { background: #f4f2ec; }
.pg-cell.rest .pg-times, .pg-cell.rest .pg-break { opacity: .4; }
.pg-cell.selected { border-color: var(--kun-600); box-shadow: 0 0 0 2px var(--kun-200); }
.pg-top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; }
.pg-sel { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; cursor: pointer; }
.pg-rest { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); cursor: pointer; }
.pg-sel input, .pg-rest input { accent-color: var(--kun-700); margin: 0; }
.pg-times { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.pg-times input, .pg-break input { min-height: 28px !important; padding: .1rem .3rem !important; font-size: .82rem !important; }
.pg-break { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted); }
.pg-break input { width: 3.6rem !important; }
.pg-sum { font-size: .75rem; font-weight: 600; color: var(--kun-800); text-align: right; min-height: 1em; }
.pattern-total { margin-top: .6rem; text-align: right; }
.assign-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 860px) {
    .pattern-grid, .pattern-grid.monthly { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pg-head, .pg-week { display: none; }
}

/* ---------- Névválasztó ---------- */
.picker { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .65rem; border-bottom: 1px solid var(--line-soft); background: #faf8f3; border-radius: var(--radius) var(--radius) 0 0; }
.picker-head .legend { margin-right: auto; }
.picker-count { font-weight: 400; color: var(--muted); font-size: .8rem; }
.picker-only { width: 210px !important; min-height: 28px !important; padding: .15rem .5rem !important; font-size: .85rem !important; }
.picker-search { width: 200px !important; min-height: 28px !important; padding: .15rem .5rem !important; font-size: .85rem !important; }
.picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .15rem .8rem; padding: .5rem .65rem; max-height: 260px; overflow-y: auto; }
.picker-list .check { padding: .15rem 0; }
.picker-list .check[hidden] { display: none; }

/* ---------- Időválasztó ablak (Megkezdés / Szünet / Befejezés) ---------- */
.time-dialog { border: 0; padding: 0; border-radius: 12px; width: min(360px, calc(100vw - 2rem)); box-shadow: 0 30px 70px -20px rgba(5, 18, 40, .55); border-top: 4px solid var(--gold-500); }
.time-dialog::backdrop { background: rgba(14, 37, 75, .55); backdrop-filter: blur(2px); }
.time-dialog[open] { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.time-dialog-body { padding: 1.1rem 1.2rem 1rem; display: grid; gap: .55rem; }
.time-dialog-body h2 { margin: 0; font-size: 1.2rem; }
.time-dialog-body .help { margin: 0; }
.time-big { display: grid; grid-template-columns: 44px 1fr 44px; align-items: stretch; gap: .4rem; margin-top: .3rem; }
.time-big input[type=time] { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; text-align: center; min-height: 58px; color: var(--kun-800); letter-spacing: .02em; }
.time-big .step { border: 1px solid var(--line); background: var(--kun-50); color: var(--kun-800); border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer; }
.time-big .step:hover { background: var(--kun-100); }
.time-quick { display: flex; gap: 1rem; justify-content: center; }
.taj-dialog { width: min(480px, calc(100vw - 2rem)); }
.is-busy { cursor: progress; opacity: .7; pointer-events: none; }
.time-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .4rem; border-top: 1px solid var(--line-soft); padding-top: .7rem; }
.sched-cell .tag.pat { background: transparent; color: var(--kun-600); font-weight: 500; font-style: italic; }

/* ---------- Beosztástervező: heti minta készítése ---------- */
.qp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: .7rem; }
.qp-head h2 { margin-bottom: .2rem; }
.qp-head .help { max-width: 70ch; }
.qp-load { min-width: 16rem; margin: 0; }
.qp-rules { display: flex; flex-direction: column; gap: .5rem; }
.qp-rule { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .9rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfbf8; }
.qp-chips { display: flex; gap: .25rem; }
.qp-chip { position: relative; cursor: pointer; }
.qp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qp-chip span { display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.25rem; padding: 0 .45rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-weight: 600; font-size: .85rem; color: var(--muted); transition: background-color .12s, color .12s, border-color .12s; }
.qp-chip:hover span { border-color: var(--kun-600); color: var(--kun-800); }
.qp-chip input:checked + span { background: var(--kun-700); border-color: var(--kun-700); color: #fff; }
.qp-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--kun-200); }
.qp-field { display: flex; flex-direction: column; gap: .15rem; font-size: .75rem; color: var(--muted); font-weight: 500; }
.qp-field input[type=time] { width: 6.6rem; }
.qp-field .w-num { width: 5rem !important; }
.qp-sum { align-self: center; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.qp-sum strong { color: var(--ink); font-size: .95rem; }
.qp-tpl { max-width: 15rem; font-size: .85rem; }
.qp-remove { margin-left: auto; align-self: center; }
.qp-preview { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(7rem, auto); gap: .35rem; margin: .9rem 0 .3rem; }
.qp-day { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: .4rem .5rem; text-align: center; background: #faf8f3; color: var(--muted); display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.qp-day.on { border-style: solid; border-color: var(--kun-200); background: var(--kun-50); color: var(--ink); }
.qp-dname { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; color: var(--muted); }
.qp-dtime { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp-day:not(.on) .qp-dtime { font-weight: 400; font-style: italic; }
.qp-dsum { font-size: .75rem; color: var(--kun-600); min-height: 1em; }
.qp-total { display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: var(--radius-sm); background: var(--kun-700); color: #fff; font-size: .75rem; padding: .4rem .6rem; }
.qp-total strong { font-size: 1.15rem; }
.qp-sub { font-size: 1rem; margin: 1rem 0 .4rem; padding-top: .8rem; border-top: 1px solid var(--line-soft); }
@media (max-width: 760px) {
    .qp-preview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .qp-remove { margin-left: 0; }
}

/* ---------- Beosztástervező: kézi tervezés és rács ---------- */
.brush-bar { padding: .75rem 1rem; }
.brush-head { display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; margin-bottom: .55rem; }
.brush-head h2 { margin: 0; font-size: 1.05rem; }
.brush-status { font-size: .85rem; color: var(--muted); }
.brush-status.active { color: var(--kun-800); }
.brush small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.brush .sw { width: 12px; height: 12px; border-radius: 3px; }
.brush-custom { cursor: default; gap: .35rem; }
.brush-custom input { min-height: 30px; padding: .15rem .4rem; }
.brush-custom .w-num { width: 4rem !important; }
.mgrid th.wk, .mgrid td.wk { border-left: 2px solid var(--kun-200); }
.mgrid tbody tr:hover th.name { background: var(--kun-50); }
.sched-cell .tag { flex-direction: column; gap: 0; line-height: 1.05; font-size: .7rem; font-weight: 600; color: #1d2b45; background: color-mix(in srgb, var(--c, transparent) 16%, #fff); box-shadow: inset 3px 0 0 var(--c, transparent); min-height: 30px; }
.sched-cell .tag b { font-weight: 700; }
.sched-cell .tag i { font-style: normal; font-weight: 500; color: #4a5872; }
.sched-cell.off .tag:not(.rest):not(.pat) { background: color-mix(in srgb, var(--c, transparent) 16%, #f6f4ee); }
.sched-cell .tag.rest { background: transparent; box-shadow: none; color: #a3a3a3; font-weight: 500; font-size: .72rem; }
.sched-cell .tag.pat { background: transparent; box-shadow: none; color: var(--kun-600); font-weight: 500; font-style: italic; }
.sched-cell .tag.pat i { color: var(--kun-600); }
.sched-cell:hover .tag { outline: 2px solid var(--kun-600); outline-offset: -2px; }
.legend .lg-sched { background: color-mix(in srgb, #1b4587 16%, #fff); box-shadow: inset 3px 0 0 #1b4587; }
.legend .lg-pat { border: 1px dashed var(--kun-200); }
.more-tools { padding: 0; }
.more-tools > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; color: var(--kun-800); }
.more-tools[open] > summary { border-bottom: 1px solid var(--line-soft); }
.more-body { padding: .8rem 1rem 1rem; }

/* ---------- Szervezeti felépítés: behúzgálós tábla ---------- */
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem 1.5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.board-head h2 { margin-bottom: .2rem; }
.board-head .help { max-width: 80ch; }
.board-head kbd { font: inherit; font-size: .78rem; padding: 0 .3rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; background: #fff; }
.board-actions { display: flex; align-items: center; gap: .5rem; position: sticky; top: 70px; }
.board-dirty { font-size: .82rem; color: var(--gold-600); font-weight: 600; }
.board-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; align-items: start; }
.board-col { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfbf8; display: flex; flex-direction: column; min-height: 120px; transition: border-color .12s, background-color .12s; }
.board-col.over { border-color: var(--kun-600); background: var(--kun-50); box-shadow: 0 0 0 2px var(--kun-200); }
.board-none { background: #f6f4ee; border-style: dashed; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .45rem .6rem; border-bottom: 1px solid var(--line-soft); font-weight: 600; font-size: .86rem; color: var(--kun-800); cursor: pointer; }
.board-col-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-col-body { display: flex; flex-direction: column; gap: .3rem; padding: .45rem; flex: 1; min-height: 70px; }
.chip-person { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .3rem; padding: .3rem .4rem .3rem .55rem; border: 1px solid var(--line); border-left: 3px solid var(--kun-600); border-radius: var(--radius-sm); background: #fff; cursor: grab; user-select: none; font-size: .84rem; }
.chip-person:hover { border-color: var(--kun-200); border-left-color: var(--kun-700); }
.chip-person:focus-visible { outline: 2px solid var(--kun-600); outline-offset: 1px; }
.chip-person.dragging { opacity: .45; }
.chip-person.picked { background: var(--kun-50); box-shadow: 0 0 0 2px var(--kun-600); }
.chip-person.multi { border-left-color: var(--gold-500); }
.chip-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-pos { grid-column: 1; font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { grid-column: 2; grid-row: 1 / span 2; border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; width: 1.5rem; height: 1.5rem; border-radius: 50%; cursor: pointer; }
.chip-x:hover { background: #fde8e6; color: var(--err); }
.board-none .chip-x { display: none; }
.board-none .chip-person { border-left-color: #b9b4a8; }

/* ---------- Jogosultságok ---------- */
.perm-tag { display: inline-block; margin: 0 .25rem .25rem 0; padding: .05rem .45rem; border-radius: 999px; background: var(--kun-50); border: 1px solid var(--kun-200); color: var(--kun-800); font-size: .74rem; }
.scope-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
.scope-option { display: flex; gap: .55rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.scope-option:has(input:checked) { border-color: var(--kun-700); background: var(--kun-50); box-shadow: 0 0 0 1px var(--kun-700); }
.scope-option input { margin-top: .2rem; }
.scope-option small { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.perm-group { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: .5rem .8rem .7rem; display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.perm-group legend { font-weight: 600; color: var(--kun-800); padding: 0 .3rem; font-size: .9rem; }
.board-zone { display: flex; flex-direction: column; border-top: 1px dashed var(--line-soft); transition: background-color .12s; }
.board-col-head + .board-zone { border-top: 0; }
.board-zone.over { background: var(--kun-50); box-shadow: inset 0 0 0 2px var(--kun-600); }
.zone-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); padding: .35rem .6rem 0; }
.zone-lead { background: #fbf7ea; }
.zone-lead .board-col-body { min-height: 38px; padding-top: .3rem; }
.zone-lead .chip-person { border-left-color: var(--gold-600); }
.board-col.over { border-color: var(--line); background: #fcfbf8; box-shadow: none; }
.board-counts { display: inline-flex; gap: .25rem; flex-shrink: 0; }
.pill-lead { background: #f6ecd2; color: #7a5a12; }

/* ---------- Szervezeti felépítés: bal sáv + egységkártyák ---------- */
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1.5rem; flex-wrap: wrap; padding: .6rem .9rem; margin-bottom: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 60px; z-index: 5; }
.board-bar .help { max-width: 90ch; }
.board-bar .board-actions { position: static; }
.board-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: .8rem; align-items: start; }
.board-side { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow: auto; }
.side-search { padding: .4rem .45rem 0; }
.side-search input { width: 100%; min-height: 32px; padding: .25rem .5rem; font-size: .85rem; }
.board-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; align-items: start; }
.unit-card { background: #fff; }
.unit-head { align-items: flex-start; flex-wrap: wrap; row-gap: .3rem; cursor: default; }
.unit-title { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; }
.unit-parent { font-size: .7rem; font-weight: 500; color: var(--muted); min-height: 0; }
.unit-parent:empty { display: none; }
.unit-name { font-weight: 600; font-size: .95rem; color: var(--kun-800); overflow-wrap: anywhere; }
.unit-tools { display: inline-flex; gap: .15rem; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--kun-50); color: var(--kun-800); border-color: var(--kun-200); text-decoration: none; }
.icon-btn.danger:hover { background: #fde8e6; color: var(--err); border-color: #f3c4bf; }
.icon-btn .icon { width: 15px; height: 15px; }
.unit-edit { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line-soft); background: var(--kun-50); display: flex; flex-direction: column; gap: .4rem; }
.unit-edit .field { margin: 0; }
.unit-edit input, .unit-edit select { min-height: 32px; font-size: .88rem; }
.unit-add { min-height: 150px; border: 2px dashed var(--kun-200); border-radius: var(--radius-sm); background: transparent; color: var(--kun-700); font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.unit-add:hover { background: var(--kun-50); border-color: var(--kun-600); }
@media (max-width: 860px) {
    .board-layout { grid-template-columns: 1fr; }
    .board-side { position: static; max-height: 320px; }
    .board-bar { position: static; }
}

/* ---------- Szervezeti fa ---------- */
.org-scroll { overflow: auto; padding: .4rem .2rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fcfbf8; min-height: 200px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org-tree { min-width: max-content; padding: .6rem; }
.org-tree ul { padding-top: 22px; position: relative; }
.org-tree ul:empty { display: none; }
.org-node { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 7px 0; }
.org-tree > .org-node { padding-top: 0; }
/* összekötő vonalak: vízszintes a testvérek fölött, függőleges le a kártyához */
.org-node::before, .org-node::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--kun-200); }
.org-node::after { right: auto; left: 50%; border-left: 2px solid var(--kun-200); }
.org-node:only-child::before, .org-node:only-child::after { display: none; }
.org-node:only-child { padding-top: 0; }
.org-node:first-child::before, .org-node:last-child::after { border: 0 none; }
.org-node:last-child::before { border-right: 2px solid var(--kun-200); border-radius: 0 6px 0 0; }
.org-node:first-child::after { border-radius: 6px 0 0 0; }
.org-tree > .org-node::before, .org-tree > .org-node::after { display: none; }
.org-tree ul::before { content: ""; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--kun-200); width: 0; height: 22px; }
.org-node.folded > [data-children] { display: none; }
.org-fold { margin-top: .3rem; border: 1px solid var(--kun-200); background: #fff; color: var(--kun-700); border-radius: 999px; font: inherit; font-size: .72rem; font-weight: 600; padding: .05rem .55rem; cursor: pointer; position: relative; z-index: 1; }
.org-fold:hover { background: var(--kun-50); }

/* Kártya a fában: fix szélesség, összecsukható */
.org-tree .unit-card { width: 236px; flex: none; text-align: left; min-height: 0; }
.unit-card.drop-over { border-color: var(--kun-600); box-shadow: 0 0 0 2px var(--kun-200); }
.unit-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .2rem .3rem; padding: .45rem .45rem .45rem .35rem; }
.unit-title { flex: none; display: flex; flex-direction: column; gap: .2rem; }
.unit-name { line-height: 1.2; }
.unit-tools { margin-left: 0; }
.unit-tools .icon-btn { width: 24px; height: 24px; }
.unit-toggle { border: 0; background: transparent; color: var(--kun-700); cursor: pointer; width: 22px; height: 22px; border-radius: var(--radius-sm); display: grid; place-items: center; padding: 0; }
.unit-toggle:hover { background: var(--kun-50); }
.unit-toggle .icon { width: 14px; height: 14px; transition: transform .15s; }
.unit-card.collapsed .unit-toggle .icon { transform: rotate(-90deg); }
.unit-summary { font-size: .74rem; color: var(--muted); padding: 0 .6rem .45rem 2rem; line-height: 1.3; }
.unit-card:not(.collapsed) .unit-summary { display: none; }
.unit-card.collapsed .unit-body { display: none; }
.unit-card.collapsed .board-col-head { border-bottom: 0; }
.side-add { display: flex; flex-direction: column; gap: .3rem; padding: .45rem .45rem 0; }
.pw-set > summary { list-style: none; cursor: pointer; text-align: center; }
.pw-set > summary::-webkit-details-marker { display: none; }
.pw-set[open] > summary { margin-bottom: .5rem; }
.pw-set .form { gap: .5rem; }
.tpl-manage { margin-top: .55rem; font-size: .85rem; }
.tpl-manage > summary { cursor: pointer; color: var(--kun-700); font-weight: 500; width: fit-content; }
.tpl-list { display: flex; flex-direction: column; gap: .3rem; margin-top: .4rem; max-width: 520px; }
.tpl-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; padding: .25rem .4rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #fff; }
.tpl-row .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

/* ---------- Háttérfrissítés: felugró értesítések ---------- */
.live-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.live-toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--kun-700); border-radius: var(--radius-sm); box-shadow: 0 14px 30px -14px rgba(5, 18, 40, .45); padding: .6rem .75rem; font-size: .86rem; animation: rise .25s var(--ease); transition: opacity .4s; }
.live-toast strong { display: block; color: var(--kun-800); margin-bottom: .15rem; }
.live-toast-actions { display: flex; gap: .35rem; margin-top: .45rem; }
.live-toast.fade { opacity: 0; }
.org-scroll { max-height: calc(100vh - 230px); cursor: grab; user-select: none; }
.org-scroll.panning { cursor: grabbing; }
.org-scroll.panning * { cursor: grabbing !important; }
.org-scroll input, .org-scroll select { user-select: text; }
.zoom-controls { display: inline-flex; gap: .2rem; margin-left: .4rem; }
.zoom-controls .btn { min-width: 2.2rem; justify-content: center; }

/* ---------- Értesítések lenyíló ---------- */
.notif-panel { width: 340px; display: block; padding: 0; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .55rem .75rem; border-bottom: 1px solid var(--line-soft); }
.notif-head .link { font-size: .8rem; padding: 0; }
.notif-list { max-height: 360px; overflow: auto; }
.dropdown .notif-item { display: grid; gap: .1rem; padding: .5rem .75rem; border-radius: 0; border-bottom: 1px solid var(--line-soft); justify-content: stretch; }
.notif-item strong { font-size: .84rem; color: var(--kun-800); }
.notif-item span { font-size: .8rem; color: var(--ink); line-height: 1.3; }
.notif-item small { font-size: .7rem; color: var(--muted); }
.notif-item.unread { background: var(--kun-50); box-shadow: inset 3px 0 0 var(--gold-500); }
.notif-empty { padding: .9rem .75rem; margin: 0; color: var(--muted); font-size: .85rem; }
.dropdown .notif-all { justify-content: center; font-size: .82rem; font-weight: 600; color: var(--kun-700); border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 560px) { .notif-panel { width: calc(100vw - 1.5rem); } }

/* ---------- Szünet jelzése ---------- */
.break-banner { display: flex; gap: .8rem; align-items: center; padding: .75rem .9rem; margin: 0 0 1rem; border-radius: var(--radius); background: var(--gold-100); border: 2px solid var(--gold-500); color: var(--kun-800); }
.break-banner .break-ico { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-500); color: #fff; animation: pulse-soft 2s ease-in-out infinite; }
.break-banner .break-ico .icon { width: 20px; height: 20px; }
.break-banner > div { display: grid; gap: .2rem; flex: 1; min-width: 0; }
.break-banner strong { font-family: var(--font-head); font-size: 1.15rem; }
.break-banner b { font-size: 1.05rem; }
.break-bar { display: block; height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.break-bar span { display: block; height: 100%; background: var(--gold-500); transition: width .4s; }
.break-banner.over { background: #fdecea; border-color: var(--err, #b3261e); }
.break-banner.over .break-bar span, .break-banner.over .break-ico { background: var(--err, #b3261e); }
@keyframes pulse-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.btn.btn-break { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.btn.btn-break:hover { filter: brightness(.95); }
.break-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border-radius: 999px; background: var(--gold-500); color: #fff; font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; animation: pulse-soft 2.4s ease-in-out infinite; }
.break-chip:hover { color: #fff; filter: brightness(.95); }
.break-chip .icon { width: 14px; height: 14px; }
.site-header:has(.break-chip) { box-shadow: inset 0 -4px 0 var(--gold-500); }
.clock-fix summary { cursor: pointer; font-size: .85rem; color: var(--kun-700); }
.clock-fix-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-top: .5rem; }
.clock-fix-form .field { margin: 0; }
.break-rows { display: inline-flex; flex-direction: column; gap: .25rem; }
.break-row { display: inline-flex; align-items: center; gap: .25rem; }
.break-row input[type=time] { width: 6.2rem; }
.break-del { font-size: 1.1rem; line-height: 1; padding: 0 .2rem; color: var(--muted); }
.break-add { margin-top: .25rem; align-self: flex-start; }
.qf-breaks { display: inline-flex; flex-direction: column; }
@media (max-width: 560px) { .break-chip { font-size: .75rem; padding: .25rem .5rem; } }

/* ---------- Távolléti korlát a szervezeti oldalon ---------- */
.pill.pill-limit { background: var(--gold-100); color: var(--kun-800); }

/* ---------- Távolléti kimutatások: jelmagyarázat, függő, adatlap ---------- */
.chart .seg { background: var(--c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }
.chart .seg-pending { background: repeating-linear-gradient(135deg, var(--c) 0 4px, #fff 4px 7px); box-shadow: inset 0 0 0 1.5px var(--c); }
.chart-labels em.pend { display: block; font-style: normal; font-size: .7rem; font-weight: 600; color: #7a5508; }
small.pend { margin-left: .25rem; color: #7a5508; font-weight: 600; font-size: .72rem; }
.pend-tag { display: inline-block; padding: 0 .35rem; border-radius: 3px; font-weight: 600; color: #5c3f04; background: repeating-linear-gradient(135deg, #f3dfa8 0 4px, #fff 4px 7px); box-shadow: inset 0 0 0 1px #c99a2e; }
.legend-title { color: var(--ink); font-weight: 600; }
.abs-legend, .pc-legend { color: var(--ink-2); font-size: .82rem; }
.lg-box { display: inline-grid; place-items: center; min-width: 20px; height: 16px; padding: 0 2px; border-radius: 3px; margin-right: .35rem; vertical-align: -3px; background: var(--c); font-size: .62rem; font-weight: 700; font-style: normal; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.lg-box.lg-pending { background: repeating-linear-gradient(135deg, var(--c) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px var(--c); }
.lg-box.lg-partial { background: linear-gradient(135deg, var(--c) 50%, #fff 50%); box-shadow: inset 0 0 0 1px var(--c); }
.lg-box.lg-off { background: #f6f4ee; box-shadow: inset 0 0 0 1px #cfcabd; }
.lg-box.lg-free { background: #fff; box-shadow: inset 0 0 0 1px #9a958a; }
.mgrid .name a { color: inherit; font-weight: 600; }
.mgrid .name a:hover { color: var(--kun-700); }
.print-tfoot, .print-only { display: none; }

.balance-table th.grp { text-align: center; text-transform: none; letter-spacing: 0; }
.balance-table .grp-start { border-left: 2px solid var(--line); }
.balance-table a[data-person-card] { color: var(--ink); }
.balance-table a[data-person-card]:hover strong { color: var(--kun-700); text-decoration: underline; }

.meter { display: flex; height: 14px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px #9a958a; overflow: hidden; }
.meter span { display: block; height: 100%; }
.meter .m-used { background: var(--c); }
.meter .m-pending { background: repeating-linear-gradient(135deg, var(--c) 0 4px, #fff 4px 7px); box-shadow: inset 0 0 0 1.5px var(--c); }
.meter.meter-over { box-shadow: inset 0 0 0 2px var(--err); }

.person-card { display: grid; gap: 1rem; }
.pc-head { display: flex; align-items: center; gap: .8rem; }
.pc-head h2 { margin: 0; font-size: 1.25rem; }
.avatar-lg { width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--kun-100); color: var(--kun-800); font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.pc-quota { display: grid; gap: .5rem; padding: .8rem .9rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #fcfbf8; }
.pc-quota-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pc-left b { font-size: 1.15rem; }
.pc-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.pc-nums > div { display: grid; gap: .05rem; }
.pc-nums dt { font-size: .76rem; color: var(--muted); font-weight: 600; }
.pc-nums dd { margin: 0; font-size: 1.1rem; font-weight: 600; }
.pc-nums small { font-size: .72rem; color: var(--muted); }
.pc-strong dd { font-size: 1.3rem; color: var(--kun-800); }
.pc-other h3, .pc-requests h3 { font-size: .95rem; margin: 0 0 .4rem; }
.pc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.pc-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--line-soft); }
.row-pending td { background: #fdf8ea; }
@media (max-width: 560px) { .pc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.person-dialog { border: 0; padding: 0; border-radius: 12px; width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); box-shadow: 0 30px 70px -20px rgba(5, 18, 40, .55); border-top: 4px solid var(--gold-500); }
.person-dialog::backdrop { background: rgba(14, 37, 75, .55); backdrop-filter: blur(2px); }
.person-dialog[open] { animation: pop .18s var(--ease); }
.person-dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; gap: .4rem; padding: .5rem .6rem; background: #fff; border-bottom: 1px solid var(--line-soft); }
.person-dialog-body { padding: .4rem 1.2rem 1.2rem; }
.person-dialog-body .table-wrap { max-height: 300px; overflow: auto; }

@media print {
    .cellmark, .chart .seg, .lg-box, .swatch, .meter, .meter span, .pend-tag, .status, .mgrid .off, .row-pending td, .mgrid thead th {
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .print-only { display: block; }
    .screen-only { display: none !important; }
    .print-title { margin: 0 0 6px; font-size: 10pt; }
    .print-tfoot { display: table-footer-group; }
    .print-tfoot td { border: 0 !important; padding: 6px 0 0 !important; text-align: left !important; height: auto !important; }
    .print-tfoot .legend { margin: 0; font-size: 7.5pt; color: #222; gap: 2px 10px; }
    .print-keep { break-inside: avoid; }
    .grid-scroll, .table-wrap { overflow: visible !important; max-height: none !important; border: 0; }
    .mgrid thead th, .mgrid .name { position: static; }
    .mgrid { font-size: 7pt; }
    .mgrid th, .mgrid td { min-width: 0; height: 18px; }
    .mgrid .name { min-width: 0; padding: 0 4px; }
    .mgrid .name small { font-size: 6pt; }
    .mgrid tr { break-inside: avoid; }
    .cellmark { min-height: 17px; font-size: 6pt; }
    .chart .seg { animation: none; }
    .chart { height: 200px; }
    a { color: inherit; text-decoration: none; }
    .card h2 { margin-top: 6px; }
}

/* ---------- Szabadságkeretek ---------- */
.quota-explain { display: grid; gap: .35rem; margin-bottom: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: #fbfaf7; border: 1px solid var(--line-soft); font-size: .86rem; color: var(--ink-2); }
.qx-tag { display: inline-block; padding: .05rem .45rem; border-radius: 4px; font-size: .72rem; font-weight: 700; margin-right: .2rem; }
.qx-in { background: var(--kun-100); color: var(--kun-800); }
.qx-calc { background: #eeece6; color: #4a4f5a; }
.quota-table th.qx-in-h { background: var(--kun-50); }
.quota-table thead th.grp { text-align: center; }
.quota-table .grp-start { border-left: 2px solid var(--line); }
.quota-table .meter-col { min-width: 120px; width: 18%; }
.quota-table tfoot th, .quota-table tfoot td { border-top: 2px solid var(--line); font-weight: 600; background: #fbfaf7; }
.quota-table a[data-person-card] { color: var(--ink); }
.quota-table a[data-person-card]:hover strong { color: var(--kun-700); text-decoration: underline; }
@media print {
    #quota-form { display: block !important; }
    .quota-table input { border: 0; background: none; padding: 0; width: auto; text-align: right; }
    .quota-table th.qx-in-h, .qx-tag, .quota-table tfoot th, .quota-table tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Munkába járás elszámolása ---------- */
.status-commute-draft { background: #eeece6; color: #4a4f5a; }
.status-commute-submitted { background: var(--gold-100); color: #7a5508; }
.status-commute-settled { background: var(--ok-bg); color: var(--ok); }
.commute-rows input[type="date"] { width: auto; }
.commute-rows input[name$="[note]"] { max-width: 160px; }
.commute-calc .details dd strong { font-size: 1.05rem; }
.commute-sheet { max-width: 900px; margin: 0 auto; }
.commute-sheet .cs-title { text-align: center; font-size: 1.15rem; margin: 0 0 .8rem; }
.commute-sheet .cs-intro { margin: 0 0 .5rem; line-height: 1.55; }
.cs-table { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .86rem; }
.cs-table th, .cs-table td { border: 1px solid #9a958a; padding: .28rem .45rem; }
.cs-table th { background: var(--kun-50); font-size: .74rem; text-align: center; vertical-align: middle; line-height: 1.25; }
.cs-table th small { font-weight: 400; color: var(--muted); }
.cs-table td.c { text-align: center; white-space: nowrap; }
.cs-table td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-table tr.cs-zero td { color: var(--muted); }
.cs-table tfoot th, .cs-table tfoot td { background: #fbfaf7; font-weight: 600; }
.cs-sign { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; }
.cs-sign-line { display: grid; justify-items: center; gap: .2rem; min-width: 240px; padding-top: 1.6rem; }
.cs-sign-line small { color: var(--muted); }
@media print {
    .cs-table th, .cs-table tfoot th, .cs-table tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .commute-sheet { max-width: none; }
    .cs-table { font-size: 8.5pt; }
}

.commute-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--kun-50); border: 1px solid var(--kun-100); border-left: 4px solid var(--kun-700); }
.commute-bar .button-row { margin: 0; }
.norm-info { display: block; padding: .45rem .6rem; border-radius: var(--radius-sm); background: var(--kun-50); border: 1px solid var(--kun-100); color: var(--ink-2); }
.norm-info .icon { width: 1em; height: 1em; vertical-align: -2px; margin-right: .2rem; color: var(--kun-700); }

/* Csengő: „Láttam” gomb – olvasottnak jelöl, nem nyit meg */
.dropdown .notif-item { display: flex; align-items: flex-start; gap: .4rem; padding: 0; }
.notif-item .notif-open { flex: 1; display: grid; gap: .1rem; padding: .5rem .2rem .5rem .75rem; color: inherit; text-decoration: none; border-radius: 0; }
.notif-item .notif-open:hover { background: rgba(27, 69, 135, .05); text-decoration: none; }
.notif-item form { margin: 0; padding: .45rem .55rem 0 0; flex: none; }
.notif-seen { font: inherit; font-size: .74rem; font-weight: 600; color: var(--kun-700); background: #fff; border: 1px solid var(--kun-100); border-radius: 4px; padding: .15rem .5rem; cursor: pointer; white-space: nowrap; }
.notif-seen:hover { background: var(--kun-50); border-color: var(--kun-700); }
.notif-item.leaving { opacity: .4; transition: opacity .15s; }
.list-item .notif-row-link { color: inherit; flex: 1; }
/* ---------- Kártyás belépések (OTIC) ---------- */
.card-times { color: #4a5568; font-size: .78rem; white-space: nowrap; }
.card-times .icon { width: .9em; height: .9em; vertical-align: -1px; color: var(--kun-700); }
.big-num { font-size: 1.6rem; color: var(--kun-800); }
.pill.pill-auto { background: var(--gold-100); color: #7a5508; }

/* Bérszámfejtési átadás */
.span-2 { grid-column: 1 / -1; }
.pad-x { padding-left: 1rem; padding-right: 1rem; }
.inline-field { display: inline-flex; align-items: center; gap: .4rem; }
.table.mono td { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; white-space: nowrap; }
.payroll-items .group-row th { background: var(--line-soft); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.payroll-items tr.sub td:nth-child(2) { padding-left: 1.6rem; color: var(--muted); }
.payroll-items .payroll-code { max-width: 11rem; font-family: ui-monospace, Consolas, monospace; }

/* ---------- Jelenléti ívek a képernyőn ---------- */
.att-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: 1.2rem 0 .6rem; }
.att-jump { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-bottom: .8rem; font-size: .88rem; }
.att-sheet { scroll-margin-top: 5rem; }
.att-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; flex-wrap: wrap; padding: .8rem 1rem .5rem; }
.att-sheet-head h2 { margin: 0 0 .15rem; }
.att-sheet .days tfoot td { font-weight: 600; background: #faf8f3; border-top: 1px solid var(--line); }
.att-sheet .days td:first-child { white-space: nowrap; }
.att-totals { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; padding: .6rem 1rem .8rem; font-size: .88rem; color: var(--muted); }
.att-totals strong { color: var(--ink, #17202d); }

/* ---------- Túlóra ---------- */
.pill.pill-ot-pending { background: var(--gold-100); color: #7a5508; }
.pill.pill-ot-approved { background: var(--ok-bg); color: #1d4f32; }
.pill.pill-ot-rejected { background: #f3f1eb; color: var(--muted); text-decoration: line-through; }
.overtime-prompt-form { margin-top: .5rem; }
.overtime-prompt-form input[type=text] { flex: 1 1 260px; min-width: 200px; }
.ot-minutes { width: 4.5rem !important; text-align: right; }
.ot-list td { vertical-align: top; }
.pill.pill-ot-unclaimed { background: #eef1f6; color: var(--muted); }
tr.unclaimed td { color: var(--muted); }

/* ---------- Automatikus szünet ---------- */
.auto-break { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; margin-top: .4rem; padding: .4rem .6rem; border-radius: var(--radius-sm); background: var(--kun-50); }
.auto-break .icon { vertical-align: -2px; }
