/* ====== Romex PM — prototyp ====== */
:root{
  --bg:#f1f5f9; --surface:#ffffff; --ink:#0f172a; --muted:#64748b;
  --line:#e2e8f0; --line2:#cbd5e1; --brand:#1b2a55; --accent:#c1123f; --accent2:#e11d48;
  --ok:#16a34a; --warn:#dc2626; --info:#2563eb;
  --radius:12px; --shadow:0 1px 3px rgba(15,23,42,.08),0 1px 2px rgba(15,23,42,.04);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);color:var(--ink);font-size:15px;line-height:1.45}
a{color:inherit;text-decoration:none}
h1{font-size:1.5rem;margin:.2rem 0}
h2{font-size:1rem;margin:0 0 .6rem;letter-spacing:.01em}
.muted{color:var(--muted)} .sm{font-size:.82rem} .mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.85rem}
.r{text-align:right} .warn{color:var(--warn)} .pre{white-space:pre-wrap}

/* ---- topbar ---- */
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:1rem;
  background:#fff;color:var(--ink);padding:.4rem 1.2rem;height:60px;border-bottom:1px solid var(--line)}
.brand{flex:none;display:flex;align-items:center;font-weight:800;letter-spacing:.01em;
  font-size:1.25rem;text-transform:lowercase;color:var(--brand)}
.brand-img{height:38px;display:block}
.brand-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);
  margin-left:3px;vertical-align:.05em}
.brand.big{font-size:2.4rem}
.brand.big .brand-img{height:64px}
.search{flex:1;display:flex;justify-content:center;min-width:0}
.search input{width:100%;max-width:520px;border:0;border-radius:20px;padding:.5rem 1rem;
  background:#f1f5f9;color:var(--ink);font:inherit}
.search input::placeholder{color:#94a3b8}
.search input:focus{outline:2px solid var(--accent);background:#fff}
.topbar-right{display:flex;align-items:center;gap:.3rem;flex:none;margin-left:auto}

.bell{position:relative;display:inline-grid;place-items:center;width:40px;height:40px;
  border-radius:50%;font-size:1.15rem;color:var(--ink)}
.bell:hover{background:#f1f5f9}
.bell .bell-ic{display:inline-block;transform-origin:50% 0}
.bell.ring .bell-ic{animation:bell-shake 2.6s ease-in-out infinite}
.dot{position:absolute;top:3px;right:2px;background:var(--accent);color:#fff;font-size:.62rem;
  min-width:17px;height:17px;border-radius:9px;display:grid;place-items:center;padding:0 3px;
  font-weight:700;box-shadow:0 0 0 2px #fff}
.bell.ring .dot{animation:dot-pulse 2.6s ease-in-out infinite}
@keyframes bell-shake{
  0%,82%,100%{transform:rotate(0)}
  84%{transform:rotate(15deg)} 86%{transform:rotate(-13deg)}
  88%{transform:rotate(10deg)} 90%{transform:rotate(-8deg)}
  92%{transform:rotate(6deg)} 94%{transform:rotate(-4deg)} 96%{transform:rotate(2deg)}
}
@keyframes dot-pulse{0%,82%,100%{transform:scale(1)}86%{transform:scale(1.25)}92%{transform:scale(1.1)}}

.avatar{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;
  background:var(--accent);color:#fff;font-size:.74rem;font-weight:700;flex:none;overflow:hidden}
img.avatar{object-fit:cover}
.avatar.sm{width:24px;height:24px;font-size:.62rem}
.avatar.lg{width:50px;height:50px;font-size:1.05rem}
.avatar.xl{width:108px;height:108px;font-size:2.1rem}

/* user dropdown */
.user-menu{position:relative}
.user-btn{display:flex;align-items:center;gap:.45rem;background:transparent;border:0;color:var(--ink);
  cursor:pointer;padding:.2rem .5rem .2rem .3rem;border-radius:22px;font:inherit}
.user-btn:hover{background:#f1f5f9}
.user-name{font-weight:600;font-size:.9rem}
.chev{font-size:.7rem;opacity:.85}
.user-dd{position:absolute;right:0;top:calc(100% + 8px);background:#fff;color:var(--ink);
  border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(15,23,42,.18);
  min-width:235px;padding:.4rem;opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:.15s;z-index:50}
.user-menu.open .user-dd{opacity:1;visibility:visible;transform:translateY(0)}
.user-dd a{display:block;padding:.55rem .7rem;border-radius:8px;font-weight:600;color:#334155}
.user-dd a:hover{background:#f1f5f9}
.user-dd hr{border:0;border-top:1px solid var(--line);margin:.3rem 0}
.user-dd-head{display:flex;align-items:center;gap:.6rem;padding:.5rem .6rem .7rem;border-bottom:1px solid var(--line);margin-bottom:.3rem}
.udd-id{display:flex;flex-direction:column;min-width:0}
.udd-id strong{font-size:.9rem}
.udd-id small{color:var(--muted);font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}
@media(max-width:820px){.user-name{display:none}.topbar{padding:.5rem .8rem;gap:.5rem}}

/* ---- profil ---- */
.profile-badges{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin:.25rem 0}
.profile-badges .role{margin-left:0}      /* role nesmí odlétat doprava */
.profile-stats{display:flex;gap:.6rem;margin:.55rem 0 .2rem;flex-wrap:wrap}
.profile-stats .st{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:.45rem .9rem;
  text-align:center;color:inherit;min-width:96px;transition:border-color .12s,box-shadow .12s}
.profile-stats .st:hover{border-color:var(--accent);box-shadow:var(--shadow)}
.profile-stats .st b{display:block;font-size:1.3rem;color:var(--accent)}
.file-input{font:inherit}

/* profil – jedna sekce */
.profile{margin-left:auto;margin-right:auto}
.profile-top{display:flex;gap:1.6rem;align-items:center;flex-wrap:wrap}
.profile-photo-col{flex:none;display:flex;flex-direction:column;align-items:center;gap:.35rem;
  text-align:center;width:140px}
.profile-photo{cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:.4rem}
.profile-photo .file-input{display:none}        /* skryté, klik na label otevře výběr */
.profile-photo .avatar{transition:filter .12s}
.profile-photo:hover .avatar{filter:brightness(.92)}
.profile-photo-edit{font-size:.74rem;font-weight:700;color:var(--accent);max-width:130px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-photo-hint{font-size:.7rem;color:var(--muted);line-height:1.3}
.link-rm{font-size:.74rem;font-weight:600;color:var(--accent)}
.link-rm:hover{text-decoration:underline}
.profile-id{flex:1;min-width:240px}
.profile-id h2{margin:.1rem 0 0}
.profile .sep{border:0;border-top:1px solid var(--line);margin:1.2rem 0}
.profile-h{margin:1.3rem 0 .5rem;font-size:1.05rem}
.profile-h:first-of-type{margin-top:0}

/* ---- layout ---- */
.navtoggle{background:transparent;border:0;color:var(--ink);font-size:1.25rem;cursor:pointer;
  padding:.2rem .55rem;border-radius:7px;flex:none;line-height:1}
.navtoggle:hover{background:#f1f5f9}
.layout{display:flex;align-items:flex-start}                 /* na celou šířku */
.side{position:sticky;top:58px;width:218px;flex:none;padding:.8rem .6rem;
  height:calc(100vh - 58px);display:flex;flex-direction:column;gap:.15rem;
  background:#f8fafc;border-right:1px solid var(--line);transition:width .15s}
.side a{display:flex;align-items:center;gap:.7rem;padding:.6rem .7rem;border-radius:9px;
  color:#334155;font-weight:600;white-space:nowrap;overflow:hidden;position:relative}
.side a:hover{background:#e2e8f0}
.side a.on{background:#fff;box-shadow:var(--shadow);color:var(--ink)}
.side .ic{font-size:1.15rem;width:24px;text-align:center;flex:none}
.side .lbl{flex:1}
.navdot{background:var(--accent);color:#fff;border-radius:9px;font-size:.7rem;padding:0 6px}
.btn-new{margin-top:.6rem;background:var(--accent)!important;color:#fff!important}
.btn-new:hover{background:#9f0e33!important}
.side-foot{margin-top:auto;font-size:.78rem;color:var(--muted);padding:.6rem .7rem;border-top:1px solid var(--line)}
.content{flex:1;min-width:0;padding:1.1rem 1.5rem 5rem}
/* sbalený rail: jen ikony */
.nav-collapsed .side{width:62px}
.nav-collapsed .side .lbl{display:none}
.nav-collapsed .side a{justify-content:center;padding:.6rem 0}
.nav-collapsed .side .navdot{position:absolute;top:5px;right:9px}
.nav-collapsed .side-foot{display:none}
.nav-collapsed .side .btn-new .ic{font-size:1.35rem}

/* ---- bottom nav (mobil) ---- */
.bottomnav{display:none}
@media(max-width:820px){
  .side{display:none}
  .search{display:none}
  .navtoggle{display:none}
  .content{padding:1rem .8rem 5.5rem}
  .layout{display:block}
  .bottomnav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:40;background:#fff;
    border-top:1px solid var(--line);justify-content:space-around;padding:.35rem 0 .5rem}
  .bottomnav a{flex:1;text-align:center;font-size:1.25rem;color:var(--muted);position:relative}
  .bottomnav a span{display:block;font-size:.65rem;margin-top:.1rem}
  .bottomnav a.on{color:var(--accent)}
  .bottomnav .bdot{position:absolute;top:-2px;right:28%;width:8px;height:8px;border-radius:50%;background:var(--accent)}
}

/* ---- cards / generic ---- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:1rem;box-shadow:var(--shadow);margin-bottom:1rem}
.page-head{margin-bottom:1rem}
.page-head.row,.row{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;flex-wrap:wrap}
.back{display:inline-block;color:var(--muted);margin-bottom:.5rem;font-weight:600}
.flash{padding:.6rem .9rem;border-radius:9px;margin-bottom:.8rem;font-size:.9rem}
.flash--ok{background:#dcfce7;color:#166534}
.flash--error{background:#fee2e2;color:#991b1b}
.flash--message{background:#dbeafe;color:#1e40af}
.empty{text-align:center;color:var(--muted);padding:2rem}

/* ---- buttons ---- */
.btn{display:inline-block;border:1px solid var(--line2);background:#fff;border-radius:9px;
  padding:.45rem .8rem;font-weight:600;cursor:pointer;font-size:.88rem}
.btn:hover{background:#f8fafc}
.btn--primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn--primary:hover{background:#9f0e33}
.toolbar{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.toggle{display:inline-flex;border:1px solid var(--line2);border-radius:9px;overflow:hidden}
.toggle a{padding:.4rem .8rem;font-weight:600;font-size:.85rem}
.toggle a.on{background:var(--brand);color:#fff}

/* ---- badges / tags ---- */
.badge{display:inline-block;padding:.12rem .5rem;border-radius:20px;font-size:.72rem;font-weight:700;
  background:#e2e8f0;color:#334155;white-space:nowrap}
.badge--poptavka,.badge--nabidka{background:#e0e7ff;color:#3730a3}
.badge--zasmluvneno{background:#cffafe;color:#155e75}
.badge--priprava{background:#fef3c7;color:#92400e}
.badge--pripraveno-k-montazi{background:#fae8ff;color:#86198f}
.badge--v-realizaci{background:#dbeafe;color:#1d4ed8}
.badge--predani-nedodelky{background:#ffedd5;color:#9a3412}
.badge--fakturace-zadrzne{background:#dcfce7;color:#166534}
.badge--archiv{background:#e2e8f0;color:#475569}
.badge--todo{background:#e2e8f0;color:#475569}
.badge--probiha{background:#dbeafe;color:#1d4ed8}
.badge--kontrola{background:#fef3c7;color:#92400e}
.badge--hotovo{background:#dcfce7;color:#166534}
.badge--blokovano{background:#fee2e2;color:#991b1b}
.badge--nezahajeno{background:#f1f5f9;color:#64748b}
.badge--neresi-se{background:#f1f5f9;color:#94a3b8}
.badge--vystavena{background:#dbeafe;color:#1d4ed8}
.badge--po-splatnosti{background:#fee2e2;color:#991b1b}
.badge--uhrazena{background:#dcfce7;color:#166534}
.tag{display:inline-block;padding:.1rem .45rem;border-radius:6px;font-size:.7rem;font-weight:700}
.tag--priprava{background:#fef3c7;color:#92400e}
.tag--nakup{background:#e0e7ff;color:#3730a3}
.tag--montaz{background:#dbeafe;color:#1d4ed8}
.tag--fakturace{background:#dcfce7;color:#166534}
.tag--servis{background:#fae8ff;color:#86198f}
.tag--ostatni{background:#e2e8f0;color:#475569}
.prio{font-size:.7rem;font-weight:700;padding:.1rem .4rem;border-radius:6px}
.prio--vysoka{background:#ffedd5;color:#9a3412}
.prio--urgentni{background:#fee2e2;color:#991b1b}
.termin{font-size:.78rem;color:var(--muted);white-space:nowrap}
.termin.over{color:var(--warn);font-weight:700}
.termin.dnes{color:var(--accent);font-weight:700}
.chip{font-size:.75rem;background:#f1f5f9;border:1px solid var(--line);border-radius:20px;padding:.1rem .55rem;color:#475569}

/* ---- task line ---- */
.taskline{display:flex;align-items:center;gap:.6rem;padding:.5rem .3rem;border-bottom:1px solid var(--line)}
.taskline:last-child{border-bottom:0}
.t-name{font-weight:600;flex:1;min-width:120px}
.t-name:hover{color:var(--accent)}
.t-meta{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.t-proj{font-size:.76rem;color:var(--info);background:#eff6ff;padding:.05rem .4rem;border-radius:5px}
@media(max-width:820px){.t-meta{width:100%;order:3}.taskline{flex-wrap:wrap}}

/* ---- progress ---- */
.progress{background:#e2e8f0;border-radius:10px;height:7px;overflow:hidden;margin:.3rem 0}
.progress .bar{height:100%;background:var(--accent2);border-radius:10px}

/* ---- agenda ---- */
.agenda-grid{display:grid;grid-template-columns:1fr 340px;gap:1rem;align-items:start}
@media(max-width:980px){.agenda-grid{grid-template-columns:1fr}}
.sect h2{display:flex;align-items:center;gap:.5rem}
.count{background:#e2e8f0;border-radius:20px;font-size:.7rem;padding:0 .5rem;color:#475569;font-weight:700}
.sect--po{border-left:4px solid var(--warn)}
.sect--dnes{border-left:4px solid var(--accent)}
.mil-row{display:block;padding:.5rem .2rem;border-bottom:1px solid var(--line)}
.mil-row:last-child{border-bottom:0}
.mil-name{font-weight:600;display:block}
.mil-sub{font-size:.78rem;color:var(--muted)}
.mil-meta{display:flex;gap:.4rem;align-items:center;margin-top:.2rem;flex-wrap:wrap}
.notif-row{display:flex;flex-direction:column;padding:.5rem .2rem;border-bottom:1px solid var(--line)}
.notif-row:last-child{border-bottom:0}
.notif-row.unread{background:#fff7ed;border-radius:7px}
.notif-typ{font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);font-weight:700}
.notif-text{font-size:.86rem}
.notif-row.big{flex-direction:row;align-items:center;gap:.8rem}
.notif-row.big .notif-text{flex:1}
.more{display:inline-block;margin-top:.5rem;color:var(--info);font-weight:600;font-size:.85rem}

/* ---- table ---- */
.tablewrap{overflow-x:auto;padding:0}
.table{width:100%;border-collapse:collapse;font-size:.88rem}
.table th{ text-align:left;padding:.6rem .7rem;border-bottom:2px solid var(--line);color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.03em}
.table td{padding:.55rem .7rem;border-bottom:1px solid var(--line)}
.table tbody tr:hover{background:#f8fafc;cursor:pointer}

/* ---- kanban ---- */
.board{display:flex;gap:.6rem;overflow-x:auto;padding-bottom:.5rem;align-items:stretch;
  min-height:calc(100vh - 215px)}
.column{flex:1 1 0;min-width:190px;background:#e9eef5;border-radius:var(--radius);padding:.5rem;
  display:flex;flex-direction:column;max-height:calc(100vh - 200px)}
.col-head{font-weight:700;font-size:.82rem;padding:.3rem .4rem .6rem;display:flex;justify-content:space-between;color:#334155;flex:none}
.col-body{min-height:40px;display:flex;flex-direction:column;gap:.5rem;flex:1;overflow-y:auto}
.col-body.drop{outline:2px dashed var(--accent);outline-offset:-4px;border-radius:9px}
.kcard{background:#fff;border:1px solid var(--line);border-radius:10px;padding:.6rem;box-shadow:var(--shadow);cursor:grab}
.kcard.dragging{opacity:.5}
.kcard-num{color:var(--muted)}
.kcard-name{font-weight:700;margin:.1rem 0}
.kcard-cust{font-size:.78rem}
.kcard-cena{font-weight:700;color:var(--accent);margin-top:.2rem}
.kcard-foot{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;font-size:.74rem;color:var(--muted);margin-top:.3rem}
.kcard-foot .avatar{margin-left:auto}
.hint{color:var(--muted);font-size:.82rem;margin-top:.6rem}

/* ---- detail zakázky ---- */
.proj-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:.8rem}
.proj-num{color:var(--muted);font-size:.8rem}
.proj-sub{color:var(--muted)}
.stav-pick select{padding:.45rem .7rem;border-radius:9px;border:1px solid var(--line2);font-weight:700;background:#fff}
.cards-row{display:flex;gap:.7rem;flex-wrap:wrap;margin-bottom:1rem}
.kpi{flex:1;min-width:130px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:.6rem .8rem;box-shadow:var(--shadow)}
.kpi-l{display:block;font-size:.74rem;color:var(--muted)}
.kpi strong{font-size:1.05rem}
.tabs{display:flex;gap:.3rem;border-bottom:2px solid var(--line);margin-bottom:1rem;overflow-x:auto}
.tab{background:none;border:0;padding:.6rem .9rem;font-weight:700;color:var(--muted);cursor:pointer;
  border-bottom:2px solid transparent;margin-bottom:-2px;white-space:nowrap}
.tab i{font-style:normal;font-size:.68rem;background:#e2e8f0;border-radius:10px;padding:0 .4rem;margin-left:.2rem;color:#475569}
.tab.on{color:var(--ink);border-bottom-color:var(--accent)}
.panel{display:none}
.panel.on{display:block}
.two-col{display:grid;grid-template-columns:1.4fr 1fr;gap:1rem;align-items:start}
@media(max-width:900px){.two-col{grid-template-columns:1fr}}
.form label{display:block;font-size:.8rem;font-weight:600;color:#475569;margin-bottom:.6rem}
.form input,.form select,.form textarea{display:block;width:100%;margin-top:.2rem;padding:.5rem .6rem;
  border:1px solid var(--line2);border-radius:8px;font:inherit;background:#fff}
.form textarea{resize:vertical}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:.4rem 1rem}
@media(max-width:600px){.grid2{grid-template-columns:1fr}}
.team-row{display:flex;align-items:center;gap:.6rem;padding:.35rem 0}
.role{font-size:.72rem;color:var(--muted);margin-left:auto;background:#f1f5f9;padding:.05rem .45rem;border-radius:6px}

/* milníky */
.milestone{padding:.7rem .9rem}
.mil-top{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.mil-poradi{width:22px;height:22px;border-radius:50%;background:#e2e8f0;color:#475569;display:grid;place-items:center;font-size:.72rem;font-weight:700;flex:none}
.mil-title{font-weight:700}
.mil-right{margin-left:auto;display:flex;align-items:center;gap:.4rem;font-size:.78rem;color:var(--muted)}
.mil-tasks{margin-top:.5rem;border-top:1px dashed var(--line);padding-top:.2rem}

/* konverzace */
.convo{display:flex;flex-direction:column;gap:.7rem;margin-bottom:1rem}
.post{display:flex;gap:.6rem}
.post-body{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:.5rem .7rem;flex:1}
.post-head{display:flex;gap:.5rem;align-items:baseline;margin-bottom:.15rem}
.post-text{white-space:pre-wrap}

/* ---- úkol detail ---- */
.task-head{margin-bottom:1rem}
.task-meta{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.4rem}
.checkrow{display:flex;align-items:center;gap:.6rem;padding:.35rem 0;border:0;background:none;width:100%;text-align:left}
.check{width:22px;height:22px;border-radius:6px;border:2px solid var(--line2);background:#fff;cursor:pointer;color:#fff;font-weight:900;flex:none}
.check.done{background:var(--ok);border-color:var(--ok)}
.strike{text-decoration:line-through;color:var(--muted)}
.task-side h2{margin-top:1rem}
.task-side h2:first-child{margin-top:0}
.full{width:100%;padding:.5rem;border:1px solid var(--line2);border-radius:8px;font:inherit}

/* ---- timeline ---- */
.tl-filters{display:flex;gap:1rem;flex-wrap:wrap;align-items:end}
.tl-filters label{font-size:.8rem;font-weight:600;color:#475569}
.tl-filters select{display:block;margin-top:.2rem;padding:.4rem .5rem;border:1px solid var(--line2);border-radius:8px}
.tl-wrap{padding:.5rem}
.tl-scroll{overflow-x:auto}
.tl{min-width:760px;position:relative}
.tl-axis{position:relative;height:22px;margin-left:200px;border-bottom:1px solid var(--line)}
.tl-tick{position:absolute;font-size:.7rem;color:var(--muted);transform:translateX(-50%);top:2px;white-space:nowrap}
.tl-today{position:absolute;top:0;bottom:0;width:2px;background:var(--accent);z-index:3}
.tl-row{display:flex;align-items:center;border-bottom:1px solid var(--line);min-height:40px}
.tl-label{width:200px;flex:none;padding:.3rem .5rem .3rem 0;font-size:.82rem;line-height:1.15}
.tl-label strong{display:block}
.tl-label small{color:var(--muted)}
.tl-track{position:relative;flex:1;height:30px}
.tl-today.thin{opacity:.35;width:2px}
.tl-bar{position:absolute;top:5px;height:20px;border-radius:5px;display:flex;align-items:center;
  padding:0 .35rem;overflow:hidden;color:#fff;font-size:.7rem;font-weight:600;min-width:6px}
.tl-bar.done{opacity:.55}
.tl-bar-txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat--priprava{background:#d97706}
.cat--nakup{background:#4f46e5}
.cat--montaz{background:#2563eb}
.cat--fakturace{background:#16a34a}
.cat--servis{background:#a21caf}
.cat--ostatni{background:#64748b}
.tl-empty{padding:1.5rem;text-align:center}
.legend{display:flex;gap:1rem;flex-wrap:wrap;font-size:.8rem;color:var(--muted);margin-top:.4rem}
.leg{display:flex;align-items:center;gap:.35rem}
.sw{width:14px;height:14px;border-radius:4px;display:inline-block}
.today-sw{background:var(--accent)}

/* ---- login ---- */
.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0f172a,#1e293b);padding:1rem}
.login-card{background:#fff;border-radius:16px;padding:2rem;width:100%;max-width:420px;box-shadow:0 20px 40px rgba(0,0,0,.3)}
.login-card .brand{color:var(--brand)}
.brand-sub{color:var(--accent);font-weight:800;font-size:.7rem;letter-spacing:.18em;
  text-transform:uppercase;margin:.1rem 0 .2rem}
.login-form{margin:1rem 0}
.login-form label{display:block;font-size:.82rem;font-weight:600;margin-bottom:.7rem}
.login-form input{display:block;width:100%;margin-top:.25rem;padding:.6rem;border:1px solid var(--line2);border-radius:9px;font:inherit}
.login-form .btn{width:100%;margin-top:.4rem}
.demo{border-top:1px solid var(--line);margin-top:1rem;padding-top:1rem}
.demo-h{font-size:.78rem;color:var(--muted);margin-bottom:.6rem}
.demo-row{margin-bottom:.4rem}
.demo-btn{display:flex;align-items:center;gap:.7rem;width:100%;background:#f8fafc;border:1px solid var(--line);
  border-radius:10px;padding:.5rem .7rem;cursor:pointer;text-align:left}
.demo-btn:hover{background:#f1f5f9;border-color:var(--line2)}
.demo-name{display:flex;flex-direction:column;font-weight:600;font-size:.88rem}
.demo-name small{font-weight:400;color:var(--muted);font-size:.74rem}
.demo-go{margin-left:auto;color:var(--accent);font-weight:800}
code{background:#f1f5f9;padding:.05rem .3rem;border-radius:4px;font-size:.85em}

/* ---- editační prvky (dotažení UI) ---- */
.inline{display:inline}
.nowrap{white-space:nowrap}
form.inline{display:inline-block}
.btn.sm{padding:.25rem .55rem;font-size:.78rem}
.btn--danger{background:#fff;border-color:#fca5a5;color:#b91c1c}
.btn--danger:hover{background:#fee2e2}
.full{width:100%}
.xbtn{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:1.05rem;
  line-height:1;padding:.15rem .35rem;border-radius:6px}
.xbtn:hover{background:#fee2e2;color:#b91c1c}
.mini-select{padding:.2rem .4rem;border:1px solid var(--line2);border-radius:7px;font:inherit;font-size:.8rem}

/* rozbalovací formuláře (details/summary) */
.adder{margin-bottom:1rem}
.adder>summary{cursor:pointer;font-weight:700;color:var(--accent);list-style:none;
  padding:.5rem .2rem;user-select:none}
.adder>summary::-webkit-details-marker{display:none}
.adder>summary:hover{color:#9f0e33}
.adder[open]>summary{margin-bottom:.6rem;border-bottom:1px solid var(--line)}
.mini-form{margin:0}
.mini-form label{font-size:.78rem}
.mini-form .btn{margin-top:.2rem}

/* malé „+ Nový…" tlačítko v řádku s nadpisem (formulář se rozbalí jako popover) */
.add-head{position:relative;margin:0;flex:none}
.add-head .mini-form.pop{right:0;left:auto;top:calc(100% + .45rem);min-width:340px;max-width:92vw}
@media(max-width:560px){.add-head .mini-form.pop{position:fixed;left:1rem;right:1rem;top:auto;min-width:0;width:auto}}
.addrow{display:flex;gap:.4rem;align-items:center;margin-top:.6rem}
.addrow input{flex:1;margin-top:0}
.addrow select{margin-top:0;max-width:160px}
.addrow .btn{margin-top:0;padding:.4rem .7rem}

.mil-actions{display:flex;gap:.5rem;align-items:flex-start;flex-wrap:wrap;margin-top:.6rem;
  padding-top:.5rem;border-top:1px dashed var(--line)}
.mil-actions .adder{margin-bottom:0}
.mil-actions .adder>summary{padding:.3rem .5rem;font-size:.82rem;background:#f1f5f9;border-radius:7px}
.mil-actions .mini-form{margin-top:.5rem;background:#f8fafc;padding:.7rem;border-radius:9px;
  border:1px solid var(--line);min-width:280px}

.filterbar{display:flex;gap:1rem;align-items:end;flex-wrap:wrap}
.filterbar label{font-size:.78rem;font-weight:600;color:#475569}
.filterbar select{display:block;margin-top:.2rem;padding:.35rem .5rem;border:1px solid var(--line2);border-radius:8px}

.chk{display:flex!important;align-items:center;gap:.4rem;flex-direction:row!important}
.chk input{width:auto!important;margin-top:0!important}

/* sub-tabs (číselníky) */
.subtabs{margin-bottom:1rem}

/* řádková editace v tabulce */
.rowedit{display:inline-block}
.rowedit>summary{list-style:none;display:inline-block}
.rowedit>summary::-webkit-details-marker{display:none}
.rowedit[open]>summary{outline:2px solid var(--accent);border-radius:9px}
.mini-form.pop{position:absolute;right:1rem;z-index:20;background:#fff;border:1px solid var(--line2);
  box-shadow:0 12px 30px rgba(15,23,42,.18);border-radius:12px;padding:1rem;margin-top:.4rem;
  min-width:320px;text-align:left}
.tablewrap{position:relative}

/* 2FA – záložní kódy a klíč */
.codes{display:flex;flex-wrap:wrap;gap:.5rem;margin:.7rem 0}
.codes code{background:#f1f5f9;border:1px solid var(--line);padding:.35rem .6rem;border-radius:7px;
  font-size:.95rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.codes code.secret{font-size:1.1rem;letter-spacing:.08em;font-weight:700;color:var(--brand)}

/* editace přes „Upravit/Přejmenovat" = vycentrovaný modal přes celou stránku (ne add-head dropdowny) */
.rowedit:not(.add-head)[open]::before{content:"";position:fixed;inset:0;background:rgba(15,23,42,.5);
  backdrop-filter:blur(1px);z-index:1000}
.rowedit:not(.add-head) .mini-form.pop{position:fixed;left:50%;top:50%;right:auto;
  transform:translate(-50%,-50%);z-index:1001;width:min(480px,92vw);max-height:86vh;overflow:auto;
  margin:0;box-shadow:0 25px 60px rgba(0,0,0,.45)}

/* ===== Šablony zakázek ===== */
.row.gap{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:.3rem 0}
.sablona-list{display:flex;flex-direction:column;gap:.6rem}
.sablona-card{display:flex;align-items:center;gap:1rem;justify-content:space-between}
.sablona-card-name{font-weight:800;font-size:1.05rem;color:var(--brand)}
.sablona-card-meta{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.4rem}
.sablona-card-act{display:flex;align-items:center;gap:.5rem;flex:none}
.sablona-head{margin-bottom:1rem}
.smil{margin-bottom:.7rem}
.smil-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.smil-title{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.smil-title .role{margin-left:0}
.smil-act{display:flex;align-items:center;gap:.3rem;flex:none}
.sukoly{margin-top:.6rem;padding-top:.5rem;border-top:1px dashed var(--line);display:flex;flex-direction:column;gap:.35rem}
.sukol{background:#f8fafc;border:1px solid var(--line);border-radius:9px;padding:.45rem .6rem}
.sukol-row{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.sukol-name{font-weight:700}
.sukol-act{display:flex;align-items:center;gap:.25rem;margin-left:auto}
.sukol-row .role,.spod-row .role{margin-left:0}
.role.sm{font-size:.68rem}
.spod-row{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;padding:.15rem 0 .15rem 1.1rem}
.spod-dot{color:var(--muted)}
.spod-name{font-size:.9rem}
.sub-adder{margin:.35rem 0 0 1.1rem}
.sub-adder>summary{font-size:.78rem}

/* ===== Notifikace ===== */
.noscroll{overflow:hidden}
.notif-modal{position:fixed;inset:0;z-index:60;pointer-events:none}   /* dropdown – nezamyká stránku */
.notif-backdrop{display:none}
.notif-panel{position:absolute;top:62px;right:14px;width:420px;max-width:calc(100vw - 28px);
  max-height:78vh;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:0 20px 50px rgba(15,23,42,.3);overflow:hidden;pointer-events:auto}
.notif-head{display:flex;align-items:center;gap:.5rem;padding:.6rem .7rem;border-bottom:1px solid var(--line)}
.notif-tabs{display:flex;gap:.3rem;flex:1}
.ntab{background:#f1f5f9;border:0;border-radius:8px;padding:.35rem .7rem;font-weight:700;cursor:pointer;
  font-size:.82rem;color:#475569}
.ntab.on{background:var(--brand);color:#fff}
.ntab i{font-style:normal;opacity:.8;font-size:.72rem}
.notif-head-actions{display:flex;align-items:center;gap:.4rem}
.notif-x{border:0;background:none;font-size:1rem;cursor:pointer;color:var(--muted);padding:.2rem .4rem}
.notif-body{overflow-y:auto}
.nlist{display:none}
.nlist.on{display:block}
.empty-n{padding:1.4rem;text-align:center}

.nrow{position:relative;display:flex;align-items:stretch;border-bottom:1px solid var(--line);overflow:hidden;background:#fff}
.nrow.unread{background:#fff7ed}
.nrow-swipe{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 1rem;
  font-size:.75rem;font-weight:800;color:#fff;text-transform:uppercase;letter-spacing:.04em}
.nrow-swipe--read{left:0;background:var(--ok)}
.nrow-swipe--arch{right:0;background:var(--accent)}
.nrow-main{position:relative;z-index:1;background:inherit;flex:1;display:grid;
  grid-template-columns:1fr auto;gap:.1rem .6rem;padding:.55rem .7rem;align-items:baseline;transition:transform .05s}
.nrow.swiping .nrow-main{transition:none}
.nrow-tags{grid-column:1;grid-row:1;display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;min-width:0}
.ntyp{font-size:.6rem;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);font-weight:800;
  background:#fee2e8;padding:.07rem .4rem;border-radius:20px;white-space:nowrap}
.ntyp--prirazeni{color:#1d4ed8;background:#dbeafe}
.ntyp--komentar{color:#92400e;background:#fef3c7}
.ntyp--konverzace{color:#6d28d9;background:#ede9fe}
.nproj{font-size:.66rem;font-weight:700;color:#334155;background:#f1f5f9;padding:.07rem .45rem;border-radius:20px;
  max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ntime{grid-column:2;grid-row:1;font-size:.72rem;color:var(--muted);white-space:nowrap}
.ntext{grid-column:1 / span 2;font-size:.88rem}
.nrow.unread .ntext{font-weight:600}
.nact{position:relative;z-index:1;background:inherit;display:flex;align-items:center;gap:.1rem;padding-right:.4rem}
.nbtn{border:0;background:none;cursor:pointer;font-size:1rem;color:var(--muted);padding:.2rem .35rem;border-radius:6px}
.nbtn:hover{background:#e2e8f0}
.npage .nrow{border-radius:0}
.npage-tabs{margin-bottom:1rem}
@media(max-width:820px){.notif-panel{display:none}}

/* ===== Agenda – dlaždice ===== */
.agenda-sekce{margin-bottom:1.4rem}
.sekce-h{display:flex;align-items:center;gap:.5rem;font-size:1.05rem;margin:0 0 .7rem}
.sekce-ic{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-size:.95rem}
.ic-mil{background:#fae8ff}.ic-ukol{background:#dbeafe}.ic-pod{background:#ccfbf1}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:.7rem}
.tile{display:block;background:#fff;border:1px solid var(--line);border-left:4px solid var(--line2);
  border-radius:11px;padding:.7rem .8rem;box-shadow:var(--shadow);transition:.12s}
.tile:hover{box-shadow:0 6px 16px rgba(15,23,42,.1);transform:translateY(-1px)}
.tile--mil{border-left-color:#a21caf}
.tile--ukol{border-left-color:#2563eb}
.tile--pod{border-left-color:#0d9488}
.tile.over{border-left-color:var(--warn)}
.tile-top{display:flex;justify-content:space-between;align-items:center;gap:.4rem;margin-bottom:.25rem}
.tile-kind{font-size:.64rem;font-weight:800;letter-spacing:.05em;color:var(--muted)}
.tile--mil .tile-kind{color:#a21caf}.tile--ukol .tile-kind{color:#2563eb}.tile--pod .tile-kind{color:#0d9488}
.tile-name{font-weight:700;line-height:1.25}
.tile-proj{font-size:.78rem;color:var(--muted);margin:.15rem 0 .4rem}
.tile-foot{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}

/* ===== Milník – popis / historie ===== */
.mil-popis{background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:.5rem .7rem;
  margin:.2rem 0 .5rem;font-size:.9rem;white-space:pre-wrap;color:#334155}
.convo.small .post-body{padding:.4rem .6rem}
.convo.small{margin-bottom:.6rem}
.hist{list-style:none;margin:.2rem 0 0;padding:0;font-size:.84rem}
.hist li{padding:.25rem 0;border-bottom:1px dashed var(--line)}
.hist li:last-child{border-bottom:0}
.hist-who{font-weight:700}

/* ===== Průběh – stepper ===== */
.stepper{display:flex;gap:0;overflow-x:auto;padding:.4rem .2rem 1rem;margin-bottom:.4rem}
.step{flex:1 1 0;min-width:78px;display:flex;flex-direction:column;align-items:center;text-align:center;position:relative}
.step::before{content:"";position:absolute;top:16px;left:-50%;width:100%;height:3px;background:var(--line2);z-index:0}
.step:first-child::before{display:none}
.step-dot{position:relative;z-index:1;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  background:#fff;border:3px solid var(--line2);color:#64748b;font-weight:800;font-size:.85rem}
.step-lbl{font-size:.67rem;color:var(--muted);margin-top:.3rem;max-width:94px;line-height:1.1;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.step--hotovo .step-dot{background:var(--ok);border-color:var(--ok);color:#fff}
.step--hotovo::before{background:var(--ok)}
.step--probiha .step-dot{border-color:var(--info);color:var(--info)}
.step--neresi-se .step-dot{border-style:dashed}
.step.over .step-dot{border-color:var(--warn);color:var(--warn)}

/* ===== Zákazníci (agenda) ===== */
.cust-list{display:flex;flex-direction:column;gap:.5rem}
.cust-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;color:inherit}
.cust-card:hover{border-color:var(--accent)}
.cust-name{font-weight:800;color:var(--brand);font-size:1.02rem}
.cust-sub{margin-top:.15rem}
.cust-stats{display:flex;gap:.4rem;flex-wrap:wrap;flex:none}
.cust-dl{display:grid;grid-template-columns:auto 1fr;gap:.35rem 1rem;font-size:.9rem}
.cust-dl span:nth-child(odd){color:var(--muted)}
.cust-note{margin-top:.7rem;white-space:pre-wrap;font-size:.9rem;background:#f8fafc;border:1px solid var(--line);
  border-radius:9px;padding:.55rem .7rem}
.cust-summary{display:flex;gap:.6rem}
.cust-summary .st{flex:1;background:#f8fafc;border:1px solid var(--line);border-radius:10px;
  padding:.55rem .9rem;text-align:center}
.cust-summary .st b{display:block;font-size:1.25rem;color:var(--accent)}
.cust-proj{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.5rem .2rem;
  border-bottom:1px solid var(--line);color:inherit}
.cust-proj:last-child{border-bottom:0}
.cust-proj:hover{background:#f8fafc}
.cust-proj-name{font-weight:600}
.cust-proj-meta{display:flex;align-items:center;gap:.5rem;flex:none;flex-wrap:wrap;justify-content:flex-end}
.cust-sec-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:1.3rem 0 .6rem}
.cust-sec-head h2{margin:0}

/* ===== Průběh – dlaždice milníků ===== */
.sekce-label{font-size:.72rem;font-weight:800;letter-spacing:.06em;color:var(--muted);
  text-transform:uppercase;margin:.8rem 0 .4rem}
.mil-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:.7rem;margin-bottom:.4rem}
.mtile{background:#fff;border:1px solid var(--line);border-left:4px solid var(--line2);border-radius:11px;
  padding:.7rem .8rem;box-shadow:var(--shadow)}
.mtile--hotovo{border-left-color:var(--ok);background:#f6fef9}
.mtile--probiha{border-left-color:var(--info)}
.mtile--neresi-se{border-left-color:#cbd5e1;opacity:.7}
.mtile.over{border-left-color:var(--warn)}
.mtile-top{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem}
.mtile-name{font-weight:700;line-height:1.25}
.mtile-date{font-size:.74rem;font-weight:700;color:#475569;background:#f1f5f9;border-radius:20px;padding:.05rem .5rem;white-space:nowrap}
.mtile-date.over{background:#fee2e2;color:#b91c1c}
.mtile-popis{font-size:.84rem;color:#475569;margin:.35rem 0;white-space:pre-wrap}
.mtile-meta{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin:.4rem 0}
.mtile-who{font-size:.82rem;font-weight:600}
.mtile-badge{font-size:.72rem;background:#dcfce7;color:#166534;border-radius:20px;padding:.05rem .5rem;font-weight:700}
.mtile-badge.open{background:#fef3c7;color:#92400e}
.mtile-badge.done{background:#dcfce7;color:#166534}
.mtile-badge.muted{background:#f1f5f9;color:#64748b}
.mtile-tasks{border-top:1px dashed var(--line);margin-top:.3rem;padding-top:.3rem;display:flex;flex-direction:column;gap:.05rem}
.mtt{display:flex;align-items:center;gap:.45rem;padding:.2rem .1rem;font-size:.86rem;border-radius:6px;color:inherit}
.mtt:hover{background:#f8fafc}
.mtt-check{width:16px;height:16px;border:2px solid var(--line2);border-radius:5px;display:inline-grid;place-items:center;font-size:.7rem;color:#fff;flex:none}
.mtt-check.done{background:var(--ok);border-color:var(--ok)}
.mtt-name{flex:1}
.mtt-name.strike{text-decoration:line-through;color:var(--muted)}
.mtt-sub{font-size:.72rem;color:var(--muted)}
.mtile-actions{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-top:.5rem;padding-top:.45rem;border-top:1px solid var(--line)}
.mtile-open{margin-left:auto;font-size:.8rem;font-weight:700;color:var(--brand);white-space:nowrap}
.mtile-open:hover{text-decoration:underline}

/* ===== Montážní skupiny ===== */
.grp-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.6rem;margin-bottom:1rem}
.grp-card{display:flex;align-items:center;gap:.6rem;background:#fff;border:1px solid var(--line);
  border-radius:11px;padding:.6rem .8rem;box-shadow:var(--shadow);color:inherit}
.grp-card:hover{box-shadow:0 6px 16px rgba(15,23,42,.1)}
.grp-card.sub{margin-left:1.4rem;border-left:3px solid var(--line2)}
.grp-dot{width:14px;height:14px;border-radius:50%;flex:none;display:inline-block}
.grp-main{flex:1;min-width:0}
.grp-name{font-weight:700}
.grp-sub{font-size:.78rem;color:var(--muted)}
.grp-stats{display:flex;gap:.6rem;font-size:.8rem;color:var(--muted);white-space:nowrap}
.tl-axis--grp{margin-left:210px}
.tl-label.grp{width:210px;display:flex;align-items:center;gap:.4rem}
.grp-lab-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.grp-lab-txt strong{font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grp-lab-txt small{color:var(--muted);font-size:.68rem}
.vyt{font-size:.7rem;font-weight:800;color:#475569;background:#f1f5f9;border-radius:20px;padding:.05rem .4rem}
.nas-row{display:flex;align-items:center;gap:.6rem;padding:.45rem .2rem;border-bottom:1px solid var(--line)}
.nas-row:last-child{border-bottom:0}
.nas-name{font-weight:600;flex:1}
.nas-date{font-size:.82rem;color:var(--muted);white-space:nowrap}
.kal{width:100%;border-collapse:collapse;font-size:.82rem}
.kal th{padding:.4rem;color:var(--muted);font-size:.72rem;text-transform:uppercase}
.kal td{border:1px solid var(--line);height:46px;vertical-align:top;padding:.25rem .35rem;color:#94a3b8;width:14.2%}
.kal td.occ{background:#e0ecff;background:color-mix(in srgb, var(--g) 22%, #fff);
  border-color:var(--g);font-weight:700;color:#1e293b}
.kal td.kday-today{outline:2px solid var(--accent);outline-offset:-2px}

/* ===== Agenda – položky (mix milník/úkol/podúkol) ===== */
.abucket{margin-bottom:1.3rem}
.abucket-h{font-size:.95rem;color:var(--muted);font-weight:800;letter-spacing:.02em;margin:0 0 .55rem;
  display:flex;align-items:center;gap:.5rem}
.abucket--po .abucket-h{color:var(--warn)}
.abucket--dnes .abucket-h{color:var(--accent)}
.aitem{display:flex;align-items:center;gap:.6rem;padding:.6rem .85rem;background:#fff;border:1px solid var(--line);
  border-left:4px solid transparent;border-radius:10px;margin-bottom:.45rem;box-shadow:var(--shadow);color:inherit}
.aitem:hover{box-shadow:0 5px 14px rgba(15,23,42,.1)}

/* agenda dashboard – 2 sloupce */
.agenda-2col{display:grid;grid-template-columns:1fr 330px;gap:1.4rem;align-items:start}
@media(max-width:980px){.agenda-2col{grid-template-columns:1fr}}
.ag-right .card{padding:.9rem}
.wg-h{font-size:.92rem;margin:0 0 .7rem}
.ag-kpis{display:flex;gap:.55rem;margin-bottom:1rem}
.ag-kpi{flex:1;background:#fff;border:1px solid var(--line);border-radius:11px;padding:.7rem .4rem;
  text-align:center;box-shadow:var(--shadow)}
.ag-kpi b{display:block;font-size:1.5rem;line-height:1}
.ag-kpi span{font-size:.7rem;color:var(--muted)}
.ag-kpi.po b{color:var(--warn)}
.ag-kpi.dnes b{color:var(--accent)}
.minical{width:100%;border-collapse:collapse}
.minical th{font-size:.64rem;color:var(--muted);padding:.2rem 0;font-weight:700}
.minical td{text-align:center;padding:.12rem 0;overflow:visible}
.mc-day{width:32px;height:32px;display:inline-grid;place-items:center;border-radius:9px;
  font-size:.82rem;position:relative;color:#334155}
.mc-day.out{color:#cbd5e1}
.mc-day.has{background:#eef2fb;cursor:pointer;font-weight:700}
.mc-day.has:hover{background:#dde6f7}
.mc-day.has.over{background:#fee2e2;color:#b91c1c}
.mc-day.today{outline:2px solid var(--brand);font-weight:800}
.mc-day.today.has{background:var(--brand);color:#fff;outline:none}
.mc-n{position:absolute;top:-6px;right:-6px;background:var(--accent);color:#fff;font-size:.6rem;
  min-width:16px;height:16px;border-radius:8px;display:grid;place-items:center;padding:0 3px;
  font-weight:700;box-shadow:0 0 0 1.5px #fff}

/* našeptávač hledání zakázek */
.search-pop{position:absolute;z-index:90;background:#fff;border:1px solid var(--line2);border-radius:10px;
  box-shadow:0 12px 30px rgba(15,23,42,.2);overflow:hidden}
.search-pop[hidden]{display:none}
.sp-it{display:flex;align-items:center;gap:.5rem;padding:.5rem .7rem;cursor:pointer}
.sp-it:hover,.sp-it.on{background:#f1f5f9}
.sp-num{color:var(--muted);font-size:.78rem;flex:none}
.sp-name{flex:1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}

/* popover dne v kalendáři */
.day-pop{position:absolute;z-index:90;background:#fff;border:1px solid var(--line2);border-radius:11px;
  box-shadow:0 12px 30px rgba(15,23,42,.22);min-width:220px;max-width:290px;padding:.55rem;
  display:flex;flex-direction:column;gap:.3rem}
.day-pop[hidden]{display:none}
.dp-h{font-weight:800;font-size:.74rem;color:var(--muted);margin:.1rem .25rem .2rem;letter-spacing:.03em}
.dp-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .5rem;border-radius:8px;color:inherit;
  border-left:3px solid transparent;background:#f8fafc}
.dp-item:hover{background:#f1f5f9}
.dp-item.aitem--milnik{border-left-color:#a21caf}
.dp-item.aitem--ukol{border-left-color:#2563eb}
.dp-item.aitem--podukol{border-left-color:#0d9488}
.dp-kind{font-size:.58rem;font-weight:800;width:56px;flex:none;color:var(--muted)}
.dp-name{font-size:.85rem;font-weight:600}
.ag-proj{display:flex;align-items:center;gap:.5rem;padding:.45rem 0;border-bottom:1px solid var(--line);color:inherit}
.ag-proj:last-child{border-bottom:0}
.ag-proj .apn{flex:1;font-weight:600;font-size:.86rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aitem--milnik{border-left-color:#a21caf}
.aitem--ukol{border-left-color:#2563eb}
.aitem--podukol{border-left-color:#0d9488}
.aitem.over{border-left-color:var(--warn)}
.aitem-kind{font-size:.6rem;font-weight:800;letter-spacing:.04em;width:64px;flex:none;color:var(--muted)}
.aitem--milnik .aitem-kind{color:#a21caf}.aitem--ukol .aitem-kind{color:#2563eb}.aitem--podukol .aitem-kind{color:#0d9488}
.aitem-name{font-weight:600;flex:1;min-width:120px}
.aitem-ctx{font-size:.78rem;color:var(--muted);max-width:28%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.more-wrap{margin-top:.5rem}
.more-wrap>summary{cursor:pointer;color:var(--accent);font-weight:700;font-size:.85rem;padding:.35rem 0;list-style:none}
.more-wrap>summary::-webkit-details-marker{display:none}
.sect--tyden{border-left:4px solid var(--info)}
.sect--pristi{border-left:4px solid #0d9488}
@media(max-width:820px){.aitem{flex-wrap:wrap}.aitem-ctx{max-width:100%;order:5;width:100%}}

/* ===== Detail (Asana stacked) ===== */
.detail{max-width:860px}
.crumbs{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;font-size:.82rem;color:var(--muted);margin-bottom:.3rem}
.crumbs a{color:var(--info)}
.crumbs .sep{color:var(--line2)}
.kindchip{font-size:.62rem;font-weight:800;letter-spacing:.05em;padding:.1rem .45rem;border-radius:6px;color:#fff}
.kindchip--milnik{background:#a21caf}.kindchip--ukol{background:#2563eb}.kindchip--podukol{background:#0d9488}
.detail-title{margin:.1rem 0 .5rem}
.detail-meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.25rem}
.mchip{display:inline-flex;align-items:center;gap:.3rem;font-size:.82rem;background:#f1f5f9;border-radius:20px;padding:.15rem .6rem}
.detail-sec h2{font-size:1rem;display:flex;align-items:center;gap:.5rem}
.subt{display:flex;align-items:center;gap:.5rem;padding:.4rem .1rem;border-bottom:1px solid var(--line)}
.subt:last-of-type{border-bottom:0}
.subt-name{flex:1;font-weight:600;color:inherit}
.subt-name:hover{color:var(--accent)}
.subt-name.strike{text-decoration:line-through;color:var(--muted)}

/* ===== Detail modal (vyskakovací okno) ===== */
.dmodal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-start;justify-content:center;padding:3.5vh 1rem}
.dmodal[hidden]{display:none}
.dmodal-back{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(1px)}
.dmodal-panel{position:relative;z-index:1;background:var(--bg);border-radius:16px;width:100%;max-width:760px;
  max-height:90vh;overflow:hidden;box-shadow:0 25px 60px rgba(0,0,0,.45);display:flex;flex-direction:column}
.dmodal-x{position:absolute;top:.6rem;right:.7rem;border:1px solid var(--line);background:#fff;
  width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:.95rem;z-index:3;color:var(--muted)}
.dmodal-x:hover{background:#fee2e2;color:#b91c1c}
.dmodal-load{padding:3rem;text-align:center;color:var(--muted)}
.dmodal-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.dmodal .detail{max-width:none;display:flex;flex-direction:column;flex:1;min-height:0}
.dmodal .detail-head{padding:1.1rem 3rem .6rem 1.3rem;margin:0;border-bottom:1px solid var(--line);background:#fff;flex:none}
.dmodal .detail-body{flex:1;overflow-y:auto;min-height:0;padding:.55rem 1.3rem 1rem;background:var(--bg)}
.dmodal .detail-foot{flex:none;margin:0;padding:.9rem 1.3rem;border-top:1px solid var(--line);background:#fff}
.dmodal .back{display:none}

/* detail – hlavička / patička (platí i na plné stránce) */
.detail-head{margin-bottom:1rem}
.dh-row{display:flex;align-items:flex-start;gap:.8rem;justify-content:space-between}
.dh-row .detail-title{margin:.1rem 0 .5rem;flex:1;min-width:0}
.dh-assignee{display:inline-flex;align-items:center;gap:.35rem;font-size:.85rem;font-weight:600;
  background:#f1f5f9;border-radius:20px;padding:.18rem .65rem .18rem .25rem;white-space:nowrap;flex:none}
.detail-foot{display:flex;gap:.6rem;align-items:center;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--line)}
.detail-edit[hidden]{display:none}

/* klikatelný stav badge */
.stavpick{position:relative;display:inline-block}
.stavpick-btn,.stavpick-opt{border:0;cursor:pointer;font:inherit}
.stavpick-btn i{font-style:normal;font-size:.72em;opacity:.7;margin-left:1px}
.stavpick-menu{position:absolute;top:calc(100% + 5px);left:0;z-index:30;background:#fff;border:1px solid var(--line2);
  border-radius:10px;box-shadow:0 10px 26px rgba(15,23,42,.2);padding:.35rem;display:flex;flex-direction:column;
  gap:.28rem;min-width:165px}
.stavpick-menu[hidden]{display:none}
.stavpick-opt{text-align:center}
.stavpick-opt:hover{box-shadow:0 0 0 2px var(--line2)}

/* inline editace polí */
.edit-title{flex:1;min-width:0;font-size:1.5rem;font-weight:800;border:1px solid transparent;border-radius:8px;
  padding:.15rem .4rem;margin:.05rem 0;color:var(--ink);background:transparent;font-family:inherit}
.edit-title:hover{background:#f1f5f9}
.edit-title:focus{outline:none;background:#fff;border-color:var(--accent)}
.dh-row{align-items:center}
.inline-pick{display:inline-flex;align-items:center;gap:.3rem;background:#f1f5f9;border-radius:20px;padding:.12rem .35rem;flex:none}
.inline-sel{border:1px solid var(--line);background:#f1f5f9;border-radius:20px;padding:.22rem .55rem;font:inherit;
  font-size:.82rem;font-weight:600;color:#334155;cursor:pointer;max-width:175px}
.inline-pick .inline-sel{background:transparent;border:0;padding:.1rem .15rem;max-width:150px}
.inline-sel:focus{outline:2px solid var(--accent)}
.inline-date{display:inline-flex;align-items:center;gap:.25rem;background:#f1f5f9;border-radius:20px;padding:.12rem .5rem;
  font-size:.72rem;color:var(--muted)}
.inline-date input{border:0;background:transparent;font:inherit;font-size:.78rem;color:var(--ink);cursor:pointer}
.daterange{position:relative;display:inline-block}
.daterange-btn{border:0;cursor:pointer;font:inherit;font-weight:600;color:#334155}
.daterange-pop{position:absolute;top:calc(100% + 5px);left:0;z-index:30;background:#fff;border:1px solid var(--line2);
  border-radius:10px;box-shadow:0 10px 26px rgba(15,23,42,.2);padding:.6rem;display:flex;flex-direction:column;
  gap:.45rem;min-width:180px}
.daterange-pop[hidden]{display:none}
.daterange-pop label{display:flex;align-items:center;justify-content:space-between;gap:.6rem;font-size:.78rem;
  font-weight:700;color:#475569}
.daterange-pop input{border:1px solid var(--line2);border-radius:7px;padding:.25rem .4rem;font:inherit}
.detail-meta{gap:.5rem .55rem}

/* popis s formátováním */
.rt{border:1px solid var(--line);border-radius:10px;overflow:hidden}
.rt-toolbar{display:flex;gap:.25rem;padding:.3rem .4rem;background:#f8fafc;border-bottom:1px solid var(--line)}
.rt-toolbar button{border:1px solid var(--line);background:#fff;border-radius:6px;cursor:pointer;font-size:.8rem;
  padding:.12rem .45rem;min-width:28px;color:#334155}
.rt-toolbar button:hover{background:#eef2f7}
.popis-edit{min-height:72px;padding:.6rem .7rem;font-size:.92rem;line-height:1.45;outline:none;white-space:pre-wrap}
.popis-edit:empty:before{content:attr(data-ph);color:var(--muted)}
.popis-edit ul,.popis-edit ol{margin:.2rem 0 .2rem 1.2rem;white-space:normal}
.foot-hint{margin-right:auto}
.foot-hint.ok{color:var(--ok);font-weight:700}
@media(max-width:820px){
  .dmodal{padding:0}
  .dmodal-panel{max-width:none;max-height:100vh;border-radius:0;min-height:100vh}
}

/* ===== @zmínky našeptávač ===== */
.mention-pop{position:absolute;z-index:200;background:#fff;border:1px solid var(--line2);
  border-radius:10px;box-shadow:0 10px 26px rgba(15,23,42,.2);overflow:hidden;max-width:280px}
.mention-pop[hidden]{display:none}
.mp-it{padding:.45rem .7rem;cursor:pointer;font-size:.88rem;font-weight:600;color:#334155}
.mp-it:hover,.mp-it.on{background:#fff7ed;color:var(--accent)}

/* ===== jednorázový hint ===== */
.hint-once{display:flex;align-items:center;gap:.6rem;background:#eff6ff;border:1px solid #bfdbfe;
  color:#1e40af;border-radius:10px;padding:.55rem .8rem;margin-bottom:1rem;font-size:.86rem}
.hint-once[hidden]{display:none}
.hint-x{margin-left:auto;border:0;background:none;cursor:pointer;color:#1e40af;font-size:1rem;flex:none}

/* ===== push banner ===== */
.push-enable{display:flex;align-items:center;gap:.7rem;background:#fff7ed;border:1px solid #fed7aa;
  color:#9a3412;border-radius:10px;padding:.6rem .8rem;margin-bottom:1rem;font-size:.88rem}
.push-enable[hidden]{display:none}
.push-enable .btn{margin-left:auto;flex:none}

/* ===== PWA install hint (mobil) ===== */
.pwa-install{position:fixed;left:.6rem;right:.6rem;bottom:4.3rem;z-index:70;display:flex;align-items:center;
  gap:.6rem;background:var(--brand);color:#fff;border-radius:12px;padding:.7rem .9rem;box-shadow:0 12px 30px rgba(0,0,0,.35)}
.pwi-txt{flex:1;display:flex;flex-direction:column;font-size:.82rem;line-height:1.3;min-width:0}
.pwi-txt b{font-size:.9rem}
.pwi-txt span{color:#cbd5e1}
.pwi-x{background:transparent;border:0;color:#cbd5e1;font-size:1rem;cursor:pointer;flex:none;padding:.2rem}
.pwa-install .btn{flex:none}

/* ===== mobilní úpravy ===== */
.zak-mobile{display:none}
.zak-row{display:flex;align-items:center;gap:.7rem;background:#fff;border:1px solid var(--line);
  border-radius:10px;padding:.7rem .85rem;margin-bottom:.5rem;box-shadow:var(--shadow);color:inherit}
.zak-row .zr-num{color:var(--muted);font-size:.78rem;flex:none}
.zak-row .zr-name{font-weight:700;flex:1;min-width:0}
@media(max-width:820px){
  .zak-desktop{display:none}
  .zak-mobile{display:block}
  .zakazky-toolbar .toggle,.zakazky-toolbar .btn-export{display:none}
  .npage{border:0;background:transparent;box-shadow:none;padding:0}
  .npage .nrow{border:1px solid var(--line);border-radius:10px;margin-bottom:.45rem;background:#fff}
  .npage .nrow.unread{background:#fff7ed}
  .npage .nact{display:none}
}
