/* ============================================================
   Shifter - "Presszó" design system (kávés világ)
   Espresso-barna oldalsáv + latte/krém felületek, karamell akcent,
   OKLCH tokenek. IBM Plex Sans (UI), Mono (számok), Serif (wordmark).
   Light az elsődleges; dark ("mokka") localStorage/rendszer-preferencia.
   ============================================================ */

:root {
    --bg:            oklch(0.978 0.010 84);
    --surface:       oklch(0.995 0.004 88);
    --surface-2:     oklch(0.958 0.014 82);
    --surface-3:     oklch(0.934 0.018 80);
    --border:        oklch(0.902 0.018 80);
    --border-strong: oklch(0.845 0.024 76);

    --ink:   oklch(0.28 0.030 55);
    --ink-2: oklch(0.455 0.030 58);
    --ink-3: oklch(0.60 0.026 60);

    --accent:        oklch(0.47 0.085 58);
    --accent-strong: oklch(0.41 0.085 55);
    --accent-weak:   oklch(0.945 0.028 75);
    --accent-ink:    oklch(0.43 0.090 56);
    --on-accent:     oklch(0.985 0.012 85);
    --ring:          oklch(0.47 0.085 58 / 0.32);

    --sidebar-bg:         oklch(0.262 0.032 52);
    --sidebar-bg-2:       oklch(0.322 0.037 54);
    --sidebar-ink:        oklch(0.912 0.024 80);
    --sidebar-ink-2:      oklch(0.732 0.032 72);
    --sidebar-active-bg:  oklch(0.362 0.042 56);
    --sidebar-active-bar: oklch(0.78 0.105 78);
    --sidebar-border:     oklch(1 0 0 / 0.10);

    --ok:        oklch(0.50 0.11 150);   --ok-bg:     oklch(0.95 0.045 150);
    --info:      oklch(0.49 0.085 235);  --info-bg:   oklch(0.95 0.03 235);
    --warn:      oklch(0.505 0.115 70);  --warn-bg:   oklch(0.955 0.045 80);
    --danger:    oklch(0.515 0.165 28);  --danger-bg: oklch(0.95 0.04 28);

    /* lefedettség-sáv színei */
    --cov-ok:   oklch(0.87 0.07 150);
    --cov-lack: oklch(0.84 0.08 28);
    --cov-over: oklch(0.88 0.08 85);
    --cov-none: var(--surface-3);

    --radius:    10px;
    --radius-sm: 7px;
    --radius-xs: 5px;
    --shadow-sm: 0 1px 2px rgba(38, 28, 18, .05), 0 1px 3px rgba(38, 28, 18, .04);
    --shadow-md: 0 4px 14px rgba(38, 28, 18, .08);
    --shadow-lg: 0 12px 32px rgba(38, 28, 18, .14);

    --sidebar-w: 232px;
    --topbar-h:  60px;

    --font-sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono:  'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;
    --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;

    --fs-display: 1.875rem;
    --fs-h1: 1.5rem;
    --fs-h2: 1.25rem;
    --fs-h3: 1.125rem;
    --fs-lg: 1rem;
    --fs-base: 0.9375rem;
    --fs-sm: 0.8125rem;
    --fs-xs: 0.75rem;

    --z-sticky:   1020;
    --z-backdrop: 1040;
    --z-drawer:   1050;
    --z-menu:     1055;

    --speed: 170ms;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
    --bg:            oklch(0.195 0.014 55);
    --surface:       oklch(0.235 0.016 55);
    --surface-2:     oklch(0.275 0.018 56);
    --surface-3:     oklch(0.31 0.020 56);
    --border:        oklch(0.325 0.018 56);
    --border-strong: oklch(0.40 0.022 58);

    --ink:   oklch(0.93 0.018 80);
    --ink-2: oklch(0.745 0.022 75);
    --ink-3: oklch(0.58 0.022 70);

    --accent:        oklch(0.68 0.10 70);
    --accent-strong: oklch(0.74 0.105 72);
    --accent-weak:   oklch(0.30 0.030 62);
    --accent-ink:    oklch(0.78 0.095 74);
    --on-accent:     oklch(0.18 0.025 55);
    --ring:          oklch(0.68 0.10 70 / 0.40);

    --ok:        oklch(0.74 0.12 150);   --ok-bg:     oklch(0.305 0.045 150);
    --info:      oklch(0.72 0.09 235);   --info-bg:   oklch(0.305 0.035 235);
    --warn:      oklch(0.78 0.11 80);    --warn-bg:   oklch(0.32 0.05 80);
    --danger:    oklch(0.70 0.15 28);    --danger-bg: oklch(0.32 0.055 28);

    --cov-ok:   oklch(0.46 0.07 150);
    --cov-lack: oklch(0.45 0.09 28);
    --cov-over: oklch(0.48 0.07 85);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .42);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
}

/* ---------- alap ---------- */
* { box-sizing: border-box; }
/* a [hidden] attribútum győzzön minden szerzői display fölött (modál-gotcha) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.num, td.num, .stat-value { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: var(--radius-xs); }
::selection { background: var(--accent-weak); color: var(--ink); }
::placeholder { color: var(--ink-2); opacity: 1; }

/* ---------- layout: oldalsáv + fő terület ---------- */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-ink);
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; height: 100vh; height: 100dvh;
    z-index: var(--z-drawer);
}
.sidebar-brand {
    display: flex; align-items: center; gap: 11px;
    height: var(--topbar-h); padding: 0 20px;
    border-bottom: 1px solid var(--sidebar-border);
}
.brand-mark {
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--sidebar-active-bar);
    color: var(--sidebar-bg);
    font-family: var(--font-serif); font-weight: 600; font-size: 19px; line-height: 1;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; color: var(--sidebar-ink); }

.nav { display: flex; flex-direction: column; padding: 14px 12px; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 13px; border-radius: var(--radius-sm);
    color: var(--sidebar-ink-2); font-weight: 500; font-size: var(--fs-base);
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.nav-item:hover { background: var(--sidebar-bg-2); color: var(--sidebar-ink); text-decoration: none; }
.nav-item:focus-visible { box-shadow: 0 0 0 3px var(--sidebar-active-bar); }
.nav-item.is-active { background: var(--sidebar-active-bg); color: #fff; font-weight: 600; }
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .92; }
.nav-section { padding: 15px 12px 5px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-ink-2); }
.nav-section:first-child { padding-top: 2px; }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--sidebar-border); font-size: var(--fs-xs); color: var(--sidebar-ink-2); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--topbar-h);
    background: color-mix(in oklab, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; gap: 14px;
    position: sticky; top: 0; z-index: var(--z-sticky);
}
.topbar-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-title h1 { font-size: var(--fs-h2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-chip {
    font-size: var(--fs-xs); color: var(--ink-2);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-meta { text-align: right; line-height: 1.2; }
.user-name { font-weight: 600; font-size: var(--fs-base); }
.user-role { font-size: var(--fs-xs); color: var(--ink-2); }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent);
    display: grid; place-items: center; font-weight: 600; font-size: var(--fs-base);
    flex: none;
}

.icon-btn {
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink-2); cursor: pointer;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.nav-toggle { display: none; }
.theme-toggle .i-sun, .theme-toggle .i-moon, .theme-toggle .i-auto { display: none; }
.theme-toggle[data-mode="light"] .i-sun { display: block; }
.theme-toggle[data-mode="dark"] .i-moon { display: block; }
.theme-toggle[data-mode="auto"] .i-auto { display: block; }
.theme-toggle:not([data-mode]) .i-auto { display: block; }

.content { padding: 26px 32px 48px; width: 100%; }

.sidebar-scrim {
    position: fixed; inset: 0; background: oklch(0.2 0.018 52 / 0.5);
    z-index: var(--z-backdrop); opacity: 0; pointer-events: none;
    transition: opacity var(--speed) var(--ease);
}
.sidebar-scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- oldal-fejléc + eszköztár ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header .sub { color: var(--ink-2); font-size: var(--fs-base); margin-top: 3px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-intro { color: var(--ink-2); margin: 0 0 22px; }

/* ---------- gombok ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-base);
    line-height: 1.2; padding: 9px 16px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
                color var(--speed) var(--ease), transform 60ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { padding: 6px 11px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-danger { background: transparent; border-color: color-mix(in oklab, var(--danger) 45%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); text-decoration: none; }

/* ---------- űrlapok ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea,
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select {
    font-family: var(--font-sans); font-size: var(--fs-base); color: var(--ink);
    padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.field input { width: 100%; }
input:hover, select:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
select { cursor: pointer; }
input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface); cursor: pointer; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- alertek (flash) ---------- */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: var(--fs-base); border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in oklab, var(--ok) 30%, transparent); }
.alert-danger  { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }

/* ---------- kártya ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { font-size: var(--fs-h3); }
.card-body { padding: 20px; }

/* ---------- stat kártyák ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.stat-value { font-size: var(--fs-display); font-weight: 600; color: var(--accent-ink); line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { font-weight: 600; font-size: var(--fs-base); margin-top: 4px; }

/* ---------- adattábla ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
table.data th {
    text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .4px;
    color: var(--ink-2); font-weight: 600; padding: 11px 16px;
    border-bottom: 1px solid var(--border); background: var(--surface-2);
}
table.data td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.actions, table.data th.actions { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }

/* ---------- badge-ek ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--ok-bg); color: var(--ok); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-warning { background: var(--warn-bg); color: var(--warn); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-muted   { background: var(--surface-3); color: var(--ink-2); }

.muted-text { color: var(--ink-2); }
.empty { text-align: center; padding: 36px 24px; color: var(--ink-2); }

/* ---------- auth ---------- */
body.auth {
    display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px;
    background:
        radial-gradient(120% 80% at 15% 0%, oklch(0.36 0.05 58) 0%, transparent 55%),
        linear-gradient(165deg, var(--sidebar-bg) 0%, oklch(0.21 0.028 50) 100%);
}
.auth-wrap { width: 100%; max-width: 408px; }
.auth-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 32px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand .brand-mark { background: var(--accent); color: var(--on-accent); }
.auth-brand .brand-name { color: var(--ink); font-size: 1.4rem; }
.auth-title { font-size: var(--fs-h1); margin-bottom: 4px; }
.auth-lead { color: var(--ink-2); margin: 0 0 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-links { margin-top: 18px; text-align: center; font-size: var(--fs-base); }
.auth-foot { text-align: center; color: var(--sidebar-ink-2); font-size: var(--fs-xs); margin-top: 18px; }

/* ---------- elérhető napok chip-sor ---------- */
.day-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.day-chips label {
    border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
    padding: 5px 9px; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; user-select: none;
    color: var(--ink-2); background: var(--surface);
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.day-chips input { display: none; }
.day-chips label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }

/* ============================================================
   Heti beosztás-rács (Shifter-specifikus)
   ============================================================ */
.week-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-range { font-size: var(--fs-lg); font-weight: 600; margin-left: 6px; }
.weekno { color: var(--ink-2); font-weight: 400; font-size: var(--fs-sm); margin-left: 8px; }
.week-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.week-actions form { display: inline; margin: 0; }

.legend { display: flex; gap: 18px; color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 12px; flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 13px; height: 13px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.sw.cov-ok { background: var(--cov-ok); }
.sw.cov-lack { background: var(--cov-lack); }
.sw.cov-over { background: var(--cov-over); }
.sw.viol { background: var(--surface); border: 2px solid var(--danger); }

.grid-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.sched { border-collapse: collapse; width: 100%; min-width: 1040px; font-size: var(--fs-base); }
.sched th, .sched td { border: 1px solid var(--border); padding: 6px 8px; text-align: center; vertical-align: top; }
.sched thead th { background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.sched th:first-child, .sched td:first-child { border-left: none; }
.sched th:last-child, .sched td:last-child { border-right: none; }
.sched thead th { border-top: none; }
.day-name { font-weight: 600; }
.day-date { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 400; }
.closed-badge { color: var(--danger); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.closure-toggle { border: none; background: none; color: var(--ink-3); font-size: var(--fs-xs); cursor: pointer; margin-top: 2px; font-family: var(--font-sans); }
.closure-toggle:hover { color: var(--accent-ink); text-decoration: underline; }
.name-col { text-align: left !important; min-width: 168px; font-weight: 600; }
.emp-meta { font-weight: 400; color: var(--ink-2); font-size: var(--fs-xs); margin-top: 2px; }
.sum-col { font-weight: 600; min-width: 68px; font-variant-numeric: tabular-nums; }
.sum-col.over-max { color: var(--danger); }
.sum-col.under-target { color: var(--warn); }

.cell { height: 58px; min-width: 106px; }
.cell.editable { cursor: pointer; transition: background var(--speed) var(--ease); }
.cell.editable:hover { background: var(--accent-weak); }
.cell.navail { background: repeating-linear-gradient(45deg, transparent, transparent 6px, var(--surface-2) 6px, var(--surface-2) 12px); }
.cell.viol { outline: 2px solid var(--danger); outline-offset: -2px; }
.closed-col { background: var(--surface-2); color: var(--ink-2); }

.shift { border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: var(--radius-xs); padding: 4px 7px; text-align: left; }
.shift .guest { font-weight: 600; font-size: var(--fs-sm); }
.shift-hours { color: var(--ink-2); font-size: var(--fs-xs); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; }
.tag-off { background: var(--surface-3); color: var(--ink-2); }
.tag-vac { background: var(--info-bg); color: var(--info); }

.placeholder-row .name-col { font-style: italic; color: var(--ink-2); }

.cov-row td { background: var(--surface-2); }
.cov-label { font-size: var(--fs-xs); color: var(--ink-2); font-weight: 400 !important; }
.cov-cell { padding: 8px 6px !important; }
.cov-strip { display: flex; height: 14px; border-radius: 4px; overflow: hidden; }
.cov-strip i { flex: 1; }
.cov-strip .cov-none { background: var(--cov-none); }
.cov-strip .cov-ok { background: var(--cov-ok); }
.cov-strip .cov-lack { background: var(--cov-lack); }
.cov-strip .cov-over { background: var(--cov-over); }
.cov-warn { color: var(--danger); font-size: var(--fs-xs); font-weight: 700; margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

.totals-row td { background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* cellamenü */
.cell-menu {
    position: absolute;
    z-index: var(--z-menu);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    width: 300px;
}
.menu-head { font-weight: 600; margin-bottom: 8px; }
.menu-warn { background: var(--warn-bg); color: var(--warn); font-size: var(--fs-sm); padding: 6px 9px; border-radius: var(--radius-xs); margin-bottom: 6px; }
.menu-custom { display: flex; gap: 6px; align-items: center; margin: 10px 0; }
.menu-custom input[type=time] { padding: 5px 6px; font-size: var(--fs-sm); }
.menu-actions { display: flex; gap: 8px; margin-top: 6px; }
.guest-input { width: 100%; margin-bottom: 6px; }

/* havi nézet */
.month-grid th, .month-grid td { font-size: var(--fs-sm); padding: 6px 8px; }
.mut { color: var(--ink-3); }
.week-link { font-weight: 400; font-size: var(--fs-sm); margin-left: 10px; }

/* megosztott (read-only) nézet fejléce */
.share-head { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--sidebar-bg); color: var(--sidebar-ink); }
.share-head .brand-mark { width: 28px; height: 28px; font-size: 16px; }
.share-head h1 { color: #fff; font-size: var(--fs-h3); }

/* ============================================================
   Modál (közös komponens)
   ============================================================ */
.modal-backdrop {
    position: fixed; inset: 0; background: oklch(0.2 0.018 52 / 0.55);
    z-index: var(--z-backdrop); display: grid; place-items: center; padding: 20px;
    overflow-y: auto;
}
.modal {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
    max-height: calc(100dvh - 40px); display: flex; flex-direction: column;
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: var(--fs-h3); }
.modal-close {
    border: none; background: none; color: var(--ink-2); cursor: pointer;
    font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-xs);
}
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-foot .spacer { margin-right: auto; }

/* elérhető idősávok szerkesztő sorai (dolgozó-modál) */
.win-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.win-row { display: flex; gap: 6px; align-items: center; }
.win-row select { padding: 6px 8px; font-size: var(--fs-sm); }
.win-row input[type=time] { padding: 6px 7px; font-size: var(--fs-sm); }
.win-del { border: none; background: none; color: var(--danger); cursor: pointer; font-size: 17px; padding: 2px 7px; border-radius: var(--radius-xs); }
.win-del:hover { background: var(--danger-bg); }
.win-hint { color: var(--ink-2); font-size: var(--fs-xs); margin-top: 4px; }

/* ============================================================
   Létszámigény: napok egymás mellett oszlopokban
   ============================================================ */
.needs-grid {
    display: grid; grid-template-columns: repeat(7, minmax(158px, 1fr));
    gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px;
}
.needs-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.needs-col-head {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2);
    border-radius: var(--radius) var(--radius) 0 0;
}
.needs-col-head h3 { font-size: var(--fs-base); }
.needs-copy { border: none; background: none; color: var(--ink-3); font-size: var(--fs-xs); cursor: pointer; font-family: var(--font-sans); padding: 0; }
.needs-copy:hover { color: var(--accent-ink); text-decoration: underline; }
.needs-items { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.need-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border-left: 3px solid var(--accent);
    border-radius: var(--radius-xs); padding: 6px 9px; font-size: var(--fs-sm);
}
.need-item > span:first-child { flex: 1; }
.need-item .hc { font-weight: 600; white-space: nowrap; }
.need-del { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 15px; padding: 0 3px; border-radius: 3px; }
.need-del:hover { color: var(--danger); }
.needs-empty { color: var(--ink-3); font-size: var(--fs-sm); text-align: center; padding: 8px 0; }
.needs-add { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.needs-add .times { display: flex; gap: 4px; align-items: center; }
.needs-add input[type=time] { padding: 5px 5px; font-size: var(--fs-sm); flex: 1; min-width: 0; }
.needs-add .hc-row { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--ink-2); }
.needs-add input[type=number] { padding: 5px 7px; font-size: var(--fs-sm); width: 62px; }

/* ============================================================
   Heti idővonal-nézet
   ============================================================ */
.view-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-switch button {
    border: none; background: var(--surface); color: var(--ink-2); cursor: pointer;
    padding: 7px 13px; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.view-switch button + button { border-left: 1px solid var(--border); }
.view-switch button.on { background: var(--accent); color: var(--on-accent); }

.tl-wrap { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; padding: 0 0 14px; }
.tl-axis { flex: none; width: 52px; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.tl-axis-head { height: 74px; border-bottom: 1px solid var(--border); }
.tl-axis-body { position: relative; }
.tl-hour {
    position: absolute; right: 8px; transform: translateY(-50%);
    font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3);
}
.tl-day { flex: 1 1 0; min-width: 148px; border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.tl-day-head { height: 74px; border-bottom: 1px solid var(--border); background: var(--surface-2); padding: 7px 9px 5px; text-align: center; position: relative; }
.tl-day-head .day-name { font-weight: 600; }
.tl-day-head .day-date { color: var(--ink-2); font-size: var(--fs-xs); }
.tl-day-chips { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 2px; min-height: 18px; }
.tl-day-chips .tag { padding: 1px 8px; font-size: var(--fs-xs); }
.tl-lack-chip { background: var(--danger-bg); color: var(--danger); }
.tl-canvas { position: relative; flex: 1; cursor: pointer; }
.tl-canvas.readonly { cursor: default; }
.tl-gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); opacity: .55; pointer-events: none; }
.tl-gridline.half { opacity: .28; }
/* igény-placeholder: szaggatott "ide kell ember" doboz a hasábban */
.tl-ph {
    position: absolute; pointer-events: none;
    border: 1.5px dashed var(--border-strong); border-radius: var(--radius-xs);
    background: color-mix(in oklab, var(--surface-2) 55%, transparent);
}
/* betöltetlen placeholder-rész: kattintható hiány */
.tl-gap {
    position: absolute; cursor: pointer; border-radius: var(--radius-xs);
    border: 1.5px dashed color-mix(in oklab, var(--danger) 45%, transparent);
    background: repeating-linear-gradient(45deg,
        var(--danger-bg), var(--danger-bg) 6px, transparent 6px, transparent 12px);
    display: grid; place-items: center;
    transition: background-color var(--speed) var(--ease);
}
.tl-gap:hover { background-color: var(--danger-bg); }
.tl-gap span {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--danger); pointer-events: none;
}
.tl-over-chip { background: var(--warn-bg); color: var(--warn); }
.tl-block {
    position: absolute; border-radius: var(--radius-xs);
    border: 1px solid transparent; border-left-width: 3px;
    padding: 3px 6px; overflow: hidden; font-size: var(--fs-xs); line-height: 1.3;
    cursor: pointer; transition: box-shadow var(--speed) var(--ease), transform 60ms var(--ease);
}
.tl-block:hover { box-shadow: var(--shadow-md); z-index: 3; }
.tl-block .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-block .tm { font-family: var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.tl-block.viol { outline: 2px solid var(--danger); outline-offset: -1px; }
.tl-closed { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, transparent, transparent 7px, var(--surface-2) 7px, var(--surface-2) 14px); display: grid; place-items: center; }
.tl-closed span { color: var(--ink-2); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; background: var(--surface); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); }

/* heti dolgozó-összesítő chipsor az idővonal alatt */
.tl-sums { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tl-sum {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 4px 12px 4px 7px; font-size: var(--fs-sm);
}
.tl-sum .dot { margin: 0; }
.tl-sum b { font-variant-numeric: tabular-nums; }
.tl-sum.over-max b { color: var(--danger); }
.tl-sum.under-target b { color: var(--warn); }
.tl-sum .meta { color: var(--ink-3); font-size: var(--fs-xs); }

.modal .field { margin-bottom: 12px; }
.modal-warns { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 13px; font-size: var(--fs-sm); margin-bottom: 12px; }
.modal-warns ul { margin: 0; padding-left: 18px; }

/* ---------- mozgás + reszponzív ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform var(--speed) var(--ease); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main { margin-left: 0; }
    .nav-toggle { display: grid; }
    .content { padding: 16px 14px 40px; }
    .user-meta { display: none; }
    .topbar { padding: 0 14px; }
}
