/* 2.60: «Новый интерфейс» (layout.js). Everything is scoped to html[data-layout="new"] on a computer;
   colours are plain values here so the palette layer (theme.js) re-points them like the rest of the app. */
.layout-only,.layout-icon,.my-day-kpis{display:none}

@media (min-width:900px){
html[data-layout="new"] #workspace{padding-left:var(--side-w,236px);transition:padding-left .15s}
html[data-layout="new"] #workspace>header{position:fixed;z-index:40;top:0;bottom:0;left:0;width:var(--side-w,236px);transition:width .15s;height:auto!important;min-height:0!important;display:flex!important;flex-direction:column;flex-wrap:nowrap!important;align-items:stretch;align-content:stretch;gap:2px!important;padding:16px 12px 14px!important;overflow-y:auto;border-bottom:0!important;border-right:1px solid #ffffff1f;box-shadow:none!important}
html[data-layout="new"] #workspace>header .brand{order:0;padding:4px 10px 12px;font-size:19px;letter-spacing:.5px}
html[data-layout="new"] #workspace>header .product-switch{order:1;width:100%;margin:0 0 4px}
html[data-layout="new"] #workspace>header .product-switch select{width:100%}
html[data-layout="new"] #workspace>header .project-picker{order:2;flex:0 0 auto;height:auto!important;min-height:0}
html[data-layout="new"] #workspace>header .project-picker>button{width:100%;height:auto!important;min-height:38px}
html[data-layout="new"] #workspace>header>*{flex-shrink:0}
html[data-layout="new"] #workspace>main{height:100dvh!important}
html[data-layout="new"] #workspace>header .product-add{order:3}
html[data-layout="new"] #workspace>header .layout-only{display:flex}
html[data-layout="new"] #side-myday{order:4;margin-top:10px}
html[data-layout="new"] #tab-tasks{order:5}
html[data-layout="new"] #tab-chats{order:6}
html[data-layout="new"] #tab-protocols{order:7}
html[data-layout="new"] #tab-metrics{order:8}
html[data-layout="new"] #tab-calendar{order:8}
html[data-layout="new"] #side-admin{order:9;flex-direction:column;gap:2px;margin-top:14px;padding-top:12px;border-top:1px solid #ffffff1f}
html[data-layout="new"] #header-more{display:none!important}
html[data-layout="new"] #workspace>header .sync{order:20;margin-top:auto;padding:10px 10px 4px;font-size:12px}
html[data-layout="new"] #workspace>header .app-version{order:21;padding:0 10px 8px;font-size:11px}
html[data-layout="new"] #who{order:22;max-width:none!important;white-space:normal!important;overflow:visible!important;padding:10px;border:1px solid #ffffff1f;border-radius:12px 12px 0 0;font-size:13px;line-height:1.35}
html[data-layout="new"] #logout{order:23}
html[data-layout="new"] #workspace>header .side-cap{padding:0 12px 4px;font-size:11px;letter-spacing:.8px;text-transform:uppercase;opacity:.7}

html[data-layout="new"] #workspace>header #side-myday,html[data-layout="new"] #workspace>header #tab-tasks,html[data-layout="new"] #workspace>header #tab-chats,html[data-layout="new"] #workspace>header #tab-protocols,html[data-layout="new"] #workspace>header #tab-metrics,html[data-layout="new"] #side-admin button,html[data-layout="new"] #workspace>header #logout,html[data-layout="new"] #workspace>header #tab-calendar{display:flex!important;align-items:center;gap:12px;width:100%;min-height:38px;padding:8px 12px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:inherit!important;box-shadow:none!important;text-align:left;font-weight:500;justify-content:flex-start}
html[data-layout="new"] #workspace>header #side-myday:hover,html[data-layout="new"] #workspace>header #tab-tasks:hover,html[data-layout="new"] #workspace>header #tab-chats:hover,html[data-layout="new"] #workspace>header #tab-protocols:hover,html[data-layout="new"] #workspace>header #tab-metrics:hover,html[data-layout="new"] #side-admin button:hover,html[data-layout="new"] #workspace>header #logout:hover,html[data-layout="new"] #workspace>header #tab-calendar:hover{background:#ffffff14!important}
html[data-layout="new"] #workspace>header button[aria-pressed="true"]:not(.layout-dim){background:#ffffff26!important;font-weight:700}
html[data-layout="new"] #workspace>header button[aria-pressed="true"]:not(.layout-dim) .layout-icon{color:#7fb0ff}
html[data-layout="new"] .layout-icon{display:block;flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html[data-layout="new"] #workspace>header #logout{border:1px solid #ffffff1f!important;border-top:0!important;border-radius:0 0 12px 12px!important;opacity:.85}

/* 2.60.1: the menu is resizable (drag its edge) and folds down to icons. */
html[data-layout="new"] #side-toggle{position:absolute;top:18px;right:10px;z-index:2;display:flex!important;align-items:center;justify-content:center;width:28px;height:28px;min-height:0;padding:0!important;border:1px solid #ffffff2e!important;border-radius:8px!important;background:transparent!important;color:inherit!important;opacity:.8}
html[data-layout="new"] #side-toggle:hover{opacity:1;background:#ffffff1a!important}
html[data-layout="new"] #side-toggle .layout-icon{transition:transform .15s}
html[data-layout="new"] #side-resize{display:block;position:absolute;top:0;right:-3px;bottom:0;width:7px;cursor:col-resize;z-index:3;touch-action:none}
html[data-layout="new"] #side-resize:hover,html[data-layout="new"] #side-resize.dragging{background:linear-gradient(90deg,transparent 2px,#7fb0ff 2px 4px,transparent 4px)}
html[data-layout="new"].side-dragging #workspace,html[data-layout="new"].side-dragging #workspace>header{transition:none}
html[data-layout="new"].side-dragging{cursor:col-resize;user-select:none}
html[data-layout="new"] #workspace>header .brand{padding-right:36px;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
html[data-layout="new"] #workspace>header button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

html[data-layout="new"][data-side="mini"] #workspace{padding-left:64px}
html[data-layout="new"][data-side="mini"] #workspace>header{width:64px;padding:62px 8px 14px!important;overflow-x:hidden}
html[data-layout="new"][data-side="mini"] #side-toggle{top:16px;left:50%;right:auto;transform:translateX(-50%)}
html[data-layout="new"][data-side="mini"] #side-toggle .layout-icon{transform:rotate(180deg)}
html[data-layout="new"][data-side="mini"] #workspace>header .brand,html[data-layout="new"][data-side="mini"] #workspace>header .product-switch,html[data-layout="new"][data-side="mini"] #workspace>header .project-picker,html[data-layout="new"][data-side="mini"] #workspace>header .product-add,html[data-layout="new"][data-side="mini"] #workspace>header .side-cap,html[data-layout="new"][data-side="mini"] #workspace>header .sync,html[data-layout="new"][data-side="mini"] #workspace>header .app-version,html[data-layout="new"][data-side="mini"] #who{display:none!important}
html[data-layout="new"][data-side="mini"] #workspace>header #side-myday,html[data-layout="new"][data-side="mini"] #workspace>header #tab-tasks,html[data-layout="new"][data-side="mini"] #workspace>header #tab-chats,html[data-layout="new"][data-side="mini"] #workspace>header #tab-protocols,html[data-layout="new"][data-side="mini"] #workspace>header #tab-metrics,html[data-layout="new"][data-side="mini"] #side-admin button,html[data-layout="new"][data-side="mini"] #workspace>header #logout,html[data-layout="new"][data-side="mini"] #workspace>header #tab-calendar{justify-content:center;gap:0;padding:10px 0!important;font-size:0!important}
html[data-layout="new"][data-side="mini"] #workspace>header #logout{border:0!important}
html[data-layout="new"][data-side="mini"] #side-admin{margin-top:10px;padding-top:10px}
html[data-layout="new"][data-side="mini"] #task-editor{max-width:calc(100vw - 64px)}

/* Task panel on the right keeps clear of the side menu. */
html[data-layout="new"] #task-editor{max-width:calc(100vw - var(--side-w,236px))}

}

/* «Мой день»: dashboard filters on desktop and mobile. */
.my-day-archive{white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){.my-day-row>.my-day-actions{flex-wrap:wrap}.my-day-row>.my-day-actions button{min-height:44px}}
/* My day uses the same metric tiles and light table styling as the task dashboard. */
html[data-layout="new"] #task-columns:has(>.my-day){display:block!important;overflow-x:hidden}
html[data-layout="new"] .my-day{display:block;width:100%;min-width:0}
html[data-layout="new"] .my-day-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:0 0 20px}
.my-day-kpi{position:relative;text-align:left;cursor:pointer;min-width:0}
.my-day-kpi[aria-pressed="true"]{outline:2px solid #287fb6;outline-offset:2px}
.my-day-kpi[aria-pressed="true"] .my-day-kpi-label:after{content:" ✓"}
.my-day-kpi:focus-visible{outline:3px solid #173b5b;outline-offset:3px}
.my-day-kpi-label{font-size:14px;font-weight:700}
.my-day-kpi-num{font-variant-numeric:tabular-nums;line-height:1.1}
.my-day-kpi-hint{font-size:12px;color:#586c7c;line-height:1.4}
.my-day-kpi-waiting{border-color:#d39a2d!important}
.my-day-kpi-waiting .my-day-kpi-label{color:#875500}
html[data-layout="new"] .my-day-section{background:#fff;border:1px solid #dbe8f2;border-radius:14px;padding:0;overflow:hidden}
html[data-layout="new"] .my-day-section>h3{padding:18px 18px 4px;margin:0;font-size:17px}
html[data-layout="new"] .my-day-section>.my-day-hint{padding:0 18px 14px;margin:0}
.my-day-list-head,html[data-layout="new"] .my-day-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(100px,1fr) minmax(120px,.8fr) minmax(155px,1.1fr) 140px;gap:12px;align-items:start;padding:14px 18px}
.my-day-list-head{background:#f6faff;color:#586c7c;border-bottom:1px solid #dce6ed;font-size:12px;font-weight:600}
html[data-layout="new"] .my-day-row{border-top:0;border-bottom:1px solid #dce6ed;min-width:0}
html[data-layout="new"] .my-day-row:last-child{border-bottom:0}
html[data-layout="new"] .my-day-row:hover{background:#f9fcff}
.my-day-row>*{min-width:0}
.my-day-task,.my-day-person{overflow-wrap:anywhere}
.my-day-title{display:block;box-sizing:border-box;width:100%;max-width:100%;color:#17679c;font-size:14px;overflow-wrap:anywhere}
.my-day-meta{margin-top:8px;font-size:12px}
.my-day-person{font-size:13px;padding-top:8px}
.my-day-status-cell select{width:100%;min-width:0;min-height:38px;font-size:13px}
.my-day-due{width:100%;text-align:left;font-size:13px;min-height:38px;white-space:normal}
.my-day-due.is-overdue{color:#b3261e;border-color:#f0b4ab;background:#fff6f4}
.my-day-row>.my-day-actions{flex-direction:column;align-items:stretch}
.my-day-save-state{grid-column:1/-1;font-size:12px;color:#875500;overflow-wrap:anywhere}
.my-day-save-state:empty{display:none}
.my-day-deadline-form{display:grid;gap:10px;margin-top:10px;padding:12px;background:#f2f8fd;border:1px solid #dbe8f2;border-radius:10px}
html[data-layout="new"] .my-day-row:has(.my-day-deadline-form){grid-template-columns:minmax(140px,2fr) minmax(80px,1fr) minmax(110px,.8fr) minmax(255px,1.5fr) 140px}
.my-day-deadline-fields{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}
.my-day-deadline-fields label{display:grid;gap:4px;font-size:12px;min-width:0}
.my-day-deadline-fields input{box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:6px;font-size:13px}
.my-day-zone{font-size:11px;color:#586c7c;overflow-wrap:anywhere}
.my-day-deadline-form .my-day-actions button{flex:1;white-space:normal}
.my-day-limit,.my-day-empty{padding:14px 18px}
@media(max-width:1100px){
 .my-day-list-head{display:none}
 html[data-layout="new"] .my-day-row,html[data-layout="new"] .my-day-row:has(.my-day-deadline-form){grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .my-day-task,.my-day-person,.my-day-row>.my-day-actions{grid-column:1/-1}
 .my-day-row>.my-day-actions{flex-direction:row}
 .my-day-person{padding-top:0}
 .my-day-person:before{content:"Исполнитель: ";color:#586c7c}
 .my-day-status-cell:before,.my-day-deadline:before{content:attr(data-label);display:block;margin-bottom:6px;color:#586c7c;font-size:12px}
 .my-day-row:has(.my-day-deadline-form) .my-day-deadline{grid-column:1/-1}
}
@media(max-width:600px){
 html[data-layout="new"] .my-day-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .my-day-kpi{padding:14px 12px}.my-day-kpi strong{font-size:28px}.my-day-kpi-label{font-size:13px}.my-day-kpi-hint{font-size:11px}
 html[data-layout="new"] .my-day-row{padding:14px 12px}
 .my-day-row select,.my-day-row button{min-height:44px}
 .my-day-row>.my-day-actions button{flex:1;min-width:120px}
}

/* «Интерфейс: Прежний | Новый» in the «Оформление» dialog. */
.layout-switch-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 18px 0}
.layout-switch-label{font-weight:700}
.layout-switch{display:flex;flex-wrap:wrap;gap:8px}
.layout-switch button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 14px;border:1px solid #c3d5e4;border-radius:10px;background:#fff;text-align:left}
.layout-switch button small{color:#6c8394;font-size:12px}
.layout-switch button[aria-pressed="true"]{border-color:#287fb6;box-shadow:0 0 0 3px #287fb633}

/* 2.60: fonts for the new interface — served from /fonts (OFL, see public/fonts/OFL-*.txt). */
@font-face{font-family:"Pult Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/inter-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Pult Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Pult Mono";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/jetbrains-mono-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Pult Mono";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/jetbrains-mono-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* 2.60.1: Inter and JetBrains Mono have no ClearType hinting and look soft on ordinary (1×) Windows screens.
   There the hinted system faces are used; the bundled fonts only on high-density screens (Retina, 4K, phones). */
html[data-layout="new"],html[data-layout="new"] body,html[data-layout="new"] button,html[data-layout="new"] input,html[data-layout="new"] select,html[data-layout="new"] textarea{font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Pult Inter",sans-serif;text-rendering:optimizeLegibility}
html[data-layout="new"] .task-card-number,html[data-layout="new"] .task-column-count,html[data-layout="new"] .task-mini-chip,html[data-layout="new"] .task-tab-count,html[data-layout="new"] .my-day-kpi-num,html[data-layout="new"] #task-due,html[data-layout="new"] #task-time,html[data-layout="new"] .app-version,html[data-layout="new"] .sync{font-family:"Cascadia Mono",Consolas,ui-monospace,"Pult Mono",monospace;font-variant-numeric:tabular-nums}
@media (min-resolution:1.5dppx){
html[data-layout="new"],html[data-layout="new"] body,html[data-layout="new"] button,html[data-layout="new"] input,html[data-layout="new"] select,html[data-layout="new"] textarea{font-family:"Pult Inter",Inter,"Segoe UI",Roboto,system-ui,sans-serif}
html[data-layout="new"] .task-card-number,html[data-layout="new"] .task-column-count,html[data-layout="new"] .task-mini-chip,html[data-layout="new"] .task-tab-count,html[data-layout="new"] .my-day-kpi-num,html[data-layout="new"] #task-due,html[data-layout="new"] #task-time,html[data-layout="new"] .app-version,html[data-layout="new"] .sync{font-family:"Pult Mono","JetBrains Mono",ui-monospace,Consolas,monospace}
}
/* Themed looks keep their own type (theme.css sets it later for cs/pixel/lamp). */

@media (min-width:900px){
/* Board: thinner column accent, compact cards with a clear edge. */
html[data-layout="new"] .task-column{border-top-width:3px!important;border-radius:12px!important;padding:10px 8px 8px!important;box-shadow:none!important}
html[data-layout="new"] .task-column h2,html[data-layout="new"] .task-column h3{font-size:14px;font-weight:700;letter-spacing:.2px}
html[data-layout="new"] .task-card{border:1px solid #d3dfe8!important;border-radius:10px!important;box-shadow:0 1px 2px #12304a14!important;padding:10px 12px!important;transition:border-color .15s,box-shadow .15s,transform .15s}
html[data-layout="new"] .task-card:hover{border-color:#7fa9c9!important;box-shadow:0 6px 18px #12304a1f!important;transform:translateY(-1px)}
html[data-layout="new"] .task-card:focus-visible{outline:2px solid #287fb6;outline-offset:2px}
html[data-layout="new"] .task-card-title{font-size:14px;font-weight:600;line-height:1.35}
html[data-layout="new"] .task-card .task-mini-chip,html[data-layout="new"] .task-card .task-label{font-size:11.5px;padding:2px 7px;border-radius:6px}
html[data-layout="new"] .task-card .task-person-avatar,html[data-layout="new"] .task-card .task-person-add{width:22px;height:22px;min-width:22px;font-size:10px}
html[data-layout="new"] .task-card .task-inline-checklist summary{font-size:11.5px}
html[data-layout="new"] .task-card .task-progress{height:4px;border-radius:2px}
@media (prefers-reduced-motion:reduce){html[data-layout="new"] .task-card{transition:none}html[data-layout="new"] .task-card:hover{transform:none}}

/* Task panel on the right: sticky header and actions, quiet labels, two-column fields. */
html[data-layout="new"] #task-editor{padding:0!important;border:0!important;border-left:1px solid #c3d5e4!important;border-radius:0!important;box-shadow:-24px 0 60px #0b2a4026!important}
html[data-layout="new"] #task-editor .task-editor-top{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:8px;margin:0;padding:12px 20px;background:#fff;border-bottom:1px solid #dfe7ee}
html[data-layout="new"] #task-editor .task-editor-top button{min-height:34px;padding:6px 14px}
html[data-layout="new"] #task-save-state{display:block;padding:6px 20px 0;font-size:12px;color:#2f6b4f;font-family:"Pult Mono",ui-monospace,monospace}
html[data-layout="new"] #task-editor-title{margin:6px 20px 4px;font-size:13px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:#6c8394;font-family:"Pult Mono",ui-monospace,monospace}
html[data-layout="new"] #task-editor .task-source-preview,html[data-layout="new"] #task-editor .task-editor-nav{margin-left:20px;margin-right:20px}
html[data-layout="new"] #task-editor .task-editor-layout{padding:8px 20px 0;gap:20px}
html[data-layout="new"] #task-form>label,html[data-layout="new"] #task-form .task-editor-grid>label,html[data-layout="new"] #task-comment-form>label{font-size:12px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;color:#6c8394}
html[data-layout="new"] #task-form input,html[data-layout="new"] #task-form select,html[data-layout="new"] #task-form textarea,html[data-layout="new"] #task-comment-form textarea{margin-top:5px;font-size:14px;font-weight:400;letter-spacing:0;text-transform:none;color:#182a39;border-radius:8px}
html[data-layout="new"] #task-title{font-size:18px!important;font-weight:650!important;padding:10px 12px}
html[data-layout="new"] #task-form .task-editor-grid.task-props{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
html[data-layout="new"] #task-form .task-fold{border-radius:10px}
html[data-layout="new"] #task-checklist h3,html[data-layout="new"] #task-comments h3{font-size:13px;letter-spacing:.6px;text-transform:uppercase}
html[data-layout="new"] #task-form .task-editor-actions{position:sticky;bottom:0;z-index:2;margin:14px -20px 0;padding:12px 20px;background:#fff;border-top:1px solid #dfe7ee}
html[data-layout="new"] #task-editor-discussion{border-radius:12px}
}

/* 2.63: sections a person turned off in «Оформление → Разделы» (modules.js sets html[data-hide]).
   Ids are repeated to outweigh the side-menu rules above. */
html[data-hide~="chats"] #tab-chats#tab-chats#tab-chats,html[data-hide~="chats"] #mobile-nav [data-section="dialogs"],html[data-hide~="chats"] #mobile-menu-mail#mobile-menu-mail,html[data-hide~="chats"] #mobile-menu-pinned#mobile-menu-pinned,
html[data-hide~="protocols"] #tab-protocols#tab-protocols#tab-protocols,html[data-hide~="protocols"] #mobile-nav [data-section="protocols"],
html[data-hide~="metrics"] #tab-metrics#tab-metrics#tab-metrics,html[data-hide~="calendar"] #tab-calendar#tab-calendar#tab-calendar,html[data-hide~="calendar"] #mobile-menu-calendar#mobile-menu-calendar,html[data-hide~="metrics"] #mobile-menu-metrics#mobile-menu-metrics,
html[data-hide~="org"] #tab-org#tab-org#tab-org,html[data-hide~="org"] #mobile-menu-org#mobile-menu-org,
html[data-hide~="myday"] #task-view-today#task-view-today,html[data-hide~="myday"] #side-myday#side-myday#side-myday,html[data-hide~="myday"] #mobile-nav [data-view="today"]{display:none!important}
html[data-hide] #mobile-nav{grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}

.modules-switch{margin:14px 18px 0;padding:12px 14px;border:1px solid #c3d5e4;border-radius:12px}
.modules-switch legend{padding:0 6px;font-weight:700}
.modules-hint{margin:0 0 8px;font-size:12.5px;color:#5b7183}
.modules-hint:empty{display:none}
.modules-list{display:flex;flex-wrap:wrap;gap:8px 16px}
.modules-list label{display:inline-flex;align-items:center;gap:8px;min-height:32px;cursor:pointer}
.modules-list input{width:18px;height:18px;margin:0}

/* 2.64: «Безопасность». */
.security-dialog{width:min(560px,calc(100% - 32px))}
.security-logins{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px}
.security-logins li{padding:8px 10px;border:1px solid #dfe7ee;border-radius:8px;font-size:13px}
.security-logins li span{color:#5b7183}
#user-revoke-sessions{margin-left:8px}
.security-backups{margin-top:16px;padding-top:12px;border-top:1px solid #dfe7ee}
.security-backups h3{margin:0 0 6px;font-size:15px}
.security-warn{color:#a3281b;font-size:13px}

/* 2.79.1: the project list fits the left menu — it never runs past the menu edge; long names wrap. */
html[data-layout="new"] #workspace>header #task-projects{left:0;right:0;width:auto;max-width:100%;box-sizing:border-box}
html[data-layout="new"] #workspace>header #task-projects .task-project-chip{white-space:normal;overflow-wrap:anywhere;line-height:1.3;height:auto!important;min-height:36px}


/* Compact metrics header; personal controls and source diagnostics live in Settings. */
#metrics-settings{margin:12px 0;padding:12px 16px;border:1px solid var(--bd,#ccd7e2);border-radius:12px;background:var(--surf,#fff);color:var(--tx,#24343e)}
#metrics-settings>summary{cursor:pointer;font-weight:600}
#metrics-settings[open]>summary{margin-bottom:12px}
#metrics-settings #metrics-source{display:block;margin:12px 0;overflow-wrap:anywhere}
#metrics-settings .metrics-connected-sheets li{margin:10px 0;overflow-wrap:anywhere}
#metrics-settings .metrics-sheet-status{display:block;font-size:.9em;line-height:1.5;color:var(--tx,#24343e)}
#metrics-refresh{min-width:42px;min-height:42px;font-size:24px}
@media print{#metrics-settings{display:none!important}}
#metrics-board .metrics-project-control{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%}
#metrics-board .metrics-project-control select{min-width:0;max-width:100%}
@media(max-width:760px){#metrics-board .metrics-project-control{width:100%;flex-direction:column;align-items:stretch}}
/* 2.83.70: «Метрики» ремонтов компактнее — меньше пустого места над плитками (по скриншоту владельца). */
#metrics-settings:not([open]){margin:4px 0;padding:6px 14px;font-size:13px}
#metrics-board .metrics-repair-tabs{margin:0 0 4px}
#metrics-board .metrics-repair-tab{padding:6px 12px!important}
#metrics-board .metrics-contracts-filter{align-items:center;gap:4px 12px;margin:0}
#metrics-board .metrics-contracts-filter .metrics-repair-filter{margin:0;flex-direction:row;align-items:center}
#metrics-board .metrics-contracts-filter .metrics-repair-filter select{min-height:32px;width:auto;padding:4px 8px}
#metrics-board .metrics-compare-periods{margin:0;font-size:12px;line-height:1.4}
#metrics-body.metrics-repair-view{gap:10px}
/* 2.83.74: Google-учётка для закрытых таблиц метрик */
#metrics-settings .metrics-google{margin:12px 0 4px;padding-top:10px;border-top:1px solid var(--bd,#d8e4ec);display:grid;gap:6px;justify-items:start}
#metrics-settings .metrics-google p{margin:0;max-width:80ch}
