@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/GolosText-cyrillic.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/GolosText-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2113,U+2122,U+2191,U+2193,U+2212;
}
@font-face {
  font-family: Unbounded; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/Unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Unbounded; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/Unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/JetBrainsMono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/JetBrainsMono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122;
}
:root {
  color-scheme: light;
  --paper: #ece8de;
  --sheet: #f8f6f0;
  --sheet-2: #f2efe7;
  --ink: #14161a;
  --muted: #62666e;
  --line: #d6d0c3;
  --line-soft: #e4dfd4;
  --signal: #ff5a1f;
  --signal-ink: #a9330c;
  --signal-soft: #ffe4d6;
  --steel: #1e4d5e;
  --steel-soft: #d9e6e9;
  --rail: #121417;
  --rail-line: #2a2e35;
  --rail-text: #d1d4d9;
  --display: Unbounded, "Golos Text", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --grid: linear-gradient(rgba(20,22,26,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(20,22,26,.045) 1px,transparent 1px),
    linear-gradient(rgba(20,22,26,.024) 1px,transparent 1px),
    linear-gradient(90deg,rgba(20,22,26,.024) 1px,transparent 1px);
  font: 100%/1.45 "Golos Text", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background-image: var(--grid); background-size: 120px 120px,120px 120px,24px 24px,24px 24px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--steel); outline-offset: 3px;
}
.sidebar button:focus-visible { outline-color: #ffbea6; }
h1, h2, h3, p { margin: 0; }
h1, h2, .brand strong, .stat strong, .avatar { font-family: var(--display); }
h1 { font-size: clamp(1.8rem, 3.05vw, 3.15rem); line-height: 1.12; letter-spacing: -.065em; }
h2 { font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.35; letter-spacing: -.045em; }
h3 { font-size: 1rem; line-height: 1.35; }
.symbols { position: absolute; height: 0; width: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hex { clip-path: polygon(25% 3%,75% 3%,100% 50%,75% 97%,25% 97%,0 50%); display: grid; place-items: center; }
.shell { display: grid; grid-template-columns: 13rem minmax(0, 1fr) minmax(17rem, 22vw); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; min-width: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem;
  background-color: var(--rail); color: #fff; padding: 1rem;
  background-image: linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px); background-size: 24px 24px;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: .3rem .25rem 1rem; border-bottom: 1px solid var(--rail-line); }
.brand strong { display: block; font-size: 1.04rem; line-height: 1.2; white-space: nowrap; }
.brand small { display: block; color: #a9afb6; font: .67rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-top: .3rem; }
.brand img { filter: invert(1); }
.identity { display: flex; align-items: center; gap: .63rem; padding: .35rem .25rem .65rem; min-width: 0; }
.identity strong, .identity span:not(.avatar) { display: block; overflow-wrap: anywhere; }
.identity span:not(.avatar) { font-size: .8rem; color: #a9afb6; }
.avatar { flex: 0 0 2.25rem; height: 2.25rem; color: #fff; background: var(--signal); font-size: .74rem; font-weight: 700; }
nav { display: grid; gap: .28rem; }
nav button, .sidebar-footer button {
  border: 0; border-radius: .62rem; background: transparent; padding: .52rem .58rem; min-height: 2.7rem; color: var(--rail-text);
  display: flex; align-items: center; gap: .58rem; text-align: left; white-space: nowrap; font-size: .9rem; font-weight: 600;
}
nav button[aria-current="page"] { color: var(--ink); background: #fff; }
nav button:hover:not([aria-current="page"]), .sidebar-footer button:hover { background: var(--rail-line); }
nav button span { margin-left: auto; font: .71rem var(--mono); color: #aeb4bc; }
nav button[aria-current="page"] span { color: #43464d; }
nav button span:empty { display: none; }
.sidebar-footer { margin-top: auto; display: grid; gap: .3rem; }
.sidebar-footer .assistant-toggle, #close-assistant { display: none; }
.workspace { width: 100%; padding: clamp(1rem, 2.15vw, 2.45rem); min-width: 0; }
.workspace-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .65rem 1rem; margin-bottom: 1rem; }
.workspace-header > div:first-child { min-width: 0; }
.workspace-name, .stat-label, .section-date {
  font: .74rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.workspace-name { margin-bottom: .45rem; }
.page-summary { margin-top: .55rem; color: #3a3e46; font-size: .95rem; }
.page-summary strong { color: var(--signal-ink); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.search { display: flex; align-items: center; gap: .4rem; padding: .1rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); }
.search .icon { width: .95rem; height: .95rem; color: var(--muted); }
.search input { border: 0; background: transparent; padding: .38rem 0; width: min(11rem, 38vw); }
.primary, .secondary, .task-button, #close, #close-assistant {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border: 1px solid var(--line);
  border-radius: 999px; padding: .45rem .8rem; min-height: 2.65rem; background: transparent; font-size: .875rem; font-weight: 650;
}
.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.primary:hover { background: #353941; border-color: #353941; }
.secondary:hover, .task-button:hover { background: var(--sheet-2); border-color: #bdb4a2; }
.panel, .stat, .empty, .card, .server-grid > div, .calendar {
  border: 1px solid var(--line); background: var(--sheet); border-radius: .82rem;
  box-shadow: 0 1px #fff9 inset, 0 10px 25px -20px #14161a60;
}
.intake { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; margin-bottom: .8rem; }
.intake-mark { width: 3.65rem; height: 3.9rem; flex: none; background: var(--signal); color: #fff; }
.intake-mark .icon { width: 1.55rem; height: 1.55rem; }
.intake-body { flex: 1; min-width: 0; }
.intake-body label { display: block; font-size: 1rem; margin-bottom: .17rem; }
.intake-body input { background: transparent; padding: .25rem .05rem; border: 0; }
.intake-body input:focus { outline-offset: 1px; }
.stats, .server-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin-bottom: .8rem; }
.stat { position: relative; display: flex; align-items: center; gap: .35rem; justify-content: space-between; text-align: left; min-height: 5.05rem; min-width: 0; padding: .75rem .82rem; }
.stat:hover { border-color: #baac99; }
.stat strong { font-size: clamp(1.55rem, 2.5vw, 2.85rem); letter-spacing: -.08em; line-height: 1; }
.stat small { display: block; margin-top: .25rem; line-height: 1.25; }
.stat.hot { background: var(--ink); color: white; border-color: var(--ink); padding-right: 1rem; }
.stat.hot .stat-label, .stat.hot strong { color: #ff7a47; }
.stat.hot small { color: #e1dfe0; }
.stat.hot::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: .47rem; border-radius: 0 .82rem .82rem 0;
  background: repeating-linear-gradient(-45deg,var(--signal) 0 7px,var(--ink) 7px 13px);
}
.today-grid { display: grid; grid-template-columns: minmax(0,1.16fr) minmax(0,1fr); gap: .75rem; align-items: start; }
.today-column { display: grid; gap: .75rem; min-width: 0; }
.today-panel { padding: .85rem; min-width: 0; }
.section-heading { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .45rem; min-height: 1.9rem; }
.section-heading h2 { flex: 1; }
.section-heading button { border: 0; background: transparent; color: var(--muted); text-align: right; padding: .2rem 0; font-size: .8rem; }
.section-heading button:hover { text-decoration: underline; }
.subsection { margin-top: 1rem; }
.list { display: grid; gap: .55rem; min-width: 0; }
.today-panel .list { gap: 0; }
.card { display: flex; align-items: flex-start; gap: .55rem; padding: .75rem; min-width: 0; }
.today-panel .card {
  background: transparent; border: 0; border-top: 1px dashed var(--line); border-radius: 0; box-shadow: none; padding: .55rem 0;
}
.card-info { flex: 1; min-width: 0; }
.card-title { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.card-title:hover { text-decoration: underline; }
.card-meta { display: flex; gap: .28rem; flex-wrap: wrap; margin-top: .28rem; font-size: .8rem; }
.card-description { margin-top: .35rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.note-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.note-card { position: relative; align-items: stretch; flex-direction: column; min-height: 8rem; padding-top: 1rem; }
.note-card::before { content: ""; position: absolute; top: 0; left: .85rem; width: 2.1rem; height: .28rem; background: var(--signal); border-radius: 0 0 .25rem .25rem; }
.note-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.task-button { flex: none; padding: 0; width: 1.9rem; min-height: 1.9rem; border-radius: .35rem; border-color: #6b6e75; margin-top: .03rem; }
.task-button.done { color: #fff; background: var(--ink); border-color: var(--ink); }
.task-button.done:hover { background: #454a54; }
.task-button .icon { width: 1rem; height: 1rem; }
small, .muted, .server-grid span { color: var(--muted); font-size: .84rem; }
.tag {
  display: inline-flex; align-items: center; max-width: 100%; width: max-content; border: 1px solid var(--line-soft); padding: .12rem .45rem;
  border-radius: 999px; background: var(--sheet-2); color: #3a3e46; font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere;
}
.tag.hot { color: var(--signal-ink); background: var(--signal-soft); border-color: #ffc9b1; }
.tag.steel { color: var(--steel); background: var(--steel-soft); border-color: #c3d6db; }
.empty { color: var(--muted); padding: .8rem; }
.today-panel .empty { border: 0; box-shadow: none; padding: .28rem 0; font-size: .875rem; }
.controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .65rem; }
.controls input { flex: 1; min-width: 8rem; }
.filters { display: flex; gap: .2rem; flex-wrap: wrap; padding: .15rem; border-radius: 1rem; background: var(--sheet-2); border: 1px solid var(--line-soft); }
.filters button { min-height: 2rem; border: 0; border-radius: 999px; padding: .2rem .65rem; font-size: .85rem; background: transparent; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.status, #editor-status, #login-status { color: #982e16; min-height: 1.4em; margin-top: .5rem; }
.status:empty, #login-status:empty { min-height: 0; }
.server-grid > div { padding: .8rem; min-width: 0; }
.server-grid strong { display: block; overflow-wrap: anywhere; }
.calendar { padding: .85rem; margin-bottom: .85rem; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: .45rem; margin-bottom: .6rem; }
.calendar-grid, .week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .22rem; text-align: center; }
.calendar-grid button, .week button {
  padding: .22rem .1rem; min-height: 2.55rem; min-width: 0; border: 1px solid var(--line-soft); border-radius: .48rem; background: var(--sheet-2);
  font-weight: 650;
}
.calendar-grid button[aria-pressed="true"], .week button.today { color: white; background: var(--ink); border-color: var(--ink); }
.week button small { display: block; font: .65rem var(--mono); color: inherit; }
.calendar-grid button.today { box-shadow: inset 0 0 0 2px var(--signal); }
.calendar-grid button.outside { color: #65635d; }
.calendar-grid button.has-records::after, .week button.has-records::after { content: ""; display: block; background: var(--signal); margin: .12rem auto; height: .3rem; width: .3rem; border-radius: 50%; }
.assistant { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; min-width: 0; background: var(--sheet); border-left: 1px solid var(--line); }
.assistant-header { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line); padding: .9rem; }
.assistant-header h2 { font-size: clamp(.88rem, 1.1vw, 1.17rem); }
.assistant-header p { color: var(--muted); font-size: .82rem; margin-top: .17rem; }
.assistant-mark { width: 2.55rem; height: 2.75rem; background: var(--ink); color: var(--signal); flex: none; }
.assistant-body { display: flex; flex-direction: column; flex: 1; gap: .7rem; padding: .9rem; overflow: auto; }
.assistant-footer { font-size: .8rem; color: var(--muted); padding: .75rem .9rem 1rem; }
.assistant-footer span { display: inline-block; border-radius: 50%; width: .45rem; height: .45rem; background: #d99a00; margin-right: .35rem; }
dialog { width: min(39rem,calc(100% - 1.2rem)); padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--sheet); max-height: 88dvh; }
dialog::backdrop { background: #14161abc; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
#close, #close-assistant { width: 2.45rem; min-height: 2.45rem; flex: none; font-size: 1.3rem; padding: 0; }
#close-assistant { display: none; }
#fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: .8rem; }
.field-wide { grid-column: 1 / -1; }
label { display: grid; gap: .28rem; font-weight: 650; }
input, select, textarea {
  width: 100%; min-width: 0; border: 1px solid #bdb5a5; border-radius: .55rem; padding: .48rem;
  background: #fff; color: var(--ink); font-weight: 400;
}
textarea { resize: vertical; }
.actions { display: flex; justify-content: flex-end; margin-top: .65rem; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%,25rem); padding: 1.25rem; }
.login-card h1 { font-size: 1.65rem; margin-block: .55rem .95rem; }
.login-card form { display: grid; gap: .65rem; }
@media (max-width: 76rem) {
  .shell { grid-template-columns: 12rem minmax(0,1fr) minmax(15rem,22vw); }
  .sidebar { padding: .75rem; }
  .stat { align-items: start; flex-direction: column-reverse; }
}
@media (max-width: 63rem) {
  .shell { grid-template-columns: 11.4rem minmax(0,1fr); }
  .sidebar-footer .assistant-toggle { display: flex; }
  .assistant { display: none; }
  .assistant.is-open {
    display: flex; z-index: 5; position: fixed; inset: 0 0 0 auto; width: min(23rem,100%); height: 100dvh;
    box-shadow: -22px 0 65px #14161a45;
  }
  #close-assistant { display: inline-flex; margin-left: auto; }
}
@media (max-width: 46rem) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: minmax(0,1fr) auto; padding: .65rem .7rem .35rem; gap: .3rem; }
  .brand { border: 0; padding: .1rem .2rem; }
  .brand small { margin-top: .15rem; }
  .brand img { width: 30px; height: 30px; }
  .identity { display: none; }
  .sidebar-footer { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: .15rem; margin: 0; }
  .sidebar-footer button { padding-inline: .35rem; font-size: .74rem; }
  nav { grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .2rem; padding: .1rem 0 .32rem; }
  nav button { justify-content: center; min-height: 2.35rem; padding: .2rem .16rem; white-space: normal; text-align: center; font-size: .81rem; }
  nav button .icon, nav button span { display: none; }
  .workspace { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
  .today-grid { grid-template-columns: minmax(0,1fr); }
  .stat { min-height: 4.7rem; }
}
@media (max-width: 29rem) {
  .header-actions { width: 100%; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  .stats { gap: .38rem; }
  .stat { padding: .45rem; }
  .stat-label { font-size: .66rem; letter-spacing: .035em; }
  .stat small { font-size: .72rem; }
  .server-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .note-grid { grid-template-columns: minmax(0,1fr); }
  .intake { gap: .48rem; padding: .55rem; flex-wrap: wrap; }
  .intake-mark { width: 2.7rem; height: 2.92rem; }
  .intake-body { min-width: 11rem; }
  .intake .primary { margin-left: auto; }
  .calendar { padding: .5rem; }
  #fields { grid-template-columns: minmax(0,1fr); }
}

/* Размеры панелей сохраняются отдельно для этого устройства. */
.shell { --nav-width: 208px; --assistant-width: 316px; grid-template-columns: var(--nav-width) minmax(0,1fr) var(--assistant-width); }
.shell.nav-minimized { --nav-width: 62px; grid-template-columns: 62px minmax(0,1fr) var(--assistant-width); }
.shell.assistant-minimized { --assistant-width: 58px; grid-template-columns: var(--nav-width) minmax(0,1fr) 58px; }
.sidebar nav button { position: relative; }
#collapse-nav, #collapse-assistant { align-items: center; gap: .5rem; }
#collapse-nav > span:first-child, #collapse-assistant { font-size: 1.35rem; line-height: 1; }
#collapse-assistant {
  border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); padding: 0;
  width: 2.05rem; height: 2.05rem; flex: none; margin-left: auto;
}
#collapse-assistant:hover { background: var(--sheet-2); }
.splitter {
  position: absolute; top: 0; bottom: 0; z-index: 3; width: .52rem; cursor: col-resize; touch-action: none;
}
.splitter-nav { right: 0; }
.splitter-assistant { left: 0; }
.splitter:hover, .splitter:focus-visible, .resizing-layout .splitter { background: #ff5a1f65; }
.resizing-layout, .resizing-layout * { cursor: col-resize !important; user-select: none; }
@media (min-width: 46.01rem) {
  .shell.nav-minimized .sidebar { padding: .55rem; gap: .65rem; }
  .shell.nav-minimized .brand { padding: .2rem 0 .6rem; justify-content: center; }
  .shell.nav-minimized .brand img { width: 32px; height: 32px; }
  .shell.nav-minimized .brand div, .shell.nav-minimized .identity, .shell.nav-minimized #logout,
  .shell.nav-minimized #collapse-nav > span:last-child,
  .shell.nav-minimized nav button span, .shell.nav-minimized .splitter-nav { display: none; }
  .shell.nav-minimized nav button { justify-content: center; gap: 0; font-size: 0; padding: .35rem 0; }
  .shell.nav-minimized #collapse-nav { justify-content: center; }
}
@media (min-width: 63.01rem) {
  .shell.assistant-minimized .assistant-header { flex-direction: column; padding: .55rem; gap: .4rem; }
  .shell.assistant-minimized #collapse-assistant { margin: 0; }
  .shell.assistant-minimized .assistant-mark { width: 2rem; height: 2.18rem; }
  .shell.assistant-minimized .assistant-title, .shell.assistant-minimized .assistant-body,
  .shell.assistant-minimized .assistant-footer, .shell.assistant-minimized .splitter-assistant { display: none; }
}
@media (max-width: 63rem) {
  .shell, .shell.assistant-minimized { grid-template-columns: var(--nav-width) minmax(0,1fr); }
  .shell.nav-minimized, .shell.nav-minimized.assistant-minimized { grid-template-columns: 62px minmax(0,1fr); }
  .splitter-assistant, #collapse-assistant { display: none; }
}
@media (max-width: 46rem) {
  .shell, .shell.assistant-minimized, .shell.nav-minimized, .shell.nav-minimized.assistant-minimized { display: block; }
  .splitter, #collapse-nav { display: none; }
}
.assistant-body { min-height: 4rem; }
.assistant-footer { border-top: 1px solid var(--line); padding: .65rem .8rem max(.7rem, env(safe-area-inset-bottom)); }
.assistant-footer span { display: initial; width: auto; height: auto; background: transparent; margin: 0; border-radius: 0; }
.model-settings { margin-bottom: .5rem; }
.model-settings summary { cursor: pointer; font-size: .82rem; }
.model-settings summary strong { margin-left: .27rem; color: var(--ink); overflow-wrap: anywhere; }
.model-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .35rem; margin-top: .35rem; }
.model-fields label { font-size: .78rem; }
.model-fields select { padding: .35rem .2rem; }
.assistant-limits { margin-top: .65rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.assistant-limits > p { margin: 0 0 .2rem; font-size: .78rem; font-weight: 600; }
#assistant-limits { max-height: min(12rem, 27vh); overflow: auto; }
.assistant-limit { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .18rem 0; font-size: .78rem; }
.assistant-limit span { min-width: 0; overflow-wrap: anywhere; }
.assistant-limit small { display: block; font-size: .71rem; }
.assistant-limit strong { color: var(--steel); text-align: right; }
.server-quota { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .8rem; margin-bottom: .8rem; }
.server-quota h2 { margin: 0 0 .2rem; font-size: 1rem; }
.server-quota small { display: block; }
.server-quota strong { color: var(--steel); font-size: 1.2rem; white-space: nowrap; }
.assistant-compose { background: #fff; border: 1px solid var(--ink); border-radius: .78rem; padding: .4rem; }
.assistant-compose textarea { display: block; height: var(--compose-height,48px); border: 0; padding: .25rem .35rem; resize: none; }
.assistant-compose textarea:focus { outline: none; }
.assistant-compose:focus-within { border-color: var(--steel); }
#compose-resize { position: absolute; top: -10px; left: 0; right: 0; height: 20px; cursor: ns-resize; touch-action: none; user-select: none; z-index: 1; display: grid; place-items: center; }
#compose-resize::before { content: ""; width: 2.5rem; height: 3px; border-radius: 2px; background: var(--muted); }
#compose-resize:hover::before, #compose-resize:focus-visible::before, .resizing-compose #compose-resize::before { background: var(--signal-ink); }
#compose-resize:focus-visible { outline: 0; }
#compose-resize:focus-visible::before { outline: 2px solid var(--steel); outline-offset: 2px; }
body.resizing-compose, body.resizing-compose * { cursor: ns-resize !important; user-select: none; }
.assistant-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.icon-action { padding: .22rem .38rem; min-height: 2.1rem; min-width: 2.1rem; border-radius: .45rem; }
.icon-action.is-recording { color: #fff; background: var(--signal-ink); border-color: var(--signal-ink); font: .76rem var(--mono); }
.draft-save { margin-left: auto; min-height: 2.1rem; font-size: .75rem; padding-inline: .62rem; }
.assistant-attachments { display: grid; gap: .22rem; max-height: 5rem; overflow-y: auto; }
.attachment-row { display: flex; gap: .45rem; align-items: center; padding: .16rem .3rem; background: var(--sheet-2); border-radius: .4rem; }
.attachment-row .attachment-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; padding: .12rem 0; flex: 1; text-align: left;
}
.attachment-row .attachment-name:hover { text-decoration: underline; }
.attachment-row button:last-child { flex: none; border: 0; background: transparent; line-height: 1; padding: .25rem; }
#assistant-audio { max-width: 100%; height: 2.75rem; margin: .25rem 0; }
#assistant-feedback { min-height: 1.2em; margin: .3rem 0; color: var(--ink); }
#assistant-feedback:empty { min-height: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.server-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; }
.server-tabs button[aria-pressed="true"] { color: white; background: var(--ink); }
.explorer { min-width: 0; padding: .75rem; }
.explorer-path { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: .55rem; }
.explorer-path button { border: 0; background: transparent; color: var(--ink); text-decoration: underline; padding: .25rem; overflow-wrap: anywhere; }
.explorer-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: .35rem; align-items: center; border-top: 1px dashed var(--line); padding: .35rem 0; }
.explorer-open { background: transparent; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; padding: .35rem; font-weight: 650; }
.explorer-open:hover { text-decoration: underline; }
.explorer-download { min-height: 2.1rem; padding-inline: .5rem; font-size: .8rem; }
.explorer-preview { margin-top: .75rem; padding: .75rem; min-width: 0; }
.explorer-preview h2 { overflow-wrap: anywhere; }
.explorer-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 48vh; overflow: auto; }
@media (max-width: 28rem) {
  .explorer-row { grid-template-columns: minmax(0,1fr) auto; }
  .explorer-row > small { display: none; }
}
@media (min-width: 63.01rem) {
  .shell.nav-minimized.assistant-minimized { grid-template-columns: 62px minmax(0,1fr) 58px; }
}

/* Компоновка разделов личного кабинета. */
.workspace { container-type:inline-size; }
.page-summary:empty { display:none; }
.section-tabs { display:flex; flex-wrap:wrap; width:fit-content; max-width:100%; gap:2px; margin-bottom:1.35rem;
  background:var(--sheet-2); border:1px solid var(--line); border-radius:.8rem; padding:4px; }
.section-tabs button { border:0; color:var(--muted); font-weight:650; background:transparent; padding:.5rem .8rem; border-radius:999px; }
.section-tabs button[aria-pressed=true] { background:var(--ink); color:white; }
.plan-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.6rem; margin:0 0 1.3rem; }
.metric { display:grid; gap:.2rem; align-content:start; text-align:left; padding:.85rem; border:1px solid var(--line);
  background:var(--sheet); border-radius:.85rem; color:var(--muted); min-width:0; }
.metric strong { font-family:var(--display); font-size:1.8rem; color:var(--ink); line-height:1.2; }
.metric span { font-size:.81rem; }
.metric:hover, .plan-action:hover { border-color:var(--signal); }
.agenda-group { margin:1rem 0; }
.agenda-group h2 { margin-bottom:.5rem; font-size:1.1rem; }
.day-empty { display:grid; justify-items:start; gap:.6rem; padding:1.1rem; }
.calendar-layout { display:grid; grid-template-columns:minmax(15rem,20rem) minmax(0,1fr); align-items:start; gap:1rem; }
.day-agenda { min-width:0; }
.day-agenda .section-heading { flex-wrap:wrap; }
.day-agenda .section-heading button { border:1px solid var(--line); background:var(--sheet); padding:.35rem .6rem; }
.calendar-grid button small { display:block; font-size:.64rem; line-height:1; color:inherit; }
.date-picker { margin-top:.8rem; color:var(--muted); font-size:.83rem; }
.plan-action { margin-left:auto; min-height:2rem; padding:.3rem .6rem; flex:none; font-size:.8rem; }
.card { align-items:center; }
.card.note-card { align-items:stretch; }
@container (max-width: 40rem) {
  .plan-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .calendar-layout { grid-template-columns:1fr; }
  .calendar { width:min(100%,23rem); }
}
@container (max-width: 28rem) {
  .section-tabs { width:100%; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .section-tabs button { padding:.45rem .12rem; font-size:.79rem; }
  .plan-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.register-controls { display:flex; flex-wrap:wrap; gap:.45rem; margin-bottom:.8rem; }
.register-controls input { flex:2 1 12rem; }
.register-controls select { flex:1 1 8rem; width:auto; }

/* Проводник: адрес, список каталога и область чтения. */
.file-layout {display:grid;grid-template-columns:minmax(17rem,.85fr) minmax(0,1.15fr);
  grid-template-rows:auto minmax(0,1fr);height:clamp(27rem,72vh,54rem);overflow:hidden;
  background:var(--sheet);border:1px solid var(--line);border-radius:.82rem}
.file-toolbar {grid-column:1/-1;display:flex;align-items:center;gap:.25rem;padding:.45rem .65rem;
  border-bottom:1px solid var(--line);background:var(--sheet-2)}
.folder-nav,.viewer-close {border:0;background:transparent;font-size:1.08rem;min-width:2rem;min-height:2rem;border-radius:.4rem}
.folder-nav:disabled {opacity:.36;cursor:default}
.folder-nav:not(:disabled):hover,.viewer-close:hover {background:var(--line-soft)}
.file-toolbar .explorer-path {flex:1;min-width:0;flex-wrap:nowrap;align-items:center;overflow:auto;margin:0;padding:0 .4rem;background:var(--sheet);border:1px solid var(--line);border-radius:.4rem}
.file-toolbar .explorer-path button {white-space:nowrap;min-height:1.9rem;text-decoration:none}
.file-layout .explorer,.file-layout .file-viewer {margin:0;border:0;border-radius:0;box-shadow:none;min-height:0;min-width:0}
.file-layout .explorer {display:flex;flex-direction:column;padding:.65rem;border-right:1px solid var(--line)}
.explorer input[type=search] {margin-bottom:.6rem}
.file-rows {min-height:0;overflow:auto;flex:1}
.folder-columns,.file-row {display:grid;grid-template-columns:minmax(0,1fr) 5rem 3.4rem;gap:.4rem;align-items:center;text-align:left}
.folder-columns {border-block:1px solid var(--line);color:var(--muted);font-size:.73rem;padding:.3rem .35rem}
.file-row {width:100%;background:transparent;border:0;border-bottom:1px solid var(--line-soft);padding:.34rem;min-height:2.1rem}
.file-row:hover {background:var(--sheet-2)}
.file-row[aria-current=true] {background:var(--signal-soft);color:var(--signal-ink)}
.file-entry {display:flex;gap:.5rem;align-items:center;min-width:0}
.file-entry>span:last-child {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-glyph {font:600 .56rem/1.35 var(--mono);background:var(--steel-soft);color:var(--steel);border-radius:.18rem;text-align:center;min-width:1.55rem}
.folder-glyph {width:1.35rem;height:.85rem;border:1px solid var(--signal-ink);background:var(--signal-soft);border-radius:.16rem;position:relative;margin:.2rem .1rem 0;flex:none}
.folder-glyph::before {content:"";position:absolute;top:-.24rem;left:-1px;width:.65rem;height:.24rem;background:var(--signal-ink);border-radius:.1rem .1rem 0 0}
.file-size,.folder-columns span:last-child {text-align:right}
.file-row small {font-size:.72rem}
.file-layout [role=status] {font-size:.74rem;color:var(--muted)}
.file-viewer {display:flex;flex-direction:column;overflow:auto}
.viewer-empty {margin:auto;padding:1rem;text-align:center}
.viewer-heading {display:flex;align-items:center;gap:.35rem;border-bottom:1px solid var(--line);padding:.55rem}
.viewer-heading h2 {flex:1;min-width:0;overflow-wrap:anywhere;font-size:1rem}
.viewer-heading .secondary {min-height:2rem;padding:.2rem .55rem;font-size:.75rem}
.file-preview-body {padding:.8rem;min-height:0;overflow:auto}
.file-preview-body pre {white-space:pre-wrap;overflow-wrap:anywhere;max-height:68vh;overflow:auto}
.file-preview-body img,.file-preview-body video,.file-preview-body audio,.file-preview-body iframe {max-width:100%;width:100%;border:0}
.file-preview-body iframe {height:62vh}
.server-section {margin:.7rem 0}
.server-section h2,.server-section summary {font-weight:700;font-size:1rem;margin-bottom:.55rem}
.server-section summary {cursor:pointer}
.table-scroll {overflow:auto}
.server-section table {border-collapse:collapse;width:100%;font-size:.86rem}
.server-section th,.server-section td {text-align:left;border-bottom:1px solid var(--line-soft);padding:.4rem;overflow-wrap:anywhere}
.server-grid progress {display:block;width:100%;height:.5rem;margin:.5rem 0;accent-color:var(--steel)}
@container (max-width:37rem) {
  .file-layout {grid-template-columns:minmax(0,1fr);height:clamp(25rem,65vh,44rem)}
  .file-layout .explorer {border-right:0}
  .file-layout:not(.has-selection) .file-viewer,.file-layout.has-selection .explorer {display:none}
}
.server-section {padding:.85rem}
.unit-list small {display:block;color:var(--muted);font-size:.73rem}
.unit-state {display:inline-flex;align-items:center;gap:.4rem}
.unit-state::before {content:"";width:.55rem;height:.55rem;flex:none;border-radius:50%;background:var(--muted)}
.unit-state[data-state=active]::before {background:#39835c}
.unit-state[data-state=failed]::before {background:#bb4032}
.unit-state[data-state=activating]::before,.unit-state[data-state=deactivating]::before {background:#bd8425}
.server-connections {padding:.5rem .1rem;color:var(--muted);font-size:.85rem}
.server-connections summary {cursor:pointer}
.server-connections div {display:flex;flex-wrap:wrap;gap:.5rem;margin:.35rem 0}

.file-note {line-height:1.6;overflow-wrap:anywhere}
.file-note p {margin:.55rem 0;white-space:pre-line}
.file-note h2,.file-note h3,.file-note h4 {margin:.85rem 0 .4rem}
.file-note ul,.file-note ol {padding-left:1.5rem}
.file-note pre {background:var(--sheet-2);padding:.5rem}
.file-note .file-meta {margin:0 0 .7rem;color:var(--muted);font-size:.78rem;line-height:1.4}
.file-note .wikilink {border:0;background:none;padding:0;min-height:0;font:inherit;color:var(--steel);text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left}
.file-note .wikilink:hover {color:var(--signal-ink)}
.file-note .wikilink:focus-visible {outline:2px solid var(--signal);outline-offset:2px}

.meeting-tools,.meeting-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:14px}
.meeting-grid {grid-template-columns:minmax(140px,1fr) minmax(0,2fr)}
.meeting-grid[hidden] {display:none}
.meeting-card,.meeting-list {min-width:0;padding:16px;background:var(--sheet);border:1px solid var(--line)}
.meeting-card h2 {font-size:1.1rem;margin:0 0 12px}
.meeting-card textarea {width:100%;resize:vertical;margin-bottom:10px}
.meeting-actions,.meeting-task {display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:10px 0}
.meeting-task {flex-direction:column;align-items:stretch;gap:6px;padding-bottom:10px;border-bottom:1px solid var(--line-soft)}
.meeting-task-head {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:7px}
.meeting-task-fields {display:flex;flex-wrap:wrap;gap:8px}
.meeting-task-field {display:flex;flex-direction:column;gap:2px;font-size:.82em;min-width:130px;flex:1 1 130px}
.meeting-task-quote {font-style:italic}
.password-form {display:grid;gap:.7rem;padding:0 1.1rem 1.1rem}
.summary-setting {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:4px 0 14px;font-size:.9em}
.summary-setting input[type=time] {width:auto}
.summary-setting .summary-toggle {display:inline-flex;flex-direction:row;align-items:center;gap:8px;margin:0;font-weight:600;cursor:pointer}
.summary-setting .summary-toggle input[type=checkbox] {width:18px;height:18px;margin:0;flex:none;accent-color:var(--signal)}
.meeting-list {display:flex;flex-direction:column;align-self:start;gap:4px}
.meeting-list button {text-align:left;overflow-wrap:anywhere}
.meeting-actions button[aria-pressed=true],.meeting-list button[aria-pressed=true] {color:var(--steel);background:var(--steel-soft);border-color:var(--steel)}
.meeting-text {white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto}
.meeting-detail>button {margin:4px}
@media(max-width:760px){.meeting-tools,.meeting-grid{grid-template-columns:minmax(0,1fr)}}

.assistant > .model-settings { padding: .55rem .9rem; margin: 0; border-bottom: 1px solid var(--line); }
.assistant-body { overscroll-behavior: contain; overflow-anchor: none; min-height: 0; }
#assistant-conversation { display: grid; gap: .85rem; align-content: start; }
.chat-message { width: fit-content; min-width: 0; max-width: 93%; }
.chat-message.mine { justify-self: end; }
.chat-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .71rem; margin: 0 .15rem .2rem; }
.mine .chat-meta { justify-content: flex-end; }
.chat-meta time { font-variant-numeric: tabular-nums; }
.chat-bubble { padding: .6rem .75rem; margin: 0; border: 1px solid var(--line); border-radius: .85rem .85rem .85rem .2rem; background: white; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .91rem; line-height: 1.5; }
.mine .chat-bubble { background: var(--signal-soft); border-color: transparent; border-radius: .85rem .85rem .2rem .85rem; }
.chat-message.pending .chat-bubble, .chat-empty { color: var(--muted); }
.chat-bubble .chat-text { display: block; }
.chat-file { display: grid; gap: .4rem; margin-top: .45rem; white-space: normal; }
.chat-file a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.chat-file img { display: block; max-width: 100%; max-height: 16rem; width: auto; border: 1px solid var(--line); border-radius: .55rem; cursor: zoom-in; background: var(--sheet); }
.chat-empty { text-align: center; margin: 1rem 0; font-size: .85rem; }
.chat-archive-title { margin: 0; color: var(--muted); font-size: .71rem; text-transform: uppercase; letter-spacing: .06em; }
.chat-archive { border: 1px solid var(--line-soft); border-radius: .7rem; background: var(--sheet); padding: .5rem .7rem; }
.chat-archive summary { cursor: pointer; color: var(--ink); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chat-archive-summary { margin: .35rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat-archive-body { display: grid; gap: .85rem; margin-top: .7rem; }
.assistant-footer { flex: none; position: relative; }
@media (min-width: 63.01rem) { .shell.assistant-minimized .assistant > .model-settings { display: none; } }

/* Проводник: меню действий, загрузка, корзина. */
.folder-columns {grid-template-columns:minmax(0,1fr) 5rem 3.4rem 2rem}
.file-item {display:grid;grid-template-columns:minmax(0,1fr) 2rem;gap:.4rem;align-items:center;border-bottom:1px solid var(--line-soft)}
.file-item .file-row {border-bottom:0}
.file-item:hover {background:var(--sheet-2)}
.file-item:has(.file-row[aria-current=true]) {background:var(--signal-soft)}
.file-more {border:0;background:transparent;min-height:2rem;width:2rem;padding:0;border-radius:.4rem;font-size:1.15rem;line-height:1;color:var(--muted)}
.file-more:hover,.file-more:focus-visible,.file-more[aria-expanded=true] {background:var(--line-soft);color:var(--ink)}
.file-menu {position:fixed;z-index:60;min-width:11.5rem;display:grid;padding:.3rem;background:var(--sheet);border:1px solid var(--line);border-radius:.6rem;box-shadow:0 .7rem 1.8rem #14161a2e}
.file-menu button {border:0;background:transparent;text-align:left;padding:.5rem .65rem;border-radius:.4rem;font-size:.86rem;min-height:2.2rem}
.file-menu button:hover,.file-menu button:focus-visible {background:var(--sheet-2)}
.file-menu button.danger {color:#b4321c}
.file-menu small {padding:.35rem .65rem .2rem;font-size:.72rem;border-top:1px solid var(--line-soft);margin-top:.2rem}
.file-upload .file-plus {font-size:1.25rem;font-weight:700;line-height:1;color:var(--signal-ink)}
.file-new-folder {display:inline-flex;align-items:center;justify-content:center;position:relative}
.file-new-folder .folder-glyph {margin:.2rem 0 0}
.file-new-folder .folder-plus {position:absolute;right:.05rem;bottom:.05rem;font-size:.8rem;font-weight:800;color:var(--signal-ink);line-height:1}
.file-trash {border:1px solid var(--line);background:var(--sheet);border-radius:.4rem;min-height:2rem;padding:.2rem .6rem;font-size:.78rem;white-space:nowrap}
.file-trash:hover {background:var(--line-soft)}
.explorer.is-drop {outline:2px dashed var(--signal);outline-offset:-.4rem;background:var(--signal-soft)}
.file-uploads {display:grid;gap:.3rem;margin-bottom:.5rem}
.upload-line {display:grid;grid-template-columns:minmax(0,1fr) 6rem;gap:.5rem;align-items:center;font-size:.78rem}
.upload-line span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-line progress {width:100%;height:.45rem;accent-color:var(--signal)}
.file-dialog {width:min(30rem,calc(100% - 1.2rem))}
.file-dialog .dialog-header h2 {font-size:1.1rem}
.file-dialog-content {display:grid;gap:.55rem;margin-top:.7rem;overflow-wrap:anywhere}
.file-dialog-hint {color:var(--muted);font-size:.8rem}
.file-dialog-actions {gap:.45rem;flex-wrap:wrap}
.file-dialog-actions button {min-height:2.3rem;padding:.3rem .85rem}
button.danger.primary {background:#b4321c;border-color:#b4321c;color:#fff}
.file-properties {display:grid;grid-template-columns:auto minmax(0,1fr);gap:.4rem .9rem;font-size:.88rem}
.file-properties dt {color:var(--muted)}
.file-properties dd {margin:0;font-weight:600}
.trash-list {display:grid;gap:.1rem;max-height:52vh;overflow:auto}
.trash-item {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--line-soft)}
.trash-item small {display:block;color:var(--muted);font-size:.74rem;margin-top:.15rem}
.trash-item .secondary {min-height:2rem;padding:.2rem .6rem;font-size:.78rem}
.file-error {color:#b4321c}
.folder-columns span:nth-child(3) {text-align:right}
.folder-columns span:last-child {text-align:left}
@container (max-width:37rem) {
  .file-toolbar {flex-wrap:wrap}
  .file-toolbar .explorer-path {order:9;flex-basis:100%;min-height:2.2rem}
  .file-trash {margin-left:auto;padding:.2rem .45rem}
  .folder-columns {grid-template-columns:minmax(0,1fr) 3.4rem 2rem}
  .folder-columns span:nth-child(2),.file-row .file-date {display:none}
  .file-item .file-row {grid-template-columns:minmax(0,1fr) 3.4rem}
}

/* Корзина: значок, счётчик, окно с выбором строки и настройкой автоочистки. */
.file-trash {display:inline-flex;align-items:center;gap:.35rem}
.trash-icon {width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.trash-count {min-width:1.1rem;padding:0 .3rem;border-radius:.6rem;background:var(--signal);color:#fff;font-size:.68rem;font-weight:700;line-height:1.1rem;text-align:center}
.trash-count[hidden] {display:none}
.file-dialog:has(.trash-box) {width:min(40rem,calc(100% - 1.2rem))}
.trash-summary {font-size:.84rem}
.trash-list {display:grid;gap:0;max-height:46vh;overflow:auto;border-block:1px solid var(--line-soft)}
.trash-list .trash-item {display:block;padding:0;border-bottom:1px solid var(--line-soft)}
.trash-item:last-child {border-bottom:0}
.trash-pick {width:100%;display:flex;gap:.6rem;align-items:center;text-align:left;background:transparent;border:0;padding:.55rem .4rem;border-radius:.4rem}
.trash-pick:hover {background:var(--sheet-2)}
.trash-item.is-open .trash-pick {background:var(--signal-soft)}
.trash-text {display:grid;min-width:0}
.trash-text strong {overflow-wrap:anywhere}
.trash-text small {color:var(--muted);font-size:.74rem;margin-top:.1rem}
.trash-actions {display:none;gap:.45rem;flex-wrap:wrap;padding:.2rem .4rem .6rem 2.5rem}
.trash-item.is-open .trash-actions {display:flex}
.trash-actions button {min-height:2.1rem;padding:.2rem .75rem;font-size:.8rem}
.trash-empty {padding:.8rem .4rem}
.trash-settings {display:flex;flex-wrap:wrap;gap:.6rem;align-items:end;justify-content:space-between;padding-top:.3rem}
.trash-keep {display:grid;gap:.25rem;font-size:.8rem;font-weight:600}
.trash-keep select {width:auto;min-width:10rem}
.danger-text {color:#b4321c}
.trash-settings .danger-text {min-height:2.3rem;padding:.3rem .8rem}
@container (max-width:37rem) {
  .trash-label {display:none}
}

/* Форма записи: поля прокручиваются, «Сохранить» всегда видна (ноутбук 1440×900 и ниже). */
#editor[open] { display:flex; flex-direction:column; padding:0; overflow:hidden; }
#record-form { display:flex; flex-direction:column; min-height:0; max-height:88dvh; }
#record-form .dialog-header { padding:1rem 1rem 0; }
#record-form #fields { overflow:auto; min-height:0; padding:0 1rem .4rem; }
#record-form #fields textarea { height:4.2rem; }
#record-form #editor-status { padding:0 1rem; margin-top:.3rem; }
#record-form .actions { margin:0; padding:.65rem 1rem; border-top:1px solid var(--line); background:var(--sheet); }
/* Телефон и узкая колонка: счётчики одной компактной строкой. */
@container (max-width: 40rem) {
  .plan-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); gap:.3rem; margin-bottom:1rem; }
  .metric { padding:.45rem .12rem; gap:.1rem; text-align:center; justify-items:center; min-width:0; }
  .metric strong { font-size:1.2rem; }
  .metric span { font-size:.6rem; line-height:1.15; overflow-wrap:anywhere; hyphens:auto; }
}

/* Окно действий по делу и кнопки окна дела (25.11) */
.task-dialog {width:min(30rem,calc(100% - 1.2rem))}
.task-dialog .dialog-header h2 {font-size:1.1rem;overflow-wrap:anywhere}
.task-dialog > .tag {display:inline-block;margin-top:.45rem}
.task-dialog-body {display:grid;gap:.5rem;margin-top:.6rem}
.task-dialog-body h3 {font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-top:.35rem}
.task-dialog-body textarea {width:100%}
.task-dialog-row {display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}
.task-dialog-row input[type=date] {min-height:2.4rem}
.task-dialog-error {color:var(--signal-ink);font-size:.85rem}
.danger {color:#fff;background:#b4361c;border:1px solid #b4361c;border-radius:999px;min-height:2.4rem;padding:.45rem .9rem;font-weight:700}
.danger:hover {background:#962c16}
.danger-text {color:#b4361c}
.task-state {display:inline-block;grid-column:1/-1;margin-bottom:.4rem;font-size:.85rem;font-weight:700}
#record-form .actions {gap:.45rem;flex-wrap:wrap}
#record-form .actions .primary {margin-left:auto}
.task-dialog-close {width:2.45rem;min-height:2.45rem;flex:none;font-size:1.3rem;padding:0;border-radius:999px}
.task-dialog-row input[type=date] {width:auto;flex:1 1 9rem;min-width:0}
.toast {position:fixed;left:50%;bottom:1.2rem;transform:translateX(-50%);z-index:50;display:flex;gap:.7rem;align-items:center;
  background:var(--ink);color:#fff;padding:.55rem .6rem .55rem 1rem;border-radius:999px;box-shadow:0 8px 24px #0004;max-width:calc(100% - 2rem);font-size:.9rem}
.toast .secondary {color:#fff;border-color:#ffffff55;min-height:2.1rem}
.field-hint {grid-column:1/-1;margin-top:-.35rem;color:var(--muted);font-size:.78rem}
