/* =========================================================
   Todo – design tokenek
   ========================================================= */
:root {
  --bg: #f4f4f1; --surface: #ffffff; --surface2: #ecebe6; --text: #18191b; --muted: #6b6f76; --line: #e3e1db;
  --glass: rgba(255, 255, 255, .72); --col-bg: rgba(236, 235, 230, .78);
  --accent: #3355d6; --on-accent: #fff;
  --c-on: #c2410c; --c-wait: #7c3aed; --c-me: #0f766e; --c-doing: #2563eb;
  --late: #dc2626; --star: #d97706; --ok: #15803d;
  --sh1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --sh2: 0 10px 30px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  --r: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121316; --surface: #1c1e22; --surface2: #26282d; --text: #ececee; --muted: #9a9ea6; --line: #2e3036;
  --glass: rgba(26, 28, 32, .72); --col-bg: rgba(34, 36, 41, .72);
  --accent: #6d8bff;
  --c-on: #fb923c; --c-wait: #b197fc; --c-me: #2dd4bf; --c-doing: #60a5fa;
  --late: #f87171; --star: #fbbf24; --ok: #4ade80;
  --sh1: 0 1px 2px rgba(0, 0, 0, .3); --sh2: 0 12px 34px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
:root {
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --accent-ink: color-mix(in srgb, var(--accent) 82%, var(--text));
  --c-on-soft: color-mix(in srgb, var(--c-on) 13%, var(--surface));
  --c-wait-soft: color-mix(in srgb, var(--c-wait) 13%, var(--surface));
  --c-me-soft: color-mix(in srgb, var(--c-me) 13%, var(--surface));
  --c-doing-soft: color-mix(in srgb, var(--c-doing) 13%, var(--surface));
  --late-soft: color-mix(in srgb, var(--late) 13%, var(--surface));
  --star-soft: color-mix(in srgb, var(--star) 15%, var(--surface));
}

/* ----- hátterek (világos / sötét) ----- */
.bgv-plain    { --bgc: var(--bg); --bgi: none; }
.bgv-warm     { --bgc: #f5eee4; --bgi: none; }
.bgv-mint     { --bgc: #e6f2eb; --bgi: none; }
.bgv-sky      { --bgc: #e5edf9; --bgi: none; }
.bgv-lavender { --bgc: #eeeaf9; --bgi: none; }
.bgv-mono     { --bgc: #e4e5e8; --bgi: none; }
.bgv-sunset   { --bgc: #ffc9b5; --bgi: linear-gradient(135deg, #ffd6a5 0%, #ffadad 48%, #bdb2ff 100%); }
.bgv-ocean    { --bgc: #b1d6fb; --bgi: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.bgv-aurora   { --bgc: #b8ecd9; --bgi: linear-gradient(135deg, #c3f0d8 0%, #a8e6e0 42%, #c7d2fe 100%); }
.bgv-forest   { --bgc: #cfe0c8; --bgi: linear-gradient(160deg, #e3ecdc 0%, #b7d1ad 100%); }
[data-theme="dark"].bgv-warm,     [data-theme="dark"] .bgv-warm     { --bgc: #1a1612; }
[data-theme="dark"].bgv-mint,     [data-theme="dark"] .bgv-mint     { --bgc: #0f1814; }
[data-theme="dark"].bgv-sky,      [data-theme="dark"] .bgv-sky      { --bgc: #0f1520; }
[data-theme="dark"].bgv-lavender, [data-theme="dark"] .bgv-lavender { --bgc: #16131f; }
[data-theme="dark"].bgv-mono,     [data-theme="dark"] .bgv-mono     { --bgc: #0b0c0e; }
[data-theme="dark"].bgv-sunset,   [data-theme="dark"] .bgv-sunset   { --bgc: #2b2032; --bgi: linear-gradient(135deg, #3b2230 0%, #2b2142 50%, #14233b 100%); }
[data-theme="dark"].bgv-ocean,    [data-theme="dark"] .bgv-ocean    { --bgc: #172e38; --bgi: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
[data-theme="dark"].bgv-aurora,   [data-theme="dark"] .bgv-aurora   { --bgc: #0d2a2a; --bgi: linear-gradient(135deg, #07171f 0%, #0d3b36 50%, #1e1b4b 100%); }
[data-theme="dark"].bgv-forest,   [data-theme="dark"] .bgv-forest   { --bgc: #14241a; --bgi: linear-gradient(160deg, #0e1a12 0%, #1d3324 100%); }

/* =========================================================
   Alap
   ========================================================= */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bgc, var(--bg)); }
body {
  margin: 0; color: var(--text); background: transparent;
  font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bgi, none), var(--bgc, var(--bg)); }
body.noscroll { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--accent-ink); }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----- bejelentkezés ----- */
body.login { display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 22px; text-align: center; box-shadow: var(--sh2); }
.login-box .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 28px; margin: 0 auto 10px; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent); }
.login-box h1 { margin: 0 0 18px; font-size: 22px; }
.login-box input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; }
.login-box button { width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 16px; }
.login-box .err { color: var(--late); margin: 10px 0 0; }
.login-box .hint { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* =========================================================
   Fejléc
   ========================================================= */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top-row, main, .search-wrap, .timerbar, .scope { max-width: 780px; margin-left: auto; margin-right: auto; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 750; }
.sub { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.top-actions { display: flex; gap: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); text-decoration: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--surface2) 80%, transparent); color: var(--text); }
.scope { margin-top: 8px; }
.seg.scope { background: color-mix(in srgb, var(--surface2) 75%, transparent); }
.search-wrap { margin-top: 8px; }
.search-wrap input { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.timerbar { margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--c-me-soft); color: var(--c-me); font-weight: 650; }
.timerbar .tb-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.timerbar .tb-clock { font-variant-numeric: tabular-nums; }
.timerbar button { border: 0; border-radius: 9px; padding: 6px 14px; background: var(--c-me); color: var(--surface); font-weight: 650; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--c-me); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 50% { opacity: .25; } }

main { padding: 6px 16px 24px; }

/* =========================================================
   Vezérlők
   ========================================================= */
.seg { display: flex; background: var(--surface2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 7px 8px; font-size: 14px; color: var(--muted); white-space: nowrap; font-weight: 550; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--sh1); }
.seg.mini { display: inline-flex; flex: none; }
.seg.mini button { padding: 5px 10px; font-size: 13px; flex: none; }
.seg[data-g="type"] button[data-v="on"].on { color: var(--c-on); }
.seg[data-g="type"] button[data-v="wait"].on { color: var(--c-wait); }
.seg[data-g="type"] button[data-v="me"].on { color: var(--c-me); }
.subnav { margin: 4px 0 12px; }
.subnav small { font-size: 11.5px; color: var(--muted); font-weight: 650; margin-left: 2px; }
.subnav .alert { color: var(--late); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; white-space: nowrap; font-weight: 550; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.chip[data-g="imp"].on { background: var(--star-soft); border-color: var(--star); color: var(--star); }
.ghost { border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 9px 13px; font-weight: 600; }
.ghost:hover { background: var(--surface2); }
.primary { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 11px; padding: 10px 18px; font-weight: 700; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.primary:hover { filter: brightness(1.06); }
.primary.sm, .ghost.sm { padding: 6px 12px; font-size: 13.5px; border-radius: 9px; box-shadow: none; }
.linkbtn { justify-self: start; border: 0; background: transparent; color: var(--accent-ink); padding: 2px 0; font-size: 13.5px; font-weight: 650; }

/* ----- gyors hozzáadás ----- */
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px; margin: 4px 0 18px; box-shadow: var(--sh1); transition: box-shadow .15s; }
.qa.open { box-shadow: var(--sh2); }
.qa-row { display: flex; gap: 6px; }
.qa-row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 10px; font-size: 16px; outline: none; }
.qa-add { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.qa-opts { display: none; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.qa.open .qa-opts { display: grid; gap: 9px; }
.qa-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qa-line input:not(.vh) { flex: 1 1 140px; min-width: 0; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; }
.qa-lbl { color: var(--muted); font-size: 13px; }
.qa-more { display: none; gap: 6px; }
.qa.more .qa-more { display: grid; }
.qa.more .linkbtn { display: none; }
.qa-more textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; resize: vertical; min-height: 40px; }

/* =========================================================
   Listák, kártyák
   ========================================================= */
.sec { margin: 0 0 24px; }
.sec h2, .later h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px 4px; font-weight: 750; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sec h2 .n { background: color-mix(in srgb, var(--surface2) 85%, transparent); border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.sec h2 small { text-transform: none; letter-spacing: 0; font-weight: 450; font-size: 12.5px; width: 100%; }
.sec-follow h2 { color: var(--late); } .sec-follow h2 .n { background: var(--late-soft); }
.sec-onImp h2 { color: var(--c-on); }
.sec-now h2 { color: var(--star); }
.empty-s { color: var(--muted); margin: 0 4px; font-size: 14px; }

.card {
  --tc: var(--line);
  display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 7px; box-shadow: var(--sh1), inset 3px 0 0 var(--tc); min-height: 56px; transition: transform .12s, box-shadow .12s;
}
.card:hover { box-shadow: var(--sh2), inset 3px 0 0 var(--tc); }
.card.t-on { --tc: var(--c-on); } .card.t-wait { --tc: var(--c-wait); } .card.t-me { --tc: var(--c-me); }
.card.running { background: color-mix(in srgb, var(--c-me) 7%, var(--surface)); }
.card.closed { opacity: .7; }
.card.closed .title { text-decoration: line-through; text-decoration-color: var(--muted); }
.chk { flex: none; width: 46px; height: 56px; display: grid; place-items: center; border: 0; background: transparent; color: transparent; padding: 0; }
.chk svg { width: 23px; height: 23px; border: 2px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 50%; padding: 2px; stroke-width: 3; transition: .15s; }
.chk:hover svg { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.card.closed .chk svg { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.body { flex: 1; min-width: 0; padding: 9px 0; cursor: pointer; }
.title { font-weight: 600; overflow-wrap: anywhere; letter-spacing: -.005em; }
.star { color: var(--star); margin-right: 4px; }
.snip { color: var(--muted); font-size: 13px; margin-top: 1px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.meta .who { color: var(--text); font-weight: 650; }
.meta .proj { color: var(--accent-ink); font-weight: 550; }
.meta .due.late { color: var(--late); font-weight: 650; }
.meta .due.now { color: var(--star); font-weight: 650; }
.meta .ckp { color: var(--c-doing); font-weight: 650; }
.meta .ckp.full { color: var(--ok); }
.warn { color: var(--c-on); font-weight: 650; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 750; padding: 2px 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pill.t-on { background: var(--c-on-soft); color: var(--c-on); }
.pill.t-wait { background: var(--c-wait-soft); color: var(--c-wait); }
.pill.t-me { background: var(--c-me-soft); color: var(--c-me); }
.pill.doing { background: var(--c-doing-soft); color: var(--c-doing); }
.pill.area { background: color-mix(in srgb, #db2777 12%, var(--surface)); color: #db2777; text-transform: none; letter-spacing: 0; }
.acts { flex: none; padding-right: 8px; }
.act { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 11px; font-size: 13px; font-weight: 650; color: var(--c-wait); }
.act:hover { background: var(--c-wait-soft); }
.act.timer { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: var(--muted); border-color: transparent; background: transparent; border-radius: 50%; }
.act.timer svg { width: 15px; height: 15px; fill: currentColor; }
.act.timer:hover { color: var(--c-me); background: var(--c-me-soft); }
.act.timer.on { color: var(--surface); background: var(--c-me); }
.act[data-act="reopen"] { color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px 30px; }
.empty .big { font-size: 44px; color: var(--star); }
.empty p { margin: 6px 0 2px; color: var(--text); font-weight: 650; }
.later { margin: 8px 0 18px; }
.later button { display: block; width: 100%; text-align: left; background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px dashed var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 6px; color: var(--muted); }
.later button:hover { border-style: solid; color: var(--text); background: var(--surface); }
.later b { color: var(--text); }
.daystat { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; padding: 4px 4px 16px; }
.daystat b { color: var(--text); }
.note { color: var(--muted); font-size: 12.5px; }

/* =========================================================
   Tábla (kanban)
   ========================================================= */
body.wide main, body.wide .top-row, body.wide .search-wrap, body.wide .timerbar, body.wide .scope { max-width: 1600px; }
body.wide #qa-wrap { max-width: 780px; }
.bfilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.bfilters select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; max-width: 42vw; font-weight: 550; }
.bhint { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.lane-h { display: flex; align-items: baseline; gap: 10px; font-size: 17px; margin: 14px 2px 10px; letter-spacing: -.01em; }
.lane-h .n { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.board {
  display: flex; gap: 12px; overflow-x: auto; align-items: stretch;
  margin: 0 -16px; padding: 0 16px 16px; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
/* oszlopok + a hozzájuk igazított fejlécsor */
.col, .board-heads .col-h {
  --cc: var(--muted);
  flex: 0 0 min(82vw, 300px); scroll-snap-align: start;
}
.col {
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid; border-top: 0; border-radius: 0 0 18px 18px;
  padding: 8px 10px 10px; display: flex; flex-direction: column; min-height: 160px;
  transition: border-color .12s, background .12s;
}
:is(.col, .board-heads .col-h).col-on { --cc: var(--c-on); }
:is(.col, .board-heads .col-h).col-me { --cc: var(--c-me); }
:is(.col, .board-heads .col-h).col-doing { --cc: var(--c-doing); }
:is(.col, .board-heads .col-h).col-wait { --cc: var(--c-wait); }
:is(.col, .board-heads .col-h).col-done { --cc: var(--ok); }
@media (min-width: 1100px) {
  .col, .board-heads .col-h { flex: 1 1 0; min-width: 210px; }
  .board, .board-heads { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
}
.col.over { background: color-mix(in srgb, var(--cc) 14%, var(--col-bg)) !important; border-color: var(--cc) !important; }
.lane { position: relative; }
.board-heads { position: sticky; top: calc(var(--top-h, 0px) - 1px); z-index: 6; overflow: hidden; margin: 0 -16px; padding: 6px 16px 0; }
.bh-track { display: flex; gap: 12px; will-change: transform; }
/* oszlopfejlécek */
.board-heads .col-h {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px;
  background: color-mix(in srgb, var(--cc) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--cc) 22%, var(--line)); border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: inset 0 3px 0 var(--cc);
  transition: background .15s, box-shadow .2s, transform .15s;
}
.col-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--cc); background: color-mix(in srgb, var(--cc) 16%, var(--surface)); }
.col-ic svg { width: 17px; height: 17px; }
.board-heads .col-t { flex: 1; min-width: 0; font-weight: 750; font-size: 14.5px; line-height: 1.15; letter-spacing: -.01em; }
.board-heads .col-t small { display: block; font-size: 11.5px; font-weight: 550; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-heads .col-h .n { flex: none; min-width: 26px; text-align: center; background: color-mix(in srgb, var(--cc) 16%, var(--surface)); color: var(--cc); border-radius: 999px; padding: 2px 8px; font-size: 12.5px; font-weight: 800; }
/* ragadós állapot: lebegő, kártyaszerű fejlécek */
.board-heads.stuck { padding-bottom: 10px; }
.board-heads.stuck .col-h {
  border-radius: 16px; border-bottom: 1px solid color-mix(in srgb, var(--cc) 22%, var(--line));
  background: color-mix(in srgb, var(--cc) 10%, var(--surface));
  box-shadow: inset 0 3px 0 var(--cc), var(--sh2);
  padding-top: 8px; padding-bottom: 8px;
}
.board-heads.stuck .col-ic { width: 28px; height: 28px; }
.board-heads .col-h.over { background: color-mix(in srgb, var(--cc) 24%, var(--surface)); transform: translateY(2px); }
body.dragging .board-heads .col-h { box-shadow: inset 0 3px 0 var(--cc), 0 0 0 2px color-mix(in srgb, var(--cc) 35%, transparent); }
body.dragging .board-heads .col-h.over { box-shadow: inset 0 3px 0 var(--cc), 0 0 0 3px var(--cc), var(--sh2); }
.col { background: color-mix(in srgb, var(--cc) 4%, var(--col-bg)); border-color: color-mix(in srgb, var(--cc) 22%, var(--line)); }

/* kész gomb a táblás kártyán */
.bcard { position: relative; }
.bcard .title, .bcard .bc-top { padding-right: 30px; }
.bc-chk {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--muted) 40%, transparent); background: var(--surface); color: transparent;
  display: grid; place-items: center; transition: .15s;
}
.bc-chk svg { width: 14px; height: 14px; stroke-width: 3.2; }
.bc-chk:hover { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); transform: scale(1.08); }
.bcard.closed .bc-chk { background: var(--ok); border-color: var(--ok); color: #fff; }

/* beszúrási jelölő húzáskor */
.drop-line { height: 3px; margin: -5.5px 2px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; }
.col-b { display: grid; gap: 8px; align-content: start; flex: 1; min-height: 40px; }
.col-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 8px; border: 1.5px dashed color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 12px; }
.col-add { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: left; }
.col-add svg { width: 16px; height: 16px; }
.col-add:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
.col-form { margin-top: 8px; display: grid; gap: 6px; }
.col-form textarea { width: 100%; border: 1px solid var(--accent); border-radius: 12px; padding: 9px 11px; background: var(--surface); resize: none; font-size: 15px; box-shadow: var(--sh1); outline: none; }
.col-form div { display: flex; gap: 6px; }

.bcard {
  --tc: transparent;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 13px;
  padding: 10px 11px; cursor: grab; box-shadow: var(--sh1), inset 3px 0 0 var(--tc);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: box-shadow .12s, transform .12s;
}
.bcard:hover { box-shadow: var(--sh2), inset 3px 0 0 var(--tc); transform: translateY(-1px); }
.bcard.imp { --tc: var(--star); }
.bcard.closed { opacity: .62; }
.bcard.closed .title { text-decoration: line-through; text-decoration-color: var(--muted); }
.bcard.running { box-shadow: 0 0 0 2px var(--c-me), var(--sh1); }
.bcard .title { font-size: 14.5px; line-height: 1.35; }
.bcard .title .pulse { display: inline-block; margin-right: 6px; vertical-align: middle; }
.bc-top { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.bc-proj { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: hsl(var(--h) 75% 92%); color: hsl(var(--h) 55% 32%); }
[data-theme="dark"] .bc-proj { background: hsl(var(--h) 35% 22%); color: hsl(var(--h) 75% 78%); }
.bc-area { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.bc-area.personal { background: color-mix(in srgb, #db2777 12%, var(--surface)); color: #db2777; }
.bc-prog { height: 4px; border-radius: 4px; background: var(--surface2); margin-top: 8px; overflow: hidden; }
.bc-prog i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.bc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.bc-due { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; background: var(--surface2); font-weight: 650; }
.bc-due svg { width: 12px; height: 12px; }
.bc-due.soon { background: var(--star-soft); color: var(--star); }
.bc-due.now { background: var(--star); color: #fff; }
.bc-due.late { background: var(--late); color: #fff; }
.bc-i { font-weight: 600; }
.bc-i.full { color: var(--ok); }
.avatar { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 750; color: #fff; background: hsl(var(--h) 55% 48%); box-shadow: 0 0 0 2px var(--surface); }
.bcard.placeholder { opacity: .25; transform: scale(.98); }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 18px 40px rgba(0, 0, 0, .28) !important; opacity: .96; margin: 0; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }

/* =========================================================
   Riport
   ========================================================= */
.period { margin: 4px 0 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--sh1); }
.kpis b { display: block; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpis span { color: var(--muted); font-size: 12px; }
@media (max-width: 480px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.rtable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh1); }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 42px) 70px; gap: 4px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 14px; }
.rrow > span:not(.rname) { text-align: right; }
.rrow[data-q]:not([data-q=""]) { cursor: pointer; }
.rrow[data-q]:not([data-q=""]):hover { background: var(--surface2); }
.rhead { border-top: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface2); font-weight: 700; }
.rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.rname small { display: block; font-weight: 650; font-size: 11.5px; }
.rtime { position: relative; }
.rtime i { position: absolute; right: 0; bottom: -5px; height: 3px; border-radius: 2px; background: var(--c-me); opacity: .6; }
@media (max-width: 420px) { .rrow { grid-template-columns: minmax(0, 1fr) repeat(4, 30px) 58px; padding: 9px 8px; font-size: 13px; } .rhead { font-size: 10px; } }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; box-shadow: var(--sh1); }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; background: var(--c-me); border-radius: 3px 3px 0 0; }
.bars-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding: 4px 4px 0; }
.toprow { display: flex; justify-content: space-between; gap: 12px; padding: 10px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 5px; cursor: pointer; }
.toprow small { color: var(--muted); }

/* =========================================================
   Navigáció – mobilon lebegő sáv, gépen oldalsáv
   ========================================================= */
.tabs {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; justify-content: space-around; max-width: 560px; margin: 0 auto;
  background: var(--glass); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 22px; padding: 5px; box-shadow: var(--sh2);
}
.tabs button { position: relative; flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 16px; transition: background .15s, color .15s; }
.tabs button.active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 750; }
.tabs button span { white-space: nowrap; }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; line-height: 18px; text-align: center; font-weight: 750; box-shadow: 0 0 0 2px var(--surface); }
.badge.soft { background: var(--surface2); color: var(--muted); }
.badge.alert { background: var(--late); color: #fff; }

@media (min-width: 1000px) {
  body { padding-bottom: 0; padding-left: 232px; }
  .tabs {
    top: 0; bottom: 0; left: 0; right: auto; width: 232px; max-width: none; margin: 0;
    flex-direction: column; justify-content: flex-start; gap: 3px;
    border-radius: 0; border: 0; border-right: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    padding: 22px 14px; box-shadow: none;
  }
  .tabs::before { content: "✓  Todo"; font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding: 0 12px 20px; color: var(--text); }
  .tabs button { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 14.5px; border-radius: 12px; }
  .tabs button:hover:not(.active) { background: color-mix(in srgb, var(--surface2) 70%, transparent); color: var(--text); }
  .tabs .badge { position: static; margin-left: auto; order: 3; box-shadow: none; }
  .toast { bottom: 24px !important; margin-left: 116px; }
  .top { padding-top: 16px; }
}

/* =========================================================
   Szerkesztő lap
   ========================================================= */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.sheet-card { position: relative; width: 100%; max-width: 680px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 13px; animation: up .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sh2); }
.sheet-card::before { content: ""; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -4px 0 -4px; }
@media (min-width: 640px) { .sheet { align-items: center; padding: 20px; } .sheet-card { border-radius: 22px; } .sheet-card::before { display: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 6px; }
.sheet-head .icon-btn { margin-left: auto; }
.ed-title { width: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 700; resize: none; outline: none; padding: 0; min-height: 30px; letter-spacing: -.01em; }
.sheet-card label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.sheet-card label input, .sheet-card label select, .sheet-card label textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; font-weight: 400; color: var(--text); }
.ed-note { min-height: 100px; line-height: 1.5; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggles { display: flex; gap: 18px; flex-wrap: wrap; }
label.toggle { display: flex !important; align-items: center; gap: 8px; font-size: 15px !important; color: var(--star) !important; }
label.toggle input { width: 20px !important; height: 20px; accent-color: var(--star); }
label.toggle.doing-t { color: var(--c-doing) !important; }
label.toggle.doing-t input { accent-color: var(--c-doing); }
.note-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.note-links a { font-size: 12.5px; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; text-decoration: none; }
.block { display: grid; gap: 4px; }
.block-h { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.block-h span { color: var(--c-doing); margin-left: 4px; }
.ck-row { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.ck-row input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--ok); }
.ck-row .ck-text { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid transparent; background: transparent; padding: 5px 2px; font-size: 15px; }
.ck-row .ck-text:focus { outline: none; border-bottom-color: var(--accent); }
.ck-row.done .ck-text { text-decoration: line-through; color: var(--muted); }
.ck-del { flex: none; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; border-radius: 8px; }
.ck-del:hover { background: var(--late-soft); color: var(--late); }
.add-input { width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; font-size: 15px; }
.add-input:focus { border-style: solid; border-color: var(--accent); outline: none; background: var(--bg); }
.ln-row { display: flex; align-items: center; gap: 6px; }
.ln-row a { flex: 1; min-width: 0; display: block; padding: 7px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; font-weight: 650; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ln-row a small { display: block; font-weight: 400; font-size: 11.5px; opacity: .75; overflow: hidden; text-overflow: ellipsis; }
.ed-info { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; }
.ed-log { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 11px; display: grid; gap: 2px; max-height: 120px; overflow-y: auto; }
.ed-log b { color: var(--text); }
.ed-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sheet-card label.addtime { display: flex; align-items: center; gap: 8px; font-weight: 450; }
.sheet-card label.addtime input { width: 90px; padding: 5px 8px; }
.sheet-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 13px; }
.sheet-actions .danger-link { border: 0; background: transparent; color: var(--late); padding: 8px 4px; margin-right: auto; font-weight: 600; }

/* =========================================================
   Beállítások, megjelenés
   ========================================================= */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; box-shadow: var(--sh1); }
.panel .lead { margin: 0; color: var(--muted); font-size: 14px; }
.panel label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.panel label input[type=email], .panel label input[type=time] { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; color: var(--text); font-weight: 400; }
.panel label.toggle.big { font-size: 15.5px !important; color: var(--text) !important; }
.panel label.toggle.big input { accent-color: var(--accent); }
.radios { display: grid; gap: 8px; }
.panel label.radio { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 450; }
.panel label.radio input { margin-top: 3px; accent-color: var(--accent); }
.panel label.radio small { display: block; color: var(--muted); font-size: 12.5px; }
.panel .sheet-actions { justify-content: flex-end; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; position: relative; display: grid; place-items: center; font-weight: 750; font-size: 14px; color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); cursor: pointer; }
.sw.def { background: linear-gradient(135deg, #3355d6, #6d8bff); }
.sw.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sw.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.bgsw { border: 0; background: transparent; padding: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }
.bgprev { display: block; height: 58px; border-radius: 12px; background: var(--bgi, none), var(--bgc, var(--bg)); box-shadow: inset 0 0 0 1px var(--line); }
.bgsw.on { color: var(--text); }
.bgsw.on .bgprev { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.preview-row { padding: 14px; border-radius: 14px; background: var(--bgi, none), var(--bgc, var(--bg)); }
.preview-row .card { margin: 0; }

/* =========================================================
   Toast
   ========================================================= */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; background: var(--text); color: var(--bg); border-radius: 14px; padding: 11px 16px; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px); box-shadow: var(--sh2); font-size: 14px; font-weight: 550; animation: fade .2s; }
.toast button { border: 0; background: transparent; color: color-mix(in srgb, var(--accent) 55%, #fff); font-weight: 750; padding: 0; }
[data-theme="dark"] .toast button { color: var(--accent); }

/* ----- pontlista a kártyán ----- */
.ckin { display: grid; gap: 1px; margin-top: 7px; }
.ckl { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; font-size: 13.5px; line-height: 1.35; cursor: pointer; user-select: none; -webkit-user-select: none; }
.ckl:hover { background: color-mix(in srgb, var(--surface2) 70%, transparent); }
.ckl input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.ckl span { overflow-wrap: anywhere; }
.ckl.done span { text-decoration: line-through; color: var(--muted); }
.ckl .star { margin-right: 3px; }
.ckmore { justify-self: start; border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 0; }
.ckmore:hover { color: var(--text); }
.bcard .ckin { margin-top: 8px; }
.bcard .ckl { font-size: 13px; }
.card .body { padding-bottom: 10px; }
.toast button + button { margin-left: -4px; }

/* ----- összevonás / szétbontás ----- */
.ck-split { flex: none; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 16px; border-radius: 8px; }
.ck-split:hover { background: var(--accent-soft); color: var(--accent-ink); }
.merge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.merge-row select { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 14.5px; }

/* =========================================================
   Testreszabás: sűrűség, betűméret, sarkok, rejtett elemek
   ========================================================= */
.board { overflow-y: hidden; }
html[data-font="s"] :is(#main, .top, .tabs, .sheet-card) { zoom: .92; }
html[data-font="l"] :is(#main, .top, .tabs, .sheet-card) { zoom: 1.1; }
html[data-radius="sharp"] { --r: 6px; }
html[data-radius="sharp"] :is(.bcard, .col, .board-heads .col-h, .qa, .panel, .kpis div, .rtable, .toprow, .later button, .search-wrap input) { border-radius: 6px !important; }
html[data-radius="sharp"] :is(.chip, .seg, .seg button, .ghost, .primary, .bc-due, .bc-proj, .pill) { border-radius: 5px !important; }
html[data-radius="round"] { --r: 20px; }
html[data-radius="round"] :is(.bcard, .panel, .qa) { border-radius: 20px; }
html[data-radius="round"] :is(.col) { border-radius: 0 0 26px 26px; }
html[data-radius="round"] .board-heads .col-h { border-radius: 26px 26px 0 0; }
html[data-radius="round"] .board-heads.stuck .col-h { border-radius: 22px; }
html[data-density="compact"] .card { min-height: 44px; margin-bottom: 5px; }
html[data-density="compact"] .chk { height: 44px; width: 40px; }
html[data-density="compact"] .card .body { padding: 5px 0 6px; }
html[data-density="compact"] .snip { -webkit-line-clamp: 1; }
html[data-density="compact"] .bcard { padding: 7px 9px; }
html[data-density="compact"] .col-b { gap: 5px; }
html[data-density="compact"] .sec { margin-bottom: 16px; }
html[data-density="compact"] .ckl { padding: 2px 6px; }
html.hide-snip .snip { display: none; }
html.hide-ck .ckin { display: none; }
html.hide-avatar .avatar { display: none; }
html.hide-proj :is(.bc-proj, .meta .proj) { display: none; }
.meta .remind, .bc-i.remind { color: var(--c-doing); font-weight: 650; }

/* ----- beállítások oldal ----- */
.settings { display: grid; gap: 16px; }
.set-toc { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: calc(var(--top-h, 0px) + 6px); z-index: 4; }
.set-toc a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 600; }
.set-toc a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.settings .panel { scroll-margin-top: calc(var(--top-h, 0px) + 56px); }
.settings h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.settings .row { display: grid; gap: 7px; }
.settings select { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; color: var(--text); font-weight: 450; }
.panel input[type=text] { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; color: var(--text); font-weight: 400; }
.tcolors { display: flex; flex-wrap: wrap; gap: 8px; }
.panel label.tcol { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 600; }
.tcol input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.tcol input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.tcol input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.tcol input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.panel label.toggle.plain { color: var(--text) !important; font-weight: 500; }
.panel label.toggle.plain input { accent-color: var(--accent); }
.hint-inline { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.seclog { display: grid; gap: 2px; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.secrow { display: grid; grid-template-columns: 112px 110px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.secrow:nth-child(odd) { background: color-mix(in srgb, var(--surface2) 50%, transparent); }
.secb { font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; justify-self: start; }
.secb.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.secb.bad { background: var(--late-soft); color: var(--late); }
.secb.info { background: var(--accent-soft); color: var(--accent-ink); }
.sect, .secua { color: var(--muted); }
.secip { font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secip small { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 560px) { .secrow { grid-template-columns: auto 1fr; } .secua { grid-column: 2; } .secip { grid-column: 1 / -1; } }
.ghost.danger { color: var(--late); border-color: color-mix(in srgb, var(--late) 40%, var(--line)); }
.ghost.danger:hover { background: var(--late-soft); }

/* =========================================================
   Doksik
   ========================================================= */
.docs-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.docs-bar > * { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; cursor: pointer; }
.docs-bar .primary { color: var(--on-accent); }
.docs-bar svg { width: 17px; height: 17px; }
.docs-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.docs-filters .chips { flex: 1 1 auto; }
.docs-filters .chip small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.docs-filters select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 550; max-width: 100%; }
.linkh { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.linkh:hover { color: var(--accent-ink); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
@media (max-width: 420px) { .dgrid { grid-template-columns: 1fr 1fr; gap: 8px; } }
.dtile { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh1); cursor: pointer; transition: transform .12s, box-shadow .12s; color: inherit; }
.dtile:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.dthumb { position: relative; height: 96px; display: grid; place-items: center; background: var(--surface2); overflow: hidden; }
.dthumb img { width: 100%; height: 100%; object-fit: cover; }
.k-note .dthumb { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.k-pdf .dthumb { background: color-mix(in srgb, #dc2626 10%, var(--surface)); }
.k-doc .dthumb { background: color-mix(in srgb, #2563eb 10%, var(--surface)); }
.k-media .dthumb { background: color-mix(in srgb, #7c3aed 10%, var(--surface)); }
.dic { font-size: 34px; line-height: 1; }
.dic.big { font-size: 56px; }
.dext { position: absolute; right: 8px; bottom: 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.dpin { position: absolute; left: 6px; top: 6px; font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.dinfo { padding: 9px 11px 10px; display: grid; gap: 3px; min-width: 0; }
.dtitle { font-weight: 650; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.dex { font-size: 12.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dmeta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11.5px; color: var(--muted); }
.dmeta .proj { color: var(--accent-ink); font-weight: 600; }
.dmeta .dcard { color: var(--c-me); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
body.dropping #main { outline: 3px dashed var(--accent); outline-offset: -8px; border-radius: 18px; background: var(--accent-soft); }
.pinstrip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 4px; scrollbar-width: none; }
.pinstrip::-webkit-scrollbar { display: none; }
.pchip { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh1); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.pchip:hover { border-color: var(--accent); }
.cdocs { display: flex; flex-wrap: wrap; gap: 6px; }
.cdocs .pchip { box-shadow: none; padding: 6px 10px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.doc-actions label { display: inline-flex !important; cursor: pointer; color: var(--text) !important; font-weight: 600 !important; font-size: 13.5px !important; }

/* ----- nézegető / szerkesztő ----- */
.docview { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.42); display: flex; justify-content: center; align-items: stretch; animation: fade .15s; }
.dv-card { width: 100%; max-width: 900px; background: var(--surface); display: flex; flex-direction: column; min-height: 0; box-shadow: var(--sh2); }
@media (min-width: 900px) { .docview { padding: 24px; } .dv-card { border-radius: 20px; overflow: hidden; } }
.dv-head { display: flex; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; border-bottom: 1px solid var(--line); }
.dv-title { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 19px; font-weight: 750; padding: 6px 4px; outline: none; letter-spacing: -.01em; }
.dv-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dv-head .icon-btn.on { background: var(--star-soft); }
.dv-menu { position: absolute; right: 12px; top: calc(56px + env(safe-area-inset-top)); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh2); padding: 6px; display: grid; min-width: 230px; }
@media (min-width: 900px) { .dv-card { position: relative; } .dv-menu { top: 56px; } }
.dv-menu > * { display: block; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; color: var(--text); text-decoration: none; }
.dv-menu > *:hover { background: var(--surface2); }
.dv-menu .danger { color: var(--late); }
.dv-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface2) 40%, var(--surface)); }
.dv-meta input, .dv-meta select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; min-width: 0; }
.dv-proj { flex: 0 1 160px; }
.dv-item { flex: 1 1 200px; }
.dv-meta .seg { margin-left: auto; }
.dv-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; -webkit-overflow-scrolling: touch; }
.md-tools { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; align-items: center; }
.md-tools button { flex: none; min-width: 36px; height: 34px; border: 0; background: transparent; border-radius: 8px; font-size: 14.5px; color: var(--text); }
.md-tools button:hover { background: var(--surface2); }
.md-count { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; padding-left: 8px; }
.dv-text { flex: 1; width: 100%; min-height: 60vh; border: 0; resize: none; outline: none; padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); font: 16px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); color: var(--text); }
.md { padding: 18px 20px calc(32px + env(safe-area-inset-bottom)); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3, .md h4 { line-height: 1.25; margin: 1.2em 0 .5em; letter-spacing: -.01em; }
.md h1 { font-size: 1.6em; } .md h2 { font-size: 1.3em; } .md h3 { font-size: 1.12em; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 .9em; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 .9em; }
.md li { margin: .2em 0; }
.md li.task { list-style: none; margin-left: -1.4em; }
.md li.task label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.md li.task input { width: 19px; height: 19px; margin-top: 4px; accent-color: var(--ok); flex: none; }
.md li.task.done span { text-decoration: line-through; color: var(--muted); }
.md code { background: var(--surface2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.md pre { background: var(--surface2); padding: 12px 14px; border-radius: 10px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md pre.plain { background: none; padding: 0; white-space: pre-wrap; font: inherit; }
.md blockquote { margin: 0 0 .9em; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.md img { max-width: 100%; border-radius: 10px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md a { color: var(--accent-ink); }
.dv-imgwrap { display: grid; place-items: center; padding: 12px; flex: 1; background: var(--surface2); }
.dv-img { max-width: 100%; max-height: 80vh; border-radius: 10px; box-shadow: var(--sh2); }
.dv-pdf { flex: 1; width: 100%; min-height: 70vh; border: 0; background: var(--surface2); }
.dv-open { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.dv-open .primary { text-decoration: none; color: var(--on-accent); }
.dv-media { width: 100%; max-height: 80vh; background: #000; }
audio.dv-media { background: none; margin: 24px 0; }
.dv-file { display: grid; justify-items: center; gap: 10px; padding: 30px 16px 10px; text-align: center; }
.dv-versions { border-top: 1px solid var(--line); padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); max-height: 45vh; overflow-y: auto; display: grid; gap: 8px; background: var(--bg); }
.vrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.vrow .note { margin-top: 2px; }

/* ----- doksi: keresés, szerkesztés telefonon ----- */
.docs-search { margin: 0 0 10px; }
.docs-q { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; box-shadow: var(--sh1); }
.docs-q:focus { outline: none; border-color: var(--accent); }
.dv-body { position: relative; }
.dv-text { flex: none; overflow: hidden; }
.md-tools { position: sticky; top: 0; z-index: 3; background: var(--surface); }
.dv-find { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); padding: 6px 8px; display: grid; gap: 6px; }
.find-row { display: flex; align-items: center; gap: 4px; }
.find-row input { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.find-row input:focus { outline: none; border-color: var(--accent); }
.find-row button { flex: none; min-width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; display: grid; place-items: center; color: var(--text); font-size: 16px; }
.find-row button:hover, .find-row button.on { background: var(--accent-soft); color: var(--accent-ink); }
.find-row button.txt { padding: 0 12px; font-size: 14px; font-weight: 650; border: 1px solid var(--line); background: var(--surface); }
.find-n { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; padding: 0 4px; font-variant-numeric: tabular-nums; }
mark.hl { background: color-mix(in srgb, #facc15 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
mark.hl.cur { background: #f59e0b; color: #111; box-shadow: 0 0 0 2px #f59e0b; }
.ta-hit { position: absolute; left: 10px; right: 10px; pointer-events: none; background: color-mix(in srgb, #facc15 30%, transparent); border-left: 3px solid #f59e0b; border-radius: 4px; transition: top .15s; }
.dv-fab { position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.dv-fab svg { width: 18px; height: 18px; }
.dv-card { position: relative; }
.md [data-line] { cursor: text; }
.dv-find { grid-template-columns: minmax(0, 1fr); }
.find-row { min-width: 0; }
@media (max-width: 640px) {
  .dv-meta { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
  .dv-meta .seg { display: none; }
  .dv-proj { flex: 0 1 38%; }
  .dv-item { flex: 1 1 0; }
  .dv-meta input, .dv-meta select { font-size: 14px; padding: 6px 8px; }
  .find-row button { min-width: 34px; }
}
.dthumb, .dinfo { width: 100%; align-self: stretch; }

/* =========================================================
   Stílusok (Beállítások → Megjelenés → Stílus)
   ========================================================= */
html[data-ff="inter"] body { font-family: "Inter", ui-sans-serif, system-ui, sans-serif; }
html[data-ff="manrope"] body { font-family: "Manrope", ui-sans-serif, system-ui, sans-serif; }
html[data-ff="grotesk"] body { font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif; }
html[data-ff="jakarta"] body { font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; }
html[data-ff="serif"] body { font-family: "Fraunces", Georgia, serif; }
html[data-ff="serif"] :is(.meta, .seg, .chip, .tabs, small, input, select, textarea) { font-family: ui-sans-serif, system-ui, sans-serif; }

/* Üveg */
html[data-style="glass"] { --glass: rgba(255,255,255,.5); }
html[data-style="glass"][data-theme="dark"] { --glass: rgba(20,22,26,.5); }
html[data-style="glass"] :is(.card, .bcard, .panel, .qa, .dtile, .kpis div, .rtable, .pchip, .toprow) {
  background: color-mix(in srgb, var(--surface) 62%, transparent) !important;
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-color: color-mix(in srgb, #fff 45%, transparent) !important;
}
html[data-style="glass"][data-theme="dark"] :is(.card, .bcard, .panel, .qa, .dtile, .kpis div, .rtable, .pchip, .toprow) { border-color: rgba(255,255,255,.08) !important; }
html[data-style="glass"] .col { background: color-mix(in srgb, var(--surface) 28%, transparent) !important; }
/* Puha */
html[data-style="soft"] { --sh1: 0 6px 22px rgba(16,24,40,.07); --sh2: 0 16px 40px rgba(16,24,40,.12); --r: 20px; }
html[data-style="soft"][data-theme="dark"] { --sh1: 0 6px 22px rgba(0,0,0,.35); --sh2: 0 16px 40px rgba(0,0,0,.5); }
html[data-style="soft"] :is(.card, .bcard, .panel, .qa, .dtile, .kpis div, .rtable) { border-color: transparent !important; }
html[data-style="soft"] :is(.bcard, .panel, .qa, .dtile) { border-radius: 20px; }
html[data-style="soft"] .col { border-color: transparent !important; border-radius: 0 0 24px 24px; }
html[data-style="soft"] .board-heads .col-h { border-color: transparent !important; border-radius: 24px 24px 0 0; }
/* Minimál */
html[data-style="minimal"] { --sh1: none; --sh2: 0 6px 18px rgba(0,0,0,.08); }
html[data-style="minimal"] :is(.card, .bcard) { box-shadow: none !important; }
html[data-style="minimal"] .card { border-width: 0 0 1px; border-radius: 0; margin-bottom: 0; background: transparent; }
html[data-style="minimal"] .col { background: transparent !important; border-style: dashed !important; }
html[data-style="minimal"] .board-heads .col-h { background: var(--surface) !important; box-shadow: inset 0 2px 0 var(--cc) !important; }
html[data-style="minimal"] .primary { box-shadow: none; }
/* Merész (neo-brutál) */
html[data-style="bold"] { --line: #18191b; --sh1: 3px 3px 0 #18191b; --sh2: 5px 5px 0 #18191b; --r: 10px; }
html[data-style="bold"][data-theme="dark"] { --line: #ececee; --sh1: 3px 3px 0 #000; --sh2: 5px 5px 0 #000; }
html[data-style="bold"] :is(.card, .bcard, .panel, .qa, .dtile, .kpis div, .rtable, .chip, .ghost, .primary, .seg, .pchip) { border-width: 2px !important; border-style: solid; }
html[data-style="bold"] :is(.card, .bcard) { box-shadow: var(--sh1) !important; }
html[data-style="bold"] .primary { border-color: var(--line) !important; box-shadow: var(--sh1); }
html[data-style="bold"] .title, html[data-style="bold"] h1 { letter-spacing: -.02em; }
html[data-style="bold"] .board-heads .col-h { border-width: 2px; border-color: var(--line) !important; }
html[data-style="bold"] .col { border-width: 2px !important; border-color: var(--line) !important; }

/* stílus- és betűválasztó */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stylesw { display: grid; gap: 3px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.stylesw b { font-size: 14px; } .stylesw small { color: var(--muted); font-size: 11.5px; }
.stylesw.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.st-prev { display: grid; gap: 4px; padding: 8px; border-radius: 10px; background: var(--bgc, var(--bg)); margin-bottom: 4px; }
.st-prev i { display: block; height: 10px; border-radius: 4px; background: var(--surface); box-shadow: var(--sh1); }
.st-prev i:nth-child(2) { width: 70%; } .st-prev i:nth-child(3) { width: 45%; }
.st-glass .st-prev { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); } .st-glass .st-prev i { background: rgba(255,255,255,.55); box-shadow: none; border: 1px solid rgba(255,255,255,.7); }
.st-soft .st-prev i { border-radius: 8px; box-shadow: 0 3px 8px rgba(16,24,40,.12); }
.st-minimal .st-prev i { box-shadow: none; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.st-bold .st-prev i { border: 2px solid #18191b; box-shadow: 2px 2px 0 #18191b; border-radius: 3px; }
.fonts { display: flex; flex-wrap: wrap; gap: 8px; }
.fontsw { display: grid; justify-items: center; min-width: 92px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 22px; font-weight: 700; line-height: 1.1; }
.fontsw small { font-size: 11.5px; font-weight: 500; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; }
.fontsw.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ff-inter { font-family: "Inter", sans-serif; } .ff-manrope { font-family: "Manrope", sans-serif; } .ff-grotesk { font-family: "Space Grotesk", sans-serif; }
.ff-jakarta { font-family: "Plus Jakarta Sans", sans-serif; } .ff-serif { font-family: "Fraunces", Georgia, serif; }

/* =========================================================
   Értesítések, SMS, nagyon fontos kártyák
   ========================================================= */
.nmatrix { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.nm-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols), 64px); align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); }
.nm-head { border-top: 0; background: var(--surface2); font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px; }
.nm-head span { text-align: center; } .nm-head span:first-child { text-align: left; }
.nm-ev b { display: block; font-size: 14.5px; color: var(--text); font-weight: 650; }
.nm-ev small { color: var(--muted); font-size: 12px; font-weight: 450; }
.panel .nm-cell { display: grid !important; place-items: center; cursor: pointer; }
.nm-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-ui { position: relative; width: 40px; height: 24px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 35%, var(--surface)); transition: background .18s; }
.sw-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.nm-cell input:checked + .sw-ui { background: var(--accent); }
.nm-cell input:checked + .sw-ui::after { transform: translateX(16px); }
.nm-cell input:focus-visible + .sw-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .nm-row { grid-template-columns: minmax(0, 1fr) repeat(var(--cols), 50px); padding: 9px 10px; } .sw-ui { width: 36px; height: 22px; } .sw-ui::after { width: 16px; height: 16px; } .nm-cell input:checked + .sw-ui::after { transform: translateX(14px); } }
.push-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); display: grid; gap: 6px; }
.push-box .note { margin: 0; }
.sms-hero { display: flex; gap: 14px; align-items: flex-start; }
.sms-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 6px 16px rgba(22,163,74,.3); }
.sms-hero .lead { margin-top: 4px; }
.sms-hero code { background: var(--surface2); padding: 1px 6px; border-radius: 6px; }
.phones { display: grid; gap: 8px; }
.phone-row { display: grid; grid-template-columns: 36px minmax(0, .8fr) minmax(0, 1fr) auto 30px; gap: 6px; align-items: center; }
.phone-row input[type=text], .phone-row input[type=tel] { min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; }
.ph-def { display: grid !important; place-items: center; cursor: pointer; }
.ph-def input { position: absolute; opacity: 0; }
.ph-def span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 16px; border: 1px solid var(--line); }
.ph-def input:checked + span { background: var(--star-soft); color: var(--star); border-color: var(--star); }
@media (max-width: 520px) { .phone-row { grid-template-columns: 36px minmax(0, 1fr) 30px; } .phone-row .ph-num { grid-column: 2; } .phone-row [data-sms=test] { grid-column: 2; justify-self: start; } .phone-row .ck-del { grid-row: 1; grid-column: 3; } }
.secrow.sms { grid-template-columns: 92px 110px 140px minmax(0, 1fr); }
.urgent-box { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--late) 45%, var(--line)); background: color-mix(in srgb, var(--late) 4%, var(--surface)); }
label.toggle.urgent-t { color: var(--late) !important; font-weight: 700 !important; }
label.toggle.urgent-t input { accent-color: var(--late); }
.urgent-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.urgent-opts select { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 14.5px; }
.pill.urgent { background: var(--late); color: #fff; text-transform: none; letter-spacing: 0; }
.card.urgent { box-shadow: var(--sh1), inset 3px 0 0 var(--late), 0 0 0 1.5px color-mix(in srgb, var(--late) 50%, transparent); }
.bcard.urgent { box-shadow: var(--sh1), 0 0 0 2px color-mix(in srgb, var(--late) 60%, transparent); }
.bcard.urgent .title::before { content: "🚨 "; }

/* =========================================================
   Oldalsáv elrejtése (gépen) + app-szerű finomítások
   ========================================================= */
.sb-toggle { display: none; }
@media (min-width: 1000px) {
  .tabs { transition: transform .25s ease; }
  body { transition: padding-left .25s ease; }
  .sb-toggle {
    display: grid; place-items: center; position: fixed; z-index: 25; top: 24px; left: 218px; width: 28px; height: 28px; padding: 0;
    border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: var(--sh1); cursor: pointer;
    transition: left .25s ease, transform .25s ease;
  }
  .sb-toggle svg { width: 16px; height: 16px; transition: transform .25s; }
  .sb-toggle:hover { color: var(--text); box-shadow: var(--sh2); }
  body.sb-hidden { padding-left: 0; }
  body.sb-hidden .tabs { transform: translateX(-100%); }
  body.sb-hidden .sb-toggle { left: 10px; }
  body.sb-hidden .sb-toggle svg { transform: rotate(180deg); }
  body.sb-hidden .top { padding-left: 52px; }
  body.sb-hidden .toast { margin-left: 0; }
}
@media (display-mode: standalone) {
  .top { padding-top: calc(12px + env(safe-area-inset-top)); }
}

/* grid-elemek ne lógjanak ki telefonon */
.settings, .sheet-card, .panel { grid-template-columns: minmax(0, 1fr); }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid2 > *, .panel > *, .sheet-card > * { min-width: 0; }
.sheet-card input, .sheet-card select, .panel input:not([type=checkbox]):not([type=radio]):not([type=color]), .panel select { min-width: 0; max-width: 100%; }
@media (max-width: 480px) { .sheet-card .grid2, .panel .grid2 { grid-template-columns: minmax(0, 1fr); } }
.panel input[type=password], .panel input[type=number], .panel input[type=tel] { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; color: var(--text); font-weight: 400; width: 100%; }
.panel input:focus, .sheet-card input:focus, .sheet-card select:focus, .sheet-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.set-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px; }
.set-toc::-webkit-scrollbar { display: none; }
.set-toc a { flex: none; }
.panel .ckl { display: flex !important; font-weight: 450; color: var(--text); font-size: 13.5px; } .panel .ckl.done span { color: var(--muted); }

/* Tábla telefonon: széles oszlopok, oldalra csak határozott húzással (JS lapoz) */
@media (max-width: 1099px) and (pointer: coarse) {
  .col, .board-heads .col-h { flex: 0 0 calc(100vw - 44px); max-width: 460px; }
  .board { touch-action: pan-y; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
  .col { scroll-snap-stop: always; }
  .board-heads .col-h { cursor: pointer; }
}
.board-heads { overflow: hidden; overflow: clip; }
