/* Рабочий интерфейс корпоративных коммуникаций: типографика, навигация и плотность. */
:root {
  --bg:#121d1d; --bg2:#182525; --panel:#1d2b2a; --panel2:#243331; --panel3:#2c3e3a;
  --line:#354943; --line2:#476057; --text:#e6eee9; --muted:#a4b8ae; --dim:#95aaa0;
  --accent:#98cbb9; --accent-2:#98cbb9; --accent-soft:rgba(152,203,185,.12); --cyan-soft:rgba(152,203,185,.08);
  --ok:#94c3a4; --ok-soft:rgba(148,195,164,.12); --warn:#d8ba84; --warn-soft:rgba(216,186,132,.12); --err:#d9a294; --err-soft:rgba(217,162,148,.12);
  --grad:#286f63; --shadow:0 5px 20px rgba(0,0,0,.16); --radius:9px;
}
:root[data-theme="light"] {
  --bg:#f3f5f3; --bg2:#ebf0ec; --panel:#ffffff; --panel2:#f7f9f7; --panel3:#eff3ef;
  --line:#dce5de; --line2:#c6d3ca; --text:#24352f; --muted:#596e63; --dim:#566c60;
  --accent:#246b5c; --accent-2:#246b5c; --accent-soft:#e9f2ed; --cyan-soft:#eef5f0;
  --ok:#34774d; --ok-soft:#edf5ef; --warn:#805d23; --warn-soft:#f7f1e3; --err:#984e3f; --err-soft:#f9eeea;
  --grad:#286f63; --shadow:0 5px 18px rgba(32,56,44,.06);
}
body { font-size: 14px; line-height: 1.5; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { grid-template-columns: 224px minmax(0,1fr); }
.side { padding: 20px 12px 14px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; gap: 3px; }
.side .brand { padding: 0 10px 24px; gap: 10px; font-size: 15px; }
.brand .logo { border-radius: 8px; background: var(--grad); box-shadow: none; }
.brand-t { font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.brand-t small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: 0; }
.side .nav { min-height: 36px; border-radius: 6px; padding: 8px 10px; font-size: 13px; line-height: 1.3; border: 1px solid transparent; gap: 9px; }
.side .nav .i { width: 16px; height: 16px; }
.side .nav.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); box-shadow: none; font-weight: 600; }
.side .nav:hover { background: var(--bg2); color: var(--text); }
.side .nav.active:hover { background: var(--accent-soft); color: var(--accent); }
.side .nav-label { padding: 0 10px; margin: 18px 0 7px; font-size: 11px; font-weight: 550; color: var(--muted); letter-spacing: 0; text-transform: none; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.side-foot { margin-top: auto; padding: 20px 9px 0; }
.workspace-note { display: flex; gap: 8px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; font-size: 11px; }
.workspace-note .i { margin-top: 2px; }
.workspace-note small { display: block; color: var(--dim); font-size: 10px; margin-top: 3px; }
.topbar { min-height: 60px; height: 60px; padding: 0 30px; background: var(--panel); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.crumbs { font-size: 12px; }
.crumbs b { font-weight: 500; }
.user-chip { border: 0; background: transparent; gap: 8px; padding: 0; }
.user-chip .avatar { background: var(--accent-soft); color: var(--accent); width: 30px; height: 30px; font-size: 11px; }
.user-chip .meta { font-size: 10px; line-height: 1.5; }
.user-chip .meta b { font-weight: 550; }
.content { max-width: 1580px; padding: 30px; }
.page-head { margin-bottom: 24px; gap: 12px; align-items: center; }
.page-head h1 { font-size: 27px; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.page-head p { margin-top: 6px; max-width: 85ch; color: var(--muted); font-size: 13px; }
.card { border-radius: 9px; border-color: var(--line); box-shadow: none; }
.card-h { padding: 16px 20px; gap: 10px; }
.card-h h3 { font-size: 14px; font-weight: 600; }
.card-b { padding: 20px; }
.btn { border-radius: 6px; background: var(--panel); border-color: var(--line2); height: 36px; padding: 0 13px; font-size: 13px; font-weight: 500; box-shadow: none; transition: background .12s, border-color .12s; }
.btn.primary { background: var(--grad); color: #fff; border-color: var(--grad); box-shadow: none; }
.btn.primary:hover { background: #205d53; border-color: #205d53; }
.btn.sm { border-radius: 5px; font-size: 12px; height: 30px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--bg2); color: var(--text); }
.input { border-radius: 6px; border-color: var(--line2); background: var(--panel); box-shadow: none; font-size: 13px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.field > label { font-size: 12px; color: var(--muted); font-weight: 500; }
.hint { font-size: 11px; line-height: 1.55; color: var(--muted); }
.lbl { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.badge { border-radius: 4px; font-size: 10px; font-weight: 500; padding: 2px 6px; }
.badge.acc { color: var(--accent); background: var(--accent-soft); }
.callout { border-radius: 6px; padding: 13px 15px; line-height: 1.6; }
.callout.info { background: var(--cyan-soft); border-color: var(--line); }
.seg { background: var(--bg2); border-color: var(--line); border-radius: 6px; padding: 2px; }
.seg button { font-size: 11px; border-radius: 4px; padding: 5px 10px; font-weight: 500; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi { padding: 20px; }
.kpi .ic { background: transparent; color: var(--muted); }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.type-card { border-radius: 6px; border: 1px solid var(--line); padding: 20px; background: var(--panel); box-shadow: none; color: var(--text); font: inherit; text-align: left; }
.type-card:hover { background: var(--panel2); border-color: var(--line2); box-shadow: none; transform: none; }
.type-card.on { border-color: var(--accent); background: var(--panel); box-shadow: inset 0 0 0 1px var(--accent); }
.type-card h4 { margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.type-card p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.wiz { grid-template-columns: minmax(0,1fr); gap: 18px; }
.steps, .wiz:has(.composer-layout) > .steps { position: static; display: flex; padding: 8px; gap: 4px; background: var(--panel); overflow-x: auto; }
.step, .wiz:has(.composer-layout) > .steps .step { flex: 1 0 140px; min-width: 0; padding: 10px 12px; gap: 9px; border-radius: 5px; }
.step.skip { display: none; }
.step::after { display: none !important; }
.step .n { width: 25px; height: 25px; border: 1px solid var(--line2); font-size: 11px; font-weight: 550; background: var(--panel); }
.step .t { font-size: 12px; font-weight: 500; }
.step .s { font-size: 10px; color: var(--dim); margin-top: 2px; max-width: 170px; }
.step.done .n { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.step.done .n .i { width: 13px; height: 13px; }
.step.on { background: var(--accent-soft); }
.step.on .n { background: var(--grad); border-color: var(--grad); color: white; }
.step.on .t { color: var(--accent); font-weight: 600; }
.wiz-foot { padding: 14px 20px; background: var(--panel); box-shadow: 0 -4px 12px rgba(20,30,45,.035); border-radius: 0 0 9px 9px; }
.composer-layout { grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 28px; }
.composer-layout > .col { gap: 16px !important; }
.composer-layout h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.composer-layout > .col > .row:first-child > .sp > p { font-size: 12px; line-height: 1.6; }
.letter-options { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 0; }
.letter-options summary { cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text); }
.letter-options summary span { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 400; }
.letter-options-body { display: grid; gap: 12px; padding-top: 15px; }
.composer-preview { top: 80px; padding: 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.composer-preview > .row:first-child { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-bottom: 14px; }
.composer-preview > .row:first-child > .sp { display: none; }
.composer-preview > .row:first-child > select { grid-column: 1/-1; grid-row: 2; width: 100% !important; height: 34px !important; }
.composer-preview > .row:first-child > .seg { grid-column: 2; grid-row: 1; }
.composer-preview .mail { border-color: #dce2ea; box-shadow: 0 3px 12px rgba(28,45,64,.05); border-radius: 6px; }
.mail-bar { background: #f9fafc; color: #657389; border-bottom: 1px solid #e8ecf1; height: 34px; font-size: 11px; }
.mail-bar .dots { display: none; }
.mail-head .hrow > span:first-child { color: #68778c; }
.mail-head .addr { background: #f1f4f8; color: #52637a; }
.mail-head .subj { font-size: 16px; line-height: 1.45; font-weight: 600; }
.mail-body { line-height: 1.7; }
.common-files { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 15px; }
.common-files > .row > b { font-size: 13px; font-weight: 600; }
.common-file-name { font-size: 12px; line-height: 1.65; color: var(--text); }
.common-file-name .i { color: var(--muted); margin-top: 3px; }
.common-mail-attachments .attach { background: #f9fafc; border-radius: 5px; border-color: #e3e8ef; font-size: 11px; }
.common-mail-attachments .attach .x { background: #eaf0f8; color: #496690; }
.composer-scenarios { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0 15px; margin-bottom: 16px; }
.composer-scenarios summary { font-size: 12px; color: var(--accent); }
.scenario-grid { gap: 7px; }
.scenario-choice { padding: 12px; border-color: var(--line); border-radius: 5px; box-shadow: none; font-size: 12px; }
.composer-blocks { border-color: var(--line); border-radius: 7px; }
.composer-block.selected { background: var(--panel2); box-shadow: inset 2px 0 var(--accent); }
.composer-block + .composer-block { border-color: var(--line); }
.composer-block-head { padding: 7px 8px; }
.composer-block-pick { font-size: 11px; gap: 8px; }
.composer-block-pick b { font-weight: 550; }
.composer-block-pick > .i { color: var(--muted); }
.composer-number { color: var(--dim); width: 15px; }
.composer-snippet { font-size: 10px; }
.composer-block-body { padding: 4px 16px 16px 17px; }
.composer-add .btn { background: var(--panel); border-color: var(--line); font-size: 11px; }
.composer-add .btn .i { width: 13px; height: 13px; }
.directory-tabs { padding: 0 20px; background: var(--panel2); }
.directory-tabs button { font-size: 12px; padding: 14px 17px; }
.directory-profile-head { gap: 14px; }
.directory-split { gap: 26px; grid-template-columns: 210px minmax(0,1fr); }
.directory-nav { padding: 13px; border-radius: 5px; border-color: var(--line); background: var(--panel); }
.directory-nav.on { border-color: var(--accent); background: var(--accent-soft); }
.directory-nav b { font-size: 12px; font-weight: 550; }
.directory-nav small { font-size: 10px; }
.directory-fields th { font-size: 11px; color: var(--muted); font-weight: 500; }
.directory-fields td { padding-top: 12px; padding-bottom: 12px; }
.directory-fields td b { font-size: 12px; font-weight: 500; }
.t th { font-size: 11px; text-transform: none; letter-spacing: 0; background: var(--panel2); font-weight: 550; }
.t td { font-size: 12px; padding-top: 13px; padding-bottom: 13px; }
.modal { box-shadow: 0 16px 60px rgba(20,35,55,.18); border-radius: 10px; }
.modal-h { padding: 18px 22px; }
.modal-h h3 { font-size: 16px; font-weight: 600; }
.mobile-nav-toggle, .mobile-nav-close, .nav-scrim { display: none; }
.login { grid-template-columns: 1fr 1fr; }
.login-hero { background: #233b5f; background-image: none; color: #fff; padding: 56px; }
.login-hero .grid-bg { display: none; }
.login-hero h1 { font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -.035em; max-width: 470px; }
.login-hero .grad-text { background: none; color: inherit; -webkit-text-fill-color: inherit; }
.login-hero p { color: #c4d0df; font-size: 15px; line-height: 1.75; max-width: 470px; }
.login-hero .hs-n { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.login-hero .hero-step { color: #e5edf7; background: #2b4669; border-color: #496484; }
.login-hero .hero-step svg { color: #b7d7d3; }
.login-hero .dim { color: #acbcd1; }
.login-card h2 { font-size: 26px; letter-spacing: -.025em; font-weight: 600; }
@media(max-width:1200px) {
  .shell { grid-template-columns: 208px minmax(0,1fr); }
  .content { padding: 24px; }
  .composer-layout { grid-template-columns: minmax(0,1fr); }
  .composer-preview { position: static; }
  .directory-split { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:900px) {
  .login { grid-template-columns: minmax(0,1fr); }
  .login-hero { display: none; }
  .shell { grid-template-columns: minmax(0,1fr); }
  .side { position: fixed; top: 0; left: 0; width: 260px; height: 100dvh; z-index: 90; transform: translateX(-100%); display: flex; flex-direction: column; flex-wrap: nowrap; overflow-y: auto; overflow-x: hidden; padding: 20px 12px 14px; align-items: stretch; border: 0; }
  .side .brand { font-size: 15px; padding: 0 8px 20px; gap: 10px; }
  .side .brand .brand-t { display: block; }
  .side .nav { width: 100%; white-space: normal; padding: 9px 10px; }
  .side .nav-label, .side-foot { display: block; }
  .nav-open .side { transform: translateX(0); }
  .nav-scrim { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100dvh; border: 0; background: rgba(15,25,40,.32); cursor: pointer; }
  .nav-open .nav-scrim { display: block; }
  .mobile-nav-toggle, .mobile-nav-close { display: inline-flex; flex: none; }
  .mobile-nav-close { margin-left: auto; }
  .topbar { position: sticky; top: 0; height: 56px; min-height: 56px; padding: 0 16px; gap: 10px; }
  .crumbs { min-width: 0; flex: 1; font-size: 12px; overflow: hidden; }
  .crumbs > :not(b), .crumbs b:not(:last-child), .user-chip .meta { display: none; }
  .crumbs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar > .sp { display: none; }
  .content { padding: 22px 16px; }
  .page-head h1 { font-size: 24px; }
}
@media(max-width:600px) {
  .topbar { padding: 0 12px; gap: 7px; }
  .topbar > .btn.primary { display: none; }
  .content { padding: 22px 14px; }
  .page-head { margin-bottom: 18px; gap: 10px; }
  .page-head h1 { font-size: 23px; }
  .page-head > .btn { height: auto; padding-left: 0; }
  .page-head > .sp { display: none; }
  .page-head p { font-size: 12px; }
  .card-b { padding: 16px; }
  .card-h { padding: 13px 16px; }
  .steps, .wiz:has(.composer-layout) > .steps { padding: 8px; gap: 3px; justify-content: space-between; }
  .step, .wiz:has(.composer-layout) > .steps .step { flex: 0 0 auto; padding: 6px 5px; gap: 6px; }
  .step .n { width: 24px; height: 24px; }
  .step .t, .step .s { display: none; }
  .step.on .t { display: block; white-space: nowrap; font-size: 11px; }
  .composer-layout { gap: 22px; }
  .composer-layout > .col > .row:first-child { display: block; }
  .composer-layout > .col > .row:first-child > .btn { margin-top: 12px; }
  .letter-options summary span { display: block; margin-left: 14px; margin-top: 3px; }
  .composer-layout h3 { font-size: 17px; }
  .composer-preview { padding: 12px; }
  .composer-block-head { flex-wrap: wrap; }
  .composer-block-pick { flex-basis: 100%; }
  .composer-block-head > .row { margin-left: 23px; }
  .composer-block-body { padding: 3px 12px 14px; }
  .composer-block-options .field { min-width: 0; width: 100%; flex-basis: 100%; }
  .common-files { padding: 12px; }
  .common-files > .row { gap: 8px; }
  .common-files > .row > .sp { display: none; }
  .common-files > .row > .btn { margin-left: auto; }
  .wiz-foot { padding: 12px 16px; }
  .directory-tabs { padding: 0 12px; }
  .directory-tabs button { padding: 12px 8px; font-size: 11px; }
  .directory-profile-head > .sp { min-width: 0; flex-basis: 100%; }
  .directory-footer { padding: 16px; }
  .modal-h, .modal-b, .modal-f { padding: 16px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Overview and process settings share the same content width and spacing. */
.topbar .crumbs { flex: 1; min-width: 0; }
.topbar > .sp { display: none; }
.user-chip { flex: none; min-width: 0; max-width: 340px; }
.user-chip .meta { min-width: 0; }
.user-chip .meta b, .user-chip .meta .muted { display: inline-block; max-width: 210px; vertical-align: bottom; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip > .btn, .user-chip > .avatar { flex: none; }
.side .nav-label { margin-top: 16px; }
.dashboard-stats { align-items: stretch; }
.dashboard-stats .kpi { display: flex; flex-direction: column; padding: 18px 20px; }
.dashboard-stats .kpi .l { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; min-height: 36px; gap: 10px; font-size: 12px; line-height: 1.45; }
.dashboard-stats .kpi .ic { width: 18px; height: 18px; }
.dashboard-stats .kpi .ic .i { width: 18px; height: 18px; }
.dashboard-stats .kpi .v { margin-top: 8px; line-height: 1.25; }
.dashboard-stats .kpi .d { line-height: 1.5; margin-top: 6px; }
.dashboard .dash-row { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
.dashboard .dash-row > .card { min-width: 0; }
.dashboard .card-h { min-height: 56px; }
.dashboard .card-h h3 { min-width: 0; }
.dashboard-upcoming { display: flex; flex-direction: column; }
.dashboard-upcoming > :last-child { display: flex; flex: 1; flex-direction: column; justify-content: center; }
.dashboard-upcoming .list-row { flex-wrap: wrap; }
.dashboard-upcoming .list-row .badge { white-space: normal; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dashboard-actions .type-card { flex: 1 1 calc((100% - 24px) / 3); display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; min-height: 116px; padding: 20px; }
.dashboard-actions .type-card h4 { margin: 0; line-height: 1.5; font-size: 14px; font-weight: 600; }
.dashboard-actions .type-card p { margin: 0; overflow-wrap: anywhere; max-width: 54ch; }
.dashboard-actions .type-card:hover { border-color: var(--line2); background: var(--panel2); }
.dashboard-history-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) 144px 72px auto 14px; align-items: center; gap: 16px; padding: 16px 20px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
.dashboard-history-row:last-child { border-bottom: 0; }
.dashboard-history-row:hover { background: var(--panel2); }
.dashboard-history-main { display: grid; min-width: 0; gap: 4px; }
.dashboard-history-main b { font-size: 13px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-history-main > span, .dashboard-history-row time, .dashboard-history-count { color: var(--muted); font-size: 11px; line-height: 1.5; }
.dashboard-history-row .badge { justify-self: start; white-space: normal; }
.dashboard-history-row > .i { color: var(--dim); }
.signature-layout { grid-template-columns: 240px minmax(0,1fr); align-items: start; }
.signature-layout > .grid.g2 { grid-template-columns: minmax(0,1fr); }
.admin-page > .row { flex-wrap: wrap; align-items: flex-start; }
.admin-page > .row > .muted { flex: 1 1 340px; }
.admin-page > .row > .sp { display: none; }
.admin-page .field, .admin-page .card { min-width: 0; }
@media(min-width:1600px) {
  .signature-layout > .grid.g2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:1180px) {
  .dashboard .dash-row { grid-template-columns: minmax(0,1fr); }
  .user-chip .meta b, .user-chip .meta .muted { max-width: 160px; }
  .signature-layout { grid-template-columns: 210px minmax(0,1fr); }
}
@media(max-width:1000px) {
  .signature-layout { grid-template-columns: minmax(0,1fr); }
  .dashboard-history-row { grid-template-columns: minmax(0,1fr) 130px auto 14px; gap: 12px; }
  .dashboard-history-count { display: none; }
}
@media(max-width:600px) {
  .dashboard-stats { gap: 10px; }
  .dashboard-stats .kpi { padding: 12px 14px; }
  .dashboard-stats .kpi .l { gap: 8px; font-size: 11px; min-height: 32px; }
  .dashboard-stats .kpi .v { font-size: 26px; margin-top: 6px; }
  .dashboard-actions { gap: 8px; }
  .dashboard-actions .type-card { flex-basis: 100%; padding: 13px; }
  .dashboard-actions .type-card p { font-size: 11px; }
  .dashboard .card-h { gap: 8px; flex-wrap: nowrap; }
  .dashboard .card-h h3 { flex: 1; font-size: 13px; }
  .dashboard .card-h .sp { display: none; }
  .dashboard .card-h .muted { font-size: 10px !important; white-space: nowrap; }
  .dashboard .card-h .btn { flex: none; padding: 0; font-size: 11px; }
  .dashboard .bars { gap: 4px; height: 128px; }
  .dashboard .bars .b span { font-size: 9px; }
  .dashboard-history-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 14px 16px; }
  .dashboard-history-main { grid-column: 1/-1; }
  .dashboard-history-row time { grid-row: 2; }
  .dashboard-history-row .badge { grid-row: 2; grid-column: 2; }
  .dashboard-history-row > .i { display: none; }
  .admin-page > .row > .btn { max-width: 100%; }
  .page-head > .btn { height: auto; min-height: 36px; padding: 8px 13px; }
}
.tcard-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.admin-templates .card-h h3 { flex: 1; overflow-wrap: anywhere; }
.admin-templates .card-h > .sp { display: none; }
.admin-templates .card-h > .btn, .admin-templates .card-h > .i { flex: none; }
.page-head > .seg { flex-wrap: wrap; max-width: 100%; }
.mail-body table.mail-signature td { border: 0; background: transparent; }
.mail-body table.mail-signature td { padding: 0; white-space: normal; }
@media(max-width:600px) {
  .dashboard > .callout { flex-wrap: wrap; align-items: flex-start; }
  .dashboard > .callout > .sp { flex-basis: calc(100% - 32px); min-width: 0; }
  .dashboard > .callout > .btn { margin-left: 30px; max-width: calc(100% - 30px); }
}

/* Communication choices use typography; colour is reserved for actual state. */
.type-grid .type-card h4 { padding-right: 24px; line-height: 1.5; }
.type-grid .type-card .tags { gap: 6px; }
.type-grid .type-card .badge.acc { color: var(--muted); background: var(--bg2); }
.type-grid .type-card .radio { width: 16px; height: 16px; border-radius: 50%; top: 23px; right: 20px; }
.type-grid .type-card.on .radio { border-width: 4px; }
.admin-commTypes .tcard { padding: 20px; gap: 16px; border-radius: 6px; }
.admin-commTypes .tcard-h { align-items: flex-start; gap: 16px; }
.admin-commTypes .tcard-h b { font-size: 14px; line-height: 1.5; font-weight: 600; white-space: normal; }
.admin-commTypes .tcard-h .mono { font-family: inherit; font-size: 11px !important; margin-top: 3px; }
.admin-commTypes .tcard-d { font-size: 12px; line-height: 1.65; min-height: 0; display: block; overflow: visible; }
.admin-commTypes .tcard-kv { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 0 0; gap: 8px 12px; font-size: 12px; }
.admin-commTypes .tcard-f { border-top: 1px solid var(--line); padding-top: 14px; }
@media(max-width:1100px) {
  .dashboard-actions .type-card { flex-basis: calc((100% - 12px) / 2); }
}
@media(max-width:600px) {
  .dashboard-actions .type-card { flex-basis: 100%; min-height: 0; padding: 16px; gap: 6px; }
  .type-grid .type-card { padding: 18px; }
  .type-grid .type-card .radio { top: 21px; right: 18px; }
}

/* Small graphic accents identify communication types without pictograms. */
.dashboard-actions.four-types .type-card { flex-basis: calc((100% - 12px) / 2); }
.dashboard-actions .type-card, .type-grid [data-act="pickType"], .admin-commTypes .tcard { border-top: 3px solid color-mix(in srgb,var(--type-accent,var(--accent)) 65%,var(--panel)); }
.dashboard-actions .type-card { min-height: 154px; gap: 8px; padding: 19px 21px 21px; transition: transform 160ms ease,box-shadow 160ms ease,background 160ms ease,border-color 160ms ease; }
.type-category { font-size: 10px; line-height: 1.5; color: var(--muted); border: 1px solid var(--line); padding: 2px 7px; border-radius: 4px; background: var(--panel2); margin-bottom: 4px; }
.dashboard-actions .type-card h4 { font-size: 16px; letter-spacing: -.015em; }
.dashboard-actions .type-card:hover { transform: translateY(-2px); background: var(--panel); box-shadow: 0 6px 16px rgba(28,45,65,.07); border-top-color: var(--type-accent,var(--accent)); }
.dashboard-actions .type-card:active { transform: translateY(0); box-shadow: none; }

/* Human-readable data chips, with atomic selection, deletion and undo. */
.rte { border-radius: 7px; background: var(--panel); }
.tpl-var { color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--line)); border-radius: 4px; font: 500 11px/1.8 Inter,system-ui,sans-serif; padding: 0 6px; margin: 0 2px; vertical-align: baseline; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.tpl-var.unknown { color: var(--err); background: var(--err-soft); }
.token-field .ql-editor { min-height: 116px; max-height: 360px; padding: 13px 14px; line-height: 1.85; }
.token-field .ql-editor p { margin: 0; }
.token-single .ql-editor { min-height: 42px; max-height: 140px; padding: 9px 12px; }
.token-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 11px; background: var(--panel2); border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.token-insert { border: 0; background: transparent; color: var(--accent); cursor: pointer; font: 500 11px/1.6 Inter,system-ui,sans-serif; padding: 2px 0; }
.token-insert:hover { text-decoration: underline; text-underline-offset: 3px; }
.token-toolbar > span { color: var(--dim); font-size: 10px; }
.rte-vars { position: static; width: auto; max-width: none; max-height: 360px; overflow-y: auto; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 14px; background: var(--panel); border: 0; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; box-shadow: none; gap: 16px 12px; }
.variable-picker-head, .variable-search { grid-column: 1/-1; }
.variable-picker-head b { display: block; font-size: 12px; font-weight: 550; }
.variable-picker-head .hint { display: block; margin-top: 3px; }
.rte-vg .lbl { font-size: 11px; letter-spacing: 0; text-transform: none; }
.rte-vi { display: grid; gap: 2px; font-size: 12px; line-height: 1.5; padding: 7px 8px; border: 1px solid transparent; border-radius: 5px; }
.rte-vi small { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.rte-vi:hover { border-color: var(--line); background: var(--panel2); }
.rte-vi[hidden], .rte-vg[hidden] { display: none; }
.admin-templates .mono:has(.tpl-var) { font-family: inherit; }
.composer-snippet { max-width: 50ch; }

/* Motion accompanies navigation and direct actions. */
@keyframes page-in { from {opacity:0;transform:translateY(6px)} to {opacity:1;transform:translateY(0)} }
@keyframes panel-in { from {opacity:0;transform:translateY(4px)} to {opacity:1;transform:translateY(0)} }
.content .view-enter { animation: page-in 200ms ease-out both; }
.modal { animation: panel-in 180ms ease-out both; }
.rte-vars:not([hidden]) { animation: panel-in 150ms ease-out both; }
.btn, .nav, .scenario-choice, .composer-block-pick, .token-insert { transition: background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease; }
.side { transition: transform 200ms cubic-bezier(.2,.7,.3,1); }
@media(max-width:600px) {
  .dashboard-actions.four-types .type-card, .dashboard-actions .type-card { flex-basis:100%; min-height:0; padding:17px; }
  .rte-vars { grid-template-columns:minmax(0,1fr); }
  .token-toolbar > span { display:none; }
  .dashboard-actions .type-card h4 { font-size:15px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .dashboard-actions .type-card:hover { transform:none; }
}
.dashboard-hero { position:relative; min-height:176px; padding:28px 30px; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:#edf0f1 url('assets/retail-correspondence-v1.webp') center 56%/cover no-repeat; }
.dashboard-hero > div { position:relative; z-index:1; max-width:58%; }
.dashboard-hero h1 { color:#23384c; }
.dashboard-hero p { color:#526476; }
:root:not([data-theme="light"]) .dashboard-hero::before { content:'';position:absolute;inset:0;background:rgba(18,24,32,.74); }
:root:not([data-theme="light"]) .dashboard-hero h1 { color:var(--text); }
:root:not([data-theme="light"]) .dashboard-hero p { color:var(--muted); }
@media(max-width:600px) {
  .dashboard-hero { min-height:154px; padding:22px 18px; background-position:54% 55%; }
  .dashboard-hero > div { max-width:60%; }
  .dashboard-hero h1 { font-size:22px; }
  .dashboard-hero p { font-size:11px; }
}

/* Native controls remain focusable and operable from the keyboard. */
.chk { position:relative; }
.chk input,.switch input { display:block;position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;z-index:1;cursor:pointer; }
.chk input:focus-visible + .box,.switch input:focus-visible + span { outline:2px solid var(--accent);outline-offset:3px; }
.chk:has(input:disabled),.switch:has(input:disabled) { cursor:not-allowed;opacity:.6; }

/* A quiet operational strip: movement reflects the real delivery queue. */
.activity-counter { display:inline-flex;align-items:center;gap:9px;flex:none;min-height:32px;padding:4px 6px 4px 10px;border:1px solid var(--line);border-radius:6px;color:var(--muted);background:var(--panel);font:inherit;font-size:11px;cursor:pointer; }
.activity-counter:hover { border-color:var(--accent);color:var(--accent); }
.activity-counter strong { display:inline-grid;place-items:center;min-width:24px;min-height:22px;padding:0 5px;border-radius:4px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:650;font-variant-numeric:tabular-nums; }
.activity-counter.is-stale strong { color:var(--warn);background:var(--warn-soft); }
.activity-strip { display:grid;grid-template-columns:minmax(200px,1fr) minmax(145px,220px) auto;align-items:center;gap:22px;padding:16px 30px;background:var(--panel);border-bottom:1px solid var(--line);min-width:0; }
.activity-summary { display:flex;gap:12px;align-items:center;min-width:0; }
.activity-summary > div { min-width:0; }
.activity-summary b { display:block;font-size:12px;font-weight:600;line-height:1.5;color:var(--text); }
.activity-summary span[data-activity-detail] { display:block;color:var(--muted);font-size:10px;line-height:1.6;overflow-wrap:anywhere; }
.activity-signal { width:7px;height:7px;border-radius:50%;background:var(--line2);flex:none;position:relative; }
.is-running .activity-signal { background:var(--accent); }
.is-running .activity-signal::after { content:'';position:absolute;inset:-4px;border:1px solid var(--accent);border-radius:50%;animation:activity-signal 2.4s ease-out infinite; }
.is-stale .activity-signal,.has-issues:not(.is-running) .activity-signal { background:var(--warn); }
.activity-progress { min-width:0; }
.activity-progress-head { display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:10px;line-height:1.5;margin-bottom:7px; }
.activity-progress-head strong { color:var(--text);font-weight:600;font-variant-numeric:tabular-nums; }
.activity-track { height:5px;border-radius:3px;background:var(--panel3);overflow:hidden; }
.activity-track[hidden] { display:block; }
.activity-fill { display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;position:relative;overflow:hidden;transition:width .85s cubic-bezier(.2,.65,.3,1); }
.is-running .activity-fill::after { content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);transform:translateX(-100%);animation:activity-flow 2.6s ease-in-out infinite; }
.has-issues .activity-fill { background:var(--warn); }
.is-stale .activity-fill { opacity:.5; }
.activity-states { display:flex;gap:6px;align-items:center;min-width:0; }
.activity-state { display:flex;align-items:center;gap:8px;min-height:31px;padding:5px 9px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);font:inherit;font-size:10px;line-height:1.4;cursor:pointer;white-space:nowrap; }
.activity-state[hidden] { display:none; }
.activity-state b { font-size:11px;font-weight:600;font-variant-numeric:tabular-nums; }
.activity-state:hover { background:var(--bg2);border-color:var(--line); }
.activity-state.is-active { background:var(--accent-soft);color:var(--accent); }
.activity-state[data-state="needs_review"].is-active { background:var(--warn-soft);color:var(--warn); }
.activity-sr { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
.count-updated { animation:activity-count .35s ease-out; }
.history-filters { flex-wrap:wrap;justify-content:flex-start;max-width:100%; }
.page-head:has(.history-filters) { flex-wrap:wrap; }
@keyframes activity-signal { 0% { transform:scale(.65);opacity:.7; } 75%,100% { transform:scale(1.6);opacity:0; } }
@keyframes activity-flow { 0% { transform:translateX(-100%); } 75%,100% { transform:translateX(100%); } }
@keyframes activity-count { 0% { transform:translateY(3px);opacity:.45; } 100% { transform:translateY(0);opacity:1; } }
@media(max-width:1350px) {
  .activity-strip { grid-template-columns:minmax(200px,1fr) minmax(120px,220px);gap:12px 24px; }
  .activity-states { grid-column:1/-1;border-top:1px solid var(--line);padding-top:9px; }
  .activity-summary span[data-activity-detail] { font-size:11px; }
}
@media(max-width:900px) {
  .activity-strip { padding:14px 16px; }
  .activity-counter-label { display:none; }
  .activity-counter { padding:3px;border-color:transparent; }
  .activity-counter::before { content:'В работе';font-size:10px; }
}
@media(max-width:600px) {
  .activity-strip { grid-template-columns:minmax(0,1fr) 90px;gap:10px 12px;padding:13px 14px 10px; }
  .activity-summary { gap:9px; }
  .activity-summary b { font-size:11px; }
  .activity-summary span[data-activity-detail] { font-size:10px; }
  .activity-states { flex-wrap:wrap;gap:3px 6px;padding-top:7px; }
  .activity-state { padding:4px 7px;gap:7px;font-size:10px;min-height:30px; }
  .activity-progress-head { font-size:9px;gap:5px; }
  .activity-counter::before { font-size:10px; }
  .topbar .user-chip > .avatar { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .activity-strip *, .activity-strip *::after,.count-updated { animation:none !important;transition:none !important; }
}

:where(.as-control) {font:inherit;color:inherit;border:0;background:transparent;padding:0;cursor:pointer;text-align:left;}
button.tn,button.list-row {width:100%;}
.as-control:focus-visible,tr[role=button]:focus-visible {outline:2px solid var(--accent);outline-offset:3px;}
.skip-link {position:fixed;top:8px;left:12px;z-index:200;transform:translateY(-160%);padding:10px 14px;background:var(--panel);color:var(--accent);border:1px solid var(--accent);border-radius:5px;}
.skip-link:focus {transform:translateY(0);}
.modal,.side {overscroll-behavior:contain;}
button,a {touch-action:manipulation;}
:root[data-theme=dark] {color-scheme:dark;}
:root[data-theme=light] {color-scheme:light;}

.schedule-day-field {width:304px;max-width:100%;min-width:0;}
.schedule-days {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;}
.schedule-days .btn {min-width:0;width:100%;padding:0;}

.motion-paused *, .motion-paused *::after {animation:none!important;transition:none!important;}

/* Solid, readable communication cards: type is expressed through colour and text. */
.dashboard-actions .type-card { background: var(--tile-bg,#196b5b); border: 1px solid var(--tile-bg,#196b5b); color: #fff; border-radius: 9px; min-height: 170px; }
.dashboard-actions .type-card .type-category { color: #fff; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28); font-size: 11px; }
.dashboard-actions .type-card h4 { color: #fff; font-weight: 650; }
.dashboard-actions .type-card p { color: #edf3f1; font-size: 12px; line-height: 1.65; }
.dashboard-actions .type-card:hover { background: var(--tile-bg,#196b5b); border-color: var(--tile-bg,#196b5b); box-shadow: 0 8px 20px rgba(20,40,45,.18); }
.dashboard-actions .type-card:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
@media (max-width:600px) { .dashboard-actions .type-card { min-height: 0; } }
.dashboard .card-h { flex-wrap: wrap; }

/* Stable controls and document layouts. */
.btn.primary .i { color: #fff; stroke: currentColor; }
.password-field .input { padding-right: 48px; }
.password-toggle { position:absolute;right:5px;top:50%;transform:translateY(-50%);width:36px;height:34px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--muted);cursor:pointer; }
.password-toggle:hover { background:var(--accent-soft);color:var(--accent); }
.password-toggle:focus-visible { outline:2px solid var(--accent);outline-offset:1px; }
.password-toggle svg.i { position:static;transform:none;color:inherit; }
#lg-pass::-ms-reveal, #lg-pass::-ms-clear { display:none; }
.drop { display:block;width:100%;padding:32px 24px;text-align:center; }
.col-chip { padding:8px 12px;min-height:36px;border-radius:6px; }
.col-chips { gap:8px; }
.docgrid { width:100%;min-width:0;max-width:100%;border-radius:6px; }
.docgrid th:has(.column-toggle) { padding:0; }
.column-toggle { display:block;width:100%;padding:10px 12px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:nowrap; }
.column-toggle:focus-visible { outline:2px solid var(--accent);outline-offset:-3px; }
.docgrid td { padding:9px 12px; }
.document-preview { min-width:0; }
.doc-preview-tools { flex-wrap:wrap;align-items:center;gap:12px; }
.doc-preview-navigation { display:flex;align-items:center;gap:8px;width:360px;max-width:100%;min-width:0; }
.doc-preview-navigation > .input { flex:1;min-width:0;max-width:100%; }
.doc-preview-navigation > .btn { flex:none; }
.file-chip { min-width:0;gap:12px; }
.file-chip > .sp { min-width:0; }
.file-chip > .sp > b { display:block;overflow-wrap:anywhere; }
.file-chip > .btn,.file-chip > .fi { flex:none; }
.schedule-range { display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:14px;align-items:start; }
.schedule-range .field { min-width:0; }
.schedule-range .input { width:100% !important;min-width:0; }
.tree.sel-list { height:min(520px,60vh);min-height:240px; }
.tree .kids { margin-left:14px;padding-left:12px; }
.tree .lvl.st { border-radius:3px;background:transparent;padding:0;min-width:55px;color:var(--text); }
@media(max-width:600px) {
 .stat-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .stat-strip > div { min-width:0;overflow-wrap:anywhere; }
 .doc-preview-tools .seg { display:flex;flex-wrap:wrap;max-width:100%; }
 .doc-preview-tools .seg > button { flex:1;min-width:0;white-space:normal; }
 .doc-preview-tools > .sp { display:none; }
 .doc-preview-navigation { width:100%; }
 .file-chip { flex-wrap:wrap; }
 .file-chip > .sp { flex:1;min-width:140px; }
 .drop { padding:24px 16px; }
}

.pg-img { display:block;width:100%; }
button.mail-item { width:100%;min-width:0;text-align:left; }
.mail-item .ttl { min-width:0;overflow:hidden;text-overflow:ellipsis; }

/* Excluded data and inactive delivery choices remain readable. */
.docgrid th.off,.docgrid td.off { opacity:1;color:var(--text); }
.docgrid tr.fade td:not(.rn) { opacity:1;color:var(--muted); }
.dlv-row.off .dlv-who,.addr-line.off { opacity:1; }
.dlv-row.off .dlv-who b { color:var(--muted);font-weight:500; }
.file-chip .fi { background:#e3f2eb;color:#17654f; }
.attach .x { background:#196b5b; }
.mail-body:focus-visible { outline:2px solid #246b5c;outline-offset:-3px; }

/* LDAP contacts retain a readable list at narrow widths. */
.contact-picker{margin-bottom:18px}.contact-results{list-style:none;margin:0;padding:0;max-height:360px;overflow:auto}.contact-results li,.contact-selected-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.contact-results li>div:first-child,.contact-selected-row>div{min-width:0}.contact-results b,.contact-selected-row b{display:block;overflow-wrap:anywhere}.contact-results span,.contact-selected-row span{display:block;font-size:12px;color:var(--muted);overflow-wrap:anywhere}.contact-picker summary{cursor:pointer}.contact-picker .field label{white-space:normal}@media(max-width:560px){.contact-results li{align-items:flex-start;flex-direction:column}.contact-picker .card-h{flex-wrap:wrap}.contact-picker .row>.btn{flex-shrink:0}.contact-selected-row{align-items:flex-start}}

.addressed-files{border-top:1px solid var(--line);margin:16px 0;padding-top:12px}.addressed-file-row{border:1px solid var(--line);border-radius:10px;padding:12px;margin:10px 0}.addressed-file-row .field label{white-space:normal}.addressed-file-row .input{min-width:0}.preset-library .card-b{height:100%}.preset-library .card-b>.row:last-child{margin-top:auto}

/* SMTP and sender settings stack before the form becomes too narrow. */
.admin-exchange .field,.admin-exchange .col{min-width:0}
.admin-exchange input{max-width:100%}
@media(max-width:1050px){.admin-exchange>.grid{grid-template-columns:minmax(0,1fr)!important}}

/* Recipient selection behaves like an address field in a mail client. */
.contact-picker{overflow:visible}.wiz>.card:has(.contact-picker){overflow:visible}
.contact-selector{position:relative;margin-top:14px}.contact-selector>label{display:block;margin-bottom:6px;font-size:12px;font-weight:600;color:var(--muted)}
.contact-query-wrap{position:relative}.contact-query-wrap .input{padding-right:40px}.contact-query-clear{position:absolute;right:7px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--muted);font-size:20px;width:28px;height:28px;border-radius:5px;cursor:pointer}
.contact-popup{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:60;overflow:auto;border:1px solid var(--line2);border-radius:9px;background:var(--panel);box-shadow:0 12px 28px rgba(20,45,32,.15)}.contact-popup[data-placement="up"]{top:auto;bottom:calc(100% + 6px)}.contact-popup[hidden]{display:none}
.contact-popup-caption{padding:11px 13px 5px;font-size:11px;color:var(--muted)}.contact-options{list-style:none;margin:0;padding:4px;max-height:270px;overflow:auto}.contact-option{display:flex;align-items:center;gap:10px;padding:10px;border-radius:6px;cursor:pointer;text-align:left;min-height:52px;width:100%}.contact-option:hover,.contact-option.is-active{background:var(--accent-soft)}.contact-option[aria-disabled="true"]{cursor:wait}
.contact-check{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex:0 0 18px;border:1px solid var(--line2);border-radius:4px;font-size:12px}.contact-option[aria-selected="true"] .contact-check{background:var(--accent);border-color:var(--accent);color:var(--panel)}.contact-option-text{display:flex;flex-direction:column;min-width:0;flex:1}.contact-option-text b{font-size:13px;font-weight:600;overflow-wrap:anywhere}.contact-option-text small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.contact-kind{font-size:10px;color:var(--muted);background:var(--panel2);padding:3px 6px;border-radius:4px}
.contact-empty{margin:0;padding:16px;font-size:12px;color:var(--muted)}.contact-popup-footer{padding:9px 13px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.contact-popup-footer span{font-size:10px}
.contact-group-choice{padding:13px;border-bottom:1px solid var(--line);background:var(--panel2)}.contact-group-choice>b{display:block;font-size:13px;overflow-wrap:anywhere}.contact-group-choice p{margin:5px 0 10px}.contact-mode-buttons{display:flex;gap:8px;flex-wrap:wrap}.contact-mode-buttons .btn{white-space:normal}
.contact-message{font-size:12px;color:var(--muted);margin-top:8px;min-height:18px}.recipient-chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px}.recipient-chip{display:inline-flex;align-items:center;gap:9px;max-width:100%;padding:8px 7px 8px 11px;border:1px solid var(--line2);border-radius:8px;background:var(--panel2)}.recipient-chip-text{min-width:0;display:flex;flex-direction:column}.recipient-chip-text b{font-size:12px;font-weight:600;overflow-wrap:anywhere}.recipient-chip-text small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.recipient-chip-remove{border:0;background:transparent;font-size:20px;color:var(--muted);width:28px;height:28px;flex-shrink:0;cursor:pointer;border-radius:5px}.recipient-chip-remove:hover,.contact-query-clear:hover{background:var(--accent-soft);color:var(--text)}.recipient-chip-mode{padding:0;border:0;background:transparent;color:var(--accent);font-size:11px;line-height:1.5;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.contact-extra-actions{display:flex;flex-wrap:wrap;gap:6px;margin:7px 0 10px}.contact-picker details{border-top:1px solid var(--line);padding-top:10px}.contact-picker details:not([open])>summary{font-size:12px;color:var(--muted)}
@media(max-width:520px){.contact-picker .card-b{padding:15px}.contact-popup-footer span{display:none}.contact-mode-buttons{display:grid;grid-template-columns:minmax(0,1fr)}.recipient-chip{max-width:100%}.contact-kind{display:none}}

:root:not([data-theme="light"]) .lvl.dd { color:#d3a2ff; }

/* Contextual reading workspace: quiet typography, sequence only for real steps. */
.help-trigger{flex-shrink:0}.help-trigger span{font-size:12px}.help-inline{border:0;background:none;color:var(--accent);text-decoration:underline;font:inherit;padding:0;cursor:pointer}.help-kicker{display:block;font-size:11px;color:var(--muted);font-weight:500;margin-bottom:8px}.help-panel{position:fixed;inset:0 0 0 auto;width:420px;max-width:100%;background:var(--panel);border-left:1px solid var(--line);z-index:1100;display:flex;flex-direction:column;box-shadow:-12px 0 32px #0001;animation:help-appear 180ms ease-out}.help-panel-head{display:flex;justify-content:space-between;align-items:center;padding:26px 26px 18px;gap:12px}.help-panel-head h2{font-size:23px;letter-spacing:-.6px;margin:0}.help-close{width:36px;height:36px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);font-size:25px;cursor:pointer;flex:none}.help-context{display:flex;justify-content:space-between;gap:8px;margin:0 26px;padding:11px 0;border-block:1px solid var(--line);font-size:12px}.help-context span{color:var(--muted);font-size:11px}.help-search-box{padding:20px 26px 12px}.help-search-label{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}.help-search{width:100%;font-size:12px}.help-panel-body{padding:10px 26px 26px;overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}.help-panel-footer{padding:12px 26px;border-top:1px solid var(--line);background:var(--panel)}.help-shade{position:fixed;inset:0;background:#08121066;z-index:1099}.help-start{padding:20px 18px;background:var(--accent-soft);border-left:3px solid var(--accent);margin:0 0 26px;border-radius:0 6px 6px 0}.help-start h3{font-size:19px;line-height:1.25;letter-spacing:-.3px;margin:0 0 9px}.help-start p{font-size:12px;line-height:1.65;color:var(--muted);margin:0 0 15px}.help-start .btn{margin:4px 0}.help-section-title{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;padding-bottom:11px;border-bottom:1px solid var(--line)}.help-article-link{display:block;width:100%;text-align:left;color:var(--text);background:transparent;border:0;border-bottom:1px solid var(--line);padding:19px 0;cursor:pointer}.help-article-link>span{display:block;font-size:10px;color:var(--muted);margin-bottom:7px}.help-article-link b{display:block;font-size:14px;font-weight:600;line-height:1.4}.help-article-link p{font-size:12px;line-height:1.65;color:var(--muted);margin:7px 0}.help-article-link small{color:var(--accent);font-size:11px}.help-article-link:hover b{text-decoration:underline;text-underline-offset:3px}.help-empty{padding:24px 0;color:var(--muted);font-size:13px;line-height:1.7}.help-back{padding-left:0!important;margin:0 0 20px}.help-reading h2{font-size:26px;line-height:1.2;letter-spacing:-.6px;margin:0 0 15px;overflow-wrap:anywhere}.help-reading p{font-size:13px;line-height:1.8;margin:10px 0;overflow-wrap:anywhere}.help-reading .help-lead{font-size:15px;line-height:1.6;color:var(--muted);margin-bottom:23px}.help-reading-steps{list-style:none;padding:0;margin:28px 0}.help-reading-steps>li{display:flex;gap:13px;margin-bottom:25px;min-width:0}.help-reading-steps>li>span{font-size:11px;line-height:25px;text-align:center;width:25px;height:25px;flex:none;border:1px solid var(--line2);border-radius:50%;color:var(--accent)}.help-reading-steps h3,.help-reading section h3{font-size:14px;line-height:1.5;font-weight:600;margin:1px 0 8px}.help-reading-steps>li>div{min-width:0}.help-reading-steps p{margin:0}.help-result{background:var(--accent-soft);padding:18px;margin:25px 0;border-radius:6px}.help-note{padding:20px 0;border-top:1px solid var(--line)}.help-article-meta{padding:15px 0;color:var(--muted);font-size:10px}.help-library{max-width:1320px;margin:auto}.help-library .page-head{align-items:flex-start}.help-page-actions{display:flex;gap:8px;flex-wrap:wrap}.help-library-layout{display:grid;grid-template-columns:255px minmax(0,1fr);gap:40px}.help-library-nav{align-self:start;position:sticky;top:82px}.help-library-nav>.hint{margin:12px 0}.help-nav-item{display:block;text-align:left;width:100%;padding:11px 12px;border:0;border-left:2px solid transparent;background:transparent;font-size:12px;line-height:1.6;color:var(--muted);cursor:pointer}.help-nav-item.on{border-color:var(--accent);color:var(--text);background:var(--accent-soft)}.help-library-reader{min-width:0;padding:26px 35px;background:var(--panel);border:1px solid var(--line);border-radius:8px;max-width:800px}.help-library-reader .help-reading h2{font-size:32px}.help-library-reader .help-reading p{font-size:14px}.help-progress{display:flex;gap:5px;margin:15px 0 24px}.help-progress span{height:3px;flex:1;background:var(--line)}.help-progress .done{background:var(--accent)}.help-coach{padding-top:4px}.help-coach h2{font-size:24px;line-height:1.25;letter-spacing:-.5px;margin:0 0 15px}.help-coach>p{font-size:14px;line-height:1.8}.help-coach-note{padding:16px;border-left:2px solid var(--accent);background:var(--accent-soft);font-size:12px!important}.help-coach-actions{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0}.help-coach>.hint{font-size:11px;line-height:1.6;color:var(--muted)}.help-highlight{outline:3px solid var(--accent)!important;outline-offset:5px;scroll-margin:120px}.help-management{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:28px}.help-management-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:8px}.help-management-head>div{flex:1;min-width:200px}.help-management-head h2{font-size:19px;margin:0 0 5px}.help-record{display:flex;align-items:center;justify-content:space-between;width:100%;gap:18px;padding:20px 0;background:transparent;color:var(--text);border:0;border-bottom:1px solid var(--line);text-align:left;cursor:pointer}.help-record b{display:block;font-size:14px;line-height:1.5}.help-record small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.help-publication{font-size:11px;color:var(--muted);line-height:1.7;max-width:230px}.help-editor{max-width:800px;display:grid;gap:20px;margin:22px auto}.help-editor .input{max-width:100%;min-width:0}.help-editor-status{font-size:12px;color:var(--muted);margin:0;padding:12px 0;border-bottom:1px solid var(--line)}.help-context-fields{border:1px solid var(--line);border-radius:6px;padding:14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.help-context-fields legend{font-size:12px;padding:0 5px;color:var(--muted)}.help-context-fields label{font-size:12px;display:flex;gap:7px;align-items:center}.help-edit-step{border-left:2px solid var(--line2);padding-left:18px;display:grid;gap:9px}.help-edit-step label{font-size:12px;color:var(--muted)}.help-edit-step b{font-size:12px}.help-editor-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:18px;border-top:1px solid var(--line)}
@keyframes help-appear{from{transform:translateX(15px);opacity:0}to{transform:translateX(0);opacity:1}}
@media(min-width:1350px){body.help-open .main{margin-right:420px}body.help-open .page-head{flex-wrap:wrap}body.help-open .page-head>div:first-child{flex-basis:100%}}
@media(max-width:800px){.help-library-layout{grid-template-columns:minmax(0,1fr);gap:18px}.help-library-nav{position:static}.help-library-nav .help-nav-item{display:none}.help-library-reader{padding:23px 19px}.help-library-reader .help-reading h2{font-size:26px}.help-management{padding:18px}.help-record{align-items:flex-start;flex-direction:column;gap:8px}.help-context-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.help-trigger span{display:none}.help-trigger{padding:0!important;width:29px!important}.help-panel{width:100%}.help-panel-head{padding:20px 20px 16px}.help-context{margin:0 20px}.help-search-box{padding:18px 20px 10px}.help-panel-body{padding:10px 20px 25px}.help-panel-footer{padding:12px 20px}.help-reading h2{font-size:24px}.help-management-head>div{min-width:0;flex-basis:100%}.help-page-actions{width:100%}.help-editor-actions .btn{white-space:normal;height:auto;min-height:36px}}
@media(prefers-reduced-motion:reduce){.help-panel{animation:none}}
.help-edit-fields{border:0;padding:0;margin:0;min-width:0;display:grid;gap:20px}.help-guide-resume{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;margin-bottom:16px;border-left:3px solid var(--accent);background:var(--accent-soft);font-size:12px}.help-guide-resume>span{flex:1;min-width:150px}
@media(min-width:1350px){body.help-open .wiz .split{grid-template-columns:minmax(0,1fr)}}

/* ---------- 1.5.1: страница входа ---------- */
.login.login-v2 { grid-template-columns: minmax(0,11fr) minmax(0,9fr); min-height: 100vh; min-height: 100dvh; }
.login-v2 .login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; padding: 48px 64px; border: 0; color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, #1d5e4f 0%, #0f3a30 60%); }
.login-v2 .login-codes { position: absolute; inset: -20px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 30px; letter-spacing: .04em; color: #fff; opacity: .06; white-space: pre; pointer-events: none; user-select: none;
  transform: rotate(-8deg) translate(-40px,-30px); -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 45%, #000 85%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 45%, #000 85%); }
.login-v2 .login-hero > :not(.login-codes) { position: relative; }
.login-v2 .brand { font-size: 18px; }
.login-v2 .brand .logo { width: 40px; height: 40px; background: #2a8a72; box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }
.login-v2 .login-hero-body { margin: auto 0; max-width: 520px; }
.login-v2 .login-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700; margin: 0 0 16px; max-width: none; text-wrap: balance; color: #fff; }
.login-v2 .login-hero p { color: #c9dcd5; font-size: 16px; line-height: 1.65; margin: 0; max-width: none; }
.login-facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.login-facts li { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 15px; }
.login-facts .lf-ic { width: 36px; height: 36px; flex: none; border-radius: 9px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #9fd3c3; }
.login-ver { font-size: 12px; color: #9fbab1; }
.login-v2 .login-form { display: flex; flex-direction: column; place-items: stretch; padding: 40px 48px; background: var(--bg); }
.login-top { display: flex; justify-content: flex-end; }
.login-v2 .login-card { margin: auto; width: 100%; max-width: 400px; }
.login-v2 .login-card h2 { font-size: 28px; letter-spacing: -.025em; font-weight: 700; margin: 0 0 6px; }
.login-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 28px; }
.login-v2 .field { margin-bottom: 18px; }
.login-v2 .field label { font-size: 13px; font-weight: 600; color: var(--text); }
.login-input { position: relative; }
.login-input > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.login-input input { width: 100%; height: 48px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--text); padding: 0 44px; font: 500 15px 'Inter', system-ui, sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
.login-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login-input.bad input { border-color: var(--err); }
.login-input .password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.login-input .password-toggle:focus-visible { outline: 2px solid var(--accent); }
.login-hint { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.login-hint code { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--panel3); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 13.5px; }
.login-remember { display: flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
.login-remember input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.login-caps[hidden] { display: none; }
.login-caps { color: var(--warn); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.login-submit { width: 100%; height: 50px; font-size: 15.5px; font-weight: 600; justify-content: center; gap: 10px; border-radius: 10px; }
.login-msg { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; margin: 0 0 20px; font-size: 13.5px; line-height: 1.45; background: var(--err-soft); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); color: var(--text); }
.login-msg > svg { color: var(--err); flex: none; margin-top: 1px; }
.login-msg.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.login-msg.ok > svg { color: var(--ok); }
.login-msg div div { margin-top: 4px; color: var(--muted); }
.login-noaccess { margin: 22px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-height: 760px) { .login-v2 .login-hero h1 { font-size: 34px; } .login-facts { margin-top: 20px; gap: 10px; } }
@media (max-width: 900px) {
  .login.login-v2 { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr; }
  .login.login-v2 .login-hero { display: flex; padding: 22px 20px 24px; }
  .login-v2 .login-hero-body, .login-v2 .login-ver { display: none; }
  .login-v2 .login-form { padding: 28px 20px 24px; }
  .login-v2 .login-top { position: absolute; top: 24px; right: 16px; }
  .login-v2 .login-top .btn { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
  .login-v2 .login-card { margin: 8px 0 auto; }
  .login-v2 .login-card h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .login-input input { transition: none; } }

/* 1.6.0: единый вход и хранение данных */
.login-or{display:flex;align-items:center;gap:12px;margin:18px 0 14px;color:var(--muted);font-size:12.5px}
.login-or::before,.login-or::after{content:"";flex:1;height:1px;background:var(--line)}
.btn.login-sso{width:100%;height:44px;justify-content:center;gap:10px;font-size:14px;font-weight:600;border-radius:8px;text-decoration:none;color:var(--text)}
.btn.login-sso:hover{border-color:var(--accent)}
.toggle{display:inline-flex;align-items:center;gap:10px;font-weight:600;cursor:pointer;user-select:none}
.toggle input{position:absolute;opacity:0;width:1px;height:1px}
.toggle i{width:38px;height:22px;border-radius:11px;background:var(--line2);position:relative;flex:none;transition:background .15s}
.toggle i::after{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
.toggle input:checked + i{background:var(--accent)}
.toggle input:checked + i::after{left:19px}
.toggle input:focus-visible + i{outline:2px solid var(--accent);outline-offset:2px}
.mb16{margin-bottom:16px}
.copy-row{display:flex;gap:8px;align-items:center}.copy-row .input{flex:1;min-width:0}
.ret-meta{gap:28px;font-size:13px;align-items:center}
.ret-at{width:72px;height:30px;display:inline-block;text-align:center;padding:0 6px}
.ret-t td,.ret-t th{vertical-align:middle}
.ret-days{display:flex;align-items:center;gap:8px}.ret-days .input{width:90px;text-align:right}
.ret-num{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.keep-list{margin:6px 0 0 18px;padding:0;line-height:1.7}
.err-text{color:var(--err)}
@media (max-width:900px){.ret-t th:nth-child(3),.ret-t td:nth-child(3){display:none}.ret-meta{gap:10px;flex-direction:column;align-items:flex-start}}
.card-h .toggle{flex:none;white-space:nowrap}
