/* ===========================================================================
   AdvoTime Web2 — stílus. Sima CSS, változókkal. Az AdvoTime arculata:
   bordó (#AA0000), krém gombkeret, meleg szürke menü.
   =========================================================================== */
:root {
    --rust:      #AA0000;
    --border:    #F1C0A0;
    --btn:       #FFFEFE;
    --btn-hover: #FFF6EF;
    --content:   #EBEBEB;
    --surface:   #FFFFFF;
    --surface2:  #F5F5F5;
    --ink:       #1F1F1F;
    --muted:     #6E6E6E;
    --rule:      #DEDEDE;
    --thead-bg:  #EDEAE6;
    --thead-fg:  #4A3A32;
    --menu-bg:   #777570;
    --line:      #C3ACAC;
    --row-hover: #FFF3E8;
    --menu-w:    260px;
    color-scheme: light;
}

/* Sotet tema: csak a valtozok cserelodnek. */
:root[data-theme="dark"] {
    --rust:      #FF6B5B;
    --border:    #5A4A42;
    --btn:       #2A2622;
    --btn-hover: #383029;
    --content:   #1A1816;
    --surface:   #23201D;
    --surface2:  #2C2825;
    --ink:       #E8E4DF;
    --muted:     #A09890;
    --rule:      #3A3531;
    --thead-bg:  #332E29;
    --thead-fg:  #E0D6CC;
    --menu-bg:   #2A2622;
    --line:      #6A5A5A;
    --row-hover: #332C26;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
    color: var(--ink);
    background: var(--surface);
}
a { color: var(--rust); text-decoration: none; }

/* ---------------------------------------------------------------- gombok */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    height: 36px; padding: 0 .85rem;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--btn); color: var(--ink);
    font-size: .9rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--btn-hover); }
.btn.primary { border-color: var(--rust); color: var(--rust); font-weight: 600; }
.btn img { width: 17px; height: 17px; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------------------------------------------------------- bejelentkezes */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    position: relative; overflow: hidden;
    background: #F4E7DF;
}
/* elmosott fotó-hatter (Justitia-szobor, ugyvedi iroda) */
.login-page::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: url('../img/login-bg.jpg') center/cover no-repeat;
    filter: blur(26px) saturate(1.04) brightness(1.16);
    transform: scale(1.28);
}
/* vilagos, legies fatyol - a hatter halvany, a kartya kiemelkedik */
.login-page::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(255,251,247,.60), rgba(255,246,239,.46) 55%, rgba(255,249,244,.58));
}

.login-card {
    position: relative; z-index: 1;
    width: min(380px, 100%);
    padding: 2.1rem 2rem 1.6rem;
    border-radius: 18px;
    background: rgba(251,246,240,.80);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    backdrop-filter: blur(22px) saturate(1.3);
    border: 1px solid rgba(150,90,70,.18);
    box-shadow: 0 18px 44px -16px rgba(60,25,15,.30), 0 2px 8px rgba(60,25,15,.10);
    display: flex; flex-direction: column;
}
.login-brand { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.login-brand .mk {
    width: 40px; height: 40px; object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(170,0,0,.28));
}
.login-brand .nm { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.login-brand .nm span { color: var(--rust); }

.login-card h1 { color: var(--ink); font-size: 1.5rem; margin: 0; font-weight: 600; }
.login-card .lead { color: var(--muted); margin: .15rem 0 1.1rem; font-size: .88rem; }
.login-card .field { margin-bottom: .7rem; }
.login-card label { font-size: .8rem; color: var(--muted); display: block; margin-bottom: .25rem; font-weight: 500; }

.login-card input[type=email],
.login-card input[type=password] {
    height: 42px; border-radius: 10px;
    background: rgba(255,255,255,.6);
    border: 1px solid rgba(120,80,60,.22);
}
.login-card input:focus { border-color: var(--rust); box-shadow: 0 0 0 3px rgba(170,0,0,.15); }

.login-actions { display: flex; flex-direction: column; gap: .55rem; margin-top: .5rem; }
.login-card .btn { width: 100%; height: 44px; justify-content: center; border-radius: 10px; font-size: .95rem; }
.login-card .btn.primary {
    background: var(--rust); color: #fff; border-color: var(--rust); font-weight: 600;
    box-shadow: 0 4px 14px rgba(170,0,0,.30);
}
.login-card .btn.primary:hover { background: var(--rust); filter: brightness(1.07); }
.login-card .btn.ghost { background: transparent; color: var(--rust); border: 1px solid rgba(170,0,0,.4); }
.login-card .btn.ghost:hover { background: rgba(170,0,0,.06); }

.login-hint { font-size: .78rem; color: var(--muted); margin: .8rem 0 0; line-height: 1.55; }
.login-foot { color: var(--muted); font-size: .76rem; margin-top: .7rem; text-align: center; opacity: .85; }
.err { color: #B70000; font-size: .88rem; margin: .3rem 0 0; }
.msg { font-size: .88rem; margin: .3rem 0 0; }
.msg.ok { color: #2E7D46; }

/* sotet tema: meleg-sotet mesh + sotet uveg */
:root[data-theme="dark"] .login-page { background: #1C110D; }
:root[data-theme="dark"] .login-page::before { filter: blur(26px) saturate(1.03) brightness(.66); transform: scale(1.28); }
:root[data-theme="dark"] .login-page::after {
    background: linear-gradient(135deg, rgba(14,8,5,.58), rgba(14,8,5,.40) 55%, rgba(14,8,5,.62));
}
:root[data-theme="dark"] .login-card {
    background: rgba(35,32,29,.72);
    border-color: rgba(255,255,255,.10);
    box-shadow: 0 18px 44px -16px rgba(0,0,0,.55);
}
:root[data-theme="dark"] .login-card input[type=email],
:root[data-theme="dark"] .login-card input[type=password] {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
}
:root[data-theme="dark"] .login-card .btn.primary { color: #1C110D; }
:root[data-theme="dark"] .msg.ok { color: #7FC79A; }

@media (max-width: 420px) {
    .login-page { padding: 1rem .8rem; }
    .login-card { padding: 1.6rem 1.3rem 1.3rem; border-radius: 14px; }
}

input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time],
input[type=month], input[type=tel], input[type=url], select {
    width: 100%; height: 38px; padding: 0 .6rem;
    border: 1px solid var(--rule); border-radius: 6px;
    background: var(--surface); color: var(--ink); font-size: .95rem;
}
input:focus, select:focus { outline: none; border-color: var(--rust); }

/* ------------------------------------------------------------ alkalmazas */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* fejlec */
.hdr {
    height: 60px; flex: none;
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.15rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
}
.hdr .burger {
    width: 38px; height: 38px; border-radius: 8px; border: none; background: none;
    color: var(--muted); cursor: pointer; font-size: 1.3rem;
}
.hdr .burger:hover { background: var(--surface2); color: var(--rust); }
.hdr .tenant {
    position: relative; height: 38px; min-width: 220px; max-width: 340px;
    border: 1px solid var(--rule); border-radius: 8px; background: var(--surface2);
}
.hdr .tenant select {
    -webkit-appearance: none; appearance: none;
    height: 100%; border: none; background: transparent; padding: 0 1.8rem 0 .7rem;
    font-weight: 600; color: var(--ink); cursor: pointer;
}
.hdr .tenant::after {
    content: "▾"; position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    font-size: .7rem; color: var(--muted); pointer-events: none;
}
.hdr .spacer { flex: 1; }
.hdr .user { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; }
.hdr .user-info { display: flex; flex-direction: column; line-height: 1.15; }
.hdr .user-name { font-weight: 600; }
.hdr .user-email { font-weight: 400; font-size: .72rem; color: var(--muted); }
.hdr .user-email:empty { display: none; }
.hdr .avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--rust); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700;
}
.hdr .brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: .1em; color: var(--rust); }
.hdr .brand img { width: 28px; height: 28px; }
.hdr .logout { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .8rem; }

/* torzs: menu + tartalom */
.body { flex: 1; display: flex; min-height: 0; }
.menu {
    width: var(--menu-w); flex: none; background: var(--menu-bg);
    padding: .75rem 0; display: flex; flex-direction: column; gap: .1rem; overflow-y: auto;
    transition: margin-left .2s ease;
}
.menu.hidden { margin-left: calc(-1 * var(--menu-w)); }
.menu .grp { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); padding: .55rem 1.25rem .3rem; }
.menu a {
    display: flex; align-items: center; gap: .8rem; padding: .5rem 1.25rem;
    color: rgba(255,255,255,.82); font-size: .95rem; border-left: 3px solid transparent;
}
.menu a img { width: 20px; height: 20px; opacity: .85; filter: brightness(0) invert(0.92); }   /* minden menüikon egyszínű (a képfájlok egy része színes) */
.menu-badge {
    margin-left: auto; flex: none; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--rust); color: #fff; border-radius: 999px;
    font-size: .72rem; font-weight: 700; line-height: 1;
}
.menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu a.active { background: transparent; color: var(--rust); font-weight: 600; }
.menu a.active:hover { background: transparent; color: var(--rust); }
.menu a.disabled { opacity: .45; cursor: not-allowed; }
.menu a.dimmed { opacity: .5; }   /* elérhető, de jelzi hogy még beállítás kell (pl. AI kulcs) */
/* Néhány menü-ikon színes PNG - a többi menü-ikon krémszínű, ehhez igazítjuk. */
.menu a[data-view="news"] img,
.menu a[data-view="dashboard"] img,
.menu a[data-view="library"] img,
.menu a[data-view="billing"] img,
.menu a[data-view="license"] img,
.menu a[data-view="admin"] img { filter: brightness(0) invert(0.9); }
.menu .filler { flex: 1; }

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

/* muveletsav */
.actionbar {
    flex: none; min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--rule);
    display: flex; align-items: center; gap: .6rem; padding: .5rem 1.15rem; flex-wrap: wrap;
}
.actionbar .crumb { font-weight: 600; }
.actionbar .crumb .sub { color: var(--muted); font-weight: 400; }
.actionbar .search { flex: 1 1 260px; min-width: 160px; max-width: 520px; }
.actionbar .spacer { flex: 1; }

/* lap */
.main { flex: 1; overflow-y: auto; background: var(--content); padding: 1rem 1.15rem; }

/* tablazat */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
thead th {
    background: var(--thead-bg); color: var(--thead-fg);
    font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600;
    text-align: left; padding: .6rem .7rem; border-bottom: 2px solid var(--line); white-space: nowrap;
}
tbody td { padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: .1rem .45rem; border: 1px solid var(--border); border-radius: 3px; color: var(--rust); background: var(--btn-hover); }
.muted { color: var(--muted); }
.count { color: var(--muted); font-size: .85rem; margin: .2rem 0 .6rem; }
.demo-banner { background: var(--btn-hover); border: 1px solid var(--border); border-left: 4px solid var(--rust);
    border-radius: 8px; padding: .6rem .9rem; margin: 0 0 .8rem; font-size: .86rem; color: var(--ink); }
.demo-banner a { color: var(--rust); font-weight: 600; }
.loading { color: var(--muted); font-style: italic; padding: 1rem 0; }

/* Rádiógombos szűrősáv az actionbarban, a kereső mellett. */
.filterslot { display: inline-flex; align-items: center; }
.filterbar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.filterbar .fb { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
    font-size: .82rem; color: var(--muted); padding: .28rem .7rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--btn); user-select: none; }
.filterbar .fb:hover { background: var(--btn-hover); }
.filterbar .fb.on { color: var(--rust); border-color: var(--rust); background: var(--btn-hover); font-weight: 600; }
.filterbar .fb input { accent-color: var(--rust); margin: 0; }

/* Munkalap-státusz címke: nyitott (kiemelt) vs. kész (halvány). */
.wsbadge { display: inline-block; font-size: .74rem; font-weight: 600; padding: .1rem .5rem; border-radius: 3px; border: 1px solid var(--border); }
.wsbadge.st-open { color: var(--rust); background: var(--btn-hover); }
.wsbadge.st-done { color: var(--muted); background: var(--surface2); }

/* lablec */
.foot { flex: none; height: 30px; display: flex; align-items: center; gap: 1.5rem; padding: 0 1.15rem;
    background: var(--surface); border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.foot .spacer { flex: 1; }
.foot strong { color: var(--ink); }
.foot-storage { white-space: nowrap; }

/* --------------------------------------------------- sotet-mod kapcsolo */
.hdr .themebtn {
    width: 38px; height: 38px; border-radius: 8px; border: none; background: none;
    color: var(--ink); cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.hdr .themebtn:hover { background: var(--surface2); color: var(--ink); }

/* ------------------------------------------------------ sor-muvelet gomb */
td.rowact { width: 1%; white-space: nowrap; text-align: right; padding-right: .5rem; }
.editbtn {
    border: 1px solid var(--border); border-radius: 6px; background: var(--btn);
    color: var(--ink); cursor: pointer; font-size: .78rem; padding: .22rem .55rem;
    display: inline-flex; align-items: center; gap: .3rem;
}
.editbtn:hover { background: var(--btn-hover); border-color: var(--rust); color: var(--rust); }

/* ------------------------------------------------------------ crumb-vissza */
.crumb .back {
    border: 1px solid var(--rule); border-radius: 6px; background: var(--surface2);
    color: var(--rust); cursor: pointer; font-size: .8rem; padding: .2rem .5rem; margin-right: .5rem;
    font-weight: 600;
}
.crumb .back:hover { background: var(--btn-hover); border-color: var(--rust); }

/* =================================================================== modal */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(20,14,10,.42);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    padding: 3vh 1rem; overflow-y: auto;
    opacity: 0; transition: opacity .16s ease;
}
.modal-backdrop.show { opacity: 1; }
.modal {
    width: min(880px, 100%);
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
    transform: translateY(-10px); transition: transform .16s ease;
    overflow: hidden;
    max-height: 92vh; display: flex; flex-direction: column;
}
.modal-body { overflow-y: auto; }
.modal-backdrop.show .modal { transform: translateY(0); }
.modal-head {
    display: flex; align-items: center; gap: .7rem;
    padding: 1rem 1.4rem; border-bottom: 1px solid var(--rule);
    background: var(--surface2);
}
.modal-head h2 { margin: 0; font-size: 1.15rem; color: var(--rust); }
.modal-head .x {
    margin-left: auto; border: none; background: none; color: var(--muted);
    font-size: 1.5rem; cursor: pointer; line-height: 1; width: 34px; height: 34px; border-radius: 8px;
}
.modal-head .x:hover { background: var(--content); color: var(--rust); }
.modal-body { padding: 1.3rem 1.4rem; }
.modal-foot {
    display: flex; align-items: center; gap: .6rem;
    padding: 1rem 1.4rem; border-top: 1px solid var(--rule); background: var(--surface2);
}
.modal-foot .spacer { flex: 1; }
.modal-err { color: var(--rust); font-size: .88rem; margin: 0 1.4rem 0; }

/* urlap-racs a modalban */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.field label .req { color: var(--rust); }
.field textarea {
    width: 100%; min-height: 64px; padding: .5rem .6rem; resize: vertical;
    border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink);
    font-family: inherit; font-size: .95rem;
}
.field textarea:focus { outline: none; border-color: var(--rust); }
.field input[type=datetime-local], .field input[type=number], .field input[type=date], .field input[type=time] {
    width: 100%; height: 38px; padding: 0 .6rem;
    border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: .95rem;
}
.field input:focus { outline: none; border-color: var(--rust); }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field.check input { width: 18px; height: 18px; accent-color: var(--rust); }
.field.check label { font-size: .92rem; color: var(--ink); }
.form-sep {
    grid-column: 1 / -1; margin: .3rem 0 -.2rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--rust); border-bottom: 1px solid var(--rule); padding-bottom: .3rem;
}
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* =============================================== panelek (profil, beállítások) */
.panel {
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
    padding: 1.1rem 1.3rem; margin: 0 0 1.1rem; max-width: 500px;
}
/* Panelek kétoszlopos elrendezése (profil), ha van hely. Masonry-szerű oszlopok. */
.panel-cols { column-width: 460px; column-gap: 1.1rem; }
.panel-cols > .panel { max-width: none; margin: 0 0 1.1rem; break-inside: avoid; -webkit-column-break-inside: avoid; display: inline-block; width: 100%; vertical-align: top; }
.panel h3 { margin: 0 0 .3rem; color: var(--rust); font-size: 1.05rem; }
.panel .small { font-size: .84rem; margin: 0 0 .8rem; }
.panel-foot { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.panel-foot .msg { flex: 1; }
.msg { font-size: .88rem; }
.msg.ok { color: #1E6F50; }
.msg.err { color: var(--rust); }

/* iroda-lista */
.office { border: 1px solid var(--rule); border-radius: 8px; margin-bottom: .8rem; overflow: hidden; }
.office-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; background: var(--surface2); }
.office-body { padding: .3rem .9rem .9rem; }
.office-body .sub { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .9rem 0 .35rem; font-weight: 700; }
.mlist, .ilist { list-style: none; margin: 0; padding: 0; }
.mlist li, .ilist li { padding: .3rem 0; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.ilist code { background: var(--content); padding: .1rem .4rem; border-radius: 4px; font-size: .82rem; }
.invite-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.invite-row .inv-email { flex: 1 1 220px; }
.invite-row .inv-role { width: 110px; }
.st { font-weight: 600; }
.st-függőben { color: #8A5A00; }
.st-elfogadva { color: #1E6F50; }
.st-visszavonva, .st-lejárt { color: var(--muted); }
.linkbtn { border: none; background: none; color: var(--rust); cursor: pointer; text-decoration: underline; font-size: .82rem; padding: 0 0 0 .4rem; }

/* =============================================================== naptár */
.cal-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; flex-wrap: wrap; }
.cal-bar .spacer { flex: 1; }
.cal-range { font-weight: 600; margin-left: .4rem; }
.cal-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.cal-legend .lg { display: inline-flex; align-items: center; gap: .35rem; }
.cal-legend .lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cal-wrap { display: flex; flex-direction: column; height: 100%; }
.cal-grid {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto repeat(4, 1fr); gap: 1px;
    background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
}
.cal-head { background: var(--thead-bg); color: var(--thead-fg); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; text-align: center; padding: .4rem 0; }
.cal-cell { background: var(--surface); min-height: 0; overflow-y: auto; padding: .3rem; display: flex; flex-direction: column; gap: .2rem; cursor: pointer; }
.cal-cell:hover { background: var(--row-hover); }
.cal-cell.we { background: var(--content); }
.cal-cell.today { outline: 2px solid var(--rust); outline-offset: -2px; }
.cal-date { font-size: .8rem; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-date { color: var(--rust); }
.cal-ev {
    font-size: .74rem; line-height: 1.3; padding: .28rem .45rem; border-radius: 4px;
    background: var(--rust); color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.cal-ev:hover { filter: brightness(1.1); }
.cal-ev .t { color: rgba(255,255,255,.8); margin-right: .3rem; font-variant-numeric: tabular-nums; }
/* kategória-karika az esemény jobb szélén (fehér keret: bármilyen tag-színen látszik) */
.cal-ev { display: flex; align-items: center; gap: .3rem; }
.cal-ev .d { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-dot { flex: none; display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.cal-cats { margin: -.2rem 0 .6rem; flex-wrap: wrap; align-items: center; }
.cal-cats .cal-dot { vertical-align: -1px; }
@media (max-width: 720px) {
    .cal-grid { grid-template-columns: repeat(7, minmax(84px, 1fr)); overflow-x: auto; }
}

/* =============================================================== hírek (RSS) */
.news-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.news-bar .spacer { flex: 1; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
    border: 1px solid var(--rule); background: var(--surface2); color: var(--ink);
    border-radius: 999px; padding: .28rem .8rem; font-size: .84rem; cursor: pointer;
}
.chip:hover { border-color: var(--rust); }
.chip.on { background: var(--rust); border-color: var(--rust); color: #fff; font-weight: 600; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .7rem; }
.news-card {
    display: flex; align-items: center; gap: .7rem;
    height: 84px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--rule);
    border-left: 4px solid var(--rust); border-radius: 8px; padding: .6rem .8rem;
    color: var(--ink); text-decoration: none; transition: background .12s;
}
.news-card:hover { background: var(--row-hover); }
.news-ico { width: 40px; height: 40px; flex: none; object-fit: contain; }
.news-body { min-width: 0; flex: 1; }
.news-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--muted); margin-bottom: .3rem; }
.news-src { font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.news-title {
    font-size: .9rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Nézetváltó (kis/nagy) — szegmentált gomb. */
.viewtoggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.viewtoggle .vt { border: none; background: var(--surface2); color: var(--ink); cursor: pointer; padding: .28rem .8rem; font-size: .84rem; }
.viewtoggle .vt + .vt { border-left: 1px solid var(--rule); }
.viewtoggle .vt:hover { background: var(--btn-hover); }
.viewtoggle .vt.on { background: var(--rust); color: #fff; font-weight: 600; }

/* Nagy nézet: a kártya nő, a cikk eleje látszik. */
.news-list.large { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
/* Nagy nézet: minden kártya egyforma magas, függetlenül a szövegtől (üres alja megengedett). */
.news-list.large .news-card { height: 200px; align-items: flex-start; }
.news-list.large .news-ico { margin-top: .1rem; }
.news-summary {
    margin-top: .35rem; font-size: .84rem; line-height: 1.45; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

/* =============================================================== dashboard */
.dash { width: 100%; }
.dash-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.6rem; align-items: start; margin-bottom: 1.4rem; }
.dash-intro h1 { color: var(--rust); margin: 0 0 .2rem; font-size: 2rem; letter-spacing: .04em; }
.dash-intro .dash-lead { font-size: 1.05rem; color: var(--ink); margin: 0 0 .8rem; font-weight: 600; }
.dash-intro p { color: var(--ink); line-height: 1.5; margin: 0 0 .8rem; }
.dash-features { margin: 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.7; }
.dash-features li { margin: 0; }
.dash-img { line-height: 0; text-align: right; }
.dash-img img { width: auto; max-width: 100%; height: auto; max-height: 297px; display: inline-block; border-radius: 12px; }
.dash-img.missing { display: none; }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; width: 100%; }
.dash-tile {
    display: flex; align-items: center; gap: .8rem;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
    padding: 1rem 1.1rem; border-top: 3px solid var(--rust);
}
.dash-ico {
    flex: none; width: 2.6rem; height: 2.6rem; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--rust); background: var(--btn-hover);
}
.dash-tile-body { min-width: 0; }
.dash-num { font-size: 1.7rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dash-label { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
@media (max-width: 760px) { .dash-top { grid-template-columns: 1fr; } .dash-img { text-align: left; } }
.dash-today { margin-top: 1.5rem; }
.dash-today h3 { color: var(--rust); font-size: 1.05rem; margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.today-list { list-style: none; margin: 0; padding: 0; max-width: 820px; display: flex; flex-direction: column; gap: .5rem; }
.today-list li { display: flex; align-items: center; gap: .7rem; padding: .7rem .95rem;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.today-list .t { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--rust); width: 3.4rem; flex: none; }
.today-list .td { flex: 1; min-width: 0; }
.today-list .tag.priv { color: #2C5AA0; }

/* veszélyzóna (fiók törlése) */
.panel.danger { border-color: rgba(183,0,0,.35); }
.panel.danger h3 { color: #B70000; }
.btn.danger { border-color: #B70000; background: #B70000; color: #fff; font-weight: 600; }
.btn.danger:hover { background: #8f0000; border-color: #8f0000; }

/* Inverz, színes gombok (számlázás) */
.btn.blue { border-color: #2C5AA0; background: #2C5AA0; color: #fff; font-weight: 600; }
.btn.blue:hover { background: #244a83; border-color: #244a83; }
.btn.red { border-color: #B00000; background: #B00000; color: #fff; font-weight: 600; }
.btn.red:hover { background: #8f0000; border-color: #8f0000; }

/* Számlázás: teljes szélességű csoport-panelek */
.bill-grp { max-width: none; }
.bill-foot { flex-wrap: wrap; }
.bill-foot .msg { flex: 0 1 auto; }
.bill-foot .spacer { flex: 1 1 auto; }   /* a gombok + összeg tömböt jobbra tolja */
.bill-langbox { display: inline-flex; align-items: center; gap: .45rem; }
.bill-langbox label { font-size: .84rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bill-langbox select { min-width: 7rem; }
/* Fix helyű összeg: a szám mindig 8 jegyre tartja a helyet (nem tolja a gombokat),
   jobb széle a fölötte lévő táblázat összeg-oszlopához igazítva (0.7rem cella-padding). */
.bill-sum-wrap { white-space: nowrap; padding-right: .7rem; font-size: .95rem; }   /* a részösszegekkel egyező méret */
.bill-sum-wrap strong { display: inline-block; min-width: 8.5rem; text-align: right;
    font-variant-numeric: tabular-nums; color: var(--ink); font-size: .95rem; }
.caselink { color: var(--rust); font-weight: 600; text-decoration: none; }
.caselink:hover { text-decoration: underline; }

/* Rendezhető oszlopfejléc */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--rust); }
th .sort-ind { font-size: .8em; }

/* Licenc-panelek: 5 függőleges kártya, kép felül, kiemelt kiválasztás */
.lic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; align-items: stretch; }   /* minden kártya egyforma magas */
.lic-cell { display: flex; flex-direction: column; }
.lic-cell > .lic-card { flex: 1; }   /* a cella teljes magasságát kitölti; a gomb az aljára kerül (lic-features: flex 1) */
.lic-card { position: relative; display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--rule); border-radius: 12px; padding: 0 0 1rem; cursor: pointer;
    transition: border-color .12s, box-shadow .12s; overflow: hidden; }
.lic-card:hover { border-color: var(--rust); }
.lic-card.selected { border-color: var(--rust); box-shadow: 0 0 0 2px var(--rust); }
.lic-card.popular { border-color: var(--rust); }
.lic-ribbon { position: absolute; right: .8rem; bottom: .8rem; z-index: 1;
    background: var(--rust); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
    padding: .3rem 1.1rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.lic-img { position: relative; height: 264px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: none; }
.lic-img img { width: 100%; height: 100%; object-fit: cover; }
.lic-img .lic-img-ph { display: none; color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lic-img.noimg .lic-img-ph { display: inline; }
.lic-name { text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--rust); margin: .8rem 0 .1rem; }
.lic-price { text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.lic-per { font-size: .8rem; font-weight: 400; color: var(--muted); margin-left: .3rem; }
.lic-note { text-align: center; font-size: .72rem; color: var(--muted); margin-top: .15rem; }

/* Megrendelő modal */
.co-summary { border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .9rem; margin-bottom: .8rem; }
.co-summary div { display: flex; justify-content: space-between; padding: .2rem 0; font-size: .9rem; }
.co-summary span { color: var(--muted); }
.co-simplepay { background: var(--surface2); border-radius: 8px; padding: .7rem .9rem; font-size: .84rem; color: var(--ink); margin-bottom: .9rem; }
.co-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .88rem; line-height: 1.4; margin: .7rem 0; }
.co-check input { margin-top: .2rem; flex: none; }
.co-check a { color: var(--rust); font-weight: 600; }

/* Fizetési előzmények görgethető grid (admin kezelő modal) */
.pay-grid { max-height: 220px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 8px; }
.pay-grid table { width: 100%; }
.pay-grid thead th { position: sticky; top: 0; z-index: 1; }

/* Széles (megrendelő) modal + kétoszlopos elrendezés */
.modal-wide { width: min(960px, 100%); }
.co-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1.3rem; align-items: start; }
.co-left { display: flex; flex-direction: column; gap: .8rem; }
.co-licimg { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; border: 1px solid var(--rule); }
.co-splogo { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--rule); border-radius: 8px; padding: .5rem; background: var(--surface2); }
.co-splogo img { max-height: 34px; max-width: 100%; }
.co-splogo span { display: none; font-weight: 800; color: #1a4f9c; letter-spacing: .02em; }
.co-splogo.noimg span { display: inline; }
@media (max-width: 620px) { .co-grid { grid-template-columns: 1fr; } }

/* Licenc bevezető */
.lic-intro h2 { color: var(--rust); font-size: 1.25rem; margin: .2rem 0 .5rem; }
.lic-intro ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink); line-height: 1.6; }

/* Hír-betöltés animáció */
.news-loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 1rem; color: var(--muted); text-align: center; }

/* Verziótörténet modal */
.ver-list { display: flex; flex-direction: column; gap: .1rem; max-height: 62vh; overflow-y: auto; }
.ver-item { display: flex; gap: .8rem; padding: .7rem .3rem; border-bottom: 1px solid var(--rule); }
.ver-item.current { background: var(--btn-hover); border-radius: 8px; }
.ver-ico { font-size: 1.5rem; flex: none; width: 2rem; text-align: center; }
.ver-h { font-size: .95rem; } .ver-h strong { color: var(--rust); }
.ver-now { font-size: .66rem; background: var(--rust); color: #fff; border-radius: 999px; padding: .05rem .4rem; margin-left: .3rem; }
.ver-desc { font-size: .84rem; color: var(--muted); margin-top: .15rem; line-height: 1.4; }

/* Lábléc: verzió-gomb + licenc */
.ver-btn { cursor: pointer; text-decoration: underline dotted; }
.foot-lic { color: var(--muted); }

/* Admin fizetés-státusz pill-ek */
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; }
.pill-green { background: #1e7d34; color: #fff; }
.pill-red { background: #b00000; color: #fff; }
.pill-grey { background: var(--surface2); color: var(--muted); }
.pill-office { background: #e3ecfb; color: #1d4ed8; }
.lic-sub { font-size: .74rem; color: var(--muted); margin-top: .15rem; white-space: nowrap; }

/* „Hamarosan" menüpontok */
.menu a.soon { opacity: .55; cursor: default; gap: .5rem; }
.menu a.soon:hover { background: rgba(255,255,255,.04); }
.menu a.soon .soon-badge { margin-left: auto; flex: none; font-size: .5rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .02em; background: var(--rust); color: #fff; border-radius: 999px; padding: .05rem .3rem; line-height: 1.4; }
.lic-features { list-style: none; margin: .8rem 0; padding: 0 1rem; flex: 1; }
.lic-features li { font-size: .84rem; padding: .32rem 0 .32rem 1.3rem; position: relative; border-bottom: 1px solid var(--rule); }
.lic-features li:before { content: '✓'; color: #1e7d34; position: absolute; left: 0; font-weight: 700; }
.lic-card .lic-choose { margin: .2rem 1rem 0; justify-content: center; }
/* a jelenlegi csomag gombja inverz (kitöltött) */
.lic-card .lic-choose.is-current, .lic-card .lic-choose.is-current:disabled {
    background: var(--rust); color: #fff; border-color: var(--rust); opacity: 1; cursor: default; }
@media (max-width: 980px) { .lic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lic-grid { grid-template-columns: 1fr; } }

/* =============================================================== AI asszisztens */
.ai-wrap { display: flex; flex-direction: column; height: 100%; }
.ai-head { flex: none; margin-bottom: .5rem; }
.ai { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: stretch; flex: 1; min-height: 0; }
.ai-side { display: flex; flex-direction: column; gap: .9rem; }
.ai-side textarea {
    width: 100%; flex: 1; min-height: 160px; padding: .6rem .75rem; resize: vertical;
    border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink);
    font-family: inherit; font-size: .95rem; line-height: 1.4;
}
.ai-side textarea:focus { outline: none; border-color: var(--rust); }
.ai-examples { display: flex; gap: .5rem; flex-wrap: wrap; }
.ai-generate { width: 100%; justify-content: center; height: 42px; }
.ai-actions { display: flex; gap: .6rem; }
.ai-actions .btn { flex: 1; justify-content: center; }
.ai-side .msg { display: block; }
/* görgethető, szürke háttér; a fehér A4-lap teteje egy vonalban a beviteli mezővel (padding-top 0) */
.ai-preview {
    background: var(--content); overflow: auto; padding: 0 1.2rem 1.2rem;
    display: flex; justify-content: center; align-items: flex-start; border-radius: 8px;
}
.ai-doc {
    flex: none; width: min(100%, 794px); aspect-ratio: 210 / 297; height: auto;   /* üresen A4 álló; tartalomnál a JS állítja a magasságot */
    border: none; background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.20); margin-top: 0;
}
@media (max-width: 820px) { .ai { grid-template-columns: 1fr; } .ai-wrap { height: auto; } }
/* teljes oldalt takaró töltés-animáció */
.loading-overlay {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(20,14,10,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
}
.loading-box { background: var(--surface); color: var(--ink); border-radius: 12px; padding: 1.6rem 2rem; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.spinner { width: 44px; height: 44px; margin: 0 auto .8rem; border: 4px solid var(--rule); border-top-color: var(--rust); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: .92rem; color: var(--muted); max-width: 260px; }

/* visszajelző buborék (toast) */
.toast {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
    z-index: 90; background: #1E6F50; color: #fff; padding: .6rem 1.1rem; border-radius: 8px;
    font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--rust); }

/* Iratmintatár */
.lib-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.lib-bar select { width: auto; min-width: 200px; }
.lib-bar .spacer { flex: 1; }
/* dokumentum-előnézet modal */
.doc-modal { width: min(900px, 100%); }
.doc-modal-body { max-height: 72vh; overflow: auto; background: var(--content); display: flex; justify-content: center; align-items: flex-start; }
.doc-modal-body .ai-doc { width: min(100%, 794px); height: 400px; }

/* ------------------------------------------------- Google Naptar panel (Profil) */
.gc-steps { margin: .4rem 0 .8rem; padding-left: 1.2rem; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.gc-steps li { margin-bottom: .5rem; }
.gc-steps strong { color: var(--ink); }
.gc-code {
    display: inline-flex; align-items: center; gap: .6rem; margin: .35rem 0;
    padding: .35rem .4rem .35rem .75rem; border: 1px dashed var(--rust); border-radius: 8px;
    background: var(--surface2); color: var(--ink);
    font-family: Consolas, "Cascadia Mono", monospace; font-size: .92rem; letter-spacing: .02em;
}
.gc-code span { user-select: all; word-break: break-all; }
.gc-code .btn { height: 28px; padding: 0 .6rem; font-size: .8rem; }
#gc_code { font-size: 1.15rem; letter-spacing: .08em; color: var(--rust); font-weight: 600; }
.gc-id { color: var(--muted); font-family: Consolas, "Cascadia Mono", monospace; font-size: .82rem; }

/* ------------------------------------------------- Naptar: tipusvalaszto (munkalap / sajat esemeny) */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.kind-opt {
    display: flex; flex-direction: column; gap: .2rem; cursor: pointer;
    padding: .8rem .9rem .8rem 2.3rem; position: relative;
    border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
    transition: border-color .15s, background .15s;
}
.kind-opt:hover { border-color: var(--border); background: var(--btn-hover); }
.kind-opt input { position: absolute; left: .85rem; top: 1rem; accent-color: var(--rust); }
.kind-opt strong { font-size: .95rem; color: var(--ink); }
.kind-opt span { font-size: .8rem; color: var(--muted); }
.kind-opt:has(input:checked) { border-color: var(--rust); background: var(--row-hover); box-shadow: 0 0 0 1px var(--rust) inset; }
@media (max-width: 480px) { .kind-pick { grid-template-columns: 1fr; } }

/* Nezetenkenti tarolo a #main-ben: elrendezes szempontjabol lathatatlan. */
.view-host { display: contents; }

/* ------------------------------------------------- Szerkeszto modal: bal oldali fotosav */
/* Minden szerkeszto ablak egyforma: a legmagasabbhoz (Uj ugyfel, ~897 px) igazodva 900 px;
   kisebb kepernyon a 92vh-ig, onnan az urlap gorget. A fotosav 276 px (+20%). */
.modal.has-side {
    width: min(1382px, 100%);   /* +25% (1106 -> 1382) */
    height: min(900px, 92vh);
    display: grid; grid-template-columns: 276px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}
.modal.has-side > :not(.modal-side) { grid-column: 2; }
.modal-side {
    grid-column: 1; grid-row: 1 / -1; position: relative;
    background-color: #2a211c; background-position: center; background-size: cover; background-repeat: no-repeat;
}
/* finom atmenet a fotobol a feher urlapba + a marka-voros elvalaszto */
.modal-side::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0) 70%, rgba(0,0,0,.10));
    box-shadow: inset -3px 0 0 var(--rust);
}
@media (max-width: 760px) {
    .modal.has-side { display: flex; }
    .modal-side { display: none; }
}

/* Beallitasok: demo-adatok bontasa teruletenkent */
.demo-areas { list-style: none; margin: .2rem 0 .7rem; padding: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.demo-areas li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .75rem; font-size: .88rem; }
.demo-areas li + li { border-top: 1px solid var(--rule); }
.demo-areas strong { color: var(--rust); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Lista-rendezes valaszto a szuro mellett (Ugyfelek, Ugyek) */
.sortbar { display: inline-flex; align-items: center; gap: .35rem; margin-left: .9rem; padding-left: .9rem; border-left: 1px solid var(--rule); }
.sortbar .sb-l { font-size: .8rem; color: var(--muted); }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- Menü: csúszó fül homorú ívekkel (SANSOFT-BPSO mintára)
   Az aktív menüpont mögött egyetlen fül-elem: a tartalom színével "kinyílik" a lap felé, fölötte és
   alatta 18 px-es homorú (inverz) ívvel. Menüváltáskor a fül átcsúszik az új pontra (moveMenuTab). */
.menu { position: relative; padding-top: 1.45rem; scrollbar-width: none; }   /* a görgetősáv ne vágja el a fület a laptól */
.menu::-webkit-scrollbar { display: none; }
.menu a {
    position: relative; z-index: 1; margin-left: .7rem;
    border-left: 0; border-radius: 999px 0 0 999px; padding-left: 1.1rem;
    transition: background .12s, color .3s;
}
.menu .grp { position: relative; z-index: 1; }
.menu-tab {
    position: absolute; left: .7rem; right: 0; top: 0; height: 0; z-index: 0; pointer-events: none;
    transition: transform .38s cubic-bezier(.4, 0, .2, 1), height .38s cubic-bezier(.4, 0, .2, 1), opacity .2s;
}
.menu-tab.no-anim { transition: none; }
.menu-tab::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; bottom: 18px; background: var(--content); border-radius: 999px 0 0 999px; }
.menu-tab::after {
    content: ""; position: absolute; inset: 0; background: var(--content);
    --corner-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M18 0A18 18 0 0 1 0 18H18Z'/%3E%3C/svg%3E");
    --corner-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M0 0A18 18 0 0 1 18 18V0Z'/%3E%3C/svg%3E");
    -webkit-mask: var(--corner-top) right top / 18px 18px no-repeat, var(--corner-bottom) right bottom / 18px 18px no-repeat;
    mask: var(--corner-top) right top / 18px 18px no-repeat, var(--corner-bottom) right bottom / 18px 18px no-repeat;
}
/* a krémszínű menü-ikonok a világos fülön bordóra váltanak */
.menu a.active img { filter: brightness(0) saturate(100%) invert(12%) sepia(93%) saturate(5200%) hue-rotate(357deg) brightness(82%) contrast(118%); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .menu-tab, .menu a { transition: none; } }

/* ------------------------------------------------- Megrendelés: fizetési mód + licenc-sávok */
.co-methods { display: grid; gap: .55rem; margin: .4rem 0 .9rem; }
.co-method {
    display: flex; flex-direction: column; gap: .15rem; cursor: pointer; position: relative;
    padding: .7rem .85rem .7rem 2.2rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
}
.co-method input { position: absolute; left: .8rem; top: .85rem; accent-color: var(--rust); }
.co-method strong { font-size: .92rem; }
.co-method span { font-size: .8rem; color: var(--muted); }
.co-method:has(input:checked) { border-color: var(--rust); background: var(--row-hover); box-shadow: 0 0 0 1px var(--rust) inset; }
.co-method.off { opacity: .55; cursor: not-allowed; }
.co-pp { margin-top: .8rem; }
.lic-banner { padding: .7rem .95rem; border-radius: 10px; margin: 0 0 .8rem; font-size: .9rem; }
.lic-banner.inherit { background: #EAF3DE; color: #27500A; border: 1px solid #C0DD97; }
.lic-banner.pending { background: #FAEEDA; color: #633806; border: 1px solid #FAC775; }
:root[data-theme="dark"] .lic-banner.inherit { background: #27500A; color: #EAF3DE; border-color: #3B6D11; }
:root[data-theme="dark"] .lic-banner.pending { background: #633806; color: #FAEEDA; border-color: #854F0B; }

/* ------------------------------------------------- Combobox (Ügyintéző): beírható + listából választható */
.combo { position: relative; display: flex; }
.combo input { flex: 1; padding-right: 2.2rem; }
.combo-btn {
    position: absolute; right: 1px; top: 1px; bottom: 1px; width: 2rem; border: 0; border-left: 1px solid var(--rule);
    background: transparent; color: var(--muted); cursor: pointer; border-radius: 0 6px 6px 0; font-size: .85rem;
}
.combo-btn:hover { color: var(--rust); background: var(--btn-hover); }
.combo-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; margin: 0; padding: .25rem 0; list-style: none;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 28px -10px rgba(0,0,0,.35);
    max-height: 240px; overflow-y: auto;
}
.combo-list li { padding: .45rem .75rem; cursor: pointer; display: flex; justify-content: space-between; gap: .8rem; font-size: .9rem; }
.combo-list li small { color: var(--muted); font-size: .78rem; }
.combo-list li:hover, .combo-list li.act { background: var(--row-hover); }
.combo-list li.sel span { color: var(--rust); font-weight: 600; }
.combo-list li.none { color: var(--muted); cursor: default; font-size: .82rem; }

/* ------------------------------------------------- Admin: eseménynapló */
.evlog-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .7rem; }
.evlog-bar select { width: auto; min-width: 180px; }
.evlog-bar input { flex: 1 1 260px; max-width: 420px; }
.evlog-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; }
.evlog-wrap thead th { position: sticky; top: 0; z-index: 1; }
.ev-kind { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.ev-login { background: #E6F1FB; color: #0C447C; } .ev-license { background: #EAF3DE; color: #27500A; }
.ev-setting { background: #FAEEDA; color: #633806; } .ev-admin { background: #FCEBEB; color: #791F1F; }
.ev-office { background: #EEEDFE; color: #3C3489; } .ev-security { background: #FBEAF0; color: #72243E; }
tr.ev-fail td { color: var(--rust); }

/* ------------------------------------------------- AI menü: Justitia */
/* három oszlop: kép | bemutatkozás + képességek | tudásbázis */
.ai-hero { position: relative; display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) minmax(0, .95fr); background: var(--surface);
    border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin-bottom: 1rem; }
.ai-hero-img { min-height: 180px; background: #1b1410; }
.ai-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-hero-info { padding: 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; }
.ai-eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rust); font-weight: 700; }
.ai-name { margin: 0; font-size: 1.7rem; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
.ai-name span { font-size: 1rem; color: var(--muted); font-family: inherit; font-weight: 400; }
.ai-intro { margin: 0; color: var(--muted); font-size: .92rem; max-width: 62ch; }
.ai-cols { min-width: 0; }
.ai-cols h4, .ai-hero-kb h4 { margin: .2rem 0 .45rem; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ai-caps { margin: 0; padding: 0; list-style: none; font-size: .88rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.ai-caps li { padding: .22rem 0 .22rem 1.25rem; position: relative; }
.ai-caps li::before { content: '✓'; position: absolute; left: 0; color: #2E6B3A; font-weight: 700; }
.ai-hero-kb { padding: 1.3rem 1.3rem 1.1rem; border-left: 1px solid var(--rule); background: var(--surface2); display: flex; flex-direction: column; gap: .4rem; }
.ai-hero-kb h4 { margin-top: 0; }
.kb-row { border: 1px solid var(--rule); border-radius: 9px; padding: .45rem .65rem; background: var(--surface); }
.kb-h { font-size: .88rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.kb-m { font-size: .76rem; color: var(--muted); margin-top: .2rem; }
.kb-pill { font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; margin-left: auto; }
.kb-pill.ok { background: #E5F0E3; color: #2E6B3A; } .kb-pill.wait, .kb-pill.run { background: #FAEED8; color: #8A5A0B; }
.kb-next { font-size: .76rem; color: var(--muted); }
.ai-knows { font-size: .84rem; border-top: 1px solid var(--rule); padding-top: .6rem; margin-top: auto; }
.ai-knows a { margin-left: .5rem; font-size: .8rem; }
.ai-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.ai-tab { text-align: left; display: flex; flex-direction: column; gap: .2rem; padding: .8rem .95rem; cursor: pointer;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); font: inherit; transition: border-color .12s, box-shadow .12s; }
.ai-tab:hover { border-color: var(--rust); }
.ai-tab.on { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust) inset; background: var(--row-hover); }
.ai-tab-ic { font-size: 1.25rem; }
.ai-tab strong { font-size: .95rem; } .ai-tab small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
/* közepes szélesség: marad a három oszlop, keskenyebb képpel, egyoszlopos képességlistával */
@media (max-width: 1350px) { .ai-hero { grid-template-columns: minmax(0, .34fr) minmax(0, 1fr) minmax(0, 1fr); }
    .ai-caps { grid-template-columns: 1fr; } .ai-hero-info, .ai-hero-kb { padding: 1.1rem 1.1rem 1rem; }
    .ai-hero:not(.collapsed) .ai-col-t { display: none; } .ai-hero:not(.collapsed) .ai-collapse { padding: .32rem .6rem; } }
@media (max-width: 1000px) { .ai-hero { grid-template-columns: 1fr; } .ai-hero-kb { border-left: 0; border-top: 1px solid var(--rule); } .ai-hero-img { min-height: 200px; max-height: 240px; } .ai-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ai-caps { grid-template-columns: 1fr; } }

.ai-ask { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .ai-ask { grid-template-columns: 1fr; } }
.ai-chat { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; display: flex; flex-direction: column; }
.ai-thread { padding: 1rem; display: flex; flex-direction: column; gap: .8rem; max-height: 520px; min-height: 220px; overflow-y: auto; }
.ai-empty { color: var(--muted); font-size: .9rem; margin: auto; text-align: center; max-width: 46ch; }
.msg-q { align-self: flex-end; max-width: 82%; background: var(--rust); color: #fff; padding: .55rem .8rem; border-radius: 12px 12px 2px 12px; font-size: .92rem; white-space: pre-wrap; }
.msg-a { align-self: flex-start; max-width: 96%; background: var(--surface2); border: 1px solid var(--rule); padding: .7rem .9rem; border-radius: 12px 12px 12px 2px; font-size: .92rem; line-height: 1.55; }
.msg-a p { margin: .15rem 0 .5rem; } .msg-a ul { margin: .2rem 0 .5rem; padding-left: 1.2rem; }
.msg-note { font-size: .74rem; color: var(--muted); border-top: 1px dashed var(--rule); padding-top: .4rem; margin-top: .3rem; }
.msg-a.typing { color: var(--muted); display: flex; align-items: center; gap: .25rem; }
.msg-a.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--rust); animation: aiDot 1s infinite ease-in-out; }
.msg-a.typing span:nth-child(2) { animation-delay: .15s; } .msg-a.typing span:nth-child(3) { animation-delay: .3s; margin-right: .4rem; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg-a.typing span { animation: none; } }
.cite { font: inherit; font-size: .76rem; font-weight: 700; color: var(--rust); background: var(--rust-soft, #F6E3DF); border: 0; border-radius: 6px; padding: 0 .35rem; cursor: pointer; white-space: nowrap; }
.cite:hover { text-decoration: underline; }
.ai-compose { border-top: 1px solid var(--rule); padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.ai-compose textarea { width: 100%; resize: vertical; min-height: 70px; }
.ai-compose-bar { display: flex; gap: .5rem; align-items: center; }
.ai-compose-bar .ai-examples { flex: 1; display: flex; gap: .35rem; flex-wrap: wrap; }
.ai-sources { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: .9rem; max-height: 680px; overflow-y: auto; }
.ai-sources h4 { margin: 0 0 .6rem; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.law-card { border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .75rem; margin-bottom: .6rem; transition: border-color .2s, box-shadow .2s; }
.law-card.hl { border-color: var(--rust); box-shadow: 0 0 0 2px var(--rust); }
.law-h { display: flex; gap: .45rem; align-items: baseline; flex-wrap: wrap; } .law-h strong { color: var(--rust); } .law-h span { font-size: .82rem; }
.law-path { font-size: .72rem; color: var(--muted); margin: .15rem 0 .4rem; }
.law-t { font-family: Georgia, "Times New Roman", serif; font-size: .9rem; line-height: 1.5; }
.law-card a { display: inline-block; margin-top: .4rem; font-size: .78rem; font-weight: 600; }
.ai-side textarea.tall { min-height: 220px; } .ai-side textarea.short { min-height: 70px; }
.ai-used { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.ai-used-h { width: 100%; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cite-link { font-size: .76rem; font-weight: 700; color: var(--rust); background: var(--rust-soft, #F6E3DF); border-radius: 6px; padding: .05rem .4rem; text-decoration: none; }
:root { --rust-soft: #F6E3DF; }
:root[data-theme="dark"] { --rust-soft: #3A2420; }

/* Pandexa hero: feliratos összecsukó gomb a kép bal felső sarkában + összecsukott (50 px-es) fejléc */
.ai-collapse { position: absolute; top: .6rem; left: .6rem; z-index: 2; display: inline-flex; align-items: center; gap: .4rem;
    padding: .32rem .75rem .32rem .55rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
    background: rgba(20,14,10,.72); color: #fff; cursor: pointer; font-size: .78rem; font-weight: 600; line-height: 1.2;
    backdrop-filter: blur(3px); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ai-collapse:hover { background: var(--rust); border-color: var(--rust); }
.ai-col-ic { font-size: .85rem; }
.ai-hero.collapsed { display: flex; align-items: center; height: 50px; }
.ai-hero.collapsed .ai-hero-img { flex: none; height: 50px; min-height: 0; width: 89px; }   /* 1100x617 képarány */
.ai-hero.collapsed .ai-hero-info { flex: 1; min-width: 0; flex-direction: row; align-items: center; padding: 0 15rem 0 1rem; gap: .8rem; }
.ai-hero.collapsed .ai-intro, .ai-hero.collapsed .ai-cols, .ai-hero.collapsed .ai-knows, .ai-hero.collapsed .ai-hero-kb { display: none; }
.ai-hero.collapsed .ai-eyebrow { display: none; }
.ai-hero.collapsed .ai-name { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* összecsukva a gomb a fejléc jobb szélére kerül (az 50 px-es képen nem férne el) */
.ai-hero.collapsed .ai-collapse { left: auto; right: .6rem; top: 50%; transform: translateY(-50%);
    background: var(--surface); color: var(--ink); border-color: var(--rule); box-shadow: none; backdrop-filter: none; }
.ai-hero.collapsed .ai-collapse:hover { color: #fff; background: var(--rust); border-color: var(--rust); }
@media (max-width: 1000px) { .ai-hero.collapsed { height: 50px; } .ai-hero.collapsed .ai-hero-img { max-height: 50px; } }
@media (max-width: 640px) { .ai-hero.collapsed .ai-name span { display: none; } .ai-hero.collapsed .ai-hero-info { padding-right: 13.5rem; } }

/* Fülsor egy oldal tetején (Admin; később a Master adatok modal is ezt használja) */
.subtabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--rule); margin-bottom: 1rem; }
.subtab { border: 0; background: none; padding: .6rem 1rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.subtab:hover { color: var(--ink); background: var(--surface2); }
.subtab.on { color: var(--rust); border-bottom-color: var(--rust); }
:root[data-theme="dark"] .pill-office { background: #1e3a8a; color: #dbeafe; }

/* Master adatok modal: kategórialista színnel */
.md-list { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 8px; max-height: 52vh; overflow-y: auto; }
.md-row { display: flex; align-items: center; gap: .7rem; padding: .4rem .7rem; border-bottom: 1px solid var(--rule); }
.md-row:last-child { border-bottom: 0; }
.md-row:hover { background: var(--row-hover); }
.md-color, .md-add input[type=color] { flex: none; width: 2.1rem; height: 1.7rem; padding: 0; border: 1px solid var(--rule); border-radius: 6px;
    background: none; cursor: pointer; }
.md-color:disabled { cursor: default; }
.md-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-badge { flex: none; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.md-badge.own { background: #e3f4e8; color: #166534; }
.md-badge.col { background: #e3ecfb; color: #1d4ed8; }
:root[data-theme="dark"] .md-badge.own { background: #14532d; color: #dcfce7; }
:root[data-theme="dark"] .md-badge.col { background: #1e3a8a; color: #dbeafe; }
.md-act { flex: none; min-width: 6.2rem; text-align: right; }
.md-add { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; }
.md-add input[type=text] { flex: 1; min-width: 0; }
.md-act .btn { padding: .2rem .6rem; font-size: .78rem; }

/* AI DEMO keret (Pandexa-fejléc + lábléc) */
.ai-quota { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; }
.ai-quota .q-bar { flex: 0 0 120px; height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; border: 1px solid var(--rule); }
.ai-quota .q-bar i { display: block; height: 100%; background: #2E6B3A; }
.ai-quota.q-low .q-bar i { background: #C98A12; }
.ai-quota.q-out .q-bar i { background: var(--rust); }
.ai-quota .q-note { flex-basis: 100%; color: var(--rust); }
.q-low { color: #A76E0A; } .q-out { color: var(--rust); }
.ai-hero.collapsed .ai-quota { display: none; }

/* Súgó ablak */
.help-hero { margin: -.2rem 0 1rem; border-radius: 10px; overflow: hidden; line-height: 0; }
.help-hero img { width: 100%; height: auto; display: block; }
.help-body p { margin: 0 0 .75rem; line-height: 1.6; font-size: .92rem; }
.help-pdf { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding-top: .6rem; border-top: 1px solid var(--rule); }

/* Pandexa: tudásbázis-lista legfeljebb 5 elem magas, a többi görgethető */
.kb-list { display: flex; flex-direction: column; gap: .4rem; max-height: 18.6rem; overflow-y: auto; padding-right: .25rem; }
.kb-count { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: .3rem; }

/* Pandexa: felolvasás gomb a válasz alatt */
.msg-note { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.msg-note > span { flex: 1; min-width: 12rem; }
.tts-btn { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .2rem .7rem;
    font: inherit; font-size: .78rem; cursor: pointer; }
.tts-btn:hover { border-color: var(--rust); color: var(--rust); }
.tts-btn.on { background: var(--rust); border-color: var(--rust); color: #fff; }
.tts-btn:disabled { opacity: .7; cursor: wait; }

/* a hidden attribútum mindig rejtsen (a .field / .btn saját display-e se írja felül) */
[hidden] { display: none !important; }

/* Pandexa válasza avatarral, mint egy csevegőben */
.msg-row { display: flex; align-items: flex-end; gap: .55rem; align-self: flex-start; max-width: 96%; }
.msg-row .msg-a { max-width: none; min-width: 0; }
.msg-av { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
    border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 2px 6px rgba(0,0,0,.18); }

/* Pandexa: webes (Google-keresés) források a válasz alatt */
.msg-web { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin: .4rem 0 .2rem; font-size: .78rem; color: var(--muted); }
.msg-web a { border: 1px solid var(--rule); border-radius: 999px; padding: .08rem .55rem; background: var(--surface); color: var(--ink); text-decoration: none; }
.msg-web a:hover { border-color: var(--rust); color: var(--rust); }

/* Új verzió sáv (automatikus frissítés) */
.upd-bar { position: fixed; right: 1.2rem; bottom: 3.2rem; z-index: 9000; display: flex; align-items: center; gap: .8rem;
    background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-left: 4px solid var(--rust);
    border-radius: 10px; padding: .6rem .8rem .6rem 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: .88rem; }

/* Súgó: asztali telepítés sora */
.help-install { margin-top: .6rem; border-top: 0; padding-top: 0; }

/* Licenc-kártyák: azonos sorok (címke + érték), egymás mellé igazítva — fix sormagasság (2 sornyi érték) */
.lic-features li { min-height: 3.55rem; padding-left: 0; }
.lic-features li:before { content: none; }
.lic-features .lic-lbl { display: block; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lic-soon { font-style: normal; background: #FBE9E5; color: #AA0000; border-radius: 999px; padding: 0 .35rem; font-size: .6rem; letter-spacing: .03em; margin-left: .15rem; }
.lic-note { min-height: 2.1rem; }

/* =================================================================== mobil (≤760 px)
   Kicsúszó menü sötétített háttérrel, tömör fejléc, teljes szélességű kereső, oldalra görgethető táblázatok,
   teljes képernyős ablakok, rövidített lábléc. */
.menu-scrim { display: none; }
@media (max-width: 760px) {
    .app { height: 100vh; height: 100dvh; }
    .hdr { gap: .35rem; padding: 0 .5rem; }
    .hdr .user-info, .hdr .brand, .hdr .spacer { display: none; }
    .hdr .tenant { flex: 1; min-width: 0; max-width: none; }
    .hdr .logout { font-size: .74rem; padding: 0 .2rem; }

    .menu { position: fixed; top: 60px; bottom: 0; left: 0; z-index: 46; margin-left: 0 !important;
            transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 30px rgba(0,0,0,.3); }
    .menu.open { transform: none; }
    .menu-scrim { display: block; position: fixed; top: 60px; right: 0; bottom: 0; left: 0; z-index: 45;
                  background: rgba(20,14,10,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
    .menu-scrim.show { opacity: 1; pointer-events: auto; }

    .actionbar { padding: .5rem .6rem; gap: .45rem; }
    .actionbar .crumb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .actionbar .spacer { display: none; }
    .actionbar .search { order: 5; flex: 1 1 100%; max-width: none; min-width: 0; }
    .filterslot { order: 6; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .filterslot::-webkit-scrollbar { display: none; }
    .filterbar { flex-wrap: nowrap; }
    .filterbar .fb, .sortbar .fb, .sortbar .sb-l { white-space: nowrap; flex: none; }
    .sortbar { margin-left: .4rem; padding-left: .4rem; flex: none; gap: .3rem; }

    .main { padding: .7rem .6rem; }
    .main table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .panel { max-width: none; padding: 1rem; }
    .panel-cols { column-width: auto; column-count: 1; }

    .foot { height: auto; flex-wrap: wrap; gap: .15rem .8rem; padding: .3rem .6rem; font-size: .7rem; }
    .foot-storage, .foot > span:last-child { display: none; }

    .modal-backdrop { padding: 0; align-items: stretch; }
    .modal, .modal-wide { width: 100%; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
    .modal-body { flex: 1; }
    .upd-bar { left: .6rem; right: .6rem; bottom: 2.4rem; }
}

/* Kétlépcsős azonosítás (2FA) */
.mfa-state { margin: 0 0 .5rem; font-size: .92rem; }
.mfa-state.on { color: #1e7d34; }
.mfa-steps { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .9rem; font-size: .9rem; }
.mfa-qr { margin: .6rem 0 .4rem; width: 192px; padding: 8px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; }
.mfa-qr img, .mfa-qr canvas { display: block; }
.mfa-secret { font-size: .85rem; letter-spacing: .04em; background: var(--surface2); padding: .1rem .35rem; border-radius: 4px; word-break: break-all; }
.mfa-confirm { display: flex; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }
.mfa-confirm input { width: 9rem; font-size: 1.1rem; letter-spacing: .15em; text-align: center; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin: .8rem 0; }
.mfa-codes code { font-size: 1.05rem; letter-spacing: .08em; text-align: center; padding: .45rem; background: var(--surface2); border: 1px solid var(--rule); border-radius: 6px; }
.mfa-remember { display: flex; align-items: center; gap: .45rem; font-size: .88rem; margin: .2rem 0 .6rem; cursor: pointer; }

/* Pandexa: összecsukott bemutatkozásnál a csevegés és a források a lap aljáig érnek, a tartalmuk görgethető.
   A .view-host display:contents, így a fejléc, a fülek és a #aiPanel közvetlenül a .main flex-elemei. */
@media (min-width: 1001px) {
    .main.ai-fill { display: flex; flex-direction: column; overflow: hidden; }
    .main.ai-fill .ai-hero, .main.ai-fill .ai-tabs { flex: none; }
    .main.ai-fill #aiPanel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .main.ai-fill .ai-ask { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
    .main.ai-fill .ai-chat { min-height: 0; }
    .main.ai-fill .ai-thread { flex: 1; max-height: none; min-height: 0; }
    .main.ai-fill .ai-sources { max-height: none; min-height: 0; }
}

/* Avatar: profilkép vagy monogram körben */
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover;
      background: var(--rust); color: #fff; font-weight: 700; line-height: 1; vertical-align: middle; }
.av.mono { font-size: .8rem; }
.hdr .avatar { background: none; overflow: visible; }
.hdr .avatar .av { width: 30px; height: 30px; }
.msg-row.me { align-self: flex-end; justify-content: flex-end; }
.msg-row.me .msg-q { max-width: none; }
.msg-row .av { border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 2px 6px rgba(0,0,0,.18); }
.cal-legend .lg .av { margin-right: .1rem; border: 1.5px solid var(--surface); }
.av-edit { display: flex; align-items: center; gap: 1rem; margin: .2rem 0 .9rem; }
.av-edit .av { box-shadow: 0 0 0 1px var(--rule); }
.av-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.av-btns label.btn { cursor: pointer; }

/* Menücsoportok (akkordeon, BPSO-mintára): a fejléc gomb, a tartalom 0fr → 1fr rácssorral nyílik */
.menu .mgrp { display: flex; flex-direction: column; }
.menu .grp { display: flex; align-items: center; width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
    font-family: inherit; border-radius: 0; margin: .15rem 0 0; }
.menu .grp:hover { color: rgba(255,255,255,.8); }
.menu .grp .caret { margin-left: auto; margin-right: 1rem; font-size: .75rem; letter-spacing: 0; transition: transform .2s; }
.menu .mgrp.open > .grp { color: rgba(255,255,255,.72); }
.menu .mgrp.open > .grp .caret { transform: rotate(180deg); }
.menu .msub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.menu .mgrp.open .msub { grid-template-rows: 1fr; }
.menu .msub-in { overflow: hidden; display: flex; flex-direction: column; gap: .1rem; min-height: 0; }
.menu .mgrp.open .msub-in { padding-bottom: .35rem; }
.msg-greet { font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { .menu .msub, .menu .grp .caret { transition: none; } }

/* a „hamarosan” menüpontok ikonjai is krémszínűek (mint a többi menü-ikon) */
.menu a.soon img { filter: brightness(0) invert(0.9); }

/* Határidőnapló */
tr.dl-late td { background: #FDECEA; }
tr.dl-soon td { background: #FFF6E5; }
:root[data-theme="dark"] tr.dl-late td { background: #3A1614; }
:root[data-theme="dark"] tr.dl-soon td { background: #33280F; }
.dl-b { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.dl-b.soon { background: #FDE7B3; color: #8A5A0B; }
.dl-b.late { background: #B3261E; color: #fff; }
.dl-amt { display: flex; gap: .4rem; }
.dl-amt input { width: 6rem; }
.dl-calc { background: var(--surface2); border: 1px solid var(--rule); border-radius: 8px; padding: .55rem .75rem; font-size: .86rem; }
.dl-calc ul { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .8rem; }
.dl-due strong { color: var(--rust); font-size: 1rem; }
.dl-close { display: grid; gap: .5rem; margin: .4rem 0 .8rem; }
.dl-close label { display: flex; gap: .5rem; align-items: baseline; cursor: pointer; }
.dash-dl h3 a { margin-left: auto; font-weight: 500; }
.dash-dl h3 { display: flex; align-items: center; gap: .5rem; }
.dash-dl .dl-b { margin-left: auto; }

/* Határidőnapló: irodai áttekintés, eszközök, Pandexa-kigyűjtés */
.dl-whobar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .7rem; }
.dl-who { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .25rem .75rem; font: inherit; font-size: .84rem; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.dl-who.on { border-color: var(--rust); color: var(--rust); background: var(--btn-hover); font-weight: 600; }
.dl-who b { font-weight: 700; }
.count .dl-tools { float: right; display: inline-flex; gap: .4rem; }
.count .dl-tools .btn { padding: .2rem .65rem; font-size: .8rem; }
.dl-found { display: grid; gap: .6rem; }
.dl-item { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .9rem; background: var(--surface2); }
.dl-item > div { flex: 1; min-width: 0; }
.dl-basis { font-size: .8rem; color: var(--muted); margin-top: .25rem; font-style: italic; }
/* Naptár: határidő-napok kiemelése */
.cal-cell.has-dl { box-shadow: inset 0 0 0 2px #B3261E; }
.cal-dl-flag { font-size: .8rem; }
.cal-ev.cal-dl { font-weight: 700; }
.cal-ev.cal-dl.late { background: repeating-linear-gradient(135deg, #B3261E 0 8px, #8E1C16 8px 16px) !important; }

/* JÜB-ellenőrzés */
.dl-b.ok { background: #E3F4E8; color: #166534; }
.id-kind { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.id-kind label, .id-cases label { display: flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .9rem; }
.id-cases { display: grid; gap: .3rem; max-height: 9rem; overflow-y: auto; border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .7rem; }
.id-rec { border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .7rem; background: var(--surface2); }
.id-rec-h { margin-bottom: .45rem; }
.id-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .35rem .9rem; font-size: .86rem; }
.id-f span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.id-f.changed { background: #FFF6E5; border-radius: 6px; padding: .15rem .35rem; }
.id-f small { display: block; color: #8A5A0B; font-size: .74rem; }
/* GDPR */
.gdpr-list { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .86rem; color: var(--muted); display: grid; gap: .35rem; }
.gdpr-tool { max-width: none; }
/* GDPR: a négy tájékoztató panel egyforma rácsban, egyenlő térközökkel */
.gdpr .panel-cols { columns: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
@media (min-width: 1600px) { .gdpr .panel-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gdpr .panel-cols { grid-template-columns: 1fr; } }
.gdpr .panel-cols > .panel { margin: 0; display: block; }
.gdpr-bulk { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: #FFF6E5; border: 1px solid #F0D9B5; border-radius: 8px; padding: .55rem .8rem; margin: .4rem 0 .8rem; }

/* Munkaszüneti napok a naptárban és az ablakban */
.cal-cell.hol { background: color-mix(in srgb, #B3261E 7%, var(--content)); }
.cal-pub { display: block; font-size: .68rem; font-weight: 600; line-height: 1.2; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pub.off { color: #B3261E; }
.cal-pub.work { color: #1E6B3A; }
.lg-hol { background: color-mix(in srgb, #B3261E 25%, transparent) !important; border: 1px solid #B3261E; }
.pub-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: .6rem; }
.pub-nav strong { font-size: 1.15rem; min-width: 3.5rem; text-align: center; }
.pub-next { background: color-mix(in srgb, #B3261E 8%, transparent); border-radius: 8px; padding: .45rem .7rem; margin: 0 0 .6rem; }
.pub-tbl { width: 100%; border-collapse: collapse; }
.pub-tbl th, .pub-tbl td { padding: .35rem .5rem; border-bottom: 1px solid var(--line, #e6e0da); text-align: left; }
.pub-tbl tr.past td { opacity: .5; }
.pub-b { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .08rem .55rem; }
.pub-b.off { background: #FBE3E1; color: #8C1D18; }
.pub-b.work { background: #DDF2E3; color: #1E6B3A; }

/* Pandexa forráskártya: njt / Kúria / Jogtár linkek */
.law-links { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .3rem; }
.law-links .jt-link { color: #1A5FB4; }
label.chk { display: flex; gap: .5rem; align-items: center; margin: .4rem 0; cursor: pointer; }

/* Pandexa „Mit tud?” — kiemelt (új) képesség, a teljes szélességben */
.ai-caps li.cap-hl { grid-column: 1 / -1; background: color-mix(in srgb, #C9A227 16%, transparent); border-left: 3px solid #C9A227;
    border-radius: 6px; padding: .4rem .6rem .4rem 1.6rem; margin-bottom: .25rem; }
.ai-caps li.cap-hl::before { left: .5rem; top: .4rem; color: #8A6D0B; }
.cap-new { display: inline-block; font-size: .65rem; font-weight: 800; letter-spacing: .04em; background: #AA0000; color: #fff; border-radius: 4px; padding: .05rem .35rem; vertical-align: 1px; }

/* Iratbeolvasás */
.scan-wrap { display: grid; gap: 1rem; }
.scan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.scan-src { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; background: var(--content); }
.scan-src.ok { border-color: #8CC79B; }
.scan-src-h { display: flex; align-items: center; gap: .45rem; margin-bottom: .45rem; }
.scan-src .pill { font-size: .7rem; border-radius: 999px; padding: .05rem .5rem; background: #EEE; color: #555; }
.scan-src .pill.ok, .pill.ok { background: #DDF2E3; color: #1E6B3A; }
.scan-opts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .3rem 0 .5rem; }
.scan-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.scan-steps { margin: .3rem 0 0; padding-left: 1.2rem; }
.scan-steps li { margin: .25rem 0; }
.scan-pages { display: flex; flex-wrap: wrap; gap: .7rem; margin: .9rem 0 .3rem; }
.scan-pg { margin: 0; width: 140px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.scan-pg img { display: block; width: 100%; height: 180px; object-fit: contain; background: #F4F1EE; }
.scan-pg figcaption { font-size: .75rem; text-align: center; padding: .2rem; color: #555; }
.scan-pg-act { display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.scan-pg-act button { flex: 1; border: 0; background: none; padding: .3rem 0; cursor: pointer; font-size: .85rem; }
.scan-pg-act button:hover:not(:disabled) { background: #F4EDE8; }
.scan-pg-act button:disabled { opacity: .3; cursor: default; }
.scan-form { margin-top: .6rem; }
.scan-list-h { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.scan-list-h .search { max-width: 340px; }
.scan-text { font-family: Consolas, 'Courier New', monospace; font-size: .85rem; width: 100%; }
.scan-wrap > .panel { max-width: 1280px; margin: 0; }
.sc-ico { flex: none; vertical-align: -3px; }
.scan-src-h .sc-ico { color: var(--rust, #AA0000); }
.btn .sc-ico, .editbtn .sc-ico, .scan-pg-act .sc-ico { width: 15px; height: 15px; }
.scan-upd { background: #FFF6E0; border-radius: 6px; padding: .35rem .55rem; margin: 0 0 .5rem; }

/* Letétkezelés */
.esc-wrap { display: grid; gap: .9rem; }
.esc-body { display: grid; gap: .9rem; }   /* a fülek tartalma (szűrősáv + lista) ugyanakkora térközzel */
.esc-sum { display: grid; grid-template-columns: repeat(3, minmax(150px, 220px)) 1fr; gap: .7rem; align-items: stretch; }
.esc-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .9rem; display: flex; flex-direction: column; }
.esc-card span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.esc-card strong { font-size: 1.35rem; }
.esc-card.warn strong { color: #B3261E; }
.esc-note { align-self: center; }
.esc-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.esc-bar .search { max-width: 320px; }
.esc-list { max-width: none; margin: 0; }
.esc-warn-badge { background: #FDECEA; color: #8C1D18; border-radius: 999px; padding: .1rem .5rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.esc-unrep { color: #8C1D18; }
.esc-warns { background: #FFF6E0; border: 1px solid #F0D58C; border-radius: 8px; padding: .5rem .8rem; margin-bottom: .8rem; font-size: .88rem; display: grid; gap: .2rem; }
.esc-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem .9rem; }
.esc-head > div span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.esc-h { margin: 1.1rem 0 .4rem; }
.esc-moves td.neg { color: #8C1D18; }
.esc-add { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; align-items: center; }
.esc-add input[type=number] { width: 150px; } .esc-add input[type=text] { flex: 1; min-width: 160px; }
.esc-elny { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; background: #F4EFEA; border-radius: 8px; padding: .5rem .7rem; margin-top: .6rem; font-size: .88rem; }
.esc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; justify-content: flex-end; }
@media (max-width: 800px) { .esc-sum { grid-template-columns: 1fr 1fr; } .esc-note { grid-column: 1 / -1; } }
.esc-add > select, .esc-add > input, .esc-elny > input { width: auto; margin: 0; }
.esc-add > input[type=text] { flex: 1 1 180px; }
.esc-elny > input[type=text] { flex: 1 1 200px; }

/* Feladatkezelő */
.tk-prio { font-size: .7rem; font-weight: 700; color: #8C1D18; background: #FDECEA; border-radius: 999px; padding: .05rem .45rem; vertical-align: 1px; }
.tk-desc { max-width: 420px; }
select.tk-st { width: auto; min-width: 118px; padding: .2rem .4rem; font-size: .85rem; border-radius: 6px; }
select.tk-st-doing { background: #E8F0FB; } select.tk-st-waiting { background: #FFF6E0; }
select.tk-st-done { background: #DDF2E3; } select.tk-st-cancelled { background: #EEE; color: #666; }

/* A dátummező naptár-ikonja a mező magasságához igazodjon; a sorban álló (nem űrlap-rácsban lévő) mezők ne nyúljanak teljes szélességre. */
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
.cal-bar input, .esc-add input, .esc-elny input, .scan-opts select { width: auto; }

/* Eseménynapló: teljes szélesség, a képernyő magasságáig görgethető */
.panel.evlog { max-width: none; }
.evlog-wrap { max-height: calc(100vh - 290px); min-height: 320px; }
.evlog-wrap td { vertical-align: top; }
.evlog-wrap td.muted { min-width: 220px; }
/* Font Awesome ikonok a gombokban, fülekben */
.btn .fa-solid, .subtab .fa-solid, .editbtn .fa-solid, .tts-btn .fa-solid { margin-right: .2rem; }
.subtab .fa-solid { opacity: .75; }
.ai-tab-ic .fa-solid { font-size: 1.15rem; }
.ver-ico .fa-solid { opacity: .6; }
.cal-ev .fa-solid { font-size: .72em; margin-right: .15rem; }
/* Háttérfolyamatok (Admin) */
.jobs { display: grid; gap: .8rem; max-width: 1280px; }
.job { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: .8rem 1rem; }
.job-h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.job-h h4 { margin: 0; font-size: 1rem; }
.job-h .spacer { flex: 1; }
.job-st { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .1rem .55rem; background: #EEE; color: #555; }
.job-st.ok { background: #DDF2E3; color: #1E6B3A; } .job-st.run { background: #E8F0FB; color: #1A4D8F; }
.job-st.err { background: #FDECEA; color: #8C1D18; } .job-st.idle { background: #F4F1EE; color: #6B5E55; }
.job-desc { margin: .3rem 0 .5rem; }
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .3rem 1.2rem; font-size: .86rem; }
.job-grid span { color: var(--muted); display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }
.job-err { color: #8C1D18; background: #FDECEA; border-radius: 6px; padding: .35rem .55rem; margin-top: .5rem; font-size: .85rem; }
.job-sub { margin-top: .5rem; font-size: .82rem; }
.job-sub table td, .job-sub table th { padding: .2rem .5rem; }

/* Admin felhasználólista: iroda + szerep soronként egymás mellé igazítva */
.ofc-line { min-height: 1.7rem; display: flex; align-items: center; line-height: 1.25; }
.role-pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; border-radius: 999px; padding: .12rem .6rem; text-transform: uppercase; }
.role-pill.role-admin { background: #7A1F1F; color: #fff; }
.role-pill.role-tag { background: #E7E1DB; color: #5A4C42; }
tr.usr-inactive td { opacity: .55; }
tr.usr-inactive td:last-child { opacity: 1; }
.acc-acts { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .6rem .8rem; border: 1px solid var(--rule); border-radius: 8px; margin-bottom: .6rem; }
.acc-acts.danger-zone { border-color: #E9B9B5; background: #FDF4F3; }
.acc-acts .btn { flex: none; }

/* Diktálás: felvétel közben piros, lüktető gomb */
#aiMic.rec { background: #B3261E; color: #fff; border-color: #B3261E; animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, .18); } }

/* Pandexa: mentett beszélgetések oszlop */
.ai-ask.has-hist { grid-template-columns: 240px minmax(0, 1.5fr) minmax(0, 1fr); }
.ai-hist { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: .7rem; display: flex; flex-direction: column; gap: .45rem; max-height: 100%; min-height: 0; }
.ai-hist-new { width: 100%; justify-content: center; }
.ai-hist-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .3rem; }
.ai-hist-list { overflow-y: auto; display: grid; gap: .25rem; align-content: start; min-height: 0; }
.ai-hist-item { padding: .45rem .55rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.ai-hist-item:hover { background: var(--surface2); }
.ai-hist-item.on { background: color-mix(in srgb, var(--rust) 9%, transparent); border-color: color-mix(in srgb, var(--rust) 30%, transparent); }
.ai-hist-t { font-size: .86rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-hist-m { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; margin-top: .15rem; }
.ai-hist-acts { margin-left: auto; display: none; gap: .1rem; }
.ai-hist-item:hover .ai-hist-acts, .ai-hist-item.on .ai-hist-acts { display: inline-flex; }
.ai-hist-acts button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: .1rem .25rem; border-radius: 4px; }
.ai-hist-acts button:hover { color: var(--rust); background: var(--surface2); }
@media (max-width: 1300px) { .ai-ask.has-hist { grid-template-columns: 210px minmax(0, 1fr); } .ai-ask.has-hist .ai-sources { grid-column: 1 / -1; } }
@media (max-width: 1000px) { .ai-ask.has-hist { grid-template-columns: 1fr; } .ai-hist { max-height: 220px; } }
.main.ai-fill .ai-ask.has-hist .ai-hist { align-self: stretch; }
.ofc-line { white-space: nowrap; }

/* Kiválasztott ügyfél / ügy: a fejléc gombjai (törlés) és a kiemelt sor */
.selchips { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.selchips:empty { display: none; }
.selchip { display: inline-flex; align-items: center; gap: .4rem; max-width: 260px; padding: .3rem .6rem; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--rust) 40%, transparent); background: color-mix(in srgb, var(--rust) 9%, var(--surface)); color: var(--ink); font: inherit; font-size: .82rem; }
.selchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selchip .fa-xmark { color: var(--muted); }
.selchip:hover { border-color: var(--rust); }
.selchip:hover .fa-xmark { color: var(--rust); }
tbody tr.click.picked td { background: color-mix(in srgb, var(--rust) 10%, transparent); }
tbody tr.click.picked td:first-child { box-shadow: inset 3px 0 0 var(--rust); }
.modal-foot .btn-del { color: #B70000; border-color: color-mix(in srgb, #B70000 45%, transparent); }
.modal-foot .btn-del:hover { background: #B70000; color: #fff; }

/* Generátor: kimenet formátuma (Word / egyszerű szöveg) */
.ai-fmt { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; font-size: .86rem; margin: .2rem 0 .1rem; }
.ai-fmt-l { color: var(--muted); font-weight: 600; }
.ai-fmt label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.ai-fmt input { width: auto; margin: 0; }
.ai-actions { flex-wrap: wrap; }

/* Teendők és határidők iratból: áttekintő pipás lista */
.da-h { font-size: .95rem; margin: 1rem 0 .4rem; display: flex; align-items: center; gap: .45rem; }
.da-h .muted { font-weight: 400; font-size: .82rem; }
.da-list { display: grid; gap: .45rem; }
.da-item { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.da-item:has(.da-chk:not(:checked)) { opacity: .55; }
.da-item.done { opacity: .5; border-style: dashed; }
.da-chk { width: 18px !important; height: 18px; margin-top: .45rem; flex: none; accent-color: var(--rust); }
.da-main { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.da-title { width: 100%; font-weight: 600; }
.da-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; font-size: .84rem; }
.da-meta label { display: inline-flex; align-items: center; gap: .4rem; }
.da-meta input[type=date] { width: auto; }
#extraBtn i { margin-right: .15rem; }

/* Letét: fülek (letétek / ügyfelenként / tranzakciók), gyorsgombok, tranzakciószűrő */
.esc-tabs { display: flex; align-items: center; gap: .3rem; border-bottom: 1px solid var(--rule); margin: 0; }
.esc-tab { border: 0; background: none; font: inherit; padding: .55rem .9rem; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center; }
.esc-tab:hover { color: var(--ink); }
.esc-tab.on { color: var(--rust); border-bottom-color: var(--rust); font-weight: 600; }
.esc-tabs .btn { margin-bottom: .35rem; }
.esc-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .8rem 0 .4rem; }
.esc-quick .muted { margin-left: auto; }
.esc-mf { flex-wrap: wrap; gap: .5rem .9rem; }
.esc-mf label { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; }
.esc-mf select, .esc-mf input[type=date] { width: auto; }
.esc-msum { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; margin: .6rem 0; }
.esc-list tfoot td { border-top: 2px solid var(--rule); }
td.neg, .num.neg { color: #B70000; }
.btn.btn-sm { padding: .25rem .55rem; font-size: .8rem; }
