:root{--bg:#f3f4f6;--card:#fff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--brand:#1f2937;--accent:#2563eb;--ok:#16a34a;--bad:#dc2626;--warn:#d97706}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%}
header{background:var(--brand);color:#fff;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:5}
header b{font-size:18px}header small{opacity:.8}
header button{background:transparent;border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:8px;padding:6px 10px;font-size:14px}
nav{display:flex;gap:6px;padding:10px 12px 0;max-width:820px;margin:0 auto}
nav button{flex:1;background:#e5e7eb;border:0;border-radius:10px;padding:10px 6px;font-size:15px;color:#374151}
nav button.on{background:var(--brand);color:#fff;font-weight:600}
main{max-width:820px;margin:0 auto;padding:12px 12px 96px}
h2{font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:18px 4px 8px}
h2.bad{color:var(--bad)}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:8px}
.card.overdue{border-left:4px solid var(--bad);background:#fef2f2;border-color:#fecaca}.card.soon{border-left:4px solid var(--warn);background:#fffbeb;border-color:#fde68a}.card.today{border-left:4px solid var(--accent)}
.title{font-weight:600;word-break:break-word}.notes{color:var(--muted);font-size:14px;margin-top:2px;white-space:pre-wrap;word-break:break-word}
.meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip{font-size:12px;background:#f3f4f6;border-radius:999px;padding:2px 8px;color:#374151}
.chip.bad{background:#fee2e2;color:#991b1b}.chip.blue{background:#dbeafe;color:#1e40af}.chip.amber{background:#fef3c7;color:#92400e}
.actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 12px;font-size:14px;color:#111827;cursor:pointer}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.ok{background:var(--ok);border-color:var(--ok);color:#fff}
.btn.ghost{color:var(--muted)}
.empty{text-align:center;color:var(--muted);padding:34px 10px}
.fab{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:50%;background:var(--accent);color:#fff;border:0;font-size:30px;box-shadow:0 6px 18px rgba(0,0,0,.25);z-index:6}
.modal{position:fixed;inset:0;background:rgba(17,24,39,.55);display:flex;align-items:flex-end;justify-content:center;z-index:10}
.sheet{background:#fff;width:100%;max-width:560px;border-radius:18px 18px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));max-height:92vh;overflow:auto}
.sheet h3{margin:0 0 12px}
label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px}
input,select,textarea{width:100%;font:inherit;padding:10px;border:1px solid #d1d5db;border-radius:10px;background:#fff}
input[type=checkbox]{width:auto}
textarea{min-height:70px;resize:vertical}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:90px;background:#111827;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;z-index:20;max-width:90vw}
.center{max-width:420px;margin:12vh auto;padding:0 16px;text-align:center}
.center .card{padding:22px}
.menu{position:absolute;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:6px;z-index:12}
.menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:10px 14px;font-size:15px;border-radius:8px}
.menu button:hover{background:#f3f4f6}
@media (min-width:900px){main{padding-top:18px}.modal{align-items:center}.sheet{border-radius:18px}nav{padding-top:16px}}
/* ---- навигация, язык ---- */
.hright{display:flex;gap:8px;align-items:center}
.lang{display:flex;border:1px solid rgba(255,255,255,.4);border-radius:8px;overflow:hidden}
header .lang button{border:0;border-radius:0;padding:6px 9px}
header .lang button.on{background:#fff;color:var(--brand);font-weight:700}
nav.top{padding-top:10px}
nav.top button{background:#fff;border:1px solid var(--line)}
nav.top button.on{background:var(--accent);border-color:var(--accent)}
main.wide{max-width:1100px}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:4px 0 10px}
.toolbar .search{flex:1;min-width:180px;width:auto}
.card.click{cursor:pointer}.card.click:hover{border-color:#cbd5e1}
.row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.r{text-align:right}.strong{font-weight:700}
.title.big{font-size:18px}
h2.inline{margin:0 0 8px}
h4{margin:14px 0 4px;font-size:15px}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.notes.warn{color:#92400e;background:#fef3c7;border-radius:8px;padding:6px 10px;margin-top:8px}
.notes.err,.err{color:var(--bad)}
.chip.green{background:#dcfce7;color:#166534}
.chip.linkchip{border:0;cursor:pointer;font:inherit;font-size:12px}
.linkchip:hover{filter:brightness(.95)}
.check{display:flex;gap:8px;align-items:center;margin-top:12px;color:var(--text)}
.inrow{display:flex;gap:6px;align-items:center}
.inrow input{flex:1;min-width:0}
.btn.small{padding:5px 9px;font-size:13px}
.sheet.wide{max-width:900px}
/* ---- строки сметы ---- */
.secrow{display:flex;justify-content:space-between;background:#f3f4f6;border-radius:8px;padding:6px 10px;margin:12px 0 6px;font-weight:600;font-size:14px}
.line{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:10px 4px;border-bottom:1px solid var(--line)}
.line:last-child{border-bottom:0}
.lnums{display:flex;gap:8px;align-items:center}
.cell{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.cell input{width:92px;text-align:right;padding:7px 8px}
.cell .unit{font-size:12px;color:var(--muted)}
.cell.total{min-width:110px;font-weight:700;text-align:right}
.lact{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.totals .row{padding:4px 0}.totals .row.big{font-size:20px;font-weight:700;border-top:1px solid var(--line);margin-top:6px;padding-top:10px}
.internal{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;padding:8px 10px;margin-top:12px}
.internal .lbl{font-size:12px;text-transform:uppercase;color:var(--muted);letter-spacing:.04em}
.neg{color:var(--bad);font-weight:700}.pos{color:var(--ok);font-weight:700}
.results{display:flex;flex-direction:column;gap:4px;margin-top:6px;max-height:260px;overflow:auto}
.result{display:flex;justify-content:space-between;gap:10px;text-align:left;background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:inherit;cursor:pointer}
.result:hover{background:#eef2ff}
.hint{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:8px;font-size:13px;color:var(--muted)}
.linetotal{font-size:18px;font-weight:700;margin-top:12px}
.linetotal.err{color:var(--bad)}
.paste{min-height:140px;font-family:ui-monospace,Menlo,monospace;font-size:13px}
.improw{display:grid;grid-template-columns:1.4fr auto 1.6fr 100px;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.pline{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.pline:last-child{border-bottom:0}
@media (max-width:700px){
  .three{grid-template-columns:1fr 1fr}
  .line{grid-template-columns:1fr}
  .lnums{justify-content:space-between}
  .lact{justify-content:flex-start}
  .improw{grid-template-columns:1fr}
  .pline{grid-template-columns:1fr auto}
  .pline .lact{grid-column:1/-1;justify-content:flex-start}
  header small{display:none}
}
/* ---- проекты ---- */
nav.sub{padding:0 0 10px;max-width:none;margin:0;flex-wrap:wrap}
nav.sub button{flex:0 1 auto;padding:8px 14px;background:#fff;border:1px solid var(--line)}
nav.sub button.on{background:var(--brand);border-color:var(--brand);color:#fff}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.pgrid .card{margin:0}
.card.overbudget{border-left:4px solid var(--bad)}
.bar{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-top:4px}
.barfill{height:100%;background:var(--accent);border-radius:999px}
.barfill.warn{background:var(--warn)}.barfill.over{background:var(--bad)}
.pbudget{margin-top:8px}
.pcols{display:grid;grid-template-columns:1fr;gap:0 12px}
@media (min-width:980px){.pcols{grid-template-columns:1.1fr 1fr}}
.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:8px}
.tile{border:1px solid var(--line);border-radius:12px;padding:10px}
.tile .tval{font-size:19px;font-weight:700;margin:2px 0}
.tile.bad{border-color:#fecaca;background:#fef2f2}.tile.bad .tval{color:var(--bad)}
.tile.ok .tval{color:#166534}
.stage{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.stage:last-of-type{border-bottom:0}
.smark{width:36px;height:36px;flex-shrink:0;border-radius:50%;border:2px solid #cbd5e1;background:#fff;font-size:16px;color:var(--muted);cursor:pointer}
.stage.active .smark{border-color:var(--accent);color:var(--accent)}
.stage.done .smark{border-color:var(--ok);background:var(--ok);color:#fff}
.stage.done .sname>div:first-child{color:var(--muted);text-decoration:line-through}
.sname{flex:1;min-width:0}
.addrow{margin-top:10px}.addrow input[type=date]{flex:0 0 150px}
.erow{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid var(--line)}
.erow:last-child{border-bottom:0}
.erow.late{background:#fef2f2;margin:0 -12px;padding:9px 12px}
.erow.click{cursor:pointer}
.inline-select{width:auto;max-width:220px}
/* ---- списки: галочки, массовые действия, страницы ---- */
.bulkbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:6px 10px;margin:4px 0 8px;border:1px dashed var(--line);border-radius:12px;background:#fff}
.bulkbar.active{border-style:solid;border-color:#bfdbfe;background:#eff6ff;position:sticky;top:64px;z-index:4}
.check.inline{margin:0;font-size:13px;color:#374151}
.rowcb{width:20px;height:20px;flex-shrink:0;margin:2px 4px 0 0;accent-color:var(--accent)}
.listrow{display:flex;gap:10px;align-items:flex-start}
.grow{flex:1;min-width:0}
.pager{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin:14px 0}
.btn.danger{color:var(--bad)}.btn.danger:hover{background:#fef2f2}
.btn:disabled{opacity:.45;cursor:default}
.notes.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pline{display:flex;gap:10px;align-items:center}
.pline>div:nth-child(2){flex:1}
.tiles4{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin:0 0 12px}
.tvrows{margin:10px 0}
.tvrow{padding:7px 0;border-bottom:1px solid var(--line)}
.tvnotes{white-space:pre-wrap;margin-top:8px;font-size:15px;color:#374151}
/* ---- поиск ---- */
header{flex-wrap:wrap}
.gsearchwrap{position:relative;flex:1;max-width:520px;min-width:160px}
.gsearch{width:100%;background:#374151;border:1px solid #4b5563;color:#fff;border-radius:10px;padding:8px 12px;font-size:15px}
.gsearch::placeholder{color:#d1d5db}
.gsearch:focus{background:#fff;color:#111827;outline:2px solid #93c5fd}
.sresults{display:none;position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;color:#111827;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.2);max-height:70vh;overflow:auto;z-index:30;padding:6px}
.sresults.open{display:block}
.sitem{display:flex;gap:8px;align-items:center;padding:9px 10px;border-radius:8px;cursor:pointer;flex-wrap:wrap}
.sitem.on,.sitem:hover{background:#eff6ff}
.stitle{font-weight:600}
.sempty{padding:8px 10px;font-size:12px;color:var(--muted)}
@media (max-width:700px){.gsearchwrap{order:3;max-width:none;flex-basis:100%}}
nav.top{flex-wrap:wrap}
/* ===== новый вид (по прототипу): шапка, дашборд, карточка дела ===== */
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
header.top{background:#1f2937;padding:calc(8px + env(safe-area-inset-top)) 20px 8px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-height:56px;justify-content:flex-start}
header.top button{border:0;border-radius:8px}
header.top .brand{background:none;color:#fff;font-weight:700;font-size:17px;letter-spacing:.02em;padding:6px 4px;white-space:nowrap}
header nav.mainnav{display:flex;gap:2px;padding:0;margin:0;max-width:none;overflow-x:auto;scrollbar-width:none}
header nav.mainnav::-webkit-scrollbar{display:none}
header nav.mainnav button{flex:0 0 auto;background:none;color:#d1d5db;padding:8px 12px;font-size:15px;white-space:nowrap}
header nav.mainnav button:hover{color:#fff;background:#273244}
header nav.mainnav button.on{background:#374151;color:#fff;font-weight:600}
header.top .gsearchwrap{flex:1;min-width:160px;max-width:420px}
header.top .btn-new{background:#2563eb;color:#fff;min-height:38px;padding:0 14px;font-weight:600;border-radius:10px;white-space:nowrap}
header.top .btn-new:hover{background:#1d4ed8}
header.top .who{font-size:14px;color:#d1d5db;white-space:nowrap}
header.top .hmore{background:#374151;color:#fff;min-width:38px;min-height:38px;font-size:20px;line-height:1;border-radius:10px}
header.top .hmore.on{background:#2563eb}
.menusep{height:1px;background:var(--line);margin:4px 6px}
.menu .menulang{display:flex;gap:4px;padding:4px 8px;border:0}
.menu .menulang button{width:auto;flex:1;text-align:center;border:1px solid var(--line);padding:6px}
.menu .menulang button.on{background:#1f2937;color:#fff}
nav.subtabs{max-width:820px;padding-top:12px}
nav.subtabs button{background:#fff;border:1px solid var(--line)}
nav.subtabs button.on{background:#1f2937;border-color:#1f2937;color:#fff}
@media (min-width:1100px){.fab{display:none}}
@media (max-width:900px){
  header.top{gap:8px;padding-left:12px;padding-right:12px}
  header nav.mainnav{order:5;flex-basis:100%;margin:0 -4px}
  header.top .who{display:none}
  header.top .gsearchwrap{order:4;max-width:none;flex-basis:100%}
  header.top .btn-new{margin-left:auto}
}
/* дашборд */
main.dash{max-width:1240px;padding:20px 16px 48px}
.dhead{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.dhead h1{margin:0;font-size:22px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:16px}
.kpi{text-align:left;border:1px solid var(--line);border-left:4px solid var(--kc);background:var(--kb);border-radius:12px;padding:8px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 10px;cursor:pointer;font:inherit;color:inherit}
.kpi .kl{grid-column:1;font-weight:600}.kpi .ks{grid-column:1}.kpi .kv{grid-column:2;grid-row:1/3}
.kpi:hover{filter:brightness(.98)}
.kpi .kl{font-size:13px;color:#4b5563}.kpi .kv{font-size:24px;font-weight:700;color:var(--kc);line-height:1.15}.kpi .ks{font-size:12px;color:#4b5563}
.kpi.red{--kc:#dc2626;--kb:#fef2f2}.kpi.amber{--kc:#d97706;--kb:#fffbeb}.kpi.dark{--kc:#1f2937;--kb:#fff}.kpi.blue{--kc:#2563eb;--kb:#eff6ff}
.drow2{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start;margin-bottom:16px}
.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px 18px;display:flex;flex-direction:column;gap:10px;min-width:0;box-sizing:border-box}
.panel.big{flex:999 1 560px}.panel.side{flex:1 1 300px;min-width:260px}
.panel h2{margin:0;font-size:16px;text-transform:none;letter-spacing:0;color:var(--text)}
.phead{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.pills{display:flex;gap:4px;flex-wrap:wrap}
.pill{min-height:36px;padding:0 12px;border-radius:999px;font-size:13px;border:1px solid #d1d5db;background:#fff;color:#111827;cursor:pointer}
.pill.on{border-color:#2563eb;background:#2563eb;color:#fff}
.tlist{display:flex;flex-direction:column;gap:8px}
.trow{display:flex;gap:12px;align-items:center;min-height:56px;padding:8px 12px;border:1px solid #e5e7eb;border-radius:12px;cursor:pointer;background:#fff}
.trow:hover{border-color:#cbd5e1;background:#fafafa}
.trow.overdue{border-color:#fca5a5}.trow.soon{border-color:#fcd34d}
.trow input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:#16a34a;cursor:pointer}
.tmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ttl{font-size:15px;font-weight:500;word-break:break-word}
.ttl .badge{font-size:11px;padding:2px 8px;vertical-align:1px;margin-left:2px}
.tmeta{font-size:13px;color:#4b5563}
.badge{display:inline-block;flex-shrink:0;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;background:#f3f4f6;color:#374151;white-space:nowrap}
.badge.bad,.chip.bad{background:#fee2e2;color:#991b1b}.badge.amber{background:#fef3c7;color:#92400e}.badge.blue{background:#dbeafe;color:#1e40af}.badge.green{background:#dcfce7;color:#166534}
.badge.violet,.chip.violet{background:#ede9fe;color:#5b21b6}.badge.indigo,.chip.indigo{background:#e0e7ff;color:#3730a3}
.dempty{padding:28px;text-align:center;color:#4b5563;border:1px dashed #d1d5db;border-radius:12px}
.rem{display:flex;gap:12px;align-items:flex-start;padding:8px 0;border-bottom:1px solid #f3f4f6;cursor:pointer}
.rem:hover .ttl{color:#1d4ed8}
.rdate{width:52px;flex-shrink:0;text-align:center;border-radius:10px;background:#eff6ff;color:#1e40af;padding:6px 0}
.rdate.today{background:#2563eb;color:#fff}
.rdow{font-size:12px}.rday{font-size:18px;font-weight:700}
.btn.dashed{border:1px dashed #9ca3af;align-self:flex-start;min-height:40px}
.obj{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden}
.objhead{width:100%;border:0;background:#fff;padding:12px 14px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;text-align:left;cursor:pointer;font:inherit;color:inherit}
.objhead:hover{background:#fafafa}
.oname{font-weight:600;font-size:15px;flex:1;min-width:160px}
.obudget{padding:0 14px 12px;display:flex;flex-direction:column;gap:6px}
.stg{list-style:none;margin:0;padding:10px 14px 8px;border-top:1px solid #f3f4f6;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.stg li{padding:6px 12px;border-radius:999px;font-size:13px;background:#f3f4f6;color:#4b5563}
.stg li.done{background:#dcfce7;color:#166534}.stg li.active{background:#dbeafe;color:#1e40af}
.stg li.stglink{background:none;padding:0;margin-left:auto}
.objtasks{padding:0 14px 12px}
.barfill.ok{background:#16a34a}
.inv{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:12px}
.btn.payok{border-color:#16a34a;color:#166534;align-self:flex-start}
.btn.payok:hover{background:#f0fdf4}
.okbox{padding:20px;text-align:center;color:#166534;background:#f0fdf4;border-radius:12px}
.team{display:flex;gap:12px;align-items:center;font-size:14px}
.team .tn{width:170px;flex-shrink:0}.team .tb{flex:1;height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}.team .tf{height:100%;background:#2563eb}.team .tf.over{background:#dc2626}
.team .tt{width:200px;flex-shrink:0;text-align:right;color:#374151}
.toast .tundo{background:none;border:1px solid rgba(255,255,255,.5);color:#fff;border-radius:8px;padding:3px 10px;margin-left:8px;cursor:pointer;font:inherit;font-size:13px}
@media (max-width:600px){.team{flex-wrap:wrap}.team .tn{width:auto;flex:1}.team .tb{flex-basis:100%;order:3}.team .tt{width:auto}.trow{align-items:flex-start}.trow .badge{margin-top:2px}}
/* карточка дела */
.tcmodal{align-items:center;padding:12px}
.sheet.tc{max-width:1180px;width:100%;padding:0;border-radius:16px;max-height:94vh;overflow:auto}
.sheet.tc.quick{max-width:760px}
.tchead{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 20px;border-bottom:1px solid #e5e7eb;background:#f9fafb;position:sticky;top:0;z-index:2}
.tchead select{width:auto;padding:8px 10px}
.tchead .seg{flex:0 0 auto}.tchead .seg button{min-height:34px;padding:0 12px;flex:0 0 auto}
.x{border:0;background:none;color:#9ca3af;font-size:18px;cursor:pointer;padding:2px 6px;border-radius:6px;line-height:1}
.x:hover{color:#dc2626;background:#fef2f2}.x.big{font-size:26px;color:#4b5563}
.kbd{font-size:12px;color:#4b5563}
.tcbody{display:flex;flex-wrap:wrap;align-items:flex-start}
.tcleft{flex:999 1 560px;min-width:0;padding:20px;display:flex;flex-direction:column;gap:20px;box-sizing:border-box}
.tcaside{flex:1 1 300px;min-width:260px;padding:20px;border-left:1px solid #e5e7eb;background:#fcfcfd;display:flex;flex-direction:column;gap:14px;box-sizing:border-box}
.af{display:flex;flex-direction:column;gap:6px;min-width:0}
.alabel{font-size:12px;color:#4b5563;text-transform:uppercase;letter-spacing:.04em}
.col{display:flex;flex-direction:column;gap:6px}
.tc label{margin:0}
.tctitle{padding:12px;font-size:20px;font-weight:600}
.tctitle.err{border-color:#dc2626;outline-color:#dc2626}
.tcdesc{min-height:110px;line-height:1.5}
.csec{display:flex;flex-direction:column;gap:8px}
.csec h3{margin:0;font-size:15px}
.clist{display:flex;flex-direction:column;gap:6px}
.cline{display:flex;gap:10px;align-items:center;min-height:44px;padding:0 10px;border:1px solid #e5e7eb;border-radius:10px;color:var(--text);font-size:15px;cursor:pointer}
.cline input{width:18px;height:18px;flex-shrink:0}
.cline .ctext{flex:1;word-break:break-word}.cline.done .ctext{color:#6b7280;text-decoration:line-through}
.subwho{width:auto;max-width:170px}
.seg{display:flex;gap:6px}.seg button{flex:1;min-height:40px;border-radius:10px;border:1px solid #d1d5db;background:#fff;font-size:14px;cursor:pointer;color:#111827}
.seg button.on{border-color:#2563eb;background:#2563eb;color:#fff}
.seg.tabs{flex-wrap:wrap}.seg.tabs button{flex:0 0 auto;padding:0 14px}
.stsel{font-weight:600}
.stsel.st-new{background:#f3f4f6;color:#111827}.stsel.st-planned{background:#e0e7ff;color:#3730a3;border-color:#3730a3}.stsel.st-progress{background:#dbeafe;color:#1e40af;border-color:#1e40af}
.stsel.st-review{background:#fef3c7;color:#92400e;border-color:#92400e}.stsel.st-blocked{background:#fee2e2;color:#991b1b;border-color:#991b1b}.stsel.st-done{background:#dcfce7;color:#166534;border-color:#166534}
.chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chipx{display:inline-flex;gap:2px;align-items:center;padding:4px 10px;border-radius:999px;font-size:13px;background:#eef2ff;color:#3730a3}
.chipx.tag{background:#f3f4f6;color:#111827}
.chipx button{border:0;background:none;color:inherit;cursor:pointer;padding:0 0 0 4px;font-size:15px;line-height:1}
.watchsel,.tagin{width:auto;max-width:180px;padding:5px 8px;font-size:13px;border-radius:999px}
.tagin{min-width:110px}
.quickgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.inrow.wrap{flex-wrap:wrap}
.btn.big{min-height:44px;flex:1;font-weight:600}
.tcfoot{border-top:1px solid #e5e7eb;padding:16px 20px 20px;display:flex;flex-direction:column;gap:12px}
.cm{display:flex;gap:10px}
.av{width:36px;height:36px;border-radius:50%;background:#dbeafe;color:#1e40af;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.cmhead{font-size:13px;display:flex;gap:6px;align-items:center}
.cmbody{font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.mention{color:#1d4ed8;font-weight:600}
.cmnew{display:flex;gap:8px;align-items:flex-end}
.cmin{min-height:44px;resize:none;flex:1}
.mdrop{border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 6px 18px rgba(0,0,0,.12);background:#fff;padding:4px;display:flex;flex-direction:column;align-self:flex-start;min-width:240px}
.mdrop button{text-align:left;border:0;background:none;padding:10px 12px;border-radius:8px;min-height:40px;cursor:pointer;font:inherit}
.mdrop button.on,.mdrop button:hover{background:#eff6ff}
.hist{display:flex;gap:10px;font-size:14px;padding:6px 0;border-bottom:1px solid #f3f4f6}
.hist .hw{color:#4b5563;width:120px;flex-shrink:0}
.hide{display:none !important}
@media (max-width:700px){
  .tcmodal{padding:0;align-items:flex-end}
  .sheet.tc{border-radius:16px 16px 0 0;max-height:96vh}
  .tcaside{border-left:0;border-top:1px solid #e5e7eb}
  .kbd{display:none}
  .quickgrid{grid-template-columns:1fr 1fr}
  .tchead{padding:10px 12px}.tcleft,.tcaside{padding:14px}
  .hist{flex-direction:column;gap:2px}.hist .hw{width:auto}
}
.fab{display:none}
.tcaside .kbd,.tcleft .kbd{text-align:center}
@media (max-width:600px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .kpi{padding:8px 10px}.kpi .kv{font-size:20px}
  main.dash{padding:14px 10px 40px}
  .panel{padding:14px 12px}
  .dhead h1{font-size:20px}
}
/* файлы и фото */
header.top .hmore{position:relative}
header.top .hmore.dot::after{content:'';position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:50%;background:#f59e0b}
.files .fbtns{margin:6px 0}
.files.drop{outline:2px dashed var(--accent);outline-offset:2px}
.files .ftabs{margin:8px 0;flex-wrap:wrap}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px;margin:8px 0}
.thumb{position:relative;padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;aspect-ratio:1/1;background:#f1f5f9;cursor:zoom-in}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb.imp{border:2px solid #f59e0b}
.thimp{position:absolute;top:3px;left:3px;background:#f59e0b;color:#fff;border-radius:6px;font-size:12px;padding:0 4px}
.thbot{position:absolute;bottom:3px;right:3px;background:rgba(17,24,39,.7);color:#fff;border-radius:5px;font-size:10px;padding:0 4px}
.frow{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:8px 0;border-top:1px solid var(--line)}
.frow.imp{background:#fffbeb;border-radius:8px;padding:8px}
.frow .ficon{font-size:20px;line-height:1.2}
.frow .grow{flex:1;min-width:0}
.frow .flink{font-weight:600;word-break:break-all}
.frow > .lact.hide{display:none}
.frow > .lact:last-child:not(.hide){flex-basis:100%;flex-wrap:wrap}
.notebody{white-space:pre-wrap;font-weight:500}
.pins{border-color:#fde68a;background:#fffdf5}
.prday{border-top:1px solid var(--line);padding:6px 0}
.prday summary{cursor:pointer;padding:4px 0;list-style-position:inside}
.modal.lb{background:rgba(0,0,0,.92);align-items:center;justify-content:center;padding:0}
.lbwrap{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:100vw;max-height:100vh;padding:44px 8px 12px}
.lbimg{max-width:96vw;max-height:calc(100vh - 150px);object-fit:contain;border-radius:6px;background:#111}
.lbcap{color:#e5e7eb;font-size:13px;text-align:center;max-width:90vw}
.lbacts{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.lbacts select{max-width:160px}
.lbx{position:fixed;top:8px;right:10px;background:none;border:0;color:#fff;font-size:34px;cursor:pointer;z-index:2}
.lbnav{position:fixed;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.12);border:0;color:#fff;font-size:40px;width:48px;height:72px;border-radius:10px;cursor:pointer;z-index:2}
.lbnav.l{left:8px}.lbnav.r{right:8px}
.btn.amber{background:#fef3c7;border-color:#fde68a}
.toast.up{bottom:140px}
a.btn{text-decoration:none;display:inline-flex;align-items:center}
/* смета: наценка этапа, перенос в объект */
.secrow{align-items:center;gap:8px;flex-wrap:wrap}
.secrow .secmeta{display:flex;gap:6px;align-items:center;flex:1;justify-content:flex-end;font-weight:400;flex-wrap:wrap}
.secrow .chip.linkchip{font-size:12px}
.applycard{border-color:#bfdbfe;background:#f8fbff}
.aplist{margin:8px 0}.aplist .row{padding:4px 0;border-bottom:1px dashed var(--line)}
/* люди и кабинет */
.card details{border-top:1px solid var(--line);padding:6px 0}
.card details summary{cursor:pointer;padding:4px 0;list-style-position:inside}
.card details .chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.linkish{color:#1d4ed8}
.hright{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.seg.tabs{margin:0 0 8px}
.card .row+.row{margin-top:4px}
.hhead{display:flex;flex-wrap:wrap;gap:8px;align-items:center;width:100%;background:none;border:0;padding:2px 0;cursor:pointer;text-align:left;font:inherit;color:inherit}
.hhead .title{flex:1;min-width:180px}
.hbody{margin-top:8px}
.hpend{border-top:1px solid var(--line);padding-top:6px;margin-top:6px}
.team.click{cursor:pointer}.team.click:hover .tn{color:#1d4ed8}
/* шапка на компьютере — в одну строку: меню сжимается и листается, дата прячется на узких экранах */
@media (min-width:701px){header.top{flex-wrap:nowrap;gap:10px}header nav.mainnav{flex:0 1 auto;min-width:0}header.top .gsearchwrap{min-width:140px;max-width:320px}}
@media (min-width:701px) and (max-width:1440px){header.top .who{display:none}header nav.mainnav button{padding:8px 9px}}
.card.pend{border-left:4px solid var(--warn)}
.pline{border-top:1px solid var(--line);padding-top:6px;margin-top:6px}
.prow .three{margin-top:8px}
.actions.stick{position:sticky;bottom:0;background:var(--bg,#f3f4f6);padding:10px 0;z-index:5}
/* выбор клиента с поиском */
.picker-wrap{max-width:none;min-width:0;width:100%}
.picker-wrap input{width:100%}
.sresults.picker{max-height:320px;z-index:60}
.sresults.picker .sres{display:block;width:100%;text-align:left;background:none;border:0;padding:8px 10px;border-radius:8px;cursor:pointer;font:inherit;color:inherit}
.sresults.picker .sres:hover,.sresults.picker .sres.on{background:#eef2ff}
.sresults.picker .sres.add{color:#1d4ed8;font-weight:600}
.kv{display:flex;flex-wrap:wrap;gap:6px 18px;margin:8px 0}
.prewrap{white-space:pre-wrap}
/* ===== обновлённый вид (2026-11): группы меню, нижняя панель, вкладки, тёмная тема ===== */
h2{text-transform:none;letter-spacing:0;font-size:15px;font-weight:600;color:var(--text)}
.alabel,.internal .lbl{text-transform:none;letter-spacing:0;font-size:13px}
.btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:4px;line-height:1.2}
.btn.small{min-height:30px}
.ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
/* шапка */
header.top{flex-wrap:nowrap;gap:10px}
header nav.mainnav{order:0;flex:0 1 auto;flex-basis:auto;margin:0;min-width:0}
header nav.mainnav button{position:relative}
header.top .gsearchwrap{order:0;flex:1 1 200px;flex-basis:auto;max-width:380px;min-width:120px}
header.top .btn-new{display:inline-flex;align-items:center;gap:6px;margin-left:auto}
header.top .btn-new .ico{width:18px;height:18px}
.sicon{display:none;background:#374151 !important;color:#fff;min-width:38px;min-height:38px;border-radius:10px !important;align-items:center;justify-content:center}
.ubtn{position:relative;display:inline-flex;align-items:center;gap:8px;background:#374151 !important;color:#fff;min-height:38px;padding:0 10px 0 4px;border-radius:999px !important;white-space:nowrap}
.ubtn.on{background:#2563eb !important}
.ubtn.dot::after{content:'';position:absolute;top:2px;right:2px;width:9px;height:9px;border-radius:50%;background:#f59e0b}
.av.sm{width:30px;height:30px;font-size:12px}
.nbadge{display:inline-block;min-width:18px;height:18px;padding:0 5px;margin-left:6px;border-radius:999px;background:#f59e0b;color:#111827;font-size:11px;font-weight:700;line-height:18px;text-align:center;vertical-align:1px}
.nbadge.bad{background:#dc2626;color:#fff}
.menu{min-width:220px}
.menu button.danger{color:var(--bad)}
.menuhead{padding:8px 14px 6px;font-weight:600}
.menulbl{padding:4px 14px 0}
/* вкладки группы под шапкой */
nav.gtabs{display:flex;gap:4px;max-width:none;margin:0;padding:0 20px;background:var(--card);border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;position:sticky;top:56px;z-index:4}
nav.gtabs::-webkit-scrollbar{display:none}
nav.gtabs button{flex:0 0 auto;background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 14px 10px;font-size:15px;color:var(--muted);cursor:pointer;white-space:nowrap}
nav.gtabs button.on{color:var(--text);border-bottom-color:var(--accent);font-weight:600}
.tseg{margin:0 0 12px}
/* нижняя панель (телефон) */
.bnav{display:none}
@media (max-width:700px){
  header.top{flex-wrap:wrap;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;min-height:52px}
  header nav.mainnav{display:none}
  header.top .gsearchwrap{display:none;order:9;flex-basis:100%;max-width:none}
  body.sopen header.top .gsearchwrap{display:block}
  .sicon{display:inline-flex;margin-left:auto}
  header.top .btn-new{margin-left:0;padding:0 11px}
  header.top .btn-new .glabel,.ubtn .uname{display:none}
  .ubtn{padding:0 4px}
  nav.gtabs{top:52px;padding:0 8px}
  nav.gtabs button{padding:11px 12px 9px}
  body.hasbnav main{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  .bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:8;background:var(--card);border-top:1px solid var(--line);padding:4px 4px calc(4px + env(safe-area-inset-bottom));justify-content:space-around}
  .bnav .bitem{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:0;padding:6px 2px;font-size:11px;color:var(--muted);border-radius:10px;position:relative;cursor:pointer}
  .bnav .bitem .ico{width:24px;height:24px}
  .bnav .bitem.on{color:var(--accent);font-weight:600}
  .bnav .nbadge{position:absolute;top:0;left:52%;margin:0}
  .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
  body.hasbnav .actions.stick{bottom:calc(64px + env(safe-area-inset-bottom))}
}
/* поле даты */
.dinp{position:relative;display:flex;align-items:stretch;min-width:0;width:100%}
.dinp input[type=text]{flex:1;min-width:0;padding-right:40px}
.dinp input.err{border-color:var(--bad)}
.dinp .dcal{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:none;font-size:16px;padding:4px 6px;cursor:pointer;border-radius:6px}
.dinp .dcal:hover{background:var(--bg)}
.dinp .dnat{position:absolute;right:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}
.inrow .dinp{flex:1}
.addrow .dinp{flex:0 0 160px;width:160px}
/* «Требует решения» */
.panel.act{border-color:#fcd34d;border-left:4px solid var(--warn)}
.panel.act.calm{border-color:var(--line);border-left:4px solid var(--ok)}
.panel.act.calm .okbox{padding:10px;text-align:left}
.actlist{display:flex;flex-direction:column;gap:10px}
.actlist .card{margin:0;border-left-width:1px}
.agroup{border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.ahead{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:4px}
.arow{display:flex;gap:10px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
.ahead+.arow{border-top:0}
.arow.click{cursor:pointer}.arow.click:hover b,.arow.click:hover .grow>div:first-child{color:var(--accent)}
.objminis{display:flex;flex-direction:column;gap:6px;padding-top:4px}
.objmini{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:999px;padding:6px 12px;font:inherit;font-size:14px;cursor:pointer}
.objmini:hover{border-color:var(--accent)}
/* карточка объекта: вкладки */
.ptabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line);margin:4px 0 12px}
.ptabs::-webkit-scrollbar{display:none}
.ptabs button{flex:0 0 auto;background:none;border:0;border-bottom:2px solid transparent;padding:10px 14px;font:inherit;font-size:15px;color:var(--muted);cursor:pointer;white-space:nowrap}
.ptabs button.on{color:var(--text);border-bottom-color:var(--accent);font-weight:600}
.ppane .tiles4{margin-bottom:10px}
.tile.click{cursor:pointer;text-align:left;font:inherit;background:var(--card)}
.tile.bad.click{background:#fef2f2}
.card.compact{padding:10px 12px}
.card.compact .ctitle{font-weight:600}
.notes.inl{display:inline;margin:0}
.btn.kebab{min-width:38px;padding:0 10px;font-size:18px;line-height:1}
/* списки */
.trowc{align-items:center}
.tacts{display:flex;gap:6px;align-items:center;flex-shrink:0}
.prow1{display:flex;gap:12px;align-items:center}
.prow1 .av{width:38px;height:38px}
.rolel{font-size:12px;font-weight:500;color:var(--muted);margin-left:8px;padding:1px 8px;border:1px solid var(--line);border-radius:999px}
.chipsel{padding:3px 8px;font-size:13px;border-radius:999px}
.card.hero{display:flex;flex-direction:column;gap:2px;padding:14px 16px}
.card.hero.pos{background:#f0fdf4;border-color:#bbf7d0}.card.hero.neg{background:#fef2f2;border-color:#fecaca}
.heroval{font-size:28px;font-weight:700}
.card.hero.pos .heroval{color:#166534}.card.hero.neg .heroval{color:var(--bad)}
@media (max-width:600px){.trowc{flex-wrap:wrap}.trowc .tacts{margin-left:30px}}
/* ===== тёмная тема ===== */
html[data-theme=dark]{--bg:#0f141b;--card:#18202b;--text:#e5e7eb;--muted:#9aa4b2;--line:#2b3542;color-scheme:dark}
html[data-theme=dark] .btn,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea,html[data-theme=dark] .sheet,html[data-theme=dark] .menu,html[data-theme=dark] .panel,
html[data-theme=dark] .pill,html[data-theme=dark] .trow,html[data-theme=dark] .objhead,html[data-theme=dark] .seg button,html[data-theme=dark] nav.sub button,html[data-theme=dark] .smark,html[data-theme=dark] .bulkbar,
html[data-theme=dark] .mdrop,html[data-theme=dark] .sresults,html[data-theme=dark] nav.subtabs button,html[data-theme=dark] .hhead{background:var(--card);color:var(--text);border-color:var(--line)}
html[data-theme=dark] .btn.primary,html[data-theme=dark] .pill.on,html[data-theme=dark] .seg button.on{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme=dark] .btn.ok{background:var(--ok);border-color:var(--ok);color:#fff}
html[data-theme=dark] nav.sub button.on,html[data-theme=dark] .menu .menulang button.on{background:#e5e7eb;color:#111827}
html[data-theme=dark] header.top,html[data-theme=dark] header{background:#0b1016}
html[data-theme=dark] .chip,html[data-theme=dark] .badge,html[data-theme=dark] .secrow,html[data-theme=dark] .stg li,html[data-theme=dark] .bar,html[data-theme=dark] .team .tb,html[data-theme=dark] .chipx.tag{background:#253041;color:#d1d5db}
html[data-theme=dark] .chip.bad,html[data-theme=dark] .badge.bad{background:#4c1d1d;color:#fecaca}
html[data-theme=dark] .chip.amber,html[data-theme=dark] .badge.amber{background:#4a3410;color:#fde68a}
html[data-theme=dark] .chip.blue,html[data-theme=dark] .badge.blue,html[data-theme=dark] .stg li.active{background:#1e3a5f;color:#bfdbfe}
html[data-theme=dark] .chip.green,html[data-theme=dark] .badge.green,html[data-theme=dark] .stg li.done{background:#14532d;color:#bbf7d0}
html[data-theme=dark] .kpi.red{--kb:#2a1416}html[data-theme=dark] .kpi.amber{--kb:#2a2010}html[data-theme=dark] .kpi.dark{--kb:var(--card);--kc:#e5e7eb}html[data-theme=dark] .kpi.blue{--kb:#142035}
html[data-theme=dark] .kpi .kl,html[data-theme=dark] .kpi .ks,html[data-theme=dark] .tmeta,html[data-theme=dark] .dempty,html[data-theme=dark] .kbd{color:var(--muted)}
html[data-theme=dark] .card.overdue,html[data-theme=dark] .tile.bad,html[data-theme=dark] .erow.late,html[data-theme=dark] .card.hero.neg,html[data-theme=dark] .tile.bad.click{background:#2a1416;border-color:#5b2323}
html[data-theme=dark] .card.soon,html[data-theme=dark] .frow.imp,html[data-theme=dark] .pins{background:#2a2010;border-color:#5b4314}
html[data-theme=dark] .okbox,html[data-theme=dark] .card.hero.pos{background:#11281a;color:#bbf7d0;border-color:#1f4d2e}
html[data-theme=dark] .card.hero.pos .heroval{color:#86efac}
html[data-theme=dark] .notes.warn{background:#4a3410;color:#fde68a}
html[data-theme=dark] .result,html[data-theme=dark] .internal,html[data-theme=dark] .tchead,html[data-theme=dark] .tcaside,html[data-theme=dark] .applycard{background:#141b24;border-color:var(--line)}
html[data-theme=dark] .trow:hover,html[data-theme=dark] .objhead:hover,html[data-theme=dark] .menu button:hover,html[data-theme=dark] .sitem.on,html[data-theme=dark] .sitem:hover,html[data-theme=dark] .result:hover,html[data-theme=dark] .mdrop button:hover{background:#223044}
html[data-theme=dark] .sresults,html[data-theme=dark] .sresults.picker .sres{color:var(--text)}
html[data-theme=dark] .gsearch:focus{background:#18202b;color:var(--text)}
html[data-theme=dark] .rdate{background:#1e3a5f;color:#bfdbfe}
html[data-theme=dark] .tvnotes,html[data-theme=dark] .check.inline,html[data-theme=dark] .team .tt{color:#d1d5db}
html[data-theme=dark] .stg,html[data-theme=dark] .rem,html[data-theme=dark] .hist,html[data-theme=dark] .tchead,html[data-theme=dark] .tcfoot,html[data-theme=dark] .tcaside,html[data-theme=dark] .cline,html[data-theme=dark] .obj,html[data-theme=dark] .inv,html[data-theme=dark] .trow{border-color:var(--line)}
html[data-theme=dark] .av{background:#1e3a5f;color:#bfdbfe}
html[data-theme=dark] .toast{background:#e5e7eb;color:#111827}
.m4{margin:4px}
.panel.act{margin-bottom:16px}
.card.pend div.pline{flex-wrap:wrap}
.card.pend .pline .actions{margin-top:6px}
.seg.cabtabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.seg.cabtabs::-webkit-scrollbar{display:none}
@media (max-width:600px){.ppane .tiles4{grid-template-columns:1fr 1fr}.ppane .tile .tval{font-size:17px}}
.card.pend .pline>.row{flex:1 1 260px}
html[data-theme=dark] .btn.danger{color:#f87171}
html[data-theme=dark] .panel.act{border-color:#5b4314;border-left-color:var(--warn)}
html[data-theme=dark] .panel.act.calm{border-color:var(--line);border-left-color:var(--ok)}
html[data-theme=dark] .gtabs,html[data-theme=dark] .bnav{background:#121922}
.bfcard{margin:10px 0}.bfcard.bad{border-color:#fecaca}.bfcard.amber{border-color:#fde68a}
.bfbar{height:8px;border-radius:999px;background:var(--line);overflow:hidden;margin:6px 0 8px}
.bffill{height:100%;border-radius:999px;background:var(--ok)}.bffill.amber{background:var(--warn)}.bffill.bad{background:var(--bad)}
.bfline{font-size:15px}
.pseg{margin:0 0 6px}.pseg button{min-height:34px}
.objgrp{margin:14px 0 6px;font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#6b7280)}.objgrp:first-child{margin-top:0}
.objsub{flex:1 0 100%;display:flex;flex-direction:column;gap:4px}.bar.thin{height:4px;margin-top:0}
.agroup .arow .row{gap:6px;flex-wrap:wrap}
.estsum{margin:10px 0 0;display:flex;flex-direction:column;gap:4px}.estsum .row{gap:10px}
.warnline{color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:8px 10px;margin-top:8px}
html[data-theme=dark] .warnline{color:#fcd34d;background:#2a2410;border-color:#5b4a14}
.ackhidden{margin-top:8px}.ackhidden .arow{opacity:1}
.whosel{width:auto;max-width:200px;padding:6px 10px;font-size:13px}.panel.others{border-color:#93c5fd}

/* календарь часов */
.gbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.glabel2{min-width:120px;text-align:center;text-transform:capitalize}
.glegend{display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:10px;font-size:12px;color:var(--muted);align-items:center}
.gname{color:var(--muted);font-weight:400}
.gkey{display:inline-flex;align-items:center;gap:4px}.gkey::before{content:'';width:12px;height:12px;border-radius:3px;display:inline-block}
.gkey.miss::before{background:#fee2e2;border:1px solid #fca5a5}.gkey.pend::before{border:1px dashed #b45309}
.gwrap{overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:12px;margin-top:12px}
.grid{border-collapse:separate;border-spacing:2px;font-size:12px;width:100%;min-width:640px}
.gwrap.month .grid{min-width:980px;font-size:11px}.gwrap.month .grid th{min-width:26px}.gwrap.month .grid th.off{min-width:16px}.gwrap.month .gchip{padding:1px 3px;margin:0}
.grid th{font-weight:500;color:var(--muted);padding:4px 2px;text-align:center;min-width:34px}
.grid th.today{color:var(--accent)}.grid th.off{color:#9ca3af}
.gdow{font-size:10px;text-transform:uppercase}
.grid td{height:34px;text-align:center;vertical-align:middle;border-radius:6px;background:#f9fafb;padding:1px}
.grid td.off{background:#f1f2f4}.grid td.miss{background:#fee2e2;box-shadow:inset 0 0 0 1px #fca5a5}.grid td.today{box-shadow:inset 0 0 0 1px var(--accent)}
.grid td.click{cursor:pointer}.grid td.click:hover{filter:brightness(.96)}
.grid .gname-c{position:sticky;left:0;z-index:1;background:var(--card);text-align:left;white-space:nowrap;padding-right:8px;font-size:13px;min-width:120px}
.grid .gtot{font-weight:600;background:transparent;min-width:44px}
.grid tfoot td{background:transparent;font-weight:600;color:var(--muted)}
.gchip{display:inline-block;border-radius:4px;padding:1px 4px;margin:1px;font-weight:600;white-space:nowrap;line-height:1.3}
.gchip.pend{outline:1px dashed #b45309;outline-offset:-1px;opacity:.85}
.gabs{display:inline-block;font-weight:700;color:#b45309;font-size:11px}
.gchip.c0{background:#ede9fe;color:#4c1d95}.gchip.c1{background:#d1fae5;color:#065f46}.gchip.c2{background:#ffe4e6;color:#9f1239}.gchip.c3{background:#e0f2fe;color:#075985}.gchip.c4{background:#fef3c7;color:#92400e}
.gchip.c5{background:#fce7f3;color:#9d174d}.gchip.c6{background:#ecfccb;color:#3f6212}.gchip.c7{background:#e5e7eb;color:#374151}.gchip.c8{background:#cffafe;color:#155e75}.gchip.c9{background:#fae8ff;color:#86198f}
.linkbtn{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:left}
.gviewrow{margin-bottom:10px}
html[data-theme=dark] .grid td{background:#18202b}html[data-theme=dark] .grid td.off{background:#121922}html[data-theme=dark] .grid td.miss{background:#3a1618;box-shadow:inset 0 0 0 1px #7f1d1d}
html[data-theme=dark] .grid .gname-c{background:var(--card)}
.mflow{margin:10px 0;border:1px solid var(--line);border-radius:10px;padding:6px 12px}
.mfrow{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px dashed var(--line)}.mfrow:last-child{border-bottom:0}
.mfrow.total{font-size:15px;border-bottom:1px solid var(--line)}.mfrow.total.bad b{color:#b91c1c}.mfrow.owes b{color:#b45309}
.rcset{margin:6px 0}.rcctl{flex-wrap:wrap;gap:8px;margin-top:4px;justify-content:flex-start}.rcctl select{width:auto;padding:3px 6px;font-size:12px}
.rcside.s-client{background:#fef3c7}.rcside.s-client_ours{background:#ffe4e6}.rcrow.dup{background:#fffbeb}
.wplist{display:grid;gap:8px}.wprow{text-align:left;width:100%;cursor:pointer;font:inherit;color:inherit}.wprow.over{border-left:4px solid #dc2626}
.wprow .meta{gap:12px;margin-top:4px}

.grid td.addable:hover{background:var(--soft,#f1f5f9)}.grid td.addable:hover::after{content:'+';color:var(--muted,#94a3b8)}
.warnbox{border-color:#f59e0b}.cabacts{flex-wrap:wrap;gap:8px}
.dblist{padding:4px 16px}.dbrow{padding:10px 0;border-bottom:1px solid var(--line,#e5e7eb)}.dbrow:last-child{border-bottom:0}.dbrow .row{align-items:center;gap:8px}.dbsum{font-size:1.05em;min-width:110px;text-align:right}
.corow{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--line,#e5e7eb)}.corow:last-child{border-bottom:0}.cotm{min-width:120px}
.cobar{height:6px;background:var(--soft,#eef2f7);border-radius:3px;margin-top:6px;overflow:hidden}.cobar-in{display:block;height:100%;background:#3b82f6;border-radius:3px}
.cobar-in.w0{width:0%}.cobar-in.w5{width:5%}.cobar-in.w10{width:10%}.cobar-in.w15{width:15%}.cobar-in.w20{width:20%}.cobar-in.w25{width:25%}.cobar-in.w30{width:30%}.cobar-in.w35{width:35%}.cobar-in.w40{width:40%}.cobar-in.w45{width:45%}.cobar-in.w50{width:50%}.cobar-in.w55{width:55%}.cobar-in.w60{width:60%}.cobar-in.w65{width:65%}.cobar-in.w70{width:70%}.cobar-in.w75{width:75%}.cobar-in.w80{width:80%}.cobar-in.w85{width:85%}.cobar-in.w90{width:90%}.cobar-in.w95{width:95%}.cobar-in.w100{width:100%}
.erow.muted{opacity:.55}
.cohead{flex-wrap:wrap;gap:8px}.cohead .title{white-space:nowrap}.cohead input{width:auto;flex:0 0 auto}
.cotwo{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}@media(max-width:700px){.cotwo{grid-template-columns:1fr}.cohead .title{flex-basis:100%}}
.tbgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:10px 0}
.tbtile{position:relative;text-align:left;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--card,#fff);padding:14px;cursor:pointer;min-height:84px;color:inherit;font:inherit}
.tbtile:hover{border-color:#3b82f6}.tbtile.on{border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6 inset}.tbtile .tbname{font-weight:600;margin-bottom:4px}.tbtile .badge{position:absolute;top:8px;right:8px}
.tbhead{align-items:center;gap:8px;margin:8px 0}.tbone{align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}.tbone input{width:110px}
.tblist{border-top:1px solid var(--line,#e5e7eb)}.tbrow{display:flex;align-items:center;gap:10px;padding:8px 2px;border-bottom:1px solid var(--line,#e5e7eb);cursor:pointer}.tbrow input.qty{width:90px}.tbrow.new{background:var(--soft,#f8fafc)}
.tbnew{margin-top:12px}.tbnew .row{gap:8px;flex-wrap:wrap;margin-top:6px}.tbnew input:first-child{flex:1 1 220px}.tbnew .price{width:110px}
.tbfoot{position:sticky;bottom:-16px;background:var(--card,#fff);display:flex;align-items:center;gap:10px;padding:12px 0 4px;border-top:1px solid var(--line,#e5e7eb);margin-top:10px}
.tbnew .row{display:flex;align-items:center}.tbnew select{width:auto;flex:0 0 120px}.tbnew .price{flex:0 0 110px}.tbnew input:first-child{min-width:0}
.brand{display:flex;align-items:center;gap:8px}.brand .brandmark{height:26px;width:auto;display:block}.brand .brandname{color:#FFDE1F;font-weight:800;letter-spacing:.04em}
.brand .brandsub{color:#9ca3af;font-weight:600;font-size:12px;letter-spacing:.08em}
@media(max-width:700px){.brand .brandsub{display:none}.brand .brandname{font-size:15px}}
.logincard{text-align:center}.loginlogo{margin:4px auto 14px}.loginlogo img{width:132px;height:auto;display:block;margin:0 auto}.loginlogo .brandsub{color:var(--muted,#6b7280);font-weight:700;letter-spacing:.2em;margin-top:8px;font-size:13px}
