/* agendyApp -- customer-dashboard app-shell (pixel, phase 2a). Auto-loaded on the dashboard
   only (not the public site's custom.css) -- see modules/agendyApp/template/app.tpl.
   HG portalApp.css layout pattern, Agendy brand tokens. Markup/class-names are
   CONTRACT-STABLE (kipp) -- this file only draws states, never adds new selectors
   the template doesn't already have. */

:root {
    --agendy-primary: #292dc2;
    --agendy-secondary: #0084e9;
    --agendy-ink: #1f194c;
    --agendy-body: #575a7b;
    --agendy-line: #ececf6;
    --agendy-bg: #f8f9fc;
    --agendy-font-head: 'Poppins', sans-serif;
}

body { margin: 0; background: var(--agendy-bg); color: var(--agendy-body); font-family: var(--agendy-font-head); }

.agendy-app { display: flex; min-height: 100vh; align-items: stretch; }

/* ---- sidebar ---- */
.agendy-app__sidebar {
    width: 260px; flex-shrink: 0; box-sizing: border-box;
    background: var(--agendy-ink); color: #fff;
    display: flex; flex-direction: column;
    padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.agendy-app__logo,
.agendy-app__topbar-logo {
    font-family: var(--agendy-font-head); font-weight: 700; font-size: 1.3rem;
    color: #fff !important; text-decoration: none; letter-spacing: -0.02em;
    display: flex; align-items: center;
}
.agendy-app__logo { padding: 6px 8px 24px; }
.agendy-app__topbar-logo { gap: 8px; }

/* logo-inline.svg is drawn for a light background (dark "Agendy" wordmark, dark-ink icon
   text) -- both mounts here sit on the dark --agendy-ink sidebar/topbar, so the wordmark
   text needs to flip to white or it's invisible; the primary-blue icon chip stays as-is
   (already reads fine against the darker ink). */
.agendy-app__logo svg,
.agendy-app__topbar-logo svg { height: 28px; width: auto; flex-shrink: 0; }
.agendy-app__logo svg text,
.agendy-app__topbar-logo svg text { fill: #fff; }

.agendy-app__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.agendy-app__navlink {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 10px;
    color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 500; font-size: .95rem;
    transition: background .15s ease, color .15s ease;
}
.agendy-app__navlink:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.agendy-app__navlink.is-active { background: var(--agendy-primary); color: #fff; }

/* not-yet-built nav destinations -- visible in the shell, not clickable */
.agendy-app__navlink.is-soon { cursor: default; }
.agendy-app__navlink.is-soon:hover { background: none; color: rgba(255, 255, 255, .75); }
.agendy-app__soon {
    margin-left: auto; font-style: normal; font-size: .66rem; font-weight: 600; letter-spacing: .3px;
    text-transform: uppercase; background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85);
    padding: 2px 8px; border-radius: 20px; flex-shrink: 0;
}

/* ---- user box (sidebar bottom) ---- */
.agendy-app__userbox {
    display: flex; align-items: center; gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 14px; margin-top: 14px;
}
.agendy-app__avatar {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    background: var(--agendy-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.agendy-app__username {
    flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agendy-app__logout {
    color: rgba(255, 255, 255, .65); text-decoration: none; padding: 8px 9px; border-radius: 8px; flex-shrink: 0;
    font-size: .85rem; font-weight: 500;
}
.agendy-app__logout:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---- content ---- */
.agendy-app__content { flex: 1; min-width: 0; padding: 32px 36px; }

/* ---- topbar (mobile only -- logo + hamburger, hidden on desktop) ---- */
.agendy-app__topbar {
    display: none;
    align-items: center; justify-content: space-between;
    background: var(--agendy-ink); color: #fff;
    padding: 14px 16px;
    position: sticky; top: 0; z-index: 30;
}
.agendy-app__hamburger {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    background: rgba(255, 255, 255, .1); border: 0; border-radius: 10px; cursor: pointer;
    order: 2;
}
.agendy-app__hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

/* ---- backdrop (mobile drawer overlay) ---- */
.agendy-app__backdrop {
    position: fixed; inset: 0; z-index: 39;
    background: rgba(9, 14, 42, .45);
    opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.agendy-app__backdrop.is-open { opacity: 1; visibility: visible; }

@media (max-width: 991px) {
    .agendy-app__topbar { display: flex; }
    .agendy-app { flex-direction: column; }

    .agendy-app__sidebar {
        position: fixed; top: 0; left: 0; z-index: 40;
        width: 280px; max-width: 82vw; height: 100vh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 0 30px rgba(9, 14, 42, .25);
    }
    .agendy-app__sidebar.is-open { transform: translateX(0); }

    .agendy-app__content { padding: 22px 16px; }
}

/* ---- shared panel chrome (dashboard content cards) ---- */
.agendy-panel { max-width: 1080px; }
.agendy-panel--narrow { max-width: 640px; }
.agendy-panel__head { margin-bottom: 1.75rem; }
.agendy-panel__title { color: var(--agendy-ink); font-weight: 600; font-size: 1.4rem; margin: 0; }
.agendy-panel__intro { color: var(--agendy-body); font-size: .9rem; margin: -1.25rem 0 1.5rem; max-width: 60ch; }

/* ---- save-result message ---- */
.agendy-msg {
    padding: .8rem 1.1rem; border-radius: 10px; font-size: .9rem; font-weight: 500;
    margin-bottom: 1.25rem;
}
.agendy-msg--ok { background: #e7f8ec; color: #1a7a3d; }
.agendy-msg--err { background: #fdecec; color: #c0392b; }

/* ---- profile form ---- */
.agendy-profil {
    background: #fff;
    border: 1px solid var(--agendy-line);
    border-radius: 16px;
    box-shadow: 0 5px 10px rgba(0, 9, 128, 0.035), 0 7px 18px rgba(0, 9, 128, 0.05);
    padding: 2rem;
}
.agendy-profil__row { display: flex; gap: 12px; }
.agendy-profil__row > .agendy-field { flex: 1; min-width: 0; }
.agendy-profil__save {
    background: var(--agendy-primary);
    background: linear-gradient(-45deg, #292dc2, #0084e9);
    color: #fff;
    border: 0;
    border-radius: 30px;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    margin-top: .5rem;
}
.agendy-profil__save:hover { opacity: .9; }

/* ---- form fields (dashboard-own, does not share restAgendyOnboarding's classes) ---- */
.agendy-field { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 6px; }
.agendy-field__label { color: var(--agendy-ink); font-weight: 500; font-size: .9rem; }
.agendy-field__req { color: #c0392b; font-weight: 700; }
.agendy-field__input {
    padding: 12px 14px;
    border: 1px solid #dcdcec;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s ease;
}
.agendy-field__input:focus { outline: none; border-color: var(--agendy-primary); }
.agendy-field__input:disabled { background: var(--agendy-bg); color: var(--agendy-body); cursor: not-allowed; }
select.agendy-field__input { cursor: pointer; }
textarea.agendy-field__input { resize: vertical; min-height: 64px; }
.agendy-field__hint { color: var(--agendy-body); font-size: 12.5px; }

/* ---- buttons (dashboard-own) ---- */
.agendy-btn {
    background: var(--agendy-primary);
    background: linear-gradient(-45deg, #292dc2, #0084e9);
    color: #fff; border: 0; border-radius: 30px;
    padding: 11px 22px; font-size: 14px; font-weight: 600; letter-spacing: .3px;
    font-family: inherit; cursor: pointer; transition: opacity .2s ease;
}
.agendy-btn:hover { opacity: .9; }
.agendy-btn:disabled { opacity: .5; cursor: not-allowed; }
.agendy-btn--sm { padding: 8px 16px; font-size: 13px; }
.agendy-btn--ghost { background: none; color: var(--agendy-body); border: 1px solid #dcdcec; }
.agendy-btn--ghost:hover { background: var(--agendy-bg); opacity: 1; color: var(--agendy-ink); }
.agendy-btn--icon {
    background: none; color: var(--agendy-body); border: 1px solid #dcdcec; border-radius: 8px;
    padding: 6px 12px; font-size: 13px; font-weight: 500;
}
.agendy-btn--icon:hover { background: var(--agendy-bg); color: var(--agendy-ink); opacity: 1; }
.agendy-btn--danger:hover { border-color: #f0b4b4; color: #c0392b; background: #fdf0f0; }
/* full (non-icon) danger button: red outline at rest so a destructive action reads clearly */
.agendy-btn--sm.agendy-btn--danger { background: #fff; color: #c0392b; border: 1px solid #f0b4b4; }
.agendy-btn--sm.agendy-btn--danger:hover { background: #fdf0f0; color: #c0392b; opacity: 1; }

/* ---- 2b Törzsadatok client-side tabs ---- */
.agendy-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--agendy-line); margin-bottom: 2rem;
}
.agendy-tab {
    appearance: none; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: .95rem; font-weight: 600; color: var(--agendy-body);
    padding: .7rem 1.15rem; margin-bottom: -1px;
    border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s, background .15s;
}
.agendy-tab:hover { color: var(--agendy-ink); background: var(--agendy-bg); }
.agendy-tab.is-active { color: var(--agendy-primary); border-bottom-color: var(--agendy-primary); }
.agendy-tab-panel[hidden] { display: none; }
.agendy-tab-panel .agendy-crud { margin-bottom: 0; }

/* ---- 2b Törzsadatok CRUD blocks ---- */
.agendy-crud { margin-bottom: 2.5rem; }
.agendy-crud__head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
}
.agendy-crud__title { color: var(--agendy-ink); font-weight: 600; font-size: 1.1rem; margin: 0; }
.agendy-crud__list {
    background: #fff; border: 1px solid var(--agendy-line); border-radius: 16px;
    box-shadow: 0 5px 10px rgba(0, 9, 128, 0.035), 0 7px 18px rgba(0, 9, 128, 0.05);
    padding: .5rem 1.5rem;
}
.agendy-crud__hint { color: var(--agendy-body); text-align: center; padding: 1.75rem 0; margin: 0; }
.agendy-crud__row {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 0; border-bottom: 1px solid var(--agendy-line);
}
.agendy-crud__row:last-child { border-bottom: 0; }
.agendy-crud__body { flex: 1; min-width: 0; }
.agendy-crud__name { color: var(--agendy-ink); font-weight: 600; font-size: .98rem; }
.agendy-crud__sub { color: var(--agendy-body); font-size: .82rem; margin-top: 2px; }
.agendy-crud__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.agendy-crud__actions { display: flex; gap: 8px; flex-shrink: 0; }
.agendy-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: .72rem; font-weight: 600; letter-spacing: .2px;
    background: var(--agendy-line); color: var(--agendy-body); white-space: nowrap;
}
.agendy-badge--brand { background: #e8eefc; color: var(--agendy-primary); }
.agendy-badge--ok    { background: #e4f6ec; color: #1a7a44; }
.agendy-badge--warn  { background: #fdf2dc; color: #9a6a12; }
.agendy-badge--err   { background: #fce6e6; color: #b3261e; }
.agendy-badge--muted { background: var(--agendy-line); color: var(--agendy-body); }

/* ---- naptar "Ertesitesek" tab (per-calendar notification-template override, kipp) ---- */
.agendy-notif-row {
    border: 1px solid var(--agendy-line); border-radius: 10px; padding: 14px;
    margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px;
}
.agendy-notif-row__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.agendy-notif-row__title { font-weight: 600; color: var(--agendy-ink); font-size: .92rem; margin-right: auto; }
.agendy-notif-row__subject { width: 100%; }
.agendy-notif-row__body { width: 100%; resize: vertical; font-family: inherit; }
.agendy-notif-row__foot { display: flex; gap: 8px; }

/* Roland scope-pontositas 2026-07-27: per-naptar emlekezteto-idozites + token-picker */
.agendy-notif-remind { border: 1px solid var(--agendy-line); border-radius: 10px; padding: 14px; margin-bottom: 14px; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.agendy-notif-remind__input { width: 90px; }
.agendy-notif-tokens { margin-bottom: 12px; }
.agendy-notif-tokens__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.agendy-notif-tokens__chip {
    border: 1px solid var(--agendy-line); background: var(--agendy-surface, #fff); border-radius: 999px;
    padding: 4px 10px; font-size: .8rem; color: var(--agendy-primary); cursor: pointer;
}
.agendy-notif-tokens__chip:hover { background: #e8eefc; }
/* smaller switch variant for inline use inside a notif-row header (same markup shape as .agendy-switch) */
.agendy-switch--sm .agendy-switch__slider { width: 32px; height: 18px; }
.agendy-switch--sm .agendy-switch__slider::after { width: 14px; height: 14px; }
.agendy-switch--sm input:checked + .agendy-switch__slider::after { transform: translateX(14px); }
.agendy-switch--sm .agendy-switch__label { font-size: .82rem; }

/* card 9770f96d: event-tabs inside the "Ertesitesek" tab (rogzites/torles/emlekezteto/aftercare) --
   same visual language as .agendy-tabs/.agendy-tab (the outer naptar-editor tabs), a size step down
   since this is a NESTED tab-set, and its own class so the two tab levels' JS selectors never collide. */
.agendy-notif-etabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--agendy-line); margin-bottom: 1rem; }
.agendy-notif-etab {
    appearance: none; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: .85rem; font-weight: 600; color: var(--agendy-body);
    padding: .5rem .85rem; margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.agendy-notif-etab:hover { color: var(--agendy-ink); background: var(--agendy-bg); }
.agendy-notif-etab.is-active { color: var(--agendy-primary); border-bottom-color: var(--agendy-primary); }
.agendy-notif-etab-panel[hidden] { display: none; }

/* ---- szamlaim (invoices) read-only list: reuse agendy-crud rows + a right-aligned amount ---- */
.agendy-invoices__right { flex-direction: column; align-items: flex-end; gap: 6px; }
.agendy-invoices__amount { color: var(--agendy-ink); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
@media (max-width: 575px) {
    .agendy-invoices__right { flex-direction: row; align-items: center; justify-content: space-between; }
}
.agendy-crud--soon .agendy-crud__list,
.agendy-crud--soon { opacity: .75; }
.agendy-crud--soon .agendy-crud__hint {
    background: #fff; border: 1px dashed #d5d8ea; border-radius: 16px; padding: 1.5rem;
}

/* ---- modal (add/edit) ----
   TOP-ALIGNED, not vertically centred (Roland 3946). Centred, a modal whose body changes height --
   switching a tab inside it, revealing an error row -- moves the WHOLE dialog, so the control you
   were aiming at slides out from under the cursor. Anchored to the top, only the bottom edge moves.
   The backdrop is position:fixed, so scrolling the overlay never leaves the page unmasked. */
.agendy-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem 1rem; overflow-y: auto; }
.agendy-modal[hidden] { display: none; }
/* fixed, not absolute: the overlay itself can now scroll (a tall top-aligned dialog), and an
   absolute backdrop would scroll away with it and leave the page unmasked underneath */
.agendy-modal__backdrop { position: fixed; inset: 0; background: rgba(9, 14, 42, .5); }
.agendy-modal__dialog {
    position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(9, 14, 42, .3); padding: 1.75rem;
}
.agendy-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.agendy-modal__title { color: var(--agendy-ink); font-weight: 600; font-size: 1.2rem; margin: 0; }
.agendy-modal__x { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--agendy-body); cursor: pointer; padding: 0 4px; }
.agendy-modal__x:hover { color: var(--agendy-ink); }
.agendy-modal__row { display: flex; gap: 12px; }
.agendy-modal__row > .agendy-field { flex: 1; min-width: 0; }
.agendy-modal__err { margin: 0 0 1rem; }
.agendy-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: .5rem; }
.agendy-modal__dialog--wide { max-width: 680px; }
/* card 9770f96d finomitas #5: a naptar-szerkeszto modal szelesebb, hogy ahol a kepernyo-szelesseg
   engedi, az OSSZES kulso tab (Alapadatok/Felhasznalok/Rendelesi idok/Szolgaltatasok/Ertesitesek)
   egymas melle ferjen -- felso korlat 80vw (Roland explicit kere), alatta a meglevo tordeles
   (agendy-tabs flex-wrap) marad, ami nem hiba. min() -> nagy kepernyon 1400px, kisebb ablakon a
   80vw viszi at a kordat. */
.agendy-modal__dialog--xwide { max-width: min(1400px, 80vw); }

/* [hidden]-guards: .agendy-tabs is display:flex + .agendy-btn/.agendy-tab set display, which override the
   UA [hidden]{display:none}. Restore hidden semantics so JS .hidden toggles actually hide these. */
.agendy-tabs[hidden], .agendy-tab[hidden], .agendy-btn[hidden], .agendy-field[hidden] { display: none !important; }

/* ---- Naptaraim UX-rework (07-22): empty-state + view/manage section + calendar picker + editor tabs ---- */
/* empty-state card (0 calendars: the only thing shown besides the section title) */
.agendy-empty {
    background: #fff; border: 1px dashed #d5d8ea; border-radius: 16px;
    padding: 2.5rem 1.5rem; text-align: center; margin-top: 1.5rem;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.agendy-empty[hidden] { display: none; }
.agendy-empty__title { color: var(--agendy-ink); font-weight: 600; font-size: 1.1rem; margin: 0; }
.agendy-empty__msg { color: var(--agendy-body); margin: 0 0 .75rem; }

/* section tab bar sits directly under the panel title -> tighten the gap */
[data-role="calendars-panel"] .agendy-tabs { margin-top: 1.25rem; margin-bottom: 0; }

/* calendar picker panel: a compact row -- title + the single selector, right-aligned */
.agendy-panel--picker { padding-top: 1.25rem; padding-bottom: 1.25rem; }
/* Roland #3: custom calendar-picker listbox -- wider control + "Megosztott" badge on shared calendars. */
.agendy-calview { position: relative; min-width: 300px; max-width: 420px; }
.agendy-calview__btn {
    display: flex; align-items: center; gap: .5rem; width: 100%; box-sizing: border-box;
    padding: .6rem .9rem; border: 1px solid var(--agendy-line); border-radius: 12px; background: #fff;
    color: var(--agendy-ink); font: inherit; font-size: .95rem; cursor: pointer; text-align: left;
}
.agendy-calview__btn:hover { border-color: var(--agendy-primary); }
.agendy-calview__btn[aria-expanded="true"] { border-color: var(--agendy-primary); box-shadow: 0 0 0 3px rgba(41, 45, 194, .12); }
.agendy-calview__label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agendy-calview__caret { flex: 0 0 auto; transform: rotate(90deg); color: var(--agendy-body); transition: transform .15s; font-size: 1.1rem; line-height: 1; }
.agendy-calview__btn[aria-expanded="true"] .agendy-calview__caret { transform: rotate(-90deg); }
.agendy-calview__badge { flex: 0 0 auto; }
.agendy-calview__menu {
    position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: .35rem;
    list-style: none; background: #fff; border: 1px solid var(--agendy-line); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(31, 25, 76, .12); max-height: 320px; overflow-y: auto;
}
.agendy-calview__opt {
    display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: 8px; cursor: pointer;
}
.agendy-calview__opt:hover { background: var(--agendy-bg); }
.agendy-calview__opt.is-selected { background: #e8eefc; color: var(--agendy-primary); font-weight: 600; }
.agendy-calview__optname { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agendy-week__calname { color: var(--agendy-body); font-weight: 500; font-size: .9rem; }

/* editor modal tab bar: a bit tighter than the full-page tabs */
.agendy-tabs--modal { margin-bottom: 1.25rem; }
.agendy-tabs--modal .agendy-tab { padding: .55rem .9rem; font-size: .9rem; }

/* ---- Felhasznalok panel (login sub-users + calendar-share modal) ---- */
.agendy-panel__lead { color: var(--agendy-body); margin: -1rem 0 1.5rem; max-width: 640px; }
.agendy-field__hint { color: var(--agendy-body); font-size: .82rem; margin: .25rem 0 0; }
.agendy-share__who { color: var(--agendy-body); font-weight: 500; font-size: .9rem; }
.agendy-share__row {
    display: flex; align-items: center; gap: 1rem;
    padding: .75rem 0; border-bottom: 1px solid var(--agendy-line);
}
.agendy-share__row:last-child { border-bottom: 0; }
.agendy-share__name { flex: 1; min-width: 0; color: var(--agendy-ink); font-weight: 500; font-size: .95rem; }
.agendy-share__role { width: 190px; flex-shrink: 0; }
@media (max-width: 575px) {
    .agendy-share__row { flex-direction: column; align-items: stretch; gap: .5rem; }
    .agendy-share__role { width: 100%; }
}

/* ---- calendar editor (c) time_window rows: per-row toggles (available + public) + add/edit form ---- */
.agendy-win__toggles { align-items: center; flex-wrap: wrap; gap: 10px; }
.agendy-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .82rem; color: var(--agendy-body); white-space: nowrap; }
.agendy-toggle__cb { width: 16px; height: 16px; accent-color: var(--agendy-primary); cursor: pointer; }
.agendy-toggle__lbl { font-weight: 500; }
.agendy-win-form { border-top: 1px solid var(--agendy-line); margin-top: 1rem; padding-top: 1rem; }
.agendy-win-form[hidden] { display: none; }
.agendy-check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--agendy-ink); font-weight: 500; margin: .25rem 0 1rem; cursor: pointer; }
.agendy-check input { width: 16px; height: 16px; accent-color: var(--agendy-primary); cursor: pointer; }

/* R2 #1: Naptarnezet al-tabsor (a section-tabsor alatt, kicsit halkabb) */
.agendy-tabs--sub { margin-top: 1.25rem; margin-bottom: 1.25rem; }
.agendy-vsub[hidden] { display: none !important; }

/* R2 #5: heti tobb-nap checkbox-sor (create) */
.agendy-weekdays { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 4px; }
.agendy-weekday { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--agendy-ink); cursor: pointer; }
.agendy-weekday__cb { width: 16px; height: 16px; accent-color: var(--agendy-primary); cursor: pointer; }

@media (max-width: 575px) {
    .agendy-profil { padding: 1.5rem; }
    .agendy-profil__row { flex-direction: column; gap: 0; }
    .agendy-crud__list { padding: .5rem 1rem; }
    .agendy-crud__row { flex-direction: column; align-items: stretch; gap: .75rem; }
    .agendy-crud__actions { justify-content: flex-end; }
    .agendy-modal__row { flex-direction: column; gap: 0; }
    .agendy-modal__dialog { padding: 1.25rem; }
    /* less headroom on a phone: 4vh of a short viewport is wasted, and the dialog is taller here */
    .agendy-modal { padding: 2vh .75rem 1rem; }
}

/* ---- 2b Naptaraim (my-bookings) list -- card + row grid, status badge.
   public.js renders .agendy-booking rows (time/service/customer/status) into .agendy-bookings. */
.agendy-bookings {
    background: #fff;
    border: 1px solid var(--agendy-line);
    border-radius: 16px;
    box-shadow: 0 5px 10px rgba(0, 9, 128, 0.035), 0 7px 18px rgba(0, 9, 128, 0.05);
    padding: .5rem 1.5rem;
}
.agendy-bookings__hint { color: var(--agendy-body); text-align: center; padding: 2rem 0; margin: 0; }
.agendy-booking {
    display: grid;
    grid-template-columns: minmax(150px, auto) 1fr minmax(120px, auto) minmax(120px, auto) minmax(110px, auto);   /* #3858-6: +phone col */
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--agendy-line);
}
.agendy-booking:last-child { border-bottom: 0; }
.agendy-booking__time { color: var(--agendy-ink); font-weight: 600; font-size: .95rem; }
.agendy-booking__service { color: var(--agendy-ink); }
.agendy-booking__customer { color: var(--agendy-body); }
.agendy-booking__phone { color: var(--agendy-body); }   /* #3858-6 */
.agendy-booking__status {
    justify-self: end;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .3px;
    background: var(--agendy-line);
    color: var(--agendy-body);
    white-space: nowrap;
}
/* Roland #status-colors: same lifecycle palette as the week grid (booked/activated/invoiced) */
.agendy-booking__status--booked    { background: #eef0f4; color: #475569; }
.agendy-booking__status--activated { background: #e6ecfa; color: #1e40af; }
.agendy-booking__status--invoiced  { background: #e7f8ec; color: #1a7a3d; }
.agendy-booking__status--confirmed { background: #eef0f4; color: #475569; }   /* legacy status fallback = booked */
.agendy-booking__status--completed { background: #e7f8ec; color: #1a7a3d; }   /* legacy = invoiced */
.agendy-booking__status--cancelled { background: #fdecec; color: #c0392b; }
.agendy-booking__status--no_show { background: #fdf3e3; color: #b7791f; }

@media (max-width: 575px) {
    .agendy-booking {
        grid-template-columns: 1fr auto;
        grid-template-areas: "time status" "service service" "customer customer" "phone phone";
        gap: .35rem 1rem;
    }
    .agendy-booking__time { grid-area: time; }
    .agendy-booking__status { grid-area: status; }
    .agendy-booking__service { grid-area: service; }
    .agendy-booking__customer { grid-area: customer; }
    .agendy-booking__phone { grid-area: phone; }
}

/* ---- 2b Naptarak: calendar assignee picker (modal checkbox list) ---- */
.agendy-modal__body { margin: 1rem 0; }
.agendy-assignees { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.agendy-assignee {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
    transition: background .12s ease;
}
.agendy-assignee:hover { background: var(--agendy-bg); }
.agendy-assignee__cb { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--agendy-primary); cursor: pointer; }
.agendy-assignee__name { flex: 1; min-width: 0; color: var(--agendy-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 2b Naptarak: HAVI kapacitas-nezet (month grid) ---- */
.agendy-panel__head--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.agendy-month__controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agendy-month__service { padding: 8px 12px; min-width: 180px; }
.agendy-month__nav { display: flex; align-items: center; gap: 6px; }
.agendy-month__label { min-width: 150px; text-align: center; font-weight: 600; color: var(--agendy-ink); text-transform: capitalize; }
.agendy-month { margin-top: .5rem; }
.agendy-month__weekdays, .agendy-month__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.agendy-month__weekdays { margin-bottom: 6px; }
.agendy-month__wd { text-align: center; font-size: .75rem; font-weight: 600; color: var(--agendy-body); text-transform: uppercase; letter-spacing: .3px; }
.agendy-month__cell {
    min-height: 64px; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px;
    border: 1px solid var(--agendy-line); background: #fff; position: relative; }
.agendy-month__cell--blank { background: transparent; border: 0; }
.agendy-month__cell--loading { background: var(--agendy-bg); }
.agendy-month__cell--clickable { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.agendy-month__cell--clickable:hover { box-shadow: 0 0 0 2px var(--agendy-primary) inset; }
.agendy-month__cell--free { border-color: #bfe6cd; background: #f2fbf5; }
.agendy-month__cell--low  { border-color: #f3ddb0; background: #fdf8ee; }
.agendy-month__cell--none { background: var(--agendy-bg); color: var(--agendy-body); }
/* R5#1: no window that day -> neutral empty cell (no free/full label), the day number dimmed */
.agendy-month__cell--empty { background: #fff; }
.agendy-month__cell--empty .agendy-month__num { color: var(--agendy-body); opacity: .55; }
/* R5#2/#3: closed day (company closed-day or opted-in HU holiday) -- muted red, 'Zárva' */
.agendy-month__cell--closed { background: #fbf0f0; border-color: #f0d5d5; }
.agendy-month__cell--closed .agendy-month__num { color: #b3261e; }
.agendy-month__cell--closed .agendy-month__free { color: #b3261e; font-weight: 600; }
.agendy-month__num { font-weight: 600; font-size: .9rem; color: var(--agendy-ink); }
.agendy-month__free { font-size: .74rem; font-weight: 600; }
.agendy-month__cell--free .agendy-month__free { color: #1a7a3d; }
.agendy-month__cell--low .agendy-month__free  { color: #b7791f; }
.agendy-month__cell--none .agendy-month__free { color: var(--agendy-body); }
.agendy-month__legend { display: flex; align-items: center; gap: 16px; margin-top: 1rem; font-size: .8rem; color: var(--agendy-body); flex-wrap: wrap; }
.agendy-month__dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--agendy-line); }
.agendy-month__dot--free { background: #f2fbf5; border-color: #bfe6cd; }
.agendy-month__dot--low  { background: #fdf8ee; border-color: #f3ddb0; }
.agendy-month__dot--none { background: var(--agendy-bg); }
/* 01121720 day-marks: "van rendeles" (opening hours cover the day) and "van foglalas" (at least one
   booking sits on it). Two small dots in the cell corner, deliberately NOT a background tint: the cell
   background already carries the capacity state, and a second tint on top would be unreadable. The
   SHAPE differs as well as the colour, so the two stay distinguishable in greyscale and for
   colour-blind users. */
.agendy-month__marks { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 3px; }
.agendy-month__mark { width: 7px; height: 7px; display: block; }
.agendy-month__mark--window  { background: var(--agendy-secondary); border-radius: 2px; }
.agendy-month__mark--booking { background: var(--agendy-primary);   border-radius: 50%; }
.agendy-month__legenditem { display: inline-flex; align-items: center; gap: 5px; }
.agendy-month__legendmark { width: 9px; height: 9px; display: inline-block; }
.agendy-month__legendmark--window  { background: var(--agendy-secondary); border-radius: 2px; }
.agendy-month__legendmark--booking { background: var(--agendy-primary);   border-radius: 50%; }
/* Roland #status-colors: week-view booking lifecycle legend (matches the __ev-- colours) */
.agendy-week__legend { display: flex; align-items: center; gap: 18px; margin-top: .9rem; font-size: .8rem; color: var(--agendy-body); flex-wrap: wrap; }
.agendy-week__legenditem { display: inline-flex; align-items: center; }
.agendy-week__legenddot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; border-left: 3px solid; }
.agendy-week__legenddot--booked    { background: #eef0f4; border-left-color: #64748b; }
.agendy-week__legenddot--activated { background: #e6ecfa; border-left-color: #1e40af; }
.agendy-week__legenddot--invoiced  { background: #e7f8ec; border-left-color: #1a7a3d; }
.agendy-week__legenddot--cancelled { background: #fdecec; border-left-color: #c0392b; }

@media (max-width: 575px) {
    .agendy-month__cell { min-height: 50px; padding: 5px; }
    .agendy-month__free { font-size: .66rem; }
    .agendy-month__service { min-width: 130px; }
}

/* ---- 2b Naptarak: HETI nezet (idotengelyes grid) ---- */
.agendy-week { margin-top: .5rem; overflow-x: auto; }
.agendy-week__wrap { display: flex; min-width: 720px; }
.agendy-week__gutter { flex: 0 0 52px; }
.agendy-week__corner { height: 46px; border-bottom: 1px solid var(--agendy-line); }
.agendy-week__hour { position: relative; box-sizing: border-box; }
.agendy-week__hourlabel { position: absolute; top: -8px; right: 8px; font-size: .7rem; color: var(--agendy-body); }
/* Roland #2: 15-min slots -- muted :15/:30/:45 quarter ticks (smaller, lighter than the hour label) */
.agendy-week__hourlabel--q { font-size: .6rem; color: #a6a9c2; }
.agendy-week__col { flex: 1 1 0; min-width: 88px; border-left: 1px solid var(--agendy-line); }
.agendy-week__colhead {
    height: 46px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; border-bottom: 1px solid var(--agendy-line);
}
.agendy-week__colhead.is-today { background: #eef0fe; }
/* R5#2/#3: closed day -- muted-red column head + faint red body wash */
.agendy-week__colhead.is-closed { background: #fbf0f0; }
.agendy-week__colhead.is-closed .agendy-week__wd { color: #b3261e; }
.agendy-week__col.is-closed .agendy-week__body { background: repeating-linear-gradient(45deg, rgba(179,38,30,.04), rgba(179,38,30,.04) 8px, transparent 8px, transparent 16px); }
.agendy-week__closed { font-size: .6rem; font-weight: 700; color: #b3261e; text-transform: uppercase; letter-spacing: .3px; }
.agendy-week__wd { font-size: .74rem; font-weight: 600; color: var(--agendy-ink); }
.agendy-week__date { font-size: .72rem; color: var(--agendy-body); }
.agendy-week__body { position: relative; overflow: hidden; }
.agendy-week__line { position: absolute; left: 0; right: 0; height: 1px; background: var(--agendy-line); }
/* Roland #2: fainter quarter-hour line (the :15/:30/:45 sub-slot dividers) */
.agendy-week__line--q { background: #f4f4fb; }
/* R3 #2a: opening-hours band (time_window) behind the booking blocks; click an empty spot -> mini-booker */
.agendy-week__window {
    position: absolute; left: 0; right: 0; box-sizing: border-box; z-index: 0;
    background: rgba(41, 45, 194, .06);
    border-top: 1px dashed rgba(41, 45, 194, .22); border-bottom: 1px dashed rgba(41, 45, 194, .22);
    cursor: pointer; transition: background .12s ease;
}
.agendy-week__window:hover { background: rgba(41, 45, 194, .11); }
.agendy-week__window--public { background: rgba(26, 122, 61, .08); border-color: rgba(26, 122, 61, .25); }
.agendy-week__window--public:hover { background: rgba(26, 122, 61, .14); }

/* R4 #1: hover-start-indicator -- a primary line with a time chip at the 5-min-snapped cursor row */
.agendy-week__hint {
    position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none;
    border-top: 2px solid var(--agendy-primary);
}
.agendy-week__hint-chip {
    position: absolute; top: -9px; left: 2px;
    background: var(--agendy-primary); color: #fff;
    font-size: .62rem; font-weight: 700; line-height: 1.35; white-space: nowrap;
    padding: 1px 5px; border-radius: 4px;
}

/* R4 #3: customer autocomplete results dropdown under the name field */
.agendy-field--autocomplete { position: relative; }
.agendy-autocomplete {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    background: #fff; border: 1px solid var(--agendy-line); border-radius: 10px;
    box-shadow: 0 10px 24px rgba(9, 14, 42, .12); margin-top: 4px; overflow: hidden; max-height: 240px; overflow-y: auto;
}
.agendy-autocomplete[hidden] { display: none; }
.agendy-autocomplete__item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: .6rem .85rem; cursor: pointer; border-bottom: 1px solid var(--agendy-line);
}
.agendy-autocomplete__item:last-child { border-bottom: 0; }
.agendy-autocomplete__item:hover, .agendy-autocomplete__item.is-active { background: var(--agendy-bg); }
.agendy-autocomplete__name { color: var(--agendy-ink); font-weight: 600; font-size: .9rem; }
.agendy-autocomplete__sub { color: var(--agendy-body); font-size: .8rem; }
.agendy-autocomplete__visits { color: var(--agendy-primary); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.agendy-autocomplete__new { color: var(--agendy-body); font-style: italic; }
.agendy-week__ev {
    position: absolute; left: 3px; right: 3px; box-sizing: border-box; z-index: 2;
    border-radius: 7px; padding: 3px 6px; overflow: hidden; cursor: pointer;
    border-left: 3px solid var(--agendy-primary); background: #eef0fe; color: var(--agendy-ink);
    display: flex; flex-direction: column; gap: 1px; font-size: .72rem; line-height: 1.15;
    transition: filter .12s ease, min-height .12s ease, box-shadow .12s ease;
}
/* Roland #17.7: a short (<30 min) slot is too low for Name/service/time -- on hover it grows to a 30-min
   height (48px @ PX_PER_MIN 1.6) as an OVERLAY (z-index up, overflow visible), without pushing the grid. */
.agendy-week__ev:hover { filter: brightness(.97); z-index: 6; min-height: 48px; overflow: visible; box-shadow: 0 4px 14px rgba(31, 25, 76, .18); }
/* Roland #17.6: block content order Name / service / time -- name is the primary (bold) line, time is muted last. */
/* Roland #17 refine: collapsed short block must CLIP cleanly, no line-crowding. flex:0 0 auto keeps each
   line at its natural height (no flex-shrink squeeze/overlap); the block's overflow:hidden clips whatever
   doesn't fit. The NAME is the first line and never shrinks -> always readable (nowrap + ellipsis); service
   and time show only if there is room. Hover-expand (min-height 48px) reveals everything, unchanged. */
.agendy-week__ev-name { flex: 0 0 auto; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agendy-week__ev-title { flex: 0 0 auto; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agendy-week__ev-time { flex: 0 0 auto; font-weight: 500; color: var(--agendy-body); white-space: nowrap; }
.agendy-week__ev-cust, .agendy-week__ev-asg { color: var(--agendy-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Roland #status-colors: booking lifecycle colour-coding (booked -> activated -> invoiced), consistent
   between the week grid and the Foglalasok list. booked=blue (waiting), activated=green (arrived),
   invoiced=violet (billed/done). Palette is a judgment call -> screenshot goes to Roland. */
/* Roland palette decision: Foglalt=grey, Megerkezett=dark-blue, Szamlazott=green, Lemondva=red (label stays "Szamlazott") */
.agendy-week__ev--booked    { border-left-color: #64748b; background: #eef0f4; }
.agendy-week__ev--activated { border-left-color: #1e40af; background: #e6ecfa; }
.agendy-week__ev--invoiced  { border-left-color: #1a7a3d; background: #e7f8ec; }
.agendy-week__ev--confirmed { border-left-color: #64748b; background: #eef0f4; }   /* legacy status fallback = booked */
.agendy-week__ev--completed { border-left-color: #1a7a3d; background: #e7f8ec; }   /* legacy = invoiced */
.agendy-week__ev--cancelled { border-left-color: #c0392b; background: #fdecec; text-decoration: line-through; opacity: .75; }
/* no_show = missed appointment: amber diagonal hatch (a non-colour cue, like cancelled's strikethrough)
   so it reads as "missed" and stays distinct from an active booking and from cancelled. */
.agendy-week__ev--no_show {
    border-left-color: #b7791f;
    background: repeating-linear-gradient(-45deg, #fdf3df, #fdf3df 5px, #f6e4bf 5px, #f6e4bf 10px);
    color: #7a5310;
}
.agendy-week__ev-head { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.agendy-week__ev-head .agendy-week__ev-time { flex: 0 0 auto; }
.agendy-week__ev-flag {
    flex: 0 1 auto; min-width: 0;
    font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
    color: #8a5a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- 2b Naptarak: foglalas-szerkeszto modal ---- */
.agendy-editor__summary { color: var(--agendy-body); font-size: .9rem; margin: -.25rem 0 .5rem; }
.agendy-editor__sub { color: var(--agendy-ink); font-size: .9rem; font-weight: 600; margin: 1.1rem 0 .6rem; }
.agendy-editor__sub:first-child { margin-top: 0; }
.agendy-editor__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.agendy-editor__row .agendy-field__input { flex: 1; min-width: 180px; }
.agendy-modal__foot--split { justify-content: space-between; }
/* left-hand action cluster in a split footer: the booking's own actions (cancel / activate / billing)
   stay together, while the neutral Close keeps the right edge (Roland 3946). Wraps on narrow screens
   instead of pushing Close off the dialog. */
.agendy-modal__foot-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- R7 recurring bookings: toggle switch, series-confirm list, series-scope dialog ---- */
.agendy-field--toggle { margin-top: .75rem; }
.agendy-switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.agendy-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.agendy-switch__slider {
    position: relative; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 22px;
    background: var(--agendy-line); transition: background .18s ease;
}
.agendy-switch__slider::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(31, 25, 76, .28); transition: transform .18s ease;
}
.agendy-switch input:checked + .agendy-switch__slider { background: var(--agendy-primary); }
.agendy-switch input:checked + .agendy-switch__slider::after { transform: translateX(18px); }
.agendy-switch input:focus-visible + .agendy-switch__slider { outline: 2px solid var(--agendy-secondary); outline-offset: 2px; }
.agendy-switch__label { font-size: .9rem; color: var(--agendy-ink); font-weight: 500; }

.agendy-book__recur { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--agendy-line); }
.agendy-book__recur .agendy-modal__row { margin-top: .7rem; }

.agendy-recur__summary { color: var(--agendy-body); font-size: .9rem; margin: 0 0 .75rem; }
.agendy-recur__list { display: flex; flex-direction: column; gap: .4rem; max-height: 340px; overflow-y: auto; }
.agendy-recur__row {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .55rem .7rem; border: 1px solid var(--agendy-line); border-radius: 10px; background: #fff;
}
.agendy-recur__row.is-free  { border-color: #bfe6cf; background: #f3fbf6; }
.agendy-recur__row.is-taken { border-color: #f2c6c4; background: #fdf4f4; }
.agendy-recur__when { flex: 1 1 auto; font-size: .9rem; color: var(--agendy-ink); font-weight: 500; }
.agendy-recur__moved { color: var(--agendy-secondary); font-weight: 400; font-size: .82rem; }
.agendy-recur__badge { flex: 0 0 auto; font-size: .78rem; font-weight: 600; padding: .18rem .55rem; border-radius: 999px; }
.agendy-recur__badge--free  { background: #e4f6ec; color: #1a7a44; }
.agendy-recur__badge--taken { background: #fce6e6; color: #b3261e; }
.agendy-recur__actions { flex: 0 0 auto; display: flex; gap: .35rem; align-items: center; }

.agendy-recur__scope {
    margin: .5rem 0; padding: .75rem .85rem; border: 1px solid #f2c6c4; border-radius: 10px; background: #fdf4f4;
}
.agendy-recur__scope-q { margin: 0 0 .6rem; font-size: .9rem; color: var(--agendy-ink); font-weight: 500; }
.agendy-recur__scope-btns { display: flex; gap: .4rem; flex-wrap: wrap; }

/* P4 billing panel: item list + net/gross toggle + rollup badges + totals */
.agendy-bill__notice { margin: .25rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: #fdf3df; color: #7a5310; border-left: 3px solid #b7791f; font-size: .9rem; }
.agendy-bill__toolbar { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; margin: .5rem 0; font-size: .85rem; color: var(--agendy-body); }
.agendy-bill__toolbar-label { color: #64748b; }
.agendy-seg { display: inline-flex; border: 1px solid #c3ccd8; border-radius: 7px; overflow: hidden; }
.agendy-seg__opt { border: 0; background: #fff; color: var(--agendy-body); padding: .35rem .8rem; font: inherit; font-size: .85rem; cursor: pointer; }
.agendy-seg__opt + .agendy-seg__opt { border-left: 1px solid #c3ccd8; }
.agendy-seg__opt.is-on { background: var(--agendy-primary); color: #fff; font-weight: 600; }
.agendy-bill__items { display: flex; flex-direction: column; margin-top: .25rem; overflow-x: auto; }
.agendy-bill__row { display: grid; grid-template-columns: minmax(120px,2.4fr) .8fr 1fr .7fr 1fr 1.1fr; gap: .5rem; align-items: center; padding: .5rem .4rem; border-bottom: 1px solid #dde3ea; font-size: .88rem; min-width: 520px; }
.agendy-bill__row--head { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 700; border-bottom: 1px solid #c3ccd8; }
.agendy-bill__c--num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.agendy-bill__name { font-weight: 600; }
.agendy-bill__unit { display: block; font-size: .75rem; color: #64748b; }
.agendy-bill__empty { color: #64748b; padding: .8rem .4rem; font-size: .9rem; }
.agendy-bill__badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.agendy-bill__badge--none { background: #eef1f5; color: #64748b; }
.agendy-bill__badge--partial { background: #fbf0dd; color: #b5761a; }
.agendy-bill__badge--full { background: #e3f3ea; color: #1f7a4d; }
.agendy-bill__totals { display: flex; flex-direction: column; gap: .3rem; margin: 1rem 0 0 auto; width: 300px; max-width: 100%; font-size: .9rem; }
.agendy-bill__total { display: flex; justify-content: space-between; color: var(--agendy-body); }
.agendy-bill__total-v { font-variant-numeric: tabular-nums; }
.agendy-bill__total--billed .agendy-bill__total-v { color: #1f7a4d; }
.agendy-bill__total--open .agendy-bill__total-v { color: #b5761a; font-weight: 700; }
.agendy-bill__activate { margin: .5rem 0 .25rem; }
.agendy-bill__arrival { margin-bottom: .75rem; }
.agendy-bill__additem { margin: .5rem 0; }
.agendy-bill__addbar { display: inline-flex; align-items: center; gap: .4rem; border: 1px dashed var(--agendy-primary); background: #eef0fe; color: var(--agendy-primary); border-radius: 8px; padding: .5rem .8rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.agendy-bill__addbar-plus { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--agendy-primary); color: #fff; line-height: 1; }
.agendy-bill__addform { margin-top: .6rem; padding: .8rem; border: 1px solid #dde3ea; border-radius: 10px; background: #fbfcff; }
.agendy-bill__calc { margin: .35rem 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; color: #1f7a4d; }
.agendy-bill__addbtns { display: flex; gap: .5rem; margin-top: .5rem; }

/* Profil vertical-menu shell (Alap adatok / Integraciok) -- base layout; visual polish -> pixel. */
.agendy-split { display: flex; gap: 24px; align-items: flex-start; }
.agendy-vmenu { display: flex; flex-direction: column; gap: 4px; min-width: 168px; }
.agendy-vmenu__item { text-align: left; padding: 10px 14px; border: 0; background: transparent; cursor: pointer; border-radius: 6px; font: inherit; color: inherit; }
.agendy-vmenu__item.is-active { background: rgba(0,0,0,.06); font-weight: 600; }
.agendy-split__body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) {
    .agendy-split { flex-direction: column; }
    .agendy-vmenu { flex-direction: row; flex-wrap: wrap; min-width: 0; }
}

/* Torzsadatok vertical nav (plex, torzsadat-nav-refaktor) */
.agendy-md__layout { display: flex; gap: 24px; align-items: flex-start; }
.agendy-vnav { display: flex; flex-direction: column; gap: 4px; width: 220px; flex-shrink: 0; }
.agendy-vnav__item {
    text-align: left; padding: 10px 14px; border: 0; border-radius: 8px; cursor: pointer;
    background: transparent; color: #334; font-size: .93rem; font-weight: 600; font-family: inherit;
}
.agendy-vnav__item:hover { background: rgba(0, 0, 0, .04); }
.agendy-vnav__item.is-active { background: var(--agendy-primary, #3b5bdb); color: #fff; }
.agendy-md__content { flex: 1; min-width: 0; }
.agendy-md__sec[hidden] { display: none; }
.agendy-crud__head-actions { display: inline-flex; gap: 6px; }
.agendy-crud__row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.agendy-crud__row-main { flex: 1; min-width: 0; }
.agendy-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.agendy-check__lbl { font-size: .92rem; }
/* AFA-torzs + Mennyisegi egysegek: the checkbox rows are .agendy-check (inline-flex) and would
   otherwise flow side-by-side (multi-column). Force a single ordered column, one row per line. */
.agendy-crud__list[data-role="vat-list"],
.agendy-crud__list[data-role="unit-list"] { display: flex; flex-direction: column; gap: 2px; }
.agendy-crud__list[data-role="vat-list"] > .agendy-check,
.agendy-crud__list[data-role="unit-list"] > .agendy-check { margin: 0; width: 100%; }
/* Roland 3783 #14: GDPR consent checkbox group (customer editor + elojegyzes-form) */
.agendy-consent { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; padding: .75rem .85rem; background: var(--agendy-bg); border-radius: 10px; }
.agendy-consent__row { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; font-size: .86rem; color: var(--agendy-body); }
.agendy-consent__cb { margin-top: 2px; flex: 0 0 auto; }
.agendy-consent__lbl { line-height: 1.35; }
/* unit rows nest a label.agendy-check inside the row div; zero its legacy margin (.agendy-check L364)
   too, so a unit row's height matches a vat row (a flat label.agendy-check). (Roland 3790) */
.agendy-crud__list[data-role="unit-list"] .agendy-check { margin: 0; }
@media (max-width: 720px) {
    .agendy-md__layout { flex-direction: column; }
    .agendy-vnav { width: 100%; flex-direction: row; flex-wrap: wrap; }
}
/* #20: compact inline date-picker in the week/bookings toolbars */
.agendy-datepick { width: auto; min-width: 150px; padding: .4rem .6rem; font-size: .85rem; }
/* uf-3857-3: customer editor tabs (Alapadatok / Idopontok) */
.agendy-ctab-panel[hidden] { display: none; }
.agendy-tabs.agendy-bkfilter { margin-bottom: .75rem; }
[data-role="cust-bk-list"] { max-height: 320px; overflow-y: auto; }

/* Subscription / billing SPA (plex, Szamlaim vertikum) */
/* this is the FIRST section that renders two .agendy-panel siblings in one view -- the shared panel
   rule carries no bottom margin, so without this the last button collides with the invoice heading */
.agendy-sub { margin-bottom: 2.5rem; }
.agendy-sub__card { border: 1px solid rgba(0, 0, 0, .08); border-radius: 10px; padding: 16px; margin-bottom: 18px; }
/* .agendy-crud__hint is the centered EMPTY-STATE style (1.75rem padding) -- inline helper copy needs
   its own left-aligned, tight variant */
.agendy-sub__hint { color: var(--agendy-body); font-size: .9rem; margin: 8px 0 0; }
.agendy-sub__facts { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 10px 0 0; }
.agendy-sub__facts div { min-width: 0; }
.agendy-sub__facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
.agendy-sub__facts dd { margin: 2px 0 0; font-size: 1.02rem; font-weight: 600; }
.agendy-sub__notice { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(59, 91, 219, .08); font-size: .92rem; }
.agendy-sub__notice--warn { background: rgba(217, 119, 6, .1); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* an author-level `display` beats the UA style behind the HTML `hidden` attribute -- without these
   the JS-toggled blocks (paused notice, fact list) stay visible in their hidden state */
.agendy-sub__facts[hidden], .agendy-sub__notice--warn[hidden] { display: none; }
.agendy-sub__check { flex-direction: row; align-items: center; gap: 8px; }
.agendy-sub__block { border-top: 1px solid rgba(0, 0, 0, .07); padding-top: 16px; margin-top: 18px; }
/* the rule above separates STACKED blocks; since the billing blocks became separate Profil tabs
   (kipp, Roland 07-25) the first block in a panel would otherwise open with an orphan rule */
.agendy-sub__block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.agendy-sub__plans { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.agendy-sub__plan { flex: 1 1 180px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.agendy-sub__cardbox { border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px; padding: 12px; margin: 10px 0; }
@media (max-width: 640px) {
    .agendy-sub__facts { gap: 12px 20px; }
    .agendy-sub__plan { flex-basis: 100%; }
}
/* Invoicing add-on offer (plex, Roland 3816) -- shown in Profil > Integraciok > Szamlazas when the
   tenant does not have the add-on. Own block: the shared panel/field rules carry no card chrome. */
.agendy-addon__box { border: 1px solid rgba(0, 0, 0, .1); border-radius: 10px; padding: 16px; margin-top: 14px; max-width: 420px; }
.agendy-addon__price { margin: 0; font-size: 1.15rem; color: var(--agendy-ink); }
.agendy-addon__note { margin: 8px 0 0; font-size: .9rem; color: var(--agendy-body); }
.agendy-addon__box .agendy-profil__save { margin-top: 14px; }

/* Profil > Adatkezeles -- CKEditor 4 chrome trimmed to the app's form style (kipp, Roland 07-25).
   The editor ships its own moono-lisa skin; without this it reads as a 2015 admin widget dropped into
   the dashboard. Only the frame is restyled -- the toolbar/plugin internals are left to the skin. */
[data-role="privacy-policy"] .cke {
    border: 1px solid #dcdcec;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    max-width: 100%;
}
[data-role="privacy-policy"] .cke_top,
[data-role="privacy-policy"] .cke_bottom {
    background: #f8f9fc;
    border-color: #ececf6;
    box-shadow: none;
}
[data-role="privacy-policy"] .cke_chrome { border: 0; }
