/* Общие координаты названий и компактные шапки основных страниц. */
#appView { --page-bg:#fafafa; --page-heading-font:"Cabinet Roboto",system-ui,sans-serif; --page-heading-padding:8px; --page-title-height:26px; }
#appView :is(#homeView,#settingsView,#bookingView,#paymentsView) { --bg:var(--page-bg); background:var(--page-bg); }
#appView :is(#settingsView,#bookingView,#paymentsView) .section-content { background:var(--page-bg); }
#appView .section-content>.section-heading { min-height:0; margin:0 0 12px; padding:var(--page-heading-padding) max(var(--content-inset),calc((100% - var(--cabinet-content-width))/2)); background:var(--page-bg); border-bottom:0; }
#appView .section-content>.section-heading>div { min-width:0; width:100%; }
#appView .section-content>.section-heading h1,#appView #brandName,#appView #mobilePageTitle,#appView #appealsListHeading h1 { margin:0; font:500 18px/var(--page-title-height) var(--page-heading-font)!important; }
#appView .section-content>.section-heading .section-description { min-height:0; margin:3px 0 0; font-size:14px!important; line-height:20px; }
#appView .section-content>.section-inner { padding-top:12px; }
#appView #settingsView .section-content>.section-heading { margin-bottom:0; }
#appView #settingsView .settings-search-toolbar { padding:0 0 4px; background:var(--page-bg); }
#appView #settingsView .settings-search-toolbar .settings-search { background:transparent; }

/* Выбор выделяется фоном, а не насыщенностью текста. */
.category-overflow-menu button,.category-overflow-menu button[aria-checked=true],.select-option-menu button[aria-selected=true],.select-option-group { font-weight:400; }
#appView .conversation-menu .dialog-actions button { font-weight:400; }
select option,select optgroup { font-weight:400; }

@media(min-width:721px){
 #appView>.topbar { padding-top:0; }
 #appView .topbar #homeLogo { height:calc(var(--page-title-height) + 2*var(--page-heading-padding)); min-height:calc(var(--page-title-height) + 2*var(--page-heading-padding)); padding:3px 6px; }
 #appView :is(#settingsView,#bookingView,#paymentsView) .section-content { scrollbar-gutter:stable both-edges; }
 #appView[data-section=home] #homeLogo>.brand-title { position:absolute; left:68px; top:var(--page-heading-padding); width:calc(100vw - 68px); min-width:0; pointer-events:none; overflow-y:auto; scrollbar-gutter:stable both-edges; }
 #appView[data-section=home] #brandName { width:calc(100% - 2*var(--content-inset)); max-width:var(--cabinet-content-width); margin:0 auto; }
 #appView[data-section=home] #homeLogo>.brand-mark { position:absolute; left:calc(var(--home-title-x,84px) - 46px); top:calc(var(--page-heading-padding) + (var(--page-title-height) - 36px)/2); }
 #appView #dialogsView #sidebar { padding:var(--page-heading-padding) 16px 0; }
 #appView #dialogsView .appeals-list-heading { position:relative; flex:none; height:var(--page-title-height); min-height:var(--page-title-height); margin:0 0 6px; }
 #appView #dialogsView #appealsReceptionSummary { position:absolute; right:0; top:50%; transform:translateY(-50%); }
 #appView #dialogsView .side-primary.section-search-controls { padding:0; margin:0 0 4px; }
 #appView #dialogsView .appeals-list-body { margin-inline:-16px; width:calc(100% + 32px); }
 #appView #dialogsView .deleted-bulk { margin-inline:16px; }
}
#appView #appealsListTitle { margin-top:4px; margin-bottom:6px; }
#appView .topbrand:has(img.hidden)::before { content:none; }
#appView .brand-mark { display:grid; place-items:center; flex:none; width:36px; height:36px; }
#appView .brand-mark:has(img.hidden)::before { content:'ОД'; display:grid; place-items:center; width:100%; height:100%; color:var(--accent); font-weight:600; }
#appView #settingsView .settings-flow-section { margin-bottom:64px; }

@media(max-width:720px){
 #appView>.topbar { padding:var(--page-heading-padding) 12px; align-items:flex-start; background:var(--page-bg); }
 #appView[data-section=dialogs]>.topbar { background:var(--card); }
 #appView .mobile-page-heading { display:block; flex:1; min-width:0; text-align:left; }
 #appView .mobile-page-title-line { height:var(--page-title-height); }
 #appView #mobilePageDescription { margin:3px 0 0; font-size:13px; line-height:20px; }
 #appView #mobilePageDescription:empty { display:none; }
 #appView .topbar #homeLogo { flex:none; margin:0; order:1; height:var(--page-title-height); min-height:var(--page-title-height); padding:0; }
 #appView .brand-mark { width:32px; height:32px; }
 #appView[data-section=home] .topbar #homeLogo { order:-1; }
 #appView[data-section=home] #mobilePageTitle { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 #appView #appMenu { margin-top:calc((var(--page-title-height) - 40px)/2); }
 #appView .topbrand>div { display:none; }
 #appView #appNavigation .nav-btn { font-weight:400; }
}

/* Плавающие инструменты и поверхности навигации. */
#appView #dialogsView :is(#sidebar,.appeals-list-pane,.appeals-list-body,.dialogs) { background:#fafafa; }
#appView #conversationAvatar { flex:none; width:36px; height:36px; font-size:13px; }
#appView #dialogsView .dialog-head-main { flex-wrap:nowrap; gap:10px; }
#appView #dialogsView .dialog-identity { flex:1; }
#appView #settingsView .settings-search-toolbar { top:8px; width:calc(100% - 24px); max-width:calc(var(--cabinet-content-width) + 12px); margin:8px auto; padding:6px; border:1px solid var(--line); border-radius:24px; background:var(--card); box-shadow:0 3px 14px #00000012; }
#appView #settingsView .settings-search-toolbar>.section-search-controls { width:100%; max-width:none; }
#appView #settingsView #generalSettingsSearchEmpty { width:100%; }
@media(min-width:721px){
 #appView>.topbar { background:#eeeeef; }
 #appView[data-section=home]>.topbar { background:#fafafa; }
 #appView[data-section=home] #homeLogo { gap:10px; }
 #appView[data-section=home] #homeLogo>.brand-mark { position:static; }
 #appView[data-section=home] #homeLogo>.brand-title { position:static; flex:1; width:auto; overflow:hidden; scrollbar-gutter:auto; }
 #appView[data-section=home] #brandName { width:100%; margin:0; }
}
@media(max-width:720px){
 #appView[data-section=dialogs]>.topbar,#appView #appNavigation { background:#fafafa; }
}

/* Единая шапка настроек: название и поиск остаются видимыми вместе. */
#appView #settingsView .section-content>.section-heading { position:sticky; top:0; z-index:22; margin:0; }
#appView #settingsView .settings-search-toolbar { position:sticky; top:var(--settings-heading-height,0px); width:100%; max-width:none; margin:0; padding:4px var(--content-inset) 8px; border:0; border-radius:0; box-shadow:none; background:var(--page-bg); }
#appView #settingsView .settings-search-toolbar>.section-search-controls,#appView #settingsView #generalSettingsSearchEmpty { width:100%; max-width:var(--cabinet-content-width); margin-inline:auto; }
#appView #settingsView .settings-section-title { font-size:18px!important; }
#appView #settingsView .module-switch small { font-weight:400; }
#appView #dialogsView .side-primary.section-search-controls { background:var(--page-bg); }
/* Постоянные инструменты календаря под шапкой. */
#appView #bookingView .section-content>.section-heading { position:sticky; top:0; z-index:23; margin:0; }
#appView #bookingView #bk-calendarToolbar { display:flex; flex:none; flex-wrap:nowrap; position:sticky; top:var(--calendar-heading-height,0px); z-index:22; gap:6px; width:100%; margin:0; padding:4px max(var(--content-inset),calc((100% - var(--cabinet-content-width))/2)) 8px; background:var(--page-bg); }
#appView #bookingView .calendar-icon { position:relative; display:grid; place-items:center; flex:none; width:40px; height:40px; min-height:40px; padding:8px; border-radius:9px; }
#appView #bookingView .calendar-icon>svg { display:block; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
#appView #bookingView .calendar-icon[aria-pressed=true] { background:#d4d4d7; border-color:#85858c; color:#202123; box-shadow:inset 0 0 0 1px #85858c; }
#appView #bookingView .calendar-icon>.service-ring { position:absolute; inset:-1px; width:40px; height:40px; stroke:none; pointer-events:none; }
#appView #bookingView .calendar-icon:has(.service-ring) { border-color:transparent; }
#workspaceForm h3:not(:first-child) { margin-top:28px; }
@media(max-width:360px){#appView #bookingView #bk-calendarToolbar { gap:4px; padding-inline:8px; }#appView #bookingView .calendar-icon { width:38px; padding:7px; }#appView #bookingView .calendar-icon>.service-ring { width:38px; }}
#appView #bookingView #bk-actionsPanel { position:sticky; bottom:0; top:auto; z-index:15; flex:none; order:2; width:100%; max-width:none; margin:0; padding:10px var(--content-inset) max(10px,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--line); border-radius:0; background:var(--page-bg); box-shadow:none; }
#appView #bookingView #bk-actionsPanel>.selected-text,#appView #bookingView #bk-actionsPanel>.actions-row { width:100%; max-width:var(--cabinet-content-width); margin-inline:auto; }
#appView #bookingView #bk-actionsPanel>.actions-row { display:flex; justify-content:center; }
#appView #bookingView #bk-calendarServices { position:static; display:flex; flex-wrap:wrap; gap:8px; margin:0 0 24px; background:transparent; overflow:visible; }
#appView #bookingView #bk-calendarServices button { max-width:100%; white-space:normal; text-align:left; overflow-wrap:anywhere; }
#appView #bookingView #bk-startDate { width:auto; max-width:100%; }
#messages.unread-positioning { padding-top:var(--conversation-head-space,0px)!important; padding-bottom:var(--conversation-tail-space,0px)!important; }
#appView #messagesDown { overflow:visible; }
#messagesDown .messages-unread-count { position:absolute; left:85.355%; top:14.645%; transform:translate(-50%,-50%); width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:var(--chat-accent,#53b559); color:#fff; font-size:10px; font-weight:500; line-height:1; pointer-events:none; }
@media(max-width:720px){
 #bk-refreshBtn svg { display:block; }
 #bk-refreshBtn span { display:none; }
 #appView #bookingView #bk-refreshBtn { width:40px; min-width:40px; height:40px; padding:9px; }
}


/* Активная страница и режим выделяются нейтральным тоном. */
#appView #appNavigation .nav-btn[aria-current=page] { background:#d4d4d7; color:#202123; box-shadow:inset 0 0 0 1px #aaaab0; }
#appView #bookingView #bk-calendarServices button { white-space:normal; overflow-wrap:anywhere; text-align:left; height:auto; min-height:42px; }
@media(max-width:720px){#appView #bk-acceptServicesBtn { display:block; width:100%; }html { background:var(--browser-chrome-bg,#fafafa); }}

#appView #appNavigation .platform-documents-link {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 2px;
}
#appView #appNavigation .platform-documents-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (min-width: 721px) {
  #appView #appNavigation .platform-documents-link { margin-top: auto; }
  #appView:not([data-section=home]) #appNavigation .platform-documents-link {
    font-size: 11px;
    margin-inline: -8px;
    text-align: center;
  }
  #appView:not([data-section=home]) .platform-documents-link-name { display: none; }
}
