/* Miltima – Jelenléti tervező */
/* ---------- toolbar ---------- */
.tools{display:flex;align-items:center;gap:8px;margin:10px 0 10px;flex-wrap:wrap}
.seg{display:flex;background:#eceef4;border-radius:10px;padding:3px}
.seg button{padding:0 14px;height:calc(var(--ctl) - 6px);border-radius:7px;font-size:13px;color:#3a4057;font-weight:500}
.seg button.on{background:#fff;font-weight:700;box-shadow:0 1px 3px rgba(16,24,64,.08)}
.box{height:var(--ctl);display:flex;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:10px}
.period{padding:0 3px;gap:2px}
.period button{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;color:#3a4057}
.period button:hover,.today-btn:hover,.filter-btn:hover{background:#f2f4f8}
.period .lbl{display:flex;align-items:center;gap:8px;font-weight:700;font-size:13px;min-width:140px;justify-content:center;padding:0 4px;white-space:nowrap}
.period .lbl svg{width:16px;height:16px;color:var(--muted)}
.today-btn,.filter-btn{padding:0 12px;font-weight:500;gap:6px;font-size:13px}
.tools .fld label{display:none}
.filter-btn .badge{background:var(--accent);color:#fff;font-size:11px;border-radius:10px;padding:1px 7px}
.primary{height:var(--ctl);display:flex;align-items:stretch;background:var(--navy);color:#fff;border-radius:10px;box-shadow:0 4px 12px rgba(var(--navy-rgb),.2);overflow:hidden}
.primary button{display:flex;align-items:center;gap:8px;padding:0 14px;font-weight:600;font-size:13px}
.primary button+button{padding:0 8px;border-left:1px solid rgba(255,255,255,.14)}
.primary button:hover{background:var(--navy-2)}

/* ---------- workspace ---------- */
.work{flex:1;min-height:0;display:flex;gap:10px}
.planner{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.board{flex:1;overflow:auto;position:relative;user-select:none}
.grid{position:relative}
.ghead{position:sticky;top:0;z-index:8;display:flex;background:#fff;border-bottom:1px solid var(--line)}
.corner{position:sticky;left:0;z-index:9;width:var(--name-w);flex:none;background:#fff;border-right:1px solid var(--line);padding:8px 10px 0;display:flex;flex-direction:column;box-shadow:6px 0 10px -8px rgba(16,24,64,.12)}
.corner .mini{display:flex;align-items:center;gap:6px;background:#f5f6fa;border-radius:8px;padding:0 8px;height:28px;color:var(--faint)}
.corner .mini svg{width:15px;height:15px}
.corner .mini input{border:0;outline:0;background:none;flex:1;min-width:0;font-size:13px;color:var(--text)}
.corner .hd{display:flex;align-items:center;gap:6px;margin-top:auto;padding:6px 2px 6px 4px;font-weight:700;font-size:11px;letter-spacing:.5px;text-transform:uppercase;color:#3a4057}
.corner .hd span{color:var(--muted);font-weight:600;background:#f1f3f7;border-radius:10px;padding:1px 7px;letter-spacing:0}
.corner .hd .cap{margin-left:auto;width:24px;margin-right:-4px;text-align:center;font-style:normal;font-size:10px;font-weight:700;color:var(--faint);letter-spacing:.4px}
.corner .hd button{color:var(--muted);padding:3px;border-radius:6px;display:grid}.corner .hd button svg{width:15px;height:15px}.corner .hd button:hover{background:#f2f4f8}
.groups{display:flex}
.grp{flex:none;padding:6px 8px 2px;border-left:1px solid var(--line);overflow:hidden;white-space:nowrap}
.grp b{font-size:12px;font-weight:700;margin-right:6px}
.grp span{font-size:11px;color:var(--muted)}
.days{display:flex}
.dh{flex:none;text-align:center;font-size:10px;color:var(--muted);padding:1px 0 4px;line-height:1.35;overflow:hidden}
.dh.wk{border-left:1px solid var(--line)}
.dh b{display:block;font-size:12px;color:var(--text);font-weight:600;width:20px;height:20px;line-height:20px;margin:0 auto;border-radius:50%}
.dh.we,.dh.hol{color:#b3b8c8}.dh.we b,.dh.hol b{color:#a0a6b8}
.dh.today{color:var(--accent);font-weight:700}
.dh.today b{background:var(--accent);color:#fff}
.gbody{position:relative}
.cols{position:absolute;top:0;bottom:0;display:flex;pointer-events:none;z-index:0}
.col{flex:none;border-left:1px solid var(--line-2)}
.col.wk{border-left-color:var(--line)}
.col.we{background:#f6f7fa}
.col.hol{background:repeating-linear-gradient(135deg,#f1f2f6 0 4px,#fafbfc 4px 8px)}
.col.today{background:rgba(var(--accent-rgb),.07);border-left:1.5px solid var(--t-l);border-right:1.5px solid var(--t-l)}
.row{display:flex;position:relative;z-index:1;border-bottom:1px solid var(--line-2);height:var(--row-h,46px)}
.emp{position:sticky;left:0;z-index:4;width:var(--name-w);flex:none;background:#fff;border-right:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:0 6px 0 12px;box-shadow:6px 0 10px -8px rgba(16,24,64,.12);transition:background .12s}
.emp::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--tc);opacity:0;transition:opacity .12s}
.row:hover .emp::before{opacity:1}
.row:hover .emp{background:#f8f9fd}
.row:hover .track{background:rgba(var(--accent-rgb),.025)}
.emp-t{min-width:0;flex:1}
.emp-t{line-height:1.25}
.emp-t b{display:block;font-weight:600;font-size:13px;letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.emp-t small{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden}
.emp-t small i{width:6px;height:6px;border-radius:50%;background:var(--tc);flex:none}
.emp-t small em{font-style:normal;color:var(--faint);overflow:hidden;text-overflow:ellipsis}
.emp .av{width:32px;height:32px;font-size:11px;font-weight:700;letter-spacing:.4px;background:hsl(var(--h) 75% 95%);color:hsl(var(--h) 50% 36%);box-shadow:inset 0 0 0 1px hsl(var(--h) 60% 86%)}
.now{width:22px;height:22px;border-radius:6px;display:grid;place-items:center;background:var(--bg);color:var(--fg);border:1px solid var(--bd);flex:none}
.now svg.i{width:13px;height:13px}
.now.none{background:none;border:1px dashed #dde0e8}
.more{width:24px;height:24px;border-radius:7px;display:none;place-items:center;color:var(--muted);flex:none;margin-right:-1px}
.row:hover .more,.more:focus-visible{display:grid}.row:hover .now{display:none}
@media (hover:none){.more{display:grid}}
.more:hover{background:#eef0f5;color:var(--text)}
.track{position:relative;flex:none;cursor:crosshair}
.track.drop{background:rgba(var(--accent-rgb),.04)}
.offday{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,rgba(17,21,43,.07) 0 3px,rgba(17,21,43,.015) 3px 8px);pointer-events:none;border-left:1px dashed rgba(17,21,43,.12);border-right:1px dashed rgba(17,21,43,.12)}
.emp-t small em.st-left{color:#dc2626}
.emp-t small em.st-future{color:#2457d6}
.drop-hint{position:absolute;top:6px;bottom:6px;border:1.5px dashed var(--accent);border-radius:8px;background:rgba(var(--accent-rgb),.08);pointer-events:none}
.selbox{position:absolute;top:5px;bottom:5px;border:1.5px dashed var(--t-l);border-radius:8px;background:repeating-linear-gradient(135deg,rgba(var(--accent-rgb),.08) 0 5px,rgba(var(--accent-rgb),.02) 5px 10px);pointer-events:none}
.empty{padding:60px 20px;text-align:center;color:var(--muted);position:sticky;left:0;width:min(100%,600px)}

/* ---------- bars ---------- */
.bar{position:absolute;top:5px;bottom:5px;border-radius:6px;background:var(--bg);border:1px solid var(--bd);color:var(--fg);display:flex;align-items:center;gap:7px;padding:0 8px;font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;cursor:grab;transition:box-shadow .15s,transform .15s}
.bar:hover{box-shadow:0 3px 10px rgba(16,24,64,.12)}
.bar.dragging{cursor:grabbing;box-shadow:0 8px 20px rgba(16,24,64,.18);z-index:3;transition:none}
.bar .lbl{color:var(--text);overflow:hidden;text-overflow:ellipsis}
.bar svg.i{width:15px;height:15px}
.bar .grip{position:absolute;right:0;top:0;bottom:0;width:7px;cursor:ew-resize;z-index:1}
.bar .grip.l{right:auto;left:0}
.bar .grip::after{content:"";position:absolute;top:28%;bottom:28%;left:2px;width:2px;border-radius:2px;background:var(--fg);opacity:0;transition:opacity .12s}
.bar .grip.l::after{left:3px}
.bar:hover .grip::after,.bar.dragging .grip::after{opacity:.45}
.bar.bad{--bg:#fee2e2;--bd:#ef4444;--fg:#dc2626;cursor:not-allowed;box-shadow:0 0 0 3px rgba(239,68,68,.22),0 8px 20px rgba(220,38,38,.18)}
.bar.bad .lbl{color:#b91c1c}
.bar.clash{border-color:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,.35);animation:clash .6s ease-in-out infinite alternate}
@keyframes clash{to{box-shadow:0 0 0 4px rgba(239,68,68,.12)}}
.drop-hint.bad{border-color:#ef4444;background:rgba(239,68,68,.1)}
.bar.tiny{padding:0;justify-content:center;gap:0}.bar.tiny .lbl{display:none}
.bar.micro svg{display:none}

/* ---------- legend/footer ---------- */
.foot{display:flex;align-items:center;gap:12px;padding:5px 10px;border-top:1px solid var(--line);font-size:12px;color:#3a4057}
.lg{display:flex;align-items:center;gap:7px;cursor:pointer;opacity:1;white-space:nowrap}
@media (max-width:1400px){.foot .lg:nth-last-child(-n+3):not(.r){display:none}}
.lg.off{opacity:.35}
.lg i{width:11px;height:11px;border-radius:50%;background:var(--fg);opacity:.55}
.lg.t-beteg i{background:none;opacity:1;color:var(--fg);font-style:normal;font-weight:800;display:grid;place-items:center;font-size:13px}
.lg .sw{width:12px;height:12px;border-radius:3px}
.foot .r{margin-left:auto;display:flex;align-items:center;gap:6px}
.zoom{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;height:28px}
.zoom button{width:26px;height:26px;display:grid;place-items:center;color:#3a4057}
.zoom span{width:44px;text-align:center;font-weight:500;font-size:12px}
.zoom svg,.foot .sq svg{width:15px;height:15px}
.foot .sel select{height:28px;border-radius:8px;min-width:118px;font-size:12px}
.foot .sq{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;color:#3a4057}

/* ---------- right panel ---------- */
.aside{width:212px;flex:none;display:flex;flex-direction:column;gap:10px;min-height:0;overflow:auto}
.aside .card{padding:10px}
.tabs{display:flex;border-bottom:1px solid var(--line);margin:-2px -2px 10px}
.tabs button{flex:1;padding:4px 2px 7px;white-space:nowrap;font-size:12px;color:var(--muted);font-weight:500;border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs button.on{color:var(--text);font-weight:700;border-color:var(--navy)}
.pal{display:flex;flex-direction:column;gap:5px}
.pi{display:flex;align-items:center;gap:9px;padding:0 10px;height:32px;border-radius:8px;font-size:13px;background:var(--bg);border:1px solid var(--bd);color:var(--fg);cursor:grab;font-weight:500}
.pi span{color:var(--text)}
.pi:hover{box-shadow:0 3px 10px rgba(16,24,64,.1);transform:translateY(-1px)}
.pi svg.i{width:16px;height:16px}
.pi.tpl{--bg:#f7f8fb;--bd:var(--line);--fg:#3a4057;height:32px;padding:0 10px;justify-content:space-between;gap:8px}
.pi.tpl b{color:var(--text);font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pi.tpl .dots{display:flex;gap:2px;flex:none}
.pi.tpl .dots i{width:8px;height:12px;border-radius:2px;background:var(--fg)}
.hint{display:flex;gap:8px;align-items:flex-start;margin-top:8px;padding:8px;border-radius:8px;background:#fafbfd;font-size:11px;color:var(--muted);line-height:1.4}
.hint svg{color:#f59e0b;width:15px;height:15px}
.aside h3{margin:0 0 6px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.qa{display:flex;flex-direction:column;gap:2px}
.qa button{display:flex;align-items:center;gap:9px;padding:7px 8px;border:1px solid transparent;border-radius:8px;text-align:left;font-size:12.5px;font-weight:500}
.qa svg.i{width:16px;height:16px;color:#3a4057}
.qa button:hover{background:#f7f8fb;border-color:#dfe2ea}

/* ---------- responsive ---------- */
@media (max-height:820px){:root{--row-h:42px}}
/* kisebb kijelzőn a jobb panel ikonsávvá szűkül */
@media (max-width:1280px){
  .aside{width:52px;gap:8px}
  .aside .card{padding:6px}
  .aside .tabs{flex-direction:column;border:0;margin:0 0 6px;gap:2px}
  .aside .tabs button{font-size:0;height:22px;padding:0;border:0;border-radius:6px;margin:0}
  .aside .tabs button::before{font-size:10px;font-weight:700;content:attr(data-short)}
  .aside .tabs button.on{background:#eceef4}
  .pi,.pi.tpl{height:38px;padding:0;justify-content:center}
  .pi span,.pi.tpl b,.aside h3,.hint{display:none}
  .pi.tpl .dots i{width:5px;height:14px}
  .qa button{justify-content:center;padding:9px 0;font-size:0;gap:0}
}
@media (max-width:1180px){
  .filter-btn{font-size:0;gap:0;padding:0 9px}.filter-btn .badge{font-size:11px;margin-left:4px}
  .primary button:first-child{padding:0 10px}.primary button:first-child span{display:none}
  .seg button{padding:0 10px}.period .lbl{min-width:0}
  .foot .sel{display:none}
}
@media (max-width:900px){
  :root{--name-w:170px}
  .tools{gap:8px}
  .seg button{padding:0 14px}
  .fld label{display:none}
  .primary button:first-child span{display:none}
  .foot .lg{display:none}
  .emp .av,.now{display:none}
}
