/* Каркас desktop.css; мерки списков и карточек – из Портфолио и Клиентов. */
.project-shell{min-width:0;width:100%}.module-name,#projectBack{display:none}
.project-layout{display:grid;grid-template-columns:var(--shell-list) minmax(0,1fr);gap:var(--shell-gap)}
.project-list,.project-detail{min-width:0}.project-list-top{flex:none}
.search{position:relative;display:block;margin:0 0 12px}.search>span{position:absolute;width:1px;height:1px;overflow:hidden}
.search>svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--text-muted);pointer-events:none}
.search input{display:block;width:100%;box-sizing:border-box;height:44px;padding:0 12px 0 40px;border:0;border-radius:var(--radius-sm);background:var(--surface-card);font:var(--fs-sub)/var(--lh-sub) Onest,sans-serif;color:var(--text-primary);outline:none;-webkit-appearance:none}
.search input:focus{box-shadow:inset 0 0 0 1.5px var(--accent)}
.filters{margin:0 0 12px}.pseg button{min-height:36px;font-size:var(--fs-cap)}
#projectList{background:var(--surface-card);border-radius:var(--radius-md);overflow:hidden}
.project-row{display:flex;align-items:center;gap:12px;padding:8px 12px;min-height:56px;cursor:pointer;border:0;background:none;width:100%;text-align:left;color:inherit;font:inherit;-webkit-tap-highlight-color:transparent}
.project-row+.project-row{box-shadow:inset 0 .5px 0 var(--border)}.project-row:active{background:var(--surface-hover)}.project-row.on{background:var(--accent-bg)}
.project-row img,.project-placeholder{flex:0 0 40px;width:40px;height:40px;border-radius:8px;object-fit:cover;background:var(--surface-sunken)}
.project-row>span:last-child{flex:1;min-width:0}.project-row strong{display:block;font-size:var(--fs-sub);line-height:var(--lh-sub);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-row small{display:block;color:var(--text-secondary);font-size:var(--fs-cap);line-height:var(--lh-cap);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:44px;margin-bottom:16px}.project-title h2{font-size:var(--fs-title);line-height:var(--lh-title);letter-spacing:var(--ls-title);font-weight:700;margin:0 0 8px}.project-title p{margin:0;font-size:var(--fs-sub);line-height:var(--lh-sub)}
.project-title .project-stage{position:static;min-width:0;height:auto;padding:0;background:none;border-radius:0;font-size:var(--fs-cap);color:var(--text-secondary);white-space:nowrap;line-height:var(--lh-display)}
.tabs{margin:0 0 16px;overflow:auto}.tabs button{white-space:nowrap}.project-choose{margin:24px 0;font-size:var(--fs-sub)}
.project-detail .project-card{background:var(--surface-card);border-radius:var(--radius-md);padding:16px;margin-bottom:12px}
.project-card h3{font-size:var(--fs-sub);line-height:var(--lh-sub);font-weight:700;color:var(--text-primary);margin:0 0 8px}.project-card p{margin:8px 0;font-size:var(--fs-sub);line-height:var(--lh-sub)}.muted{color:var(--text-secondary);line-height:var(--lh-sub)}.small,.project-note{font-size:var(--fs-cap);line-height:var(--lh-cap)}
.card-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:16px}.card-head h3{margin:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;min-height:44px;font-size:var(--fs-sub);margin:0}.btn svg{display:block;flex:none;width:18px;height:18px}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.work-tile{position:relative;display:block;min-width:0}.work-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:var(--radius-sm);background:var(--surface-sunken)}.work-tile small{display:block;font-size:var(--fs-cap);color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 0}.work-tile input{position:absolute;top:8px;left:8px;width:20px;height:20px;accent-color:var(--accent)}
.empty{padding:24px 16px;text-align:center}.empty svg{color:var(--text-muted)}
.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}
.form-row label,.project-kind-field>span,.field-label,dialog label{display:block;font-size:var(--fs-cap);font-weight:600;color:var(--text-secondary)}
.form-row input:not([type=range]):not(.stepper input),.form-row textarea,dialog input{display:block;box-sizing:border-box;width:100%;margin-top:4px;padding:12px;border:.5px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface-sunken);color:var(--text-primary);font:var(--fs-sub)/var(--lh-sub) Onest,sans-serif;outline:none}
.form-row input:focus,dialog input:focus{border-color:var(--accent)}.form-row textarea{resize:vertical;min-height:80px}.form-row .stepper{margin-top:4px}.form-row .stepper input{margin:0}.form-row .pseg{margin:4px 0 0}.form-row .pseg button{white-space:nowrap;padding-inline:8px}
.person,.document-row{display:flex;align-items:center;gap:12px;padding:12px 0;text-decoration:none;color:inherit}.person+.person,.document-row+.document-row{border-top:.5px solid var(--border)}.person strong,.person small{display:block}.person small,.document-row span{font-size:var(--fs-cap);color:var(--text-secondary)}.avatar{flex:none;width:40px;height:40px;border-radius:50%;background:var(--surface-sunken);display:grid;place-items:center;font-weight:600}.document-row{justify-content:space-between}.project-note{color:var(--text-secondary)}
.pick{display:flex;flex-wrap:nowrap;gap:6px;margin-top:9px;overflow-x:auto;scrollbar-width:none}.pick::-webkit-scrollbar{display:none}.pick button{flex:0 0 auto;color:var(--text-muted);font:inherit;font-size:var(--fs-cap);padding:6px 11px;cursor:pointer;white-space:nowrap;border:none;border-radius:var(--radius-md);background:var(--surface-sunken)}
dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));border:0;border-radius:var(--radius-lg);padding:24px;background:var(--surface-card);color:var(--text-primary)}dialog::backdrop{background:var(--overlay,rgba(20,25,35,.3))}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-head h2{margin:0;font-family:Onest,sans-serif;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}.icon-close{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:var(--radius-sm);background:var(--surface-sunken);color:inherit;cursor:pointer}.icon-close svg{width:18px;height:18px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.error{color:var(--danger)}
.project-save-state{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}
#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--text-primary);color:var(--surface-card);border-radius:var(--radius-md);padding:12px 20px;z-index:100;max-width:90vw}
.project-detail .skline{height:28px;margin-bottom:24px}.project-detail .skblock{height:240px}
html.shell-wide body.shell-full{display:flex;flex-direction:column;height:100vh;padding-top:24px;padding-bottom:24px}
html.shell-wide .project-shell{display:flex;flex-direction:column;flex:1;min-height:0}
html.shell-wide .shell-head{flex:none}
html.shell-wide .project-layout{flex:1;min-height:0}
html.shell-wide .project-list{display:flex;flex-direction:column;min-height:0}
html.shell-wide .project-list-scroll,html.shell-wide .project-detail{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-bottom:16px}
html:not(.shell-wide) .project-shell{padding:16px;box-sizing:border-box}
html:not(.shell-wide) .shell-head{margin-bottom:20px}
html:not(.shell-wide) .module-name{display:block;margin:0;font-size:var(--fs-sub)}
html:not(.shell-wide) .project-layout{display:block}
html:not(.shell-wide) .project-detail{display:none}
html:not(.shell-wide) .project-open .project-detail{display:block}
html:not(.shell-wide) .project-open .project-list{display:none}
html:not(.shell-wide) .project-open #projectBack{display:inline-flex}
html:not(.shell-wide) .project-open .module-name{display:none}
html:not(.shell-wide) .shell-head #settings{font-size:0;width:44px;padding:0}
html:not(.shell-wide) .tabs button{flex:none;min-width:72px}
html:not(.shell-wide) .form-row{grid-template-columns:1fr}

.form-row:has(#editTitle){grid-template-columns:1fr}

.work-preview{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in;border-radius:inherit}.work-preview img{display:block;width:100%}.work-preview:focus-visible{outline:2px solid #405FFF;outline-offset:3px}

/* Аудит Проектов: содержимое первым, одно действие по текущему разделу. */
.project-title{margin-bottom:8px;min-height:0}.project-title h2{margin-bottom:8px}.project-title p{font-size:var(--fs-cap);line-height:var(--lh-cap)}
.project-detail .team-summary{margin-bottom:8px}.project-next{min-height:48px}.project-status{margin-top:0}.project-status>summary{min-height:36px}
.project-detail .tabs{margin-bottom:12px}.project-detail .tabs button{min-height:44px}
.project-workspace .card-head{margin-bottom:12px}.worksets{margin-bottom:12px}.worksets button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:4px}
.project-detail [hidden],.project-shell [hidden]{display:none!important}
.project-workspace .team-panel{margin-top:16px}.project-workspace .team-panel>.project-note:first-child{margin-top:0}
.client-edit{margin:12px 0 0}.client-edit>summary{font-weight:400}.client-edit .form-row{margin-top:12px}.selection-conditions{margin-bottom:0}
.document-types button{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;min-height:56px;width:100%;border:0;border-bottom:.5px solid var(--border);background:transparent;text-align:left;color:var(--text-primary);font:inherit;cursor:pointer}
.document-types button:last-child{border-bottom:0}.document-types strong{display:block;font-size:var(--fs-sub);font-weight:600}.document-types small{display:block;color:var(--text-secondary);font-size:var(--fs-cap);margin-top:4px}.document-types svg{flex:none;color:var(--text-secondary)}
.document-types button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.portfolio-actions{position:sticky;bottom:12px;z-index:2;padding:12px;background:var(--surface-card);border:.5px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sheet);margin:16px 0}
html:not(.shell-wide) .project-open #newProject{display:none}.project-detail .project-title .project-stage{max-width:128px}
@media(max-width:700px){.project-detail .tabs button{font-size:var(--fs-cap);padding-inline:8px}.project-next{align-items:center}.project-next .btn{font-size:var(--fs-cap)}.project-detail .project-title .project-stage{max-width:none}.portfolio-actions{bottom:12px}}

.project-title .project-facts{color:var(--text-secondary);font-size:var(--fs-cap);line-height:var(--lh-cap)}.project-title .project-facts .project-stage{display:inline;font-weight:600;white-space:normal;text-align:left;max-width:none;line-height:inherit;color:var(--text-primary)}
.project-list-empty{padding:16px;font-size:var(--fs-sub)}.project-card>details:last-child{margin-bottom:0}


/* Размеры Портфолио (.pf-card/.pf-row) и Клиентов (.sect/.row):
   карточка 16, строка 12/16, промежуток групп 20, подпись 13, имя 15. */
.project-detail .project-card{margin-bottom:20px}
.project-card h3,.team-panel h3{font-weight:600}
.project-card:not(.project-workspace)>.card-head h3,.team-share-head h3{color:var(--text-secondary)}
.project-detail .tabs{padding:4px;gap:4px;border-radius:var(--radius-sm)}
.project-detail .tabs button{font-size:var(--fs-cap);font-weight:600}
.project-detail .tabs button.on{box-shadow:inset 0 0 0 .5px var(--border-strong)}
.worksets button span{font-weight:500;color:var(--text-muted);font-variant-numeric:tabular-nums}
.project-status>summary{min-height:44px}
.form-row label,.team-form label,.field-label{font-weight:400}
.team-disclosure{margin:12px 0 0}
.team-disclosure>summary{font-weight:500}
.team-member{padding:12px 0}
.team-member-head{display:flex;align-items:flex-start;gap:12px}
.team-member-head>div{flex:1;min-width:0}
.team-member strong{font-size:var(--fs-sub);line-height:var(--lh-sub);font-weight:600;overflow-wrap:anywhere}
.team-member-head .avatar{font-size:var(--fs-sub);color:var(--text-secondary)}
.team-member-options{margin:0 0 0 52px}
.team-member-options>summary{font-size:var(--fs-cap);font-weight:400}
.document-row{justify-content:flex-start;min-height:44px;padding:12px 0;gap:12px}
.document-icon{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:var(--surface-sunken);color:var(--text-secondary)}
.document-copy{flex:1;min-width:0}
.document-copy strong{display:block;font-size:var(--fs-sub);font-weight:500;line-height:var(--lh-sub)}
.document-copy span{display:block;margin-top:4px;line-height:var(--lh-cap)}
.document-chevron{flex:none;color:var(--text-muted);font-size:20px}
.document-row:hover{background:var(--surface-hover)}
.project-row:focus-visible,.document-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.quiet-link{display:inline-flex;align-items:center;min-height:44px;color:var(--accent-text);font-size:var(--fs-sub);text-decoration:none}
.team-form label{margin:12px 0}
.team-panel>.project-note{margin-top:4px}
@media(max-width:700px){.team-member-head>div{min-width:0}.document-copy strong{overflow-wrap:anywhere}}

.project-detail .team-member-options{margin:0 0 0 52px}.project-detail .team-member-options>summary{min-height:36px}.team-dialog .team-member-options{margin:0 0 0 52px}

#shareProject.linkbtn.quiet{color:var(--accent-text)}

.project-loading>.skline:first-child{width:45%;height:24px;margin-bottom:16px}
.project-loading>.skline:nth-child(2){height:44px;margin-bottom:12px}
#projectList>.skline{height:64px;margin:8px 12px}
