/* Shared form rhythm only. Calendar lanes, chat bubbles, QR codes and clinical
   colours retain their module-specific geometry and semantic exceptions. */
:is(.atlas-v49-view,.atlas-admin-standalone,dialog) .atlas-v49-field{min-width:0;max-width:100%;box-sizing:border-box;align-content:end;gap:8px}
:is(.atlas-v49-view,.atlas-admin-standalone,dialog) .atlas-v49-field>span{min-width:0;line-height:1.4;overflow-wrap:anywhere}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form,.atlas-v49-create-schedule,.atlas-v49-shift-form,.graph-employee-fields,.graph-shift-fields,.reception-block-form){align-items:end;min-width:0}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form,.atlas-v49-create-schedule,.atlas-v49-shift-form,.graph-employee-fields,.graph-shift-fields,.reception-block-form)>*{min-width:0;max-width:100%;box-sizing:border-box}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form,.atlas-v49-create-schedule,.atlas-v49-shift-form,.graph-employee-fields,.graph-shift-fields,.reception-block-form) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]),select:not([multiple])){box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:48px;min-height:48px;margin:0;font-size:16px;line-height:1.4}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form,.graph-employee-fields,.graph-shift-fields,.reception-block-form) textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px;line-height:1.5;min-height:90px;resize:vertical}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form) :is(input[type=file],select[multiple]){box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px}
:is(.admin-actions,.equipment-actions,.task-actions,.task-form-actions,.op-actions,.private-profile-actions){align-items:stretch;gap:12px;min-width:0}
:is(.admin-actions,.equipment-actions,.task-actions,.task-form-actions,.op-actions,.private-profile-actions)>:is(button,a){min-width:0;min-height:48px;max-width:100%;height:auto;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;line-height:1.4;margin:0;text-align:center;align-self:stretch}
:is(.admin-actions,.equipment-actions,.private-profile-actions)>:is(button,a){flex:1 1 180px}
.equipment-root .equipment-actions>:is(button,a){max-width:none}
:is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form)>button{min-height:48px;align-self:end;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
:is(.atlas-v49-card,.admin-record,.equipment-card,.task-detail,.op-card,.lifecycle-card,.knowledge-card,.atlas-v49-subcard){min-width:0;box-sizing:border-box}
:is(.atlas-v49-card,.admin-record,.equipment-card,.task-detail,.op-card,.lifecycle-card) :is(h2,h3,p,summary){max-width:100%;overflow-wrap:anywhere}
:is(.atlas-v49-view,.atlas-admin-standalone,dialog) :is(input,select,textarea,button):focus-visible{outline-offset:2px;scroll-margin-block:20px}
:is(.admin-form,.equipment-form,.op-form-grid,.atlas-v49-legal-form,.graph-employee-fields,.graph-shift-fields) select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.equipment-settings-row{flex-wrap:wrap;align-items:end}.equipment-settings .atlas-v49-field{flex:1 1 188px;max-width:100%}.equipment-settings .atlas-v49-button{height:48px;min-height:48px}
.atlas-v49-search-form{grid-template-columns:minmax(0,1fr) auto;align-items:stretch}.atlas-v49-search-form>:is(input,button){min-width:0;min-height:48px;box-sizing:border-box}
/* The acknowledged monthly editor is intentionally collapsed, with its
   explicit reopen action retained. Author display:grid must respect hidden. */
.atlas-v49-shift-form[hidden]{display:none!important}
/* Reproduced native forms still inherited 10–14px labels as control fonts.
   Keep the visual palette while making the editable text readable without iOS zoom. */
:is(.atlas-finance-planner,.budget-layout,.overview-personal,.settings-grid,.atlas-v49-search-form,.atlas-v49-legal-form) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]),select:not([multiple]),textarea){font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
:is(.atlas-admin-standalone #admin-root,.equipment-root) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]),select:not([multiple]),textarea){font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
:is(.atlas-finance-planner,.budget-layout,.overview-personal,.settings-grid) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]),select:not([multiple])){height:48px;min-height:48px}
.profile-layout,.profile-layout>*,.profile-avatar-card>div,.profile-avatar-form{min-width:0;max-width:100%;box-sizing:border-box}
.profile-avatar-card h2,.profile-avatar-card p,.profile-avatar-form h2{overflow-wrap:anywhere;max-width:100%}
.profile-avatar-form .file-button{box-sizing:border-box;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.atlas-v49-knowledge-navigation select,.lifecycle-fields .lifecycle-field :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]),select:not([multiple]),textarea){font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
.endoscopy-journal-dialog .endoscopy-journal-header>button{flex:0 0 auto;min-width:96px;white-space:nowrap;overflow-wrap:normal;word-break:normal}
.atlas-recovery-dialog .atlas-recovery-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;min-width:0}
.atlas-recovery-dialog .atlas-recovery-heading>h2{min-width:0;overflow-wrap:anywhere;margin:0}
.atlas-recovery-dialog :is(.atlas-recovery-heading>button,form>button){box-sizing:border-box;min-width:0;max-width:100%;min-height:48px;border:1px solid #d8e3ef;border-radius:14px;padding:10px 14px;font:inherit;line-height:1.4;white-space:normal;overflow-wrap:normal;word-break:normal;background:#fff;color:#304a67}
.atlas-recovery-dialog .atlas-recovery-heading>button{min-width:92px;white-space:nowrap}
.atlas-recovery-dialog form>button{width:100%;margin:8px 0}
.atlas-recovery-dialog form>button.primary{background:linear-gradient(120deg,#00b8d4,#008fb5);border-color:transparent;color:#fff}
.atlas-recovery-dialog label[hidden]{display:none!important}
@media(max-width:380px){.atlas-recovery-dialog .atlas-recovery-heading{grid-template-columns:minmax(0,1fr)}.atlas-recovery-dialog .atlas-recovery-heading>button{justify-self:end}}
.access33-dialog .access33-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px}
.access33-dialog .access33-actions>button{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;height:auto;margin:0;align-self:stretch;line-height:1.4;overflow-wrap:anywhere}
.auth-card [data-registration-fields] .access33-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.auth-card [data-registration-fields] .access33-actions>button{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;margin:0;white-space:normal;overflow-wrap:normal;word-break:normal}
.telegram-binding-dialog>section,.telegram-binding-dialog .atlas-v49-hero,.telegram-binding-dialog .atlas-v49-hero>div{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
.telegram-binding-dialog .atlas-v49-hero{flex-wrap:wrap;gap:12px}
.telegram-binding-dialog :is(h1,h2,h3,p,a){max-width:100%;overflow-wrap:anywhere}
.telegram-binding-dialog>button,.telegram-binding-dialog .telegram-guide>a{box-sizing:border-box;width:100%;min-width:0;max-width:100%;white-space:normal}
.access33-dialog[aria-label="Ключи доступа"]>section>button{box-sizing:border-box;width:100%;min-width:0;min-height:48px;margin:6px 0;border:1px solid #d8e3ed;border-radius:14px;background:#fff;color:#334155;padding:12px 16px;font:inherit;line-height:1.4}
@media(max-width:380px){.auth-card [data-registration-fields] .registration-birthday{grid-template-columns:minmax(0,1fr)}}
@media(max-width:380px){.access33-dialog .access33-actions{grid-template-columns:minmax(0,1fr)}}
main.content .section-switch[aria-label="Раздел финансов"]{grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,460px);max-width:100%}
main.content .section-switch[aria-label="Раздел финансов"]>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:10px 8px;min-height:48px;height:auto}
@media(max-width:700px){
 :is(.admin-form,.equipment-form,.task-form,.op-form-grid,.atlas-v49-legal-form,.atlas-v49-create-schedule,.graph-employee-fields,.graph-shift-fields,.reception-block-form){grid-template-columns:minmax(0,1fr)}
 :is(.admin-actions,.equipment-actions,.private-profile-actions){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr}
 :is(.admin-actions,.equipment-actions,.private-profile-actions)>:is(button,a){width:100%;max-width:none}
 .atlas-v49-search-form{grid-template-columns:minmax(0,1fr)}
 .profile-layout{grid-template-columns:minmax(0,1fr)}
 .profile-avatar-card{grid-template-columns:92px minmax(0,1fr)}
 .equipment-root .equipment-table{min-width:0}
}
@media(max-width:900px){.equipment-root .equipment-table{min-width:0}}
@media(max-width:380px){:is(.admin-actions,.equipment-actions,.private-profile-actions){grid-template-columns:minmax(0,1fr)}}
/* On short landscape screens the header/alarm/footer must not squeeze nav to
   zero height. Scroll the complete sidebar; all actions remain reachable. */
@media(min-width:761px) and (max-height:600px){
 body .sidebar,body.has-anesthesia-alarm .sidebar{height:100dvh;max-height:100dvh;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
 body .sidebar>nav,body.has-anesthesia-alarm .sidebar>nav{flex:0 0 auto;min-height:auto;overflow:visible}
 body .sidebar>.privacy-note{margin-top:0}
 body.has-anesthesia-alarm .sidebar>.anesthesia-alarm-launch{position:static;top:auto}
}
/* A short landscape viewport cannot fit the full schedule toolbar and a
   readable calendar at once. Scroll the panel, rather than shrinking the
   calendar to a one-line nested scroll region. */
@media(max-height:600px){
 .atlas-v49-view[data-view="clinicSchedule"]{overflow-x:hidden;overflow-y:auto;display:block;overscroll-behavior:contain}
 .atlas-v49-view[data-view="clinicSchedule"]>.atlas-v49-body,
 .atlas-v49-view[data-view="clinicSchedule"] .schedule-shell{flex:none;min-height:auto;overflow:visible}
 .atlas-v49-view[data-view="clinicSchedule"] .schedule-board{flex:0 0 auto;min-height:360px;overflow:visible}
 .atlas-v49-view[data-view="clinicSchedule"] :is(.schedule-month,.schedule-load-month){flex:none;min-height:320px;overflow:visible}
 .atlas-v49-view[data-view="clinicSchedule"] .schedule-fit-frame{min-height:320px}
}
@media(prefers-reduced-motion:reduce){:is(.atlas-v49-view,.atlas-admin-standalone,dialog){scroll-behavior:auto}}
/* S0 secondary controls: let the layout grow at word boundaries instead of
   splitting short tab/category captions into individual syllables. */
:is(.personal-plans-colors span,main.content .section-switch[aria-label="Раздел финансов"]>button,.task-page .task-toolbar>.task-action,.atlas-v49-view[data-view="knowledge"] .atlas-v49-knowledge-tab,.schedule-colors-dialog .schedule-load-key){overflow-wrap:normal;word-break:normal;hyphens:none}
.personal-plans-dialog .personal-plans-colors{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.personal-plans-dialog .personal-plans-colors>label{min-width:0;align-items:center}
.personal-plans-dialog .personal-plans-colors span{min-width:0}
main.content .section-switch[aria-label="Раздел финансов"]{grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));grid-auto-rows:1fr}
.schedule-colors-dialog .schedule-load-key{align-items:start}
.schedule-colors-dialog .schedule-load-key::before{flex-shrink:0}
@media(max-width:480px){
 /* Reserve the parked mascot's existing40px figure and safe margin beside the
    Tasks heading; its collision fallback must not cover the final letters. */
 .atlas-v49-view[data-view="workTasks"]>.atlas-v49-hero{padding-right:52px}
 .task-page .task-toolbar{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;align-items:stretch}
 .task-page .task-toolbar>.task-action{min-height:48px;height:auto;margin:0}
 .atlas-v49-view[data-view="knowledge"] .atlas-v49-knowledge-tabs{grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr}
 .schedule-colors-dialog .schedule-load-legend{grid-template-columns:minmax(0,1fr)}
}
/* These two older dialogs predate the shared footer. Keep their existing
   actions and handlers, but use one equal-height branded action row. */
:is(.graph-person-dialog .graph-employee-actions,.atlas-finance-dialog menu){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;min-width:0;padding:0;margin:12px 0 0}
:is(.graph-person-dialog .graph-employee-actions,.atlas-finance-dialog menu)>button{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;height:auto;margin:0;align-self:stretch;padding:12px 14px;font:inherit;line-height:1.4;white-space:normal;overflow-wrap:normal;word-break:normal}
.atlas-finance-dialog menu>button{border:1px solid #d5e2ec;border-radius:14px;background:#fff;color:#294456;font-weight:600;cursor:pointer}
.atlas-finance-dialog menu>button.primary{border-color:transparent;background:linear-gradient(120deg,#00b4db,#0083b0);color:#fff}
/* The Telegram bot handle may wrap; the exit remains a separate reachable
   control rather than being pushed outside the viewport. */
.atlas-v49-view[data-view="telegram"]>.atlas-v49-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;min-width:0}
.atlas-v49-view[data-view="telegram"]>.atlas-v49-hero>div{min-width:0;max-width:100%}
.atlas-v49-view[data-view="telegram"]>.atlas-v49-hero h1{max-width:100%;overflow-wrap:anywhere;word-break:normal}
.atlas-v49-view[data-view="telegram"]>.atlas-v49-hero>.atlas-v49-close{margin:0;min-width:0;max-width:100%;white-space:nowrap}
@media(max-width:480px){
 .atlas-v49-view[data-view="telegram"]>.atlas-v49-hero{grid-template-columns:minmax(0,1fr)}
 .atlas-v49-view[data-view="telegram"]>.atlas-v49-hero>.atlas-v49-close{justify-self:start}
}
/* WebKit can paint the composited avatar of the inactive group chat through
   its visibility-hidden parent. Keep the active mobile conversation list
   above that underlying panel; do not remove avatars or messenger actions. */
@media(max-width:760px){
 body.atlas-messenger-active:not(.atlas-messenger-thread-open)>.atlas-messenger-nav{z-index:2002;isolation:isolate}
}
/* Keep helper text in the upload field's flow and visibly separate the next
   field. In standalone admin the schedule stylesheet is intentionally absent,
   so service rows declare their own shared two-column geometry here. */
main.content .document-form{display:grid;min-width:0}
main.content .document-form>label{display:grid;align-content:start;gap:8px;min-width:0}
main.content .document-form>label:has(input[type=file]){gap:8px;margin-bottom:4px}
main.content .document-form>label:has(input[type=file])>small{display:block;line-height:1.5;margin-top:4px}
:is(.atlas-admin-surface,.atlas-admin-standalone) .uzi-service-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 16px;min-width:0;padding:8px 10px;line-height:1.5}
:is(.atlas-admin-surface,.atlas-admin-standalone) .uzi-service-row>span:first-child{min-width:0;overflow-wrap:anywhere}
:is(.atlas-admin-surface,.atlas-admin-standalone) .uzi-service-time{white-space:nowrap;font-weight:650;font-variant-numeric:tabular-nums}
