/* Share compact navigation, mail panels and accessible field help across custom and admin pages.
   Объединяет компактное меню, почту и доступные подсказки в обычной панели и админке. */
:root{--navy:#172b43;--ink:#203148;--muted:#687b90;--line:#dce4ed;--blue:#245db2;--gold:#d4a94d}
.nav-group summary{cursor:pointer;padding:10px;color:inherit;font-weight:650;font-size:12px;list-style:none}.nav-group summary:before{content:'▸';display:inline-block;margin-right:9px;color:#d4a94d}.nav-group[open]>summary:before{content:'▾'}.nav-group[open]>summary{background:#ffffff12;border-radius:6px}.nav-group a{font-size:12px!important;padding:6px 10px!important}.compact-admin-nav{padding:12px!important;background:#f5f8fb!important;min-width:240px}.compact-admin-nav a{display:block;padding:8px;color:#203148}.compact-admin-nav .nav-group{margin:8px 0;border-bottom:1px solid #dce4ed}.compact-admin-nav .sidebar-nav{padding:0}.field-help{display:inline-block;position:relative;margin-left:7px;vertical-align:middle}.field-help summary{display:inline-grid;place-items:center;width:21px;height:21px;border:1px solid #b9c8d8;border-radius:50%;color:#245db2;cursor:pointer;font-size:12px;font-weight:bold;list-style:none}.field-help summary::-webkit-details-marker{display:none}.field-help .help-body{display:block;position:absolute;z-index:60;top:25px;left:0;width:min(360px,70vw);padding:13px;background:#fff8e9;color:#203148;border:1px solid #d4b776;border-radius:8px;box-shadow:0 8px 22px #142b4229;white-space:normal;font-size:13px;line-height:1.5;font-weight:normal}.notice-bell{position:relative;display:inline-block;color:#203148;text-transform:none;letter-spacing:normal;font-size:12px}.notice-bell>summary{cursor:pointer;list-style:none;padding:9px;background:#eef3f8;border:1px solid #dce4ed;border-radius:7px;white-space:nowrap}.notice-bell summary b{display:inline-grid;place-items:center;min-width:21px;height:21px;border-radius:12px;background:#245db2;color:#fff}.notice-popup{position:absolute;right:0;top:43px;width:min(360px,85vw);max-height:65vh;overflow:auto;z-index:55;background:#fff;padding:14px;box-shadow:0 10px 35px #10223844;border:1px solid #dce4ed;border-radius:10px}.notice-popup a{display:block!important;color:#203148!important;padding:9px!important;border-bottom:1px solid #dce4ed;text-decoration:none;font-size:12px}.notice-popup small{display:block;color:#687b90}.route-drawer{position:fixed;inset:0 0 0 auto;width:min(350px,94vw);z-index:1000;background:#fff;color:#203148;padding:16px;border-left:1px solid #dce4ed;box-shadow:-6px 0 30px #142b4225;transform:translateX(105%);transition:transform .2s;overflow:auto}.route-drawer.is-open{transform:translateX(0)}.route-drawer h2,.route-drawer h3{color:#172b43}.route-drawer a{color:#245db2}.route-drawer .button{display:inline-block;border-radius:7px;padding:9px 12px;background:#245db2;color:#fff;text-decoration:none}.route-drawer .icon-button{padding:7px 9px;cursor:pointer;background:#edf2f7;color:#172b43;border:1px solid #dce4ed;border-radius:6px}.drawer-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.drawer-head h2{font-size:17px}.drawer-overlay{display:none;position:fixed;inset:0;z-index:990;background:#10223855}.drawer-overlay.is-open{display:block}.drawer-steps{list-style:none;padding:0;margin:15px 0}.drawer-steps li{border-left:3px solid #dce4ed;padding:9px 10px;margin:6px 0}.drawer-steps li.done{border-color:#4b9070;background:#f1f8f4}.drawer-steps p{margin:7px 0;font-size:12px}.drawer-steps a{font-size:12px}.route-group{border-top:1px solid #dce4ed;padding:8px 0}.route-group>summary{cursor:pointer;font-size:13px;font-weight:bold}.route-group form{margin:5px 0}.drawer-route-choice{display:flex;gap:10px;width:100%;text-align:left;border:1px solid #dce4ed;border-radius:7px;padding:9px;background:#f6f8fb;color:#203148;cursor:pointer}.drawer-route-choice small{display:block;color:#687b90;font-weight:normal}.route-number{color:#806221;background:#f1e4c2;padding:5px;border-radius:5px}.conversation{max-height:60vh;overflow:auto}.message{padding:13px;border-bottom:1px solid #dce4ed}.message pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.message.note{background:#fff8e9}.case-actions{display:flex;flex-wrap:wrap;gap:8px}.support-bar{display:flex;align-items:center;gap:15px;margin:11px 0}.support-bar span{min-width:200px}.support-bar meter{flex:1;width:100%;height:25px}.support-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.route-drawer .drawer-route-choice:hover{background:#e8eff6}.route-group summary:focus-visible,.field-help summary:focus-visible{outline:3px solid #d4a94d;outline-offset:2px}
@media(min-width:1100px){body.operator-pinned #container{margin-right:350px}}
@media(max-width:800px){.support-layout{grid-template-columns:1fr}.support-bar span{min-width:140px}.notice-bell>summary{font-size:11px}.field-help .help-body{left:auto;right:0}}

/* Wrap the action bar on narrow screens.
   Переносит действия шапки на узком экране. */
.topbar,.topbar-left{flex-wrap:wrap}.topbar-right{margin-left:auto}.notice-bell summary svg{vertical-align:middle;margin-right:4px}.workspace.drawer-pinned{margin-right:350px}.sidebar .logout>a{color:#e9f0f8}.drawer-pin[aria-pressed=true],#drawer-pin[aria-pressed=true]{background:#172b43;color:#fff}
/* Keep metric bars aligned and match the server palette, including browser meter controls.
   Выравнивает полосы статистики и оформляет элементы meter в палитре сервера. */
.support-bar span{width:270px;flex:0 0 270px}.support-bar meter::-webkit-meter-bar{background:#e8eef5;border:0;border-radius:5px}.support-bar meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#245db2,#5c83ba);border-radius:5px}.support-bar meter::-moz-meter-bar{background:#245db2}.mobile-nav-toggle{display:none}
@media(max-width:760px){.mobile-nav-toggle{display:block;width:100%;background:#ffffff15;border:1px solid #ffffff30;color:#fff;margin:5px 0}.sidebar.mobile-collapsed .sidebar-nav,.sidebar.mobile-collapsed .nav-tool,.sidebar.mobile-collapsed .logout{display:none}.support-bar span{width:150px;flex-basis:150px}.workspace.drawer-pinned{margin-right:0}}

/* Place help triggers beside controls; popup lives in the top layer/body, outside clipped rows.
   Размещает кнопки возле полей; окно живёт в верхнем слое/body вне обрезаемых строк. */
.field-help{display:inline-flex;position:static;vertical-align:middle;margin:0 0 0 8px;flex:none}
.field-help-button{display:inline-grid;place-items:center;box-sizing:border-box;min-width:32px;min-height:32px;width:32px;height:32px;padding:0;border:1px solid #aebfd1;border-radius:50%;background:#f8fbff;color:#245db2;font-size:15px;line-height:1;font-weight:700;cursor:pointer;flex:none}
.field-help-button:hover{background:#e8eff8;color:#173e78}.field-help-button:focus-visible{outline:3px solid #b38a34;outline-offset:2px}
.operator-help-popover{box-sizing:border-box;position:fixed;inset:auto;margin:0;padding:16px 44px 16px 16px;z-index:10000;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;background:#fff8e9;color:#203148;border:1px solid #c8a45c;border-radius:9px;box-shadow:0 8px 26px #142b4238;font:14px/1.55 system-ui,"Segoe UI",sans-serif;white-space:normal;overflow-wrap:anywhere}
.operator-help-popover[hidden]{display:none}.operator-help-popover::backdrop{background:transparent}.operator-help-popover:focus{outline:2px solid #b38a34;outline-offset:1px}
.operator-help-close{position:absolute;right:7px;top:7px;display:grid;place-items:center;min-width:30px;min-height:30px;padding:0;background:#f3e7ca;color:#203148;border:1px solid #c8a45c;border-radius:5px;font-size:22px;cursor:pointer}
.operator-help-text{white-space:normal}.operator-help-text p{margin:0 0 10px}.operator-help-text pre{white-space:pre-wrap;overflow-wrap:anywhere}.operator-help-text a{color:#174b97}

/* Make readable program names wide without losing the adjacent help action on smaller screens.
   Расширяет читаемое название программы, сохраняя место для подсказки на узком экране. */
input.operator-wide-name{box-sizing:border-box;width:min(56rem,calc(100% - 48px));max-width:calc(100% - 48px);min-width:0}
/* Let native admin content shrink beside navigation instead of overflowing a portrait tablet.
   Позволяет штатному содержимому сжиматься возле меню без переполнения планшета. */
#main>main.content{min-width:0;flex:1 1 auto}
/* Keep native checkbox captions flexible so their help triggers remain fully visible on phones.
   Позволяет подписи флажков сжиматься, сохраняя кнопки пояснений видимыми на телефоне. */
.aligned .checkbox-row .vCheckboxLabel{flex:1 1 auto;min-width:0;white-space:normal}
/* Preserve readable navigation contrast when native Django switches to the dark theme.
   Сохраняет читаемый контраст меню при переключении штатной тёмной темы Django. */
#nav-sidebar.compact-admin-nav .nav-group summary,#nav-sidebar.compact-admin-nav a{color:#203148}

/* Present precise technical-field errors without recolouring or restricting ordinary prose fields.
   Показывает точные ошибки технических полей, не ограничивая обычный текст. */
.technical-field-warning{box-sizing:border-box;clear:both;max-width:60rem;margin:8px 0 2px;padding:9px 12px;border-left:3px solid #a63a3a;border-radius:4px;background:#fff3ed;color:#842d2d;white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.5}
.technical-field-warning[hidden]{display:none}

/* Hide every private body child before history restoration or failed authentication verification.
   Скрывает весь частный контент до восстановления истории или при непроверенном сеансе. */
html.operator-session-pending body>:not(#operator-session-message){display:none!important}
#operator-session-message{box-sizing:border-box;max-width:36rem;margin:15vh auto;padding:24px;border:1px solid #dce4ed;border-radius:10px;background:#fff;color:#203148;font:16px/1.6 system-ui,"Segoe UI",sans-serif}
#operator-session-message button{margin-top:14px;padding:10px 15px;border:1px solid #245db2;border-radius:6px;background:#245db2;color:#fff;cursor:pointer}
@media(max-width:600px){.operator-help-popover{font-size:14px}.field-help-button{min-width:36px;min-height:36px;width:36px;height:36px}.technical-field-warning{max-width:100%}#operator-session-message{margin:12vh 12px}}
