/*
 * Panoráma ügyviteli rendszer – közös stílus.
 *
 * Forrás: a vázlat (panorama-wireframe-vercel) oldalainak beágyazott stílusai, itt egyetlen helyre szedve.
 * A vázlatban nincs közös CSS, minden oldal inline stílusú; ez a fájl az ott használt értékeket nevezi el.
 * Nincs külső hívás: a betűtípus a /public/fonts mappából jön (IBM Plex, SIL OFL 1.1, lásd OFL.txt).
 *
 * Felépítés: 1 tokenek, 2 betűtípus, 3 alap, 4 elrendezés, 5 komponensek, 6 vendég oldal, 7 reszponzív.
 */

/* ---------- 1. Tokenek ---------- */
:root {
    --navy: #14284B;
    --link: #1F5FD1;
    --text: #1B2230;
    --muted: #5B6474;
    --border: #D7DBE1;
    --border-soft: #E6E9ED;
    --border-input: #C3C9D2;
    --bg: #F3F4F6;
    --surface: #FFFFFF;

    --green-bg: #E6F3EA;
    --green-fg: #1E6B3A;
    --amber-bg: #FDF0DD;
    --amber-fg: #9A4A06;
    --grey-bg: #EEF0F3;
    --grey-fg: #3A4352;
    --blue-bg: #EAF1FC;
    --blue-fg: #1F5FD1;
    --yellow-bg: #FDF3C4;
    --yellow-fg: #6B5200;
    --yellow-border: #E3CF7A;
    --red-bg: #FBE7E7;
    --red-fg: #9B1C1C;

    --radius: 6px;
    --radius-card: 8px;
    --sidebar-width: 248px;
    --topbar-height: 68px;
    --bottom-nav-height: 64px;

    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 2. Betűtípus (helyi fájlok, nincs külső kérés) ---------- */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('../fonts/plex-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('../fonts/plex-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/plex-mono-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/plex-mono-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 3. Alap ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); }
a:hover { color: var(--navy); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 26px; font-weight: 700; line-height: 1.2; }
h2 { margin-bottom: 12px; font-size: 16px; font-weight: 600; }
h3 { margin-bottom: 8px; font-size: 15px; font-weight: 600; }

img, svg { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.mono { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }

.icon { flex: 0 0 auto; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ---------- 4. Elrendezés ---------- */
.app { display: flex; min-height: 100vh; }

.app__sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 14px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.brand { padding: 0 12px; }
.brand img { display: block; width: 150px; height: auto; }
.brand__sub { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* A fejléc gombjai telefonon az oldalmenü tetején jelennek meg (a fejlécben nincs hely). */
.sidebar-actions { display: none; flex-direction: column; gap: 8px; padding: 0 12px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group__title {
    padding: 0 12px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text);
    text-decoration: none;
}
.nav-link:hover { background: var(--bg); color: var(--navy); }
.nav-link[aria-current='page'] { font-weight: 600; color: #fff; background: var(--navy); }
.nav-link .chip { margin-left: auto; }

.app__main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.btn.topbar__menu { display: none; }
.topbar__logo { display: none; line-height: 0; }
.topbar__logo img { display: block; height: 34px; width: auto; }
.topbar__search { flex: 1 1 260px; max-width: 480px; display: flex; }
.topbar__search input { max-width: none; }
.topbar__right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.env-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--amber-bg);
    color: var(--amber-fg);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--navy);
    text-decoration: none;
}
.bell:hover { background: var(--bg); color: var(--navy); }
.bell__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--amber-fg);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

/*
 * Avatar (fiók-avatar, `<x-avatar>`): színes kör monogrammal, beépített képpel vagy a saját fotóval. Dekoratív, a név mindig mellette áll.
 * Méretek: sm (listák, 24px), md (fejléc, 36px, alap), lg (Fiókom oldal, 96px). A szín `avatar--c-<kulcs>` osztályból jön: a hexa értékek a
 * palettával (AvatarPalette::COLORS) egyeznek, mindegyik legalább 4,5:1 kontrasztú a fehérrel (a tests/Unit/AvatarPaletteTest ellenőrzi mindkettőt).
 */
.avatar {
    --avatar-size: 36px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--avatar-size);
    height: var(--avatar-size);
    overflow: hidden;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: calc(var(--avatar-size) * .36);
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
}
.avatar--sm { --avatar-size: 24px; }
.avatar--md { --avatar-size: 36px; }
.avatar--lg { --avatar-size: 96px; }
/* A monogram CSS-tartalom (nincs szöveg-csomópont a DOM-ban): a fotó (`.avatar__photo`, később a DOM-ban, abszolút) rá kerül. */
.avatar[data-initials]::before { content: attr(data-initials); position: relative; }
.avatar__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar__art { width: 64%; height: 64%; }
.avatar--c-navy { background: #14284B; }
.avatar--c-blue { background: #1D5FB0; }
.avatar--c-teal { background: #0F6B73; }
.avatar--c-green { background: #2F6F3A; }
.avatar--c-olive { background: #5B6A12; }
.avatar--c-amber { background: #935400; }
.avatar--c-red { background: #B3261E; }
.avatar--c-plum { background: #8B2D6E; }
.avatar--c-violet { background: #5B3FA6; }
.avatar--c-slate { background: #475569; }

/* Név + avatar egy sorban (listák, előzmény): a név szövegként marad, az avatar csak mellette áll. */
.with-avatar { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }

/* „Fiókom” oldal: a profilkép-választó. */
.account-columns { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.avatar-pick > legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.avatar-pick__item { position: relative; }
.avatar-pick__item input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.avatar-pick__item label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 50%;
}
.avatar-pick__item input:checked + label { border-color: var(--navy); }
.avatar-pick__item input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 2px; }
.avatar-pick__item--wide label { gap: 8px; border-radius: var(--radius); padding: 0 14px; border: 2px solid var(--border); }
.avatar-pick__item--wide input:checked + label { border-color: var(--navy); background: var(--bg); }
.account-avatar-now { display: flex; align-items: center; gap: 16px; }

.usermenu { position: relative; }
.usermenu > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 4px;
    list-style: none;
    cursor: pointer;
    border-radius: var(--radius);
}
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu__who { display: flex; flex-direction: column; line-height: 1.25; }
.usermenu__name { font-size: 14px; font-weight: 600; }
.usermenu__role { font-size: 12px; color: var(--muted); }
.usermenu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 220px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(20, 40, 75, .16);
}
.usermenu__panel a, .usermenu__panel button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--text);
    font-size: 15px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--bg); }

.app__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 24px;
}
.page-header__text { min-width: 0; }
.page-header__lead { margin: 4px 0 0; color: var(--muted); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    height: var(--bottom-nav-height);
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.bottom-nav a, .bottom-nav button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.bottom-nav a[aria-current='page'] { color: var(--navy); font-weight: 600; }
/* A felirat két sorba törhet (pl. „Áttekintő (saját)” 375 px-en: 90 px felirat a 75 px-es helyen), nem csonkul; két sornál hosszabb már csonkolva jelenik meg. */
.bottom-nav span { max-width: 100%; overflow: hidden; text-align: center; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }

.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(20, 40, 75, .4);
}

/* ---------- 5. Komponensek ---------- */

/* Gomb */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--navy);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--navy); }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--link); border-color: var(--link); color: #fff; }
.btn--danger { background: var(--surface); border-color: var(--red-fg); color: var(--red-fg); }
.btn--danger:hover { background: var(--red-bg); color: var(--red-fg); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; }

/* Címke (chip) */
.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--grey-bg);
    color: var(--grey-fg);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.chip--green { background: var(--green-bg); color: var(--green-fg); }
.chip--amber { background: var(--amber-bg); color: var(--amber-fg); font-weight: 600; }
.chip--grey { background: var(--grey-bg); color: var(--grey-fg); }
.chip--blue { background: var(--blue-bg); color: var(--blue-fg); }
.chip--yellow { background: var(--yellow-bg); color: var(--yellow-fg); border: 1px solid var(--yellow-border); }
.chip--red { background: var(--red-bg); color: var(--red-fg); font-weight: 600; }
.chip--count { min-width: 24px; padding: 1px 7px; font-size: 12px; font-weight: 600; text-align: center; }

/* Szűrősáv és szűrő-pirula (szerver oldali GET-hivatkozások, JavaScript nélkül) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--navy);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.filter-pill:hover { background: var(--bg); color: var(--navy); }
.filter-pill__count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--grey-bg);
    color: var(--grey-fg);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.filter-pill[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.filter-pill[aria-pressed='true']:hover { background: var(--navy); color: #fff; }
.filter-pill[aria-pressed='true'] .filter-pill__count { background: #fff; color: var(--navy); font-weight: 700; }

/* Kártya */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 20px;
}
.card--flush { padding: 0; }
.card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 20px 20px 14px;
}
.card__header h2 { margin: 0; }
.card__meta { color: var(--muted); font-size: 14px; }
.card__footer { padding: 12px 20px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--muted); }
/* Nem "flush" kártyán a fejléc és a lábléc a kártya saját belső margóján belül marad. */
.card:not(.card--flush) > .card__header { padding: 0 0 12px; }
.card:not(.card--flush) > .card__footer { margin-top: 12px; padding: 12px 0 0; }
/* Érintési cél (WCAG 2.2, 2.5.8): a pult blokkjaiban a sima hivatkozás (projektszám a táblázatban, a kártya lábléc-hivatkozása, pl. „Összes értesítés”) legalább 24 px magas.
   Gombot (.btn) nem érint: az már saját méretű. */
[data-desk-block] td a:not(.btn), [data-desk-block] .card__footer a:not(.btn) { display: inline-flex; align-items: center; min-height: 24px; }

/* Táblázat */
/* position: relative – a fejlécek abszolút pozíciójú, csak felolvasónak szóló (.sr) szövegei a görgető dobozon belül maradnak, és nem szélesítik ki az oldalt. */
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.table th {
    height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    white-space: nowrap;
}
.table td { padding: 8px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr { height: 56px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Mutató (KPI) */
.kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    color: var(--text);
    text-decoration: none;
}
a.kpi:hover { border-color: var(--navy); color: var(--text); }
.kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.kpi__label { font-size: 14px; color: var(--muted); }
.kpi__value { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--navy); }
.kpi--warn .kpi__value { color: var(--amber-fg); }
.kpi__note { font-size: 13px; color: var(--muted); }
.kpi__note--warn { color: var(--amber-fg); font-weight: 600; }
.kpi__link { font-size: 13px; font-weight: 600; color: var(--link); }

/* Státusz-léptető */
.stepper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stepper__step {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border-input);
    background: var(--surface);
    color: var(--grey-fg);
    font-size: 14px;
    white-space: nowrap;
}
.stepper__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-input);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.stepper__step--done { border-color: var(--border); background: var(--grey-bg); }
.stepper__step--done .stepper__mark { border: 0; background: var(--surface); color: var(--green-fg); }
.stepper__step--current { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: 600; }
.stepper__step--current .stepper__mark { border: 0; background: #fff; color: var(--navy); font-weight: 700; }

/* Űrlap */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; }
.field__req { color: var(--amber-fg); }
.field__hint { font-size: 13px; color: var(--muted); }
/* Kemény mezőhiba: PIROS (a mentést tiltja). A borostyán a puha figyelmeztetésé (.field-warning, [data-warned]): a kettő nem téveszthető össze. */
.field__error { font-size: 13px; font-weight: 600; color: var(--red-fg); }

.input, .select, .textarea {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] {
    border: 2px solid var(--red-fg);
}
/* A puha figyelmeztetéssel jelölt mező (`data-warned`, az űrlap rakja rá az `aria-invalid` mellé): borostyán keret, nem piros. */
.input[aria-invalid='true'][data-warned], .select[aria-invalid='true'][data-warned], .textarea[aria-invalid='true'][data-warned] {
    border-color: var(--amber-fg);
}

.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }

/* Figyelmeztetés a mező alatt (hibás kitöltés elleni védelem) */
.field-warning {
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--amber-bg);
    color: var(--amber-fg);
    font-size: 13px;
    line-height: 1.45;
}
.field-warning__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.field-warning--info { background: var(--blue-bg); color: var(--blue-fg); }

/* Üzenetdoboz */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--blue-bg);
    color: var(--blue-fg);
    font-size: 14px;
}
.alert--success { background: var(--green-bg); color: var(--green-fg); }
.alert--warning { background: var(--amber-bg); color: var(--amber-fg); }
.alert--error { background: var(--red-bg); color: var(--red-fg); }
.alert__body { min-width: 0; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* Értesítés (toast) */
.toast-stack {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(420px, calc(100vw - 32px));
}
.toast {
    padding: 12px 16px;
    border-radius: var(--radius-card);
    background: var(--navy);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(20, 40, 75, .28);
    opacity: 1;
    transition: opacity .25s;
}
.toast--error { background: var(--red-fg); }
.toast.is-hiding { opacity: 0; }

/* Üres állapot */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty__icon { display: inline-flex; margin-bottom: 8px; color: var(--border-input); }
.empty__title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--text); }
.empty__text { margin: 0 auto; max-width: 52ch; }
.empty__action { margin-top: 16px; }

/* Levél indítása (boríték-gomb) */
.mailto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--navy);
    cursor: pointer;
    text-decoration: none;
}
.mailto:hover { background: var(--bg); color: var(--navy); }
.mailto--sm { width: 36px; height: 36px; }
.mailto--missing { border-style: dashed; color: #9AA2AF; cursor: default; }
.mailto--missing:hover { background: var(--surface); color: #9AA2AF; }

/* Leíró lista (kulcs – érték) */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin: 0; }
.dl-grid dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dl-grid dd { margin: 2px 0 0; }

/* Lapozó */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border-soft); }
.pager__spacer { flex: 1 1 auto; }

/* Értesítés-lista */
.notif-list { margin: 0; padding: 0; list-style: none; }
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); }
.notif:last-child { border-bottom: 0; }
.notif--unread { background: var(--blue-bg); }
.notif__dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--link); }
.notif--read .notif__dot { background: transparent; border: 1px solid var(--border-input); }
.notif__main { min-width: 0; flex: 1 1 auto; }
.notif__title { font-weight: 600; }
.notif__body { margin: 2px 0 0; color: var(--grey-fg); font-size: 14px; }
.notif__time { margin-top: 4px; font-size: 13px; color: var(--muted); }
.notif__link { all: unset; cursor: pointer; color: var(--link); text-decoration: underline; font-weight: 600; }
.notif__link:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Keresés */
.search-group + .search-group { margin-top: 16px; }
.search-hit { display: block; padding: 12px 20px; border-bottom: 1px solid var(--border-soft); color: var(--text); text-decoration: none; }
.search-hit:hover { background: var(--bg); }
.search-hit__title { font-weight: 600; }
.search-hit__sub { font-size: 13px; color: var(--muted); }

/* ---------- 6. Vendég oldal (belépés) ---------- */
.guest {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 16px;
}
.guest__brand { text-align: center; }
.guest__brand img { display: block; width: 180px; height: auto; margin: 0 auto 4px; }
.guest__brand span { font-size: 13px; color: var(--muted); }
.guest__card {
    width: 100%;
    max-width: 400px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}
.guest__card h1 { margin-bottom: 4px; font-size: 22px; }
.guest__card .lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.guest__card form { display: flex; flex-direction: column; gap: 16px; }
.guest__foot { font-size: 12px; color: var(--muted); }

/* ---------- 7. Reszponzív ---------- */
@media (max-width: 899px) {
    .app__sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 40;
        width: min(300px, 86vw);
        height: 100%;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .2s, visibility .2s;
        box-shadow: 0 0 32px rgba(20, 40, 75, .3);
    }
    body.drawer-open .app__sidebar { transform: none; visibility: visible; }
    body.drawer-open .drawer-backdrop { display: block; }
    body.drawer-open { overflow: hidden; }

    .topbar { padding: 8px 16px; gap: 8px; }
    .btn.topbar__menu { display: inline-flex; }
    .topbar__logo { display: block; }
    .topbar__search { order: 5; flex: 1 1 100%; max-width: none; }
    .topbar__right { gap: 8px; }
    .topbar__actions { display: none; }
    .sidebar-actions { display: flex; }
    .usermenu__who { display: none; }
    .env-badge { display: none; }

    .app__content { padding: 16px 16px calc(var(--bottom-nav-height) + 24px); gap: 16px; }
    h1 { font-size: 22px; }
    .bottom-nav { display: flex; }
    .toast-stack { bottom: calc(var(--bottom-nav-height) + 12px); }
    .card__header { padding: 16px 16px 12px; }
    .card { padding: 16px; }
    .card--flush { padding: 0; }
    .notif { padding: 12px 16px; }
    .page-header__actions { width: 100%; }
    .page-header__actions .btn { flex: 1 1 auto; }
    .kpi__value { font-size: 32px; }
}

@media (min-width: 900px) {
    .bottom-nav, .drawer-backdrop { display: none !important; }
}

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

@media print {
    .app__sidebar, .topbar, .bottom-nav, .toast-stack { display: none !important; }
    .app__content { padding: 0; }
    body { background: #fff; }
}
