/* Бумага, бронзовая печать и общий рельеф кабинета. Цвет следует штатному
   color-scheme: системная тема и явный выбор используют одну палитру. */
:root {
  --bg: var(--paper);
  --bg-2: var(--rail-paper);
  --paper: #1c2722;
  --rail-paper: #253129;
  --panel: #2b3730;
  --panel-solid: #2d3931;
  --panel-2: #354238;
  --ink: #f2e9d6;
  --ink-2: #c2c8b8;
  --ink-3: #acb5a5;
  --line: #4b594c;
  --line-2: #596652;
  --mint: #d4d8b4;
  --teal: #c1dccb;
  --selected: #425741;
  --solid-action: #52694d;
  --action-text: #fff8e8;
  --action-hover: #5c7355;
  --brass: #d6c29b;
  --stamp: #baa782;
  --light-edge: #89947c6b;
  --shade-edge: #111c15;
  --depth: #08110a75;
  --grain: url('/static/cabinet-grain.webp');
  --sheet: var(--grain), linear-gradient(135deg, color-mix(in srgb, var(--panel) 96%, white), var(--panel));
  --raised: inset 0 1px 1px var(--light-edge), inset 0 -1px 1px var(--shade-edge), 0 3px 6px -3px var(--depth);
  --inset: inset 1px 2px 3px var(--depth), 0 1px 0 var(--light-edge);
  --imprint: 0 -1px .45px var(--light-edge), .5px 1px .6px var(--depth);
  --serif: 'Baskerville', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --rail-width: clamp(212px, 16.5vw, 264px);
}

:root[data-theme="light"] {
  --paper: #eee7da;
  --rail-paper: #e6ddcd;
  --panel: #f7f0e4;
  --panel-solid: #f5eee1;
  --panel-2: #e6dece;
  --ink: #2a3a2c;
  --ink-2: #50584a;
  --ink-3: #626457;
  --line: #cbc0a9;
  --line-2: #b7ab94;
  --mint: #385337;
  --teal: #386455;
  --selected: #dce0cd;
  --solid-action: #40563c;
  --action-hover: #334a31;
  --brass: #696348;
  --stamp: #a99a7a;
  --light-edge: #fffae9;
  --shade-edge: #aa9a78;
  --depth: #79664746;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #eee7da;
    --rail-paper: #e6ddcd;
    --panel: #f7f0e4;
    --panel-solid: #f5eee1;
    --panel-2: #e6dece;
    --ink: #2a3a2c;
    --ink-2: #50584a;
    --ink-3: #626457;
    --line: #cbc0a9;
    --line-2: #b7ab94;
    --mint: #385337;
    --teal: #386455;
    --selected: #dce0cd;
    --solid-action: #40563c;
    --action-hover: #334a31;
    --brass: #696348;
    --stamp: #a99a7a;
    --light-edge: #fffae9;
    --shade-edge: #aa9a78;
    --depth: #79664746;
  }
}

body, .bg, .screen, #home {
  background-color: var(--paper);
  background-image: var(--grain), radial-gradient(ellipse at 13% 0, color-mix(in srgb, var(--paper) 90%, var(--ink-2)), transparent 58%);
  background-size: 116px, cover;
}
.top, .cab-rail {
  color: var(--ink);
  background: var(--grain) 0 0 / 116px, var(--rail-paper);
  border-color: var(--line);
}
.top { box-shadow: 0 1px 0 var(--light-edge); }
.top-in { min-height: 64px; padding: 6px clamp(16px,3vw,48px); gap: 12px; }
.cab-rail { display: contents; }
.top-brand { color: var(--brass); filter: drop-shadow(.5px 1px .5px var(--depth)); }
.top-brand b { font: 600 30px/1 var(--serif); letter-spacing: -.055em; text-shadow: var(--imprint); }
.top-brand .mark, .screen .mark { background: linear-gradient(140deg, var(--brass), var(--stamp)); }
.top-brand .mark { width: 39px; height: 42px; }
.cab-place { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.cab-place span { color: var(--stamp); }
.cab-place b { color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar-tools { gap: 7px; }
.top-user { border: 0; padding: 0; }
.top .user-btn { padding: 0; min-width: 40px; border-radius: 50%; }
.top .user-name, .top .user-btn .chev { display: none; }
.top .avatar { background: var(--sheet); color: var(--brass); border: 1px solid var(--line-2); box-shadow: var(--raised); }
#home :is(.bar-action,.user-btn), #navToggle { color: var(--ink); }
#home .bar-action { border: 1px solid var(--line-2); background: var(--sheet); box-shadow: var(--raised); border-radius: 999px; }
#home .bar-action:hover, .top .user-btn:hover { border-color: var(--stamp); }
#home #barSearch { color: var(--ink-2); background: var(--paper); box-shadow: var(--inset); padding-inline: 15px; }
#themeToggle { width: 40px; padding: 8px; }
#themeToggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#themeToggle[data-dark="true"] .theme-moon, #themeToggle[data-dark="false"] .theme-sun { display: none; }

body #home .top #helpBtn {
  position: relative; display: grid; flex: none; place-items: center;
  width: clamp(118px,10vw,150px); min-height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; box-shadow: none;
}
.ruta-plaque { width: 100%; height: auto; display: block; border-radius: 999px; box-shadow: var(--raised), 0 1px 3px var(--depth); }
#helpBtn:hover .ruta-plaque { filter: brightness(1.045); }
#helpBtn:active .ruta-plaque { transform: translateY(1px); }
.top #helpBadge { left: auto; right: 0; top: 0; }
.ruta-reply {
  position: absolute; right: 0; bottom: -4px; z-index: 1; padding: 1px 7px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--solid-action);
  color: var(--action-text); font: 650 11px/1.4 var(--body); white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  #helpBtn.ruta-glint::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgb(255 246 209 / .42) 50%, transparent 65%) no-repeat;
    background-size: 65% 100%; animation: ruta-glint .8s ease-out 1 both;
  }
  @keyframes ruta-glint { from { background-position: -200% center; } to { background-position: 300% center; } }
}
.help-form.ruta-compose { display: grid; }
.ruta-send-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.editor-status { display: block; color: var(--ink-2); font: 500 13px/1.4 var(--body); }
.editor-status:empty, .desk-pinned[hidden], .ruta-reply[hidden] { display: none; }
.editor-status[data-phase="error"] { color: var(--bad, var(--ink)); }
.editor-status[data-phase="saved"] { color: var(--mint); }
.desk-pinned { margin: 12px 0; }
.desk-pinned h3 { margin: 0 0 6px; }
.desk-pinned button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.desk-pinned [aria-pressed="true"] { background: var(--solid-action); color: var(--action-text); }
.desk-bookmark { display: inline-flex; align-items: center; gap: 8px; }
.desk-bookmark::before {
  content: ""; flex: none; width: 10px; height: 17px;
  background: linear-gradient(110deg,var(--brass),var(--stamp));
  clip-path: polygon(0 0,100% 0,100% 100%,50% 75%,0 100%);
  box-shadow: inset 1px 1px 1px var(--light-edge);
}
.desk-result-return { border-radius: 8px; box-shadow: inset 3px 0 var(--brass); }
.desk-move-calendar { margin: 16px 0; }
.desk-move-calendar figcaption { margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.desk-move-days { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.desk-move-day {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 2px;
  background: var(--panel-2); color: var(--ink); border-radius: 10px;
}
.desk-move-day b { font: 500 23px/1.2 var(--serif); }
.desk-move-day small { font: 500 11px/1.3 var(--body); min-height: 15px; }
.desk-move-day.is-shift { background: var(--solid-action); color: var(--action-text); box-shadow: var(--inset); }
.desk-move-day.is-proposed { outline: 1px dashed var(--stamp); outline-offset: -2px; }
.desk-day-gap { align-self: center; text-align: center; color: var(--ink-2); }
.desk-next-request { margin: 14px 0 6px; }
.desk-move-out { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .desk-bookmark-new::before { animation: desk-bookmark .46s cubic-bezier(.2,.72,.25,1) both; }
  .desk-result-return { animation: desk-result-return 1.4s ease-out both; }
  .desk-move-out::after {
    content: ""; position: absolute; inset: 0; border: 2px dashed var(--brass); border-radius: inherit;
    pointer-events: none; animation: desk-move-out 1.45s ease-out both;
  }
  .desk-move-in { animation: desk-move-in .68s ease-out both; }
  @keyframes desk-bookmark {
    0% {transform:translateY(-9px) scaleY(.4);opacity:.1}
    72% {transform:translateY(1px) scaleY(1.08);opacity:1}
    100% {transform:translateY(0) scaleY(1);opacity:1}
  }
  @keyframes desk-result-return {
    0%,34% {background:var(--panel-2);box-shadow:inset 3px 0 var(--brass)}
    100% {background:transparent;box-shadow:inset 0 0 transparent}
  }
  @keyframes desk-move-out {0%,45% {opacity:1} 100% {opacity:0}}
  @keyframes desk-move-in {
    from {box-shadow:inset 0 0 0 3px var(--brass);transform:translateY(-3px)}
    to {box-shadow:var(--inset);transform:translateY(0)}
  }
}
.bar-org, .bar-org select, .bar-company { color: var(--ink); }
.bar-org select, .bar-company {
  background-color: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 30px 9px 12px; box-shadow: var(--raised);
}
.bar-company { padding-right: 12px; }
.bar-org .company-settings { min-height: 36px; margin-top: 4px; padding: 4px 9px; }
.company-dialog .desk-body { overflow-wrap: anywhere; }
@media (pointer: coarse) { .bar-org .company-settings { min-height: 44px; } }
.bar-org select option { color: var(--ink); background: var(--panel-solid); }
.cab-app-links { margin-top: 16px; display: grid; gap: 2px; }
.cab-app-links a { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 8px 11px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.cab-app-links a:hover { background: var(--panel-2); }
.cab-app-links .app-ico { width: 19px; height: 19px; color: var(--ink-2); border: 0; background: none; }
.cab-app-links svg { width: 17px; height: 17px; }
#tabs .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
#tabs button.on, .seg button.on, .desk-lanes button.selected {
  color: var(--action-text); background: var(--solid-action); box-shadow: var(--raised);
}
:focus-visible, .top :focus-visible, .section-head :focus-visible { outline-color: var(--brass); }

@media (min-width: 901px) {
  #home { padding-inline-start: var(--rail-width); }
  .cab-rail {
    position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; align-items: stretch;
    width: var(--rail-width); padding: 28px 14px 18px; overflow-y: auto; overscroll-behavior: contain;
    border-right: 1px solid var(--line-2); box-shadow: inset -1px 0 0 var(--light-edge); scrollbar-width: thin;
  }
  .cab-rail > * { flex-shrink: 0; }
  .cab-rail .top-brand { margin: 0 8px 25px; }
  .cab-rail .bar-org { width: 100%; max-width: none; margin: 0 0 22px; }
  .bar-org::before { content: "Выбранная фирма"; display: block; color: var(--ink-2); font-size: 11px; margin: 0 0 5px 9px; }
  #navToggle { display: none; }
  #tabs, .top:has(.bar-org:not([hidden])) #tabs {
    position: static; width: 100%; overflow: visible; max-height: none; padding: 0;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
  }
  #tabs .nav-group:first-child::before { content: "Кабинет"; display: block; padding: 5px 11px; color: var(--ink-2); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
  #tabs :is([data-tab],[data-team-section]) { display: flex; align-items: center; gap: 10px; }
  #tabs :is([data-tab],[data-team-section])::before { content: ""; width: 17px; height: 17px; flex: none; background: currentColor; mask: var(--nav-icon) center/contain no-repeat; }
  .cab-sprig {
    flex: 1 1 120px; min-height: 28px; max-height: 168px; margin-top: auto;
    background: url('/static/cabinet-sprig.webp') center bottom / min(100%, 205px) auto no-repeat;
    opacity: .64; filter: saturate(.5) drop-shadow(.7px 1px .6px var(--shade-edge));
  }
  .top #barSearch { min-width: 175px; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .cab-place { display: none; }
  .cab-rail .nav-wrap { order: -1; }
  #navToggle { width: 40px; min-height: 44px; font-size: 0; gap: 0; }
  #tabs { position: absolute; left: 0; top: calc(100% + 5px); max-height: calc(100dvh - 110px); }
  .top-in { gap: 8px; }
}
@media (max-width: 720px) {
  .top-in, .top-in:has(.bar-org:not([hidden])) { flex-wrap: wrap; gap: 3px; padding: 4px 8px; }
  .top-brand b { display: none; }
  .top-brand .mark { width: 29px; height: 30px; }
  .bar-tools { gap: 3px; }
  .bar-org { order: 5; flex: 0 0 100%; }
  .bar-org select, .bar-company { width: min(100%, 320px); }
  .bar-company { width: max-content; max-width: 100%; }
  #home #barSearch, #themeToggle { min-height: 44px; width: 37px; padding: 7px; }
  .tool-word { display: none; }
  #tabs { position: fixed; left: 8px; top: calc(51px + env(safe-area-inset-top)); }
  .top #userBtn { min-width: 36px; }
  body #home .top #helpBtn { width: clamp(96px, 29vw, 124px); }
}
@media (max-width: 360px) { .top-in { padding-inline: 5px; } }

body #view, body #view:not(:has(.desk-grid)) { max-width: 1440px; padding: clamp(20px,3.1vw,48px) clamp(18px,3.4vw,58px) 56px; }
.desk-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.95fr); gap: 24px; color: var(--ink); align-items: stretch; }
.desk-hero, .desk-quick, .desk-shelf, .desk-catalog { grid-column: 1 / -1; min-width: 0; }
.desk-grid .desk-hero { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.desk-meta { order: 1; color: var(--ink-2); font-size: 13px; }
.desk-date::first-letter { text-transform: uppercase; }
.desk-grid h1, .section-head h1, .screen .login-card h1 {
  color: var(--ink); font: 500 clamp(37px,4vw,64px)/1.12 var(--serif); letter-spacing: -.052em; text-shadow: var(--imprint);
}
.desk-grid h2, .card .card-head h3, .help-head b, .desk-winhead b {
  font: 550 clamp(22px,2vw,31px)/1.16 var(--serif); letter-spacing: -.035em; text-shadow: var(--imprint);
}
.desk-grid h2 { margin-bottom: 14px; }
.card, .screen .login-card, .desk-panel, .desk-dialog, .help-panel, .user-menu, .desk-catalog, .tour-card {
  color: var(--ink); background: var(--sheet); background-size: 116px,cover;
  border: 1px solid var(--line); box-shadow: var(--raised); border-radius: 16px;
}
.desk-panel {
  position: relative; min-width: 0; padding: clamp(18px,2vw,27px);
  outline: 1px solid color-mix(in srgb,var(--line) 64%,transparent); outline-offset: -6px;
}
.desk-panel h3 { font-size: 15px; margin: 14px 0 2px; }
.desk-panel p, .desk-shelf p { color: var(--ink-2); font-size: 14px; margin: 9px 0; }
.desk-row { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.desk-row:last-child { border-bottom-color: transparent; }
.desk-row b, .desk-row small { display: block; overflow-wrap: anywhere; }
.desk-row b { font-size: 14px; font-weight: 620; }
.desk-row small { color: var(--ink-2); font-size: 12px; }
.desk-row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.desk-row-action { color: var(--ink); font-size: 12px; background: var(--selected); border-radius: 8px; padding: 6px 9px; }
.desk-lanes, .seg { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 3px; box-shadow: var(--inset); }
.desk-lanes button { background: transparent; color: var(--ink-2); border: 0; padding: 6px 10px; border-radius: 14px; font: 550 12px var(--body); cursor: pointer; }
.desk-shelf { border-top: 1px solid var(--line-2); padding-top: 19px; }
.desk-shelf-items { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,275px),1fr)); gap: 0 18px; }
.desk-shelf-items .desk-lanes { justify-self: start; grid-column: 1 / -1; margin-bottom: 5px; }
.desk-apps { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: 12px; }
.desk-app { display: flex; align-items: center; text-align: left; gap: 13px; min-width: 0; min-height: 68px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); text-decoration: none; font: 550 18px var(--serif); cursor: pointer; background: var(--sheet); background-size: 116px,cover; box-shadow: var(--raised); }
.desk-app:hover { border-color: var(--stamp); }
.desk-app::after { content: "›"; margin-left: auto; color: var(--ink-3); }
.desk-app .app-ico { width: 39px; height: 39px; border-radius: 50%; color: var(--brass); box-shadow: var(--raised); background: var(--panel-2); }
.desk-app .ico-priemnaya { color: light-dark(#785b3a,#e7c8a7); }
.desk-app .ico-praven { color: var(--teal); }
.desk-actions, .ruta-shortcuts { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.desk-quick .desk-actions { margin-top: 10px; }
.desk-catalog { padding: 12px 17px; }
.desk-catalog summary, .desk-history-panel summary { cursor: pointer; font-weight: 600; }
.desk-legacy { display: grid; gap: 12px; margin-top: 11px; }
.desk-dialog { width: min(590px,calc(100vw - 24px)); max-height: 84dvh; padding: 0; overflow: auto; }
.desk-dialog::backdrop { background: #101b16a6; }
.desk-winhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 1; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-solid); }
.desk-body { padding: 18px; display: grid; gap: 12px; }
.desk-body p, .desk-body h3 { margin: 2px 0; }
.desk-body form { width: 100%; }
.desk-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.desk-history { margin: 0; padding-left: 22px; }
.desk-history li { padding: 5px 0 9px; }
.desk-search-scope { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.desk-search-scope small, .desk-history small, .desk-latest small, .desk-transfer small { color: var(--ink-2); }
.desk-transfer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.desk-transfer > div { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.desk-transfer > div:last-child { border-color: var(--mint); }
.desk-history-panel summary { padding: 8px 0; }
.desk-date-feedback { display: block; margin-top: 4px; }
.desk-date-feedback:empty { display: none; }
.desk-date-feedback[data-state=error] { color: var(--rose); }

.section-head { background: transparent; color: var(--ink); min-height: 0; padding: 0 0 12px; border-radius: 0; border-bottom: 1px solid var(--line); }
.desk-back { color: var(--ink-2); }
.btn.primary, .btn.ghost, .help-tip { box-shadow: var(--raised); }
.btn.ghost, .help-tip { color: var(--ink); background: var(--panel-2); }
input:not([type=checkbox]):not([type=radio]), select, textarea { box-shadow: var(--inset); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.help-panel .help-head { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.help-panel .help-log { min-height: 80px; }
.help-panel { overflow-y: auto; }
@media (max-width: 740px) {
  body #view, body #view:not(:has(.desk-grid)) { padding: 20px 13px 44px; }
  .desk-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .desk-grid h1 { font-size: 37px; }
  .desk-grid .desk-hero { align-items: flex-start; }
  .desk-meta { align-self: center; font-size: 12px; }
  .desk-grid h2 { font-size: 25px; }
  .desk-apps { grid-template-columns: repeat(auto-fit,minmax(min(100%,134px),1fr)); gap: 8px; }
  .desk-app { padding: 9px; gap: 8px; font-size: 16px; }
  .desk-dialog { max-height: 87dvh; }
  .desk-body input, .desk-body textarea { font-size: 16px; }
}
@media (max-width: 640px) { .help-panel { border-radius: 0; } }
@media (forced-colors: active) { .ruta-plaque { outline: 1px solid ButtonText; } #tabs button.on, .desk-lanes button.selected { outline: 2px solid Highlight; } }
.desk-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; margin: 6px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.desk-week button { min-width: 0; min-height: 44px; display: grid; align-content: center; gap: 3px; padding: 3px 1px; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--ink); cursor: pointer; }
.desk-week small { text-transform: uppercase; font: 550 10px var(--body); }
.desk-week strong { font: 550 18px var(--serif); }
.desk-week button:hover { border-color: var(--line-2); }
.desk-week button[aria-pressed=true] { background: var(--solid-action); color: var(--action-text); box-shadow: var(--raised); }
#tabs [data-tab="apps"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20width%3D%227%22%20height%3D%227%22%20x%3D%223%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%227%22%20x%3D%2214%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%227%22%20x%3D%2214%22%20y%3D%2214%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%227%22%20x%3D%223%22%20y%3D%2214%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="team"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M18%2021a8%208%200%200%200-16%200%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Cpath%20d%3D%22M22%2020c0-3.37-2-6.5-4-8a5%205%200%200%200-.45-8.3%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="account"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Cpath%20d%3D%22M20%2021a8%208%200%200%200-16%200%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="selling"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M13%2016H8%22%2F%3E%3Cpath%20d%3D%22M14%208H8%22%2F%3E%3Cpath%20d%3D%22M16%2012H8%22%2F%3E%3Cpath%20d%3D%22M4%203a1%201%200%200%201%201-1%201.3%201.3%200%200%201%20.7.2l.933.6a1.3%201.3%200%200%200%201.4%200l.934-.6a1.3%201.3%200%200%201%201.4%200l.933.6a1.3%201.3%200%200%200%201.4%200l.933-.6a1.3%201.3%200%200%201%201.4%200l.934.6a1.3%201.3%200%200%200%201.4%200l.933-.6A1.3%201.3%200%200%201%2019%202a1%201%200%200%201%201%201v18a1%201%200%200%201-1%201%201.3%201.3%200%200%201-.7-.2l-.933-.6a1.3%201.3%200%200%200-1.4%200l-.934.6a1.3%201.3%200%200%201-1.4%200l-.933-.6a1.3%201.3%200%200%200-1.4%200l-.933.6a1.3%201.3%200%200%201-1.4%200l-.934-.6a1.3%201.3%200%200%200-1.4%200l-.933.6a1.3%201.3%200%200%201-.7.2%201%201%200%200%201-1-1z%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="firm"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2012h4%22%2F%3E%3Cpath%20d%3D%22M10%208h4%22%2F%3E%3Cpath%20d%3D%22M14%2021v-3a2%202%200%200%200-4%200v3%22%2F%3E%3Cpath%20d%3D%22M6%2010H4a2%202%200%200%200-2%202v7a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V9a2%202%200%200%200-2-2h-2%22%2F%3E%3Cpath%20d%3D%22M6%2021V5a2%202%200%200%201%202-2h8a2%202%200%200%201%202%202v16%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="marketing"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M11%206a13%2013%200%200%200%208.4-2.8A1%201%200%200%201%2021%204v12a1%201%200%200%201-1.6.8A13%2013%200%200%200%2011%2014H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2z%22%2F%3E%3Cpath%20d%3D%22M6%2014a12%2012%200%200%200%202.4%207.2%202%202%200%200%200%203.2-2.4A8%208%200%200%201%2010%2014%22%2F%3E%3Cpath%20d%3D%22M8%206v8%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-tab="admin"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M20%2013c0%205-3.5%207.5-7.66%208.95a1%201%200%200%201-.67-.01C7.5%2020.5%204%2018%204%2013V6a1%201%200%200%201%201-1c2%200%204.5-1.2%206.24-2.72a1.17%201.17%200%200%201%201.52%200C14.51%203.81%2017%205%2019%205a1%201%200%200%201%201%201z%22%2F%3E%3Cpath%20d%3D%22m9%2012%202%202%204-4%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-team-section="requests"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%2222%2012%2016%2012%2014%2015%2010%2015%208%2012%202%2012%22%2F%3E%3Cpath%20d%3D%22M5.45%205.11%202%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z%22%2F%3E%3C%2Fsvg%3E"); }
#tabs [data-team-section="shifts"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%202v4%22%2F%3E%3Cpath%20d%3D%22M16%202v4%22%2F%3E%3Crect%20width%3D%2218%22%20height%3D%2218%22%20x%3D%223%22%20y%3D%224%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%2010h18%22%2F%3E%3Cpath%20d%3D%22M8%2014h.01%22%2F%3E%3Cpath%20d%3D%22M12%2014h.01%22%2F%3E%3Cpath%20d%3D%22M16%2014h.01%22%2F%3E%3Cpath%20d%3D%22M8%2018h.01%22%2F%3E%3Cpath%20d%3D%22M12%2018h.01%22%2F%3E%3Cpath%20d%3D%22M16%2018h.01%22%2F%3E%3C%2Fsvg%3E"); }

/* Выбор различим по форме и цвету, в том числе при наведении и высокой контрастности. */
.seg [role="tab"][aria-selected="true"], .desk-lanes button[aria-pressed="true"],
.shift-presets button[aria-pressed="true"] {
  background: var(--solid-action); color: var(--action-text);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .23em;
}
.record-link { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; min-height: 40px; text-align: start; font: inherit; color: inherit; border: 0; background: transparent; }
@media (pointer: coarse) { .seg [role="tab"], .desk-lanes button, .shift-presets button, .record-link { min-height: 44px; } }
@media (forced-colors: active) { .seg [aria-selected="true"], .shift-presets [aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; } }
/* Shared workspace tools preserve the embossed cabinet theme. */
.workspace-dialog .desk-body{overflow-wrap:anywhere}
.workspace-dialog input:not([type=checkbox]),.workspace-dialog select{width:100%;min-width:0;box-sizing:border-box}
.workspace-dialog .card{box-shadow:none;border:1px solid var(--line);padding:16px}
.workspace-shift{display:grid;grid-template-columns:minmax(0,1fr) 160px auto;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}
.workspace-shift label{display:flex;align-items:center;gap:8px}
.draft-resume:empty{display:none}.draft-resume{padding:12px;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}
.draft-conflict{padding:8px 0}.draft-conflict p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.workspace-shift{grid-template-columns:1fr}.workspace-dialog button{min-height:44px}.workspace-dialog .row{flex-wrap:wrap}}

/* «Мой день» — панорама над первым делом и ближайшими сменами фирмы. */
.desk-grid { column-gap: clamp(14px,1.5vw,22px); align-items: start; }
.desk-grid .day-hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-content: start;
  align-content: center; justify-items: start; align-items: start; gap: 10px;
  min-height: clamp(210px,18vw,280px); padding: 30px clamp(21px,3vw,50px) 58px;
  margin-bottom: -48px; background: #213b31; color: #fff7e5; border-radius: 18px;
}
.day-landscape { position: absolute; inset: 0; z-index: -2; background: url('/static/desk-forest.webp') 54% 46% / cover; }
.day-hero::before, .day-hero::after { position: absolute; content: ""; pointer-events: none; z-index: -1; }
.day-hero::before { inset: 0; background: linear-gradient(95deg,#132a21f5,#173828a3 53%,transparent 84%),linear-gradient(0deg,#18322674,transparent 69%); }
.day-hero::after {
  top: -24px; right: -13px; height: 85%; width: min(23%,245px); opacity: .66;
  background: url('/static/cabinet-sprig.webp') center / contain no-repeat; transform: rotate(151deg); mix-blend-mode: soft-light;
}
.day-hero .desk-meta { order: 0; color: #f0e3c3; letter-spacing: .045em; align-self: auto; }
.desk-grid .day-hero h1 { color: #fff7e5; font: 400 clamp(38px,4.6vw,68px)/1.04 var(--serif); margin: 0; text-shadow: 0 1px 3px #09201677; overflow-wrap: anywhere; }
.day-brief { margin: 0; color: #f1f3e5; font-size: 15px; }
:root[data-theme="dark"] .day-landscape { filter: brightness(.7) saturate(.78); }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .day-landscape { filter: brightness(.7) saturate(.78); } }
@media (prefers-reduced-motion:no-preference) {
  .day-arrival .day-landscape { animation: day-forest-arrival 2.2s ease-out both; }
  .day-stamped > span { animation: day-receipt-stamp .4s ease-out; }
}
@keyframes day-forest-arrival { from {transform:scale(1.035)} to {transform:scale(1)} }
@keyframes day-receipt-stamp { from {transform:scale(1.25) rotate(-12deg);opacity:.25} to {transform:none;opacity:1} }
.desk-grid :is(.attn-card,.desk-today) { z-index: 1; outline: 0; border-radius: 13px; }
.desk-grid .day-hero + .desk-panel { margin-left: clamp(8px,1.15vw,18px); }
.desk-grid .day-hero + .desk-panel + .desk-panel { margin-right: clamp(8px,1.15vw,18px); }
.desk-grid .attn-card { padding: 0 0 18px; box-shadow: var(--raised),0 3px 0 -1px var(--panel-2),0 4px 0 -1px var(--line); }
.attn-card > :not(.day-feature) { margin-inline: clamp(16px,1.8vw,28px); }
.attn-card > .day-queue-title { margin-top: 19px; }
.attn-card:has(.day-feature:not(:empty)) .day-queue-title { font: 580 15px/1.4 var(--body); text-shadow: none; letter-spacing: 0; margin-bottom: 8px; }
.day-feature:empty { display:none; }
.day-feature { position:relative; isolation:isolate; overflow:hidden; padding:clamp(20px,2vw,30px); border-bottom:1px solid var(--line); }
.day-feature::after { content:""; position:absolute; z-index:-1; bottom:-24px; right:-12px; width:32%; height:110px; transform:rotate(-14deg); background:url('/static/cabinet-sprig.webp') center / contain no-repeat; opacity:.3; pointer-events:none; }
.day-byline { display:flex; justify-content:space-between; gap:7px 13px; align-items:center; flex-wrap:wrap; color:var(--ink-2); font-size:12px; }
.day-byline strong { display:inline-flex; align-items:center; gap:8px; color:var(--brass); }
.day-byline strong::before { content:""; width:7px; height:7px; border-radius:100%; background:currentColor; box-shadow:0 0 0 3px color-mix(in srgb,var(--stamp) 20%,transparent); }
.desk-grid .day-feature h2 { margin:17px 0 8px; max-width:25ch; font:400 clamp(27px,2.6vw,40px)/1.09 var(--serif); letter-spacing:-.035em; overflow-wrap:anywhere; }
.day-feature p { overflow-wrap:anywhere; }
.day-shift { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:14px 0 2px; color:var(--ink-2); font-size:13px; }
.day-shift span { color:var(--ink); padding:5px 9px; border:1px solid var(--line); border-radius:7px; background:var(--panel-2); }
.day-feature .day-action { margin-top:12px; min-height:44px; }
.day-upcoming { margin-bottom:15px; }
.day-upcoming button { display:flex; text-align:left; align-items:center; gap:15px; padding:11px 0; width:100%; min-height:46px; color:var(--ink); border:0; border-bottom:1px solid var(--line); background:none; cursor:pointer; }
.day-upcoming time { color:var(--brass); font:500 20px/1.05 var(--serif); flex:0 0 5.2em; }
.day-upcoming b,.day-upcoming small { display:block; overflow-wrap:anywhere; }
.day-upcoming b { font-size:14px; }
.day-upcoming small { color:var(--ink-2); }
.day-suggestions { display:flex; flex-wrap:wrap; gap:6px; }
.day-suggestions button { min-height:44px; }
.day-suggestions button[aria-pressed="true"] { color:var(--action-text); background:var(--solid-action); }
.day-receipt { display:flex; gap:12px; align-items:center; border-block:1px solid var(--line); padding:12px 0; }
.day-receipt > span { flex:none; display:grid; place-items:center; width:35px; height:35px; border:3px double var(--brass); color:var(--brass); border-radius:50%; box-shadow:var(--inset); }
.day-receipt small { display:block; color:var(--ink-2); }
@media(max-width:740px) {
  .desk-grid .day-hero { min-height:172px; margin-bottom:-34px; padding:22px 19px 43px; gap:6px; }
  .desk-grid .day-hero h1 { font-size:clamp(33px,8vw,44px); }
  .day-hero::after { width:90px; right:-20px; }
  .desk-grid .day-hero + .desk-panel,.desk-grid .day-hero + .desk-panel + .desk-panel { margin-inline:6px; }
  .day-feature { padding:18px; }
}

/* Внутренние разделы продолжают «Мой день». Панорама перекрывается только полосой вкладок. */
#view[data-day-section] { gap:14px; }
#view[data-day-section] .cabinet-land {
  position:relative; isolation:isolate; overflow:hidden; display:grid; align-content:center;
  grid-template-columns:minmax(0,1fr); align-items:start; justify-items:start; gap:6px;
  min-height:152px; margin:0; padding:20px clamp(20px,3vw,40px);
  border:0; border-radius:18px; color:#fff7e5; background:#213b31;
}
#view[data-day-section] .cabinet-land:has(+ .row > .seg) { margin-bottom:-31px; padding-bottom:41px; }
.cabinet-land .desk-back { color:#f1e8cf; padding:5px 0; min-height:36px; }
.cabinet-land .desk-back:focus-visible { outline:2px solid #fff7e5; }
.cabinet-land h1 { color:inherit; font:400 clamp(37px,4.2vw,62px)/1.05 var(--serif); letter-spacing:-.045em; text-shadow:0 1px 3px #09201677; }
.cabinet-land .day-brief { overflow-wrap:anywhere; }
#view[data-day-section] .cabinet-land + .row:has(> .seg) { position:relative; z-index:1; margin-inline:clamp(6px,1.4vw,18px); }
#view[data-day-section] .cabinet-land + .row .seg { background:var(--panel-solid); box-shadow:var(--raised); }
#view[data-day-section] .card { min-width:0; }
#view[data-day-section] .card-head h3,#view[data-day-section] .request-queues h3 { color:var(--ink); font:500 clamp(22px,2vw,30px)/1.12 var(--serif); }
.request-queues:empty {display:none}
.request-queues .request-paper, .week-paper { position:relative; isolation:isolate; overflow:hidden; border-radius:14px; }
.request-paper::before, .week-paper::before { content:""; position:absolute; right:0; top:0; height:88px; width:min(28%,165px); pointer-events:none; background:url('/static/cabinet-sprig.webp') center/contain no-repeat; transform:rotate(158deg); opacity:.12; z-index:-1; }
.request-paper .card-head { justify-content:flex-start; gap:12px; }
.req-total { display:inline-grid; place-items:center; min-width:27px; min-height:27px; padding:1px 7px; border-radius:100%; background:var(--panel-2); color:var(--brass); font-variant-numeric:tabular-nums; }
.req-ref { display:block; color:var(--ink-2); font-size:12px; margin-bottom:4px; }
.request-paper .mk-item { background:var(--sheet); background-size:116px,cover; }
.request-paper .mk-item b { overflow-wrap:anywhere; }
.request-tools button, #view[data-day-section] .week-navigation button { min-height:44px; }
.week-paper .card-head { gap:8px 20px; flex-wrap:wrap; }
.week-navigation { justify-content:flex-start; }
.week-range { font-size:14px; color:var(--ink-2); }
.week-paper .team-week { min-width:0; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; align-items:stretch; }
.week-paper .team-day { padding:9px 6px; background:var(--panel-solid); border-color:var(--line); gap:8px; }
.week-paper .team-day.today { border-color:var(--brass); box-shadow:inset 0 3px var(--brass); }
.week-paper .team-day h4 { display:flex; align-items:baseline; flex-wrap:wrap; justify-content:space-between; gap:3px; font:550 12px var(--body); letter-spacing:0; color:var(--ink-2); }
.week-paper .team-day time { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.week-paper .team-day time b { font:500 27px/1.1 var(--serif); color:var(--ink); }
.week-paper .team-day h4 small { color:var(--brass); font-size:11px; text-transform:none; }
.week-paper .team-shift { display:flex; flex-direction:column; align-items:flex-start; padding:7px 6px; gap:3px; }
.week-paper .team-shift b { font-size:13px; }
.week-paper .shift-overnight { color:var(--brass); }
.week-paper .vacant { margin:4px 0; color:var(--ink-2); font-size:12px; }
.week-paper .team-shift .linkbtn { align-self:flex-end; min-width:36px; }
@media(max-width:1150px) {
  .week-paper .team-week { grid-template-columns:repeat(auto-fit,minmax(min(100%,126px),1fr)); }
}
@media(max-width:700px) {
  #view[data-day-section] .cabinet-land { min-height:128px; padding:14px 17px; }
  #view[data-day-section] .cabinet-land:has(+ .row > .seg) { margin-bottom:-27px; padding-bottom:33px; }
  .cabinet-land h1 {font-size:clamp(33px,8vw,43px)}
  #view[data-day-section] .cabinet-land + .row .seg { flex-wrap:wrap; }
  #view[data-day-section] .cabinet-land + .row .seg button { min-height:44px; }
  .week-navigation { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .week-range { grid-column:1/-1; grid-row:1; }
  .week-paper .team-week { grid-template-columns:minmax(0,1fr); gap:0; }
  .week-paper .team-day { display:grid; grid-template-columns:66px minmax(0,1fr); align-content:start; column-gap:12px;
    border:0; border-top:1px solid var(--line); border-radius:0; padding:10px 4px; background:none; }
  .week-paper .team-day.today { box-shadow:none; }
  .week-paper .team-day h4 { grid-column:1; grid-row:1; align-self:start; align-items:flex-start; justify-content:start; }
  .week-paper .team-day h4 time {width:100%}
  .week-paper .team-day.today h4 { border-left:3px solid var(--brass); padding-left:5px; }
  .week-paper .team-day > :not(h4) {grid-column:2}
  .week-paper .team-shift {padding:8px 10px}
  .week-paper .team-shift .linkbtn {min-height:44px; min-width:44px}
  #view[data-day-section] .request-paper button {min-height:44px}
}
.request-paper .mk-item > b { font:500 clamp(20px,2vw,29px)/1.15 var(--serif); letter-spacing:-.025em; }
.request-paper .mk-item > .btn { justify-self:start; width:fit-content; min-height:44px; }

/* Рабочий лист: отделяем заголовок от данных, сохраняя цвет предупреждений и статусов. */
#view[data-day-section] :is(.card > h3,.firm-hero h2), .desk-body > h3 {
  font:500 clamp(22px,2vw,30px)/1.16 var(--serif); letter-spacing:-.025em; overflow-wrap:anywhere;
}
#view[data-day-section] .card:not(.firm-note) > .card-head:not(:last-child) {
  padding-bottom:10px; border-bottom:1px solid var(--line);
}
#view[data-day-section] .seg { max-width:100%; }
#view[data-day-section] .seg button { max-width:100%; overflow-wrap:anywhere; }
#view[data-day-section] :is(.firm-hero,.mg-card) {
  background:var(--sheet); background-size:116px,cover;
}
#view[data-day-section] .firm-kicker { color:var(--brass); }
#view[data-day-section] .mg-n { font-family:var(--serif); color:var(--brass); }
#view[data-day-section] :is(form.card,.card > form,.name-form), .desk-body form { min-width:0; }
#view[data-day-section] :is(form.card,.card > form:not(:only-child)):not([hidden]) {
  border-inline-start:3px solid var(--stamp); padding-inline-start:clamp(12px,1.3vw,20px);
}
#view[data-day-section] :is(.record-link,.sales-row,.mg-card):focus-visible,
.desk-body :is(button,a):focus-visible { outline:2px solid var(--mint); outline-offset:-2px; }
@media(hover:hover) {
  #view[data-day-section] :is(.record-link,.sales-row,.mg-card):hover { background-color:var(--selected); }
  #view[data-day-section] :is(.record-link,.sales-row,.mg-card):hover b { text-decoration:underline; text-underline-offset:.2em; }
}

/* У поиска, карточки и Руты своя компактная шапка; места для действий не убавляется. */
.desk-dialog .desk-winhead, .help-panel .help-head {
  background:linear-gradient(92deg,#20382ff7 12%,#223b32d1 64%,#213a31c2),url('/static/desk-forest.webp') center 40%/cover,#213b31;
  color:#fff7e5; border-bottom:1px solid #a19371;
}
.desk-dialog .desk-winhead { padding:12px clamp(14px,2vw,22px); }
.help-panel .help-head { padding:7px 10px 7px 14px; border-radius:10px; }
.desk-dialog .desk-winhead b,.help-panel .help-head b { color:inherit; text-shadow:0 1px 2px #13291e; overflow-wrap:anywhere; min-width:0; }
.desk-dialog .desk-winhead .btn,.help-panel .help-head .help-x {
  color:#fff7e5; background:#324b40; border:1px solid #acb19d; box-shadow:none; flex-shrink:0;
}
.desk-dialog .desk-winhead :focus-visible,.help-panel .help-head :focus-visible { outline:2px solid #fff7e5; outline-offset:2px; }
@media(max-width:700px) {
  #view[data-day-section] .name-form .row { flex-wrap:wrap; }
  #view[data-day-section] .name-form input:not([type=checkbox]) { flex:1 1 100%; min-width:0; }
  #view[data-day-section] :is(.seg button,form .btn,.record-link), .desk-dialog .desk-winhead button,.help-panel .help-head button { min-height:44px; }
  .help-panel .help-head .help-x { min-width:44px; }
}

/* Сводка тестирования: те же измерения видны и на узком экране. */
.tester-day-list {list-style:none;margin:0;padding:0}
.tester-day-head,.tester-day-row {display:grid;grid-template-columns:minmax(8rem,1fr) minmax(10rem,1.6fr) minmax(6rem,.68fr);gap:.75rem;align-items:start}
.tester-day-head {color:var(--ink-2);font-size:.8rem;margin:.8rem 0 .25rem}
.tester-day-row {border-top:1px solid var(--line);padding:.72rem 0;overflow-wrap:anywhere}
.tester-day-who,.tester-day-times {display:grid;gap:.2rem}
.tester-day-who span {color:var(--ink-2)}
.tester-day-times,.tester-day-total {font-variant-numeric:tabular-nums}
.tester-day-total {font-weight:600}
.tester-today .card-head {flex-wrap:wrap}
@media(max-width:760px) {
  .tester-day-head {display:none}
  .tester-day-row {grid-template-columns:minmax(0,1fr);gap:.35rem}
  .tester-day-total::before {content:"Всего за день: ";font-weight:400}
}
