/* Оболочка как в эталонном прототипе (drafts/unified-platform.css): монохром, Inter,
   сайдбар #f5f5f3, шапка без рамки, карточки Home. Переносит только визуальный язык —
   данные и поведение остаются за существующими модулями v2. */
:root { --ref-ink: #111; --ref-muted: #626262; --ref-faint: #8a8a8a; --ref-line: #e7e7e7; --ref-soft: #f7f7f5; --ref-ground: #f6f6f5; --ref-mono: 'SFMono-Regular', Menlo, Consolas, monospace; }
/* Inter как в эталонном прототипе (локальные woff2, same-origin из-за CSP font-src 'self'). */
@font-face { font-family: Inter; src: url('/app/assets/inter-latin-wght-normal-Dx4kXJAl.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; src: url('/app/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; src: url('/app/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
body { margin: 0; background: var(--ref-ground); color: var(--ref-ink); font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
.app-shell { display: flex; height: 100dvh; min-height: 0; }
.reference-sidebar { width: 218px; flex-shrink: 0; background: #f5f5f3; border-right: 1px solid #e4e4e1; padding: 20px 12px 14px; display: flex; flex-direction: column; min-height: 0; }
.reference-sidebar .sidebar-brand { margin-bottom: 22px; padding: 0 6px; }
.reference-sidebar .brand { display: inline-flex; align-items: center; gap: 9px; padding: 0 6px; min-height: 36px; font-size: 20px; font-weight: 790; letter-spacing: -.85px; color: var(--ref-ink); text-decoration: none; }
.reference-sidebar .brand em { font-weight: 400; font-style: normal; }
.reference-sidebar .brand-mark { display: grid; place-items: center; background: #111; color: #fff; width: 34px; height: 34px; border-radius: 8px; }
.workspace-user { display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid #dededb; border-radius: 9px; background: #fff; padding: 10px; margin-bottom: 18px; min-height: 56px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.workspace-user:hover { border-color: #111; }
.workspace-user > span:nth-child(2) { flex: 1; min-width: 0; }
.workspace-user strong { font-size: 12px; display: block; font-weight: 680; }
.workspace-user small { display: block; margin-top: 3px; font-size: 11px; color: #666; }
.workspace-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #efefec; color: #111; flex-shrink: 0; }
.reference-sidebar .workspace-icon { flex: 0 0 28px; width: 28px; height: 28px; }
.reference-header .header-actions { gap: 13px; }
.reference-search { padding: 0 10px; }
.reference-search svg { width: 16px; height: 16px; }
.nav-scroll { min-height: 0; overflow: auto; flex: 1; scrollbar-width: thin; scrollbar-color: #c9c9c6 transparent; }
.nav-scroll::-webkit-scrollbar { width: 8px; }
.nav-scroll::-webkit-scrollbar-thumb { background: #c9c9c6; border-radius: 4px; }
.nav-scroll::-webkit-scrollbar-thumb:hover { background: #a9a9a6; }
.nav-label { font: 10px var(--ref-mono); letter-spacing: .14em; color: #8a8a86; text-transform: uppercase; padding: 0 11px; margin: 26px 0 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; width: 100%; padding: 10px; border-radius: 8px; color: #333; text-align: left; font-size: 13px; margin: 2px 0; text-decoration: none; border: 0; background: none; cursor: pointer; font-family: inherit; }
.nav-item:hover { background: #ececea; color: #111; }
.nav-item.active { background: #111; color: #fff; font-weight: 610; }
.nav-item small { margin-left: auto; font: 9px var(--ref-mono); color: #999; }
.nav-item.active small { color: #bbb; }
.circle-letter { width: 28px; height: 28px; border-radius: 7px; background: #d9d9d6; color: #111; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.nav-item.active .circle-letter { background: #fff; color: #111; }
.circle-nav-item span:nth-child(2) { min-width: 0; }
.circle-nav-item small { display: block; margin: 3px 0 0; font-size: 11px; color: #777; font-family: inherit; letter-spacing: 0; text-align: left; }
.nav-item.active small { color: #bbb; }
.sidebar-bottom { border-top: 1px solid #e0e0dd; padding-top: 10px; margin-top: auto; }
.sidebar-bottom .nav-item svg { width: 17px; height: 17px; }
.main-column { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reference-header { height: 48px; flex-shrink: 0; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: transparent; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666; }
.breadcrumbs strong { font-weight: 600; color: #111; }
.breadcrumb-slash { color: #aaa; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.reference-search { display: flex; align-items: center; gap: 9px; width: 260px; height: 38px; padding: 0 10px; background: #efefec; border: 0; border-radius: 8px; font-size: 12px; color: #888; cursor: pointer; font-family: inherit; }
.reference-search:hover { background: #e7e7e4; }
.reference-search span { flex: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; color: #111; padding: 0; border: 0; background: none; cursor: pointer; }
.icon-btn:hover { background: #ececea; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: #d9d9d6; color: #111; display: inline-grid; place-items: center; font-size: 12px; font-weight: 640; border: 0; cursor: pointer; font-family: inherit; }
.main-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c9c9c6 transparent; }
.main-scroll::-webkit-scrollbar { width: 10px; }
.main-scroll::-webkit-scrollbar-track { background: transparent; }
.main-scroll::-webkit-scrollbar-thumb { background: #c9c9c6; border-radius: 5px; border: 2px solid var(--ref-ground); }
.main-scroll::-webkit-scrollbar-thumb:hover { background: #a9a9a6; }
.main-scroll > .container { max-width: 1540px; margin: 0 auto; padding: 20px 24px 28px; }
/* Эталонный Home занимает всю колонку без центрирующего контейнера (как в прототипе):
   отступы задаёт сам .ws-reference-home (0 24px 24px). */
.main-scroll > .container:has(.ws-reference-home) { width: 100%; max-width: none; margin: 0; padding: 0; }
.overview-dashboard .ws-reference-home .ws-briefing { width: 100%; }
body:not(.is-signed-in) .reference-sidebar, body:not(.is-signed-in) .reference-header { display: none; }
/* В прототипе фон подписанного шелла прозрачный (белый), а не серый ground. */
body.is-signed-in { background: #fff; font-size: 13px; line-height: normal; }
body.is-signed-in .reference-sidebar, body.is-signed-in .reference-header { font-size: 13px; line-height: normal; }
body.is-signed-in .nav-item, body.is-signed-in .breadcrumbs, body.is-signed-in .reference-search, body.is-signed-in .nav-label { line-height: normal; }
body.is-signed-in h1, body.is-signed-in h3 { letter-spacing: -.035em; }
body.is-signed-in { font-synthesis: none; }
body.is-signed-in svg { flex-shrink: 0; vertical-align: middle; }
body:not(.is-signed-in) .app-shell { display: block; height: auto; }
body:not(.is-signed-in) .main-scroll { overflow: visible; background: #fff; }
body:not(.is-signed-in) .main-scroll > .container { max-width: 720px; padding: 9vh 24px 48px; }
.shell-hidden { display: none !important; }

/* Home: эталонная раскладка поверх существующих зон Overview. */
body.is-signed-in #account-overview > .eyebrow, body.is-signed-in #account-overview > h1, body.is-signed-in #account-overview > .lead, body.is-signed-in #account-overview > .card-grid, body.is-signed-in #account-overview > p.muted { display: none; }
.overview-dashboard { background: transparent; padding: 0; gap: 18px; font: 13px/normal Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--ref-ink); }
.overview-heading { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.overview-heading h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.overview-heading button { min-height: 30px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ref-muted); font-size: 11px; font-weight: 620; cursor: pointer; font-family: inherit; }
.overview-heading button:hover { color: #111; background: #ececea; }
.overview-heading button[aria-pressed="true"] { background: #111; color: #fff; }
.overview-feedback:empty { display: none; }
.overview-dashboard [data-drop-container="briefing"] { min-height: 0; }
.overview-dashboard [data-drop-container="briefing"] .overview-card { display: flex; align-items: center; gap: 14px; width: 100%; background: #efefec; border: 1px solid #e4e4e1; border-radius: 10px; padding: 14px 18px; }
.overview-dashboard [data-drop-container="briefing"] .overview-card header { display: flex; align-items: center; gap: 10px; margin: 0; flex-shrink: 0; }
.overview-dashboard [data-drop-container="briefing"] .overview-card header h2 { font-size: 12px; font-weight: 650; margin: 0; }
.overview-dashboard [data-drop-container="briefing"] .overview-card-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.overview-dashboard [data-drop-container="briefing"] .overview-card-body p { margin: 0; font-size: 12px; color: #333; }
.overview-dashboard [data-drop-container="briefing"] .overview-state { display: none; }
.overview-dashboard [data-drop-container="briefing"] .overview-card time, .overview-dashboard [data-drop-container="briefing"] .overview-card > small { display: none; }
.overview-briefing-open { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: #111; font-size: 11px; font-weight: 650; cursor: pointer; padding: 6px 4px; font-family: inherit; white-space: nowrap; }
.overview-briefing-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.overview-dashboard [data-drop-container="summary"] { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; min-height: 0; }
.overview-dashboard [data-drop-container="summary"] .overview-card { width: 100%; }
.overview-dashboard .overview-card { background: #fff; border: 1px solid var(--ref-line); border-radius: 12px; padding: 17px; }
.overview-dashboard .overview-card:hover { border-color: #b5b5b5; }
.overview-dashboard .overview-card > header { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; }
.overview-dashboard .overview-card > header h2 { margin: 0; font-size: 12px; font-weight: 600; color: var(--ref-muted); letter-spacing: 0; }
.overview-mark { width: 26px; height: 26px; border-radius: 7px; background: #efefec; color: #111; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 700; }
.overview-mark svg { width: 14px; height: 14px; }
.overview-dashboard .overview-card > header h2 { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.overview-dashboard .overview-card header button[data-action="entry"] { order: 2; margin-left: auto; border: 1px solid var(--ref-line); border-radius: 6px; background: #fff; padding: 4px 8px; min-height: 0; font-size: 10px; font-weight: 620; color: var(--ref-muted); cursor: pointer; font-family: inherit; white-space: nowrap; }
.overview-dashboard .overview-card header button[data-action="entry"]:hover { border-color: #111; color: #111; text-decoration: none; }
.overview-dashboard .overview-card-title { order: 1; display: inline; margin: 0; font-size: 12px; font-weight: 600; color: var(--ref-muted); }
.overview-dashboard .overview-value { font-size: 31px; line-height: 1.08; font-weight: 780; letter-spacing: -1.1px; }
.overview-dashboard [data-drop-container="summary"] .overview-value { font-size: 27px; }
.overview-dashboard .overview-card-body p { font-size: 10px; line-height: 1.7; color: var(--ref-faint); margin: 7px 0 0; }
.overview-dashboard .overview-card-body figure { margin: 9px 0 4px; }
.overview-dashboard .overview-card-body figure svg { height: 54px; }
.overview-dashboard [data-drop-container="col0"] .overview-card-body figure svg { height: 150px; }
.overview-dashboard .overview-card-body figcaption { font: 8px var(--ref-mono); letter-spacing: .03em; color: #999; }
.overview-dashboard .overview-card > time, .overview-dashboard .overview-card > small { display: block; margin-top: 12px; padding-top: 9px; border-top: 1px solid #efefef; font: 9px var(--ref-mono); color: #999; }
.overview-dashboard .overview-state { font-size: 10.5px; color: var(--ref-faint); }
.overview-dashboard .overview-card-body ul, .overview-dashboard .overview-card-body ol { list-style: none; padding: 0; margin: 0; }
.overview-dashboard .overview-card-body li { padding: 11px 0; border-bottom: 1px solid #efefef; }
.overview-dashboard .overview-card-body li:last-child { border-bottom: 0; padding-bottom: 0; }
.overview-dashboard .overview-card-body li strong { display: block; font-size: 11.5px; font-weight: 630; line-height: 1.5; }
.overview-dashboard .overview-card-body li p { margin: 3px 0 0; font-size: 10.5px; color: #999; }
.overview-dashboard .overview-card-body li time { font: 9px var(--ref-mono); color: #999; display: block; margin-bottom: 3px; }
.overview-dashboard [data-drop-container="actions"] .overview-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.overview-dashboard [data-drop-container="actions"] .overview-card-body button { min-height: 40px; border: 1px solid var(--ref-line); border-radius: 8px; background: #fff; font-size: 11px; font-weight: 620; color: #111; cursor: pointer; font-family: inherit; }
.overview-dashboard [data-drop-container="actions"] .overview-card-body button:hover { border-color: #111; }
.overview-dashboard [data-drop-container="actions"] .overview-card-body p { grid-column: 1 / -1; }
.overview-dashboard .overview-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.overview-dashboard .overview-columns > [data-drop-container] { display: grid; grid-template-columns: 1fr; gap: 14px; min-height: 0; }
.overview-dashboard .overview-columns > [data-drop-container] > .overview-card { width: 100%; }
.overview-dashboard .overview-card h3 { font-size: 14px; font-weight: 750; letter-spacing: -.3px; }
.overview-observations { border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; padding: 14px 17px; }
.overview-observations summary { cursor: pointer; font-size: 11px; font-weight: 620; color: var(--ref-muted); min-height: 30px; }
.overview-observations article { padding: 10px 0; border-bottom: 1px solid #efefef; }
.overview-observations article:last-child { border-bottom: 0; }
.overview-pending { font: 10px var(--ref-mono); color: #777; }

/* Поиск-палитра оболочки. */
.shell-search-overlay { position: fixed; inset: 0; z-index: 300; background: #0005; backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; }
.shell-search { width: 560px; max-width: 100%; background: #fff; border: 1px solid var(--ref-line); border-radius: 14px; box-shadow: 0 24px 90px #0002; overflow: hidden; display: flex; flex-direction: column; max-height: 70dvh; }
.shell-search input { border: 0; border-bottom: 1px solid var(--ref-line); padding: 16px 18px; font-size: 13px; font-family: inherit; color: #111; outline: none; width: 100%; }
.shell-search-results { overflow: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: #c9c9c6 transparent; }
.shell-search-results button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 12px; color: #111; cursor: pointer; font-family: inherit; }
.shell-search-results button:hover, .shell-search-results button:focus-visible { background: #fafafa; }
.shell-search-results small { display: block; font-size: 9.5px; color: #999; margin-top: 3px; }
.shell-search-empty { padding: 18px; font-size: 11px; color: #999; }

@media (max-width: 1200px) { .overview-dashboard [data-drop-container="summary"] { grid-template-columns: 1fr 1fr; } .overview-dashboard .overview-columns { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1024px) { .reference-sidebar { display: none; } .reference-sidebar.open { display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 150; width: 230px; box-shadow: 10px 0 35px #0002; } .reference-header { padding: 0 16px; } .reference-search { width: 180px; } }
@media (max-width: 640px) { .reference-header { height: 56px; padding: 0 12px; } .reference-search { width: 44px; padding: 0; justify-content: center; background: transparent; } .reference-search span { display: none; } .main-scroll > .container { padding: 16px 12px 22px; } .overview-dashboard [data-drop-container="summary"] { grid-template-columns: 1fr 1fr; gap: 11px; } .overview-dashboard .overview-columns { grid-template-columns: 1fr; } .overview-dashboard [data-drop-container="briefing"] .overview-card { flex-wrap: wrap; } }
/* Эталонный Home несёт собственный фон и отступы — снимаем обёртку overview-dashboard. */
.overview-dashboard:has(.ws-reference-home) { background: transparent; padding: 0; gap: 0; }
.overview-dashboard:has(.ws-reference-home) .overview-feedback:empty { display: none; }
.overview-dashboard:has(.ws-reference-home) .overview-observations { margin: 16px 24px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }