/* Owner-approved hybrid: colourful clinical surfaces + quiet Inter typography.
   Presentation only; keep existing viewport/layout/access logic authoritative. */
:root {
  --atlas-hybrid-paper:#F4F7FA; --atlas-hybrid-ink:#172638; --atlas-hybrid-muted:#596D7E;
  --atlas-hybrid-line:#DCE5EB; --atlas-hybrid-radius:14px; --atlas-hybrid-purple:#8324DC;
  --color-bg-main:var(--atlas-hybrid-paper); --color-text-primary:var(--atlas-hybrid-ink);
  --color-text-secondary:var(--atlas-hybrid-muted); --color-card-border:var(--atlas-hybrid-line);
  --radius-atlas:var(--atlas-hybrid-radius); --color-accent-blue:#048DA7;
  --gradient-brand:linear-gradient(135deg,#0AA6BE,#048DA7);
}
body {background:var(--atlas-hybrid-paper);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5;color:var(--atlas-hybrid-ink)}
body .brand-mark[data-atlas-logo="owner"] {background:#fff!important;border:1px solid #c4e0e7;overflow:hidden}
body .brand-mark[data-atlas-logo="owner"] > img.atlas-owner-logo,
body .sidebar .brand-mark[data-atlas-logo="owner"] > img.atlas-owner-logo,
body .auth-brand .brand-mark[data-atlas-logo="owner"] > img.atlas-owner-logo {display:block!important;width:100%!important;height:100%!important;object-fit:contain;border:0;padding:0;position:static;opacity:1;filter:none}
/* Statistics is part of the same application, not a separate green theme. */
.atlas-statistics,.atlas-statistics .stat-board {font-family:inherit;color:var(--atlas-hybrid-ink);font-size:14px}
.atlas-statistics :is(.statistics-tab,.stat-action) {font-family:inherit;font-size:14px;font-weight:600;min-height:44px;border-radius:10px;border-color:var(--atlas-hybrid-line);background:#fff;color:var(--atlas-hybrid-ink)}
.atlas-statistics .statistics-tab[aria-selected=true] {background:#CEE8FF;border-color:#90CBE4;color:#173E56}
.atlas-statistics :is(.stat-card,.statistics-metric,.stat-total,.statistics-fact,.stat-setup-row) {border-color:var(--atlas-hybrid-line);border-radius:14px;box-shadow:0 2px 9px #17263806}
.atlas-statistics :is(.stat-card p,.stat-card li,.stat-card td,.stat-card th,.stat-board-note,.stat-legend-item,.stat-yaxis,.stat-col-label,.stat-col-value) {font-size:13px;line-height:1.4;font-weight:400}
.atlas-statistics :is(.stat-filters label,.stat-card-tools label) {font-weight:500;letter-spacing:0;text-transform:none;color:var(--atlas-hybrid-muted)}
.atlas-statistics :is(.stat-total b,.statistics-metric strong) {font-size:26px;font-weight:600;color:var(--atlas-hybrid-ink)}
.atlas-statistics :is(.stat-total span,.statistics-description,.statistics-context,.statistics-metric small,.statistics-metric>span) {color:var(--atlas-hybrid-muted)}
.atlas-statistics :is(.stat-filters select,.stat-filters input,.stat-card-tools select,.stat-card-tools input) {font-family:inherit;font-size:14px;min-height:44px;box-sizing:border-box;max-width:100%;min-width:0}
.atlas-statistics .stat-card h3 {font-size:18px}
.atlas-statistics :is(.stat-total,.statistics-metric):nth-child(3n+1) {background:#CFF0E2}
.atlas-statistics :is(.stat-total,.statistics-metric):nth-child(3n+2) {background:#CEE8FF}
.atlas-statistics :is(.stat-total,.statistics-metric):nth-child(3n) {background:#FFEAA5}
.atlas-statistics :is(.statistics-table caption,.statistics-table thead th,.statistics-table tfoot) {background:#F0F5F8;color:var(--atlas-hybrid-ink);font-weight:600}
/* Whole clinical day: compact timeline, details stay available by tapping. */
.schedule-clinical-fit .schedule-fit-head {height:44px;min-height:44px;padding:3px 6px;gap:1px}
.schedule-clinical-fit .schedule-fit-head strong {font-size:15px;line-height:18px;font-weight:600}
.schedule-clinical-fit .schedule-fit-head small {font-size:11px;line-height:13px;-webkit-line-clamp:1}
.schedule-clinical-fit .schedule-fit-mark strong {font-size:12px;line-height:14px}
.schedule-clinical-fit .schedule-fit-mark span {display:none}
.schedule-clinical-fit .schedule-fit-lane .schedule-chip {font-size:12px;line-height:14px;padding:2px 5px;min-height:16px}
.schedule-clinical-fit :is(.schedule-fit-who,.schedule-fit-service,.schedule-or-half) {font-size:12px;line-height:14px}
.schedule-clinical-fit .schedule-or-half {min-height:0;padding:2px 4px}
.schedule-clinical-fit .schedule-or-note {font-size:10px;line-height:12px}
.schedule-clinical-day {gap:6px!important}
@media(max-width:760px) {
 .schedule-shell.schedule-clinical-day:not(.clinical-filters-open) > .schedule-toolbar {display:none}
 .schedule-day-filters-toggle {min-height:44px;border:1px solid var(--atlas-hybrid-line);background:#fff;border-radius:10px;color:var(--atlas-hybrid-ink)}
 .atlas-v49-view:has(.schedule-clinical-day) .atlas-v49-hero p {display:none}
 .schedule-shell.schedule-clinical-day .schedule-toolbar {padding:8px;gap:4px}
 .schedule-shell.schedule-clinical-day .schedule-toolbar-row {gap:4px}
 .schedule-shell.schedule-clinical-day .schedule-toolbar .atlas-v49-field {min-width:0!important;flex:1 1 42%;max-width:none}
 .schedule-shell.schedule-clinical-day .schedule-toolbar :is(input,select) {font-size:16px}
 .schedule-clinical-day .schedule-room-caption {padding:2px 0;font-size:13px}
 .schedule-clinical-day .schedule-room-nav {gap:4px}
 .atlas-statistics .stat-filters label {min-width:0;flex:1 1 42%}
 .atlas-statistics :is(.stat-filters select,.stat-filters input,.stat-card-tools select,.stat-card-tools input) {font-size:16px}
}
button,input,select,textarea {font-family:inherit}
input,select,textarea {box-sizing:border-box;min-width:0;max-width:100%}
.equipment-grid > *,.equipment-status-pair > *,.equipment-sheet > * {min-width:0}
.atlas-v49-body,.equipment-card,.panel-form {min-width:0;max-width:100%;box-sizing:border-box}
.atlas-v49-body {grid-template-columns:minmax(0,1fr)}
.atlas-v49-body > * {min-width:0}
h1,h2,h3,.brand strong,.panel-title h2,.atlas-v49-hero h1 {font-weight:600!important;letter-spacing:-.025em}
.atlas-v49-hero h1 {font-size:clamp(22px,2.3vw,30px)!important;line-height:1.25}
.content h1 {font-size:clamp(24px,2.7vw,32px);line-height:1.25}
.sidebar nav button > span,.sidebar-drawer nav button > span {font-weight:600!important}
.sidebar nav small,.sidebar-drawer nav small {font-weight:400}
:is(.atlas-v49-card,.panel,.form-card,.auth-card,.backup-card,.patient-card,.record,.loan-card,.stats-panel,.personal-hero,.patient-signal) {border-color:var(--atlas-hybrid-line);border-radius:var(--atlas-hybrid-radius);box-shadow:0 2px 9px #17263806}
.atlas-v49-view,.personal-hero {background:var(--atlas-hybrid-paper)}
.personal-hero {background:#FFF;border-color:var(--atlas-hybrid-line)}
.atlas-v49-button,.panel-tab,.ps-button,.primary,.schedule-step,.schedule-today,.schedule-extra > summary {font-weight:600!important;border-radius:10px}
:is(.kpi.mint,.kpi.blue,.kpi.sand,.kpi.rose) {border:0;border-radius:14px;color:#172638}
.kpi.mint {background:#CFF0E2}.kpi.blue {background:#CEE8FF}.kpi.sand {background:#FFEAA5}.kpi.rose {background:#E8DAFA}
.kpi :is(strong,small,p) {color:inherit}
:is(.record,.task-card,.personal-task.is-draft) {background:#FFF6CF;border-color:#E9D68A;color:var(--atlas-hybrid-ink)}
.tag.income {background:#CFF0E2;color:#155B43}.tag.expense,.tag.urgent {background:#FFDADF;color:#842935}
.personal-year-cell {border-color:var(--atlas-hybrid-line);border-radius:10px}
.personal-year-cell[aria-pressed="true"] {background:#CEE8FF}
/* Full-colour records: data attributes are set by the actual renderers. */
:is(.schedule-chip,.schedule-card,.schedule-fit-booking,.schedule-or-half,.schedule-load-day,.schedule-month-day,.booking-day,.booking-slot,.booking-key,.schedule-load-key)[data-hybrid-record="true"] {
  background:var(--hybrid-fill)!important;color:var(--hybrid-ink)!important;
  border-color:color-mix(in srgb,var(--hybrid-fill) 65%,#172638 15%)!important;
  border-left-color:var(--hybrid-fill)!important;
}
[data-hybrid-record="true"] :is(.schedule-card-line,.schedule-card-time,.schedule-fit-who,.schedule-fit-service,.schedule-card-direction,.schedule-anesthesia,.schedule-load-num,.schedule-load-count,.schedule-load-caption,.booking-first-service,.booking-day-number,.booking-day-count,.booking-anesthesia-label,.booking-slot-time,.booking-slot-description,.schedule-month-free) {color:inherit!important;font-weight:500}
[data-hybrid-record="true"] .schedule-load-badge {background:transparent!important;color:inherit!important;border:0}
.hybrid-anesthesia,.booking-day.has-anesthesia,.booking-slot.has-anesthesia {box-shadow:inset 0 5px 0 var(--atlas-hybrid-purple)!important}
.booking-day-tab {background:var(--hybrid-fill,var(--accent))!important}
.booking-key.has-anesthesia {background:#F4EDF9;box-shadow:inset 0 5px 0 var(--atlas-hybrid-purple)!important}
.schedule-hybrid-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;height:6px;min-height:6px;max-height:6px;margin-bottom:2px;overflow:hidden;pointer-events:none}
.schedule-hybrid-tab {display:block;height:6px;border-radius:3px;min-width:0;background:var(--hybrid-fill);box-shadow:0 0 0 1px #ffffff80 inset}
.schedule-load-day > .schedule-hybrid-tabs {position:absolute;top:2px;left:3px;right:3px}
.schedule-load-day:has(.schedule-hybrid-tabs) .schedule-load-num {top:11px}
.schedule-load-day:has(.schedule-hybrid-tabs) > :is(.schedule-load-halves,.schedule-load-badge) {margin-top:34px}
.schedule-load-day {border-radius:10px!important}
.schedule-load-half[data-hybrid-record="true"] {background:var(--hybrid-fill)!important;color:var(--hybrid-ink)!important}
.schedule-load-half[data-hybrid-record="true"] .schedule-load-badge {background:transparent!important;color:inherit!important}
.schedule-load-day:has(.schedule-load-halves) {background:#FFF!important;color:var(--atlas-hybrid-ink)!important}
.schedule-load-num,.schedule-month-day strong,.schedule-card-line,.schedule-fit-who {font-weight:600!important}
.schedule-fit-booking {border-radius:8px!important}
/* Staff colours are the user's stored colours, not a new assignment. */
.atlas-fit-day :is(.shift-chip,.atlas-v49-shift) {border-radius:6px}
.atlas-fit-day :is(.shift-chip,.atlas-v49-shift) strong {font-weight:600}
/* Light coherent messenger; preserve fixed composer and touch geometry. */
body.atlas-messenger-active :is(.atlas-messenger-nav,.neo-chat.chat-panel,.atlas-direct-view,.neo-chat-main,.neo-chat-layout,.neo-chat-members,.atlas-direct-messages,.chat-messages) {background:#FFF!important;color:var(--atlas-hybrid-ink)!important;border-color:var(--atlas-hybrid-line)!important}
body.atlas-messenger-active :is(.neo-chat-cover,.atlas-direct-header) {background:#CEE8FF!important;color:var(--atlas-hybrid-ink)!important;border-color:var(--atlas-hybrid-line)!important}
body.atlas-messenger-active :is(.neo-chat-cover h2,.atlas-direct-header strong,.atlas-messenger-header p) {color:var(--atlas-hybrid-ink)!important;font-weight:600!important}
body.atlas-messenger-active :is(.atlas-messenger-header small,.atlas-direct-header small,.neo-chat-cover span:not(.status-flower),.atlas-conversation-item small) {color:var(--atlas-hybrid-muted)!important}
body.atlas-messenger-active :is(.chat-message,.atlas-direct-message) {background:#CEE8FF!important;color:#172638!important;border-color:#AFCFE8!important;box-shadow:none}
body.atlas-messenger-active :is(.chat-message.own,.atlas-direct-message.own) {background:#CFF0E2!important;color:#172638!important;border-color:#ABDBC9!important}
body.atlas-messenger-active .chat-message:not(.media-video) :is(p,.chat-text,.chat-body),
body.atlas-messenger-active .atlas-direct-message :is(p,.atlas-direct-text) {color:#172638!important}
body.atlas-messenger-active .chat-message:not(.media-video) .chat-meta {color:#486171!important}
body.atlas-messenger-active :is(.chat-message header,.chat-message header strong,.atlas-direct-author,.atlas-direct-message-meta,.chat-actions button,.atlas-direct-message-action-menu button) {color:#294C60!important}
body.atlas-messenger-active :is(.chat-compose,.atlas-direct-compose,.atlas-direct-message-action-menu) {background:#F4F7FA!important;border-color:var(--atlas-hybrid-line)!important;color:var(--atlas-hybrid-ink)!important}
body.atlas-messenger-active :is(.chat-compose textarea,.atlas-direct-compose textarea,.atlas-conversation-search input) {background:#FFF!important;color:var(--atlas-hybrid-ink)!important;border-color:#BDCDD8!important}
body.atlas-messenger-active :is(.compose-tools button,.atlas-tools-toggle,.atlas-messenger-header-actions button,.neo-members-toggle,.atlas-messenger-back,.atlas-conversation-item,.atlas-conversation-new,.atlas-direct-attach) {background:#EFF5F8!important;color:#254356!important;border-color:#BDCDD8!important}
body.atlas-messenger-active .atlas-conversation-item.active {background:#CFF0E2!important;color:#172638!important}
body.atlas-messenger-active :is(.atlas-direct-file,.chat-message a) {color:#075C83!important}
body.atlas-messenger-active .chat-reactions button {background:#FFF!important;color:#172638!important;border-color:#BDCDD8!important}
body.atlas-messenger-active :is(.atlas-atlas-shortcut,.atlas-thread-atlas-exit,.atlas-new-message,.atlas-messenger-tool,.atlas-events-shortcut) {background:#EFF5F8!important;color:#254356!important;border-color:#BDCDD8!important}
body.atlas-messenger-active .atlas-conversation-search {background:#FFF!important;color:#172638!important;border-color:#BDCDD8!important}
body.atlas-messenger-active .atlas-conversation-search::placeholder {color:#596D7E!important}
/* Dedicated header berth: unread mascot must not cover the newest message. */
body.atlas-messenger-active .atlas-kaplya {position:fixed!important;width:40px!important;height:44px!important;z-index:2200}
body.atlas-messenger-active .atlas-kaplya:not(.is-user-positioned) {top:calc(var(--atlas-chat-top,0px) + 28px)!important;right:150px!important;left:auto!important;bottom:auto!important}
body.atlas-messenger-active .atlas-kaplya :is(.atlas-kaplya-body,.atlas-kaplya-art,.atlas-kaplya-mascot,.atlas-kaplya-restore) {width:40px!important;height:44px!important}
body.atlas-messenger-active .atlas-kaplya-cloud {display:none!important}
/* Patient routes keep their explicit semantic identity, never recoloured by department. */
.ps-card.ps-green {background:#DDF3E6;color:#174831}.ps-card.ps-yellow {background:#FFF0B7;color:#604711}.ps-card.ps-red {background:#FFDADF;color:#78222C}
.ps-arrival-dialog .ps-category-title {font-weight:600}
.ps-arrival-dialog .ps-category.ps-green {background:#DDF3E6}.ps-arrival-dialog .ps-category.ps-yellow {background:#FFF0B7}.ps-arrival-dialog .ps-category.ps-red {background:#FFDADF}
/* Mobile retains existing seven-column calendar and full-size form controls. */
@media(max-width:1100px) {
 .equipment-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 .atlas-v49-view[data-view="equipment"] .panel-form {grid-template-columns:minmax(0,1fr)!important}
 .atlas-v49-view[data-view="equipment"] .panel-form > * {min-width:0;max-width:100%;grid-column:auto!important}
}
@media(max-width:760px) {
  body.atlas-messenger-active .atlas-kaplya:not(.is-user-positioned) {top:calc(var(--atlas-chat-mobile-top,0px) + 5px)!important;right:12px!important}
  body.atlas-messenger-active.atlas-messenger-thread-open .atlas-kaplya:not(.is-user-positioned) {right:calc(50% - 20px)!important}
  .atlas-v49-view[data-view="clinicSchedule"] .atlas-v49-hero {padding-right:52px;min-height:56px}
  .schedule-board:has(.schedule-load-month) > .schedule-load-legend {flex-wrap:wrap;max-height:none;overflow:visible;gap:4px}
  .schedule-shell:has(.schedule-load-month) .schedule-load-key {min-height:26px;padding:2px 6px;font-size:11px}
  .content,.atlas-v49-body,.atlas-v49-card {min-width:0;max-width:100%}
  :is(.booking-controls,.statistics-controls) {display:grid;grid-template-columns:minmax(0,1fr)!important;gap:12px}
  :is(.booking-controls,.statistics-controls) .atlas-v49-field {min-width:0!important;max-width:100%}
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea {box-sizing:border-box;min-width:0;max-width:100%;font-size:16px}
  .schedule-hybrid-tabs {gap:2px;height:5px;min-height:5px;max-height:5px}.schedule-hybrid-tab {height:5px}
  .atlas-v49-hero h1 {font-size:22px!important}
}
@media print {.schedule-hybrid-tabs{display:none} [data-hybrid-record="true"] {print-color-adjust:exact;-webkit-print-color-adjust:exact}}
@media(max-width:360px) {
 .atlas-v49-view[data-view="clinicSchedule"] .atlas-v49-hero {padding-right:0;padding-bottom:48px!important}
 .schedule-load-month {grid-template-rows:24px repeat(var(--month-weeks,6),minmax(32px,1fr));overflow-y:auto}
}
/* The native account select stays first for existing authorization/navigation. */
.sidebar .atlas-mode-switch { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px; order:1; }
.sidebar .atlas-mode-switch button {padding:6px;font-size:14px;gap:4px;white-space:nowrap}
.sidebar .atlas-mode-switch button span {white-space:nowrap;overflow:visible;flex:0 1 auto}
.sidebar .atlas-mode-switch .atlas-mode-icon {width:14px;height:14px;flex-basis:14px}
.sidebar .account-switcher > .account-identity {order:0}
.sidebar .account-switcher > label {
  order:2;position:static;width:100%;height:auto;margin:0;clip:auto;overflow:visible;
  min-width:0;font-size:0;letter-spacing:0;gap:0;
}
.sidebar .account-switcher.is-personal > label {display:none}
.sidebar .account-switcher > .atlas-role-context {order:3}
.sidebar .account-switcher > label > select {
  position:static !important; width:100% !important;
  height:40px !important; min-width:0; max-width:100%; margin:0 !important;
  padding:6px 8px !important; clip:auto !important; overflow:visible !important;
  border:1px solid #718797 !important; border-radius:8px; background:#263b4b; color:#fff;
  font:inherit; font-size:14px;white-space:normal !important;letter-spacing:normal;text-transform:none;
}
@media(max-width:760px) {
 .sidebar {position:sticky;top:0;z-index:600;overflow:visible}
 body .atlas-v49-view, body.has-anesthesia-alarm .atlas-v49-view {top:var(--atlas-mobile-workspace-top,222px)}
 body.sidebar-open .sidebar {z-index:4700}
 body:not(.sidebar-open) .sidebar > .sidebar-drawer {visibility:hidden}
 .sidebar > .sidebar-drawer {overscroll-behavior:contain}
 /* Before drawer initialization (or if its script cannot load), native
    navigation remains usable in a compact row and participates in height. */
 .sidebar > nav {
   flex:0 0 auto;min-height:44px;min-width:0;max-width:100%;margin:0;padding:2px 6px;
   display:flex;flex-direction:row;gap:4px;overflow-x:auto;overflow-y:hidden;background:#243447
 }
 .sidebar > nav button {flex:0 0 auto;min-height:44px;min-width:0;padding:5px 9px}
 .sidebar > nav button small {display:none}
 .sidebar > .privacy-note {padding:4px 8px;margin:0;border-radius:0}
 .sidebar > .privacy-note :is(.creator-credit,.privacy-note-copy) {display:none}
 .sidebar:has(> .brand [data-entry-account-menu]) > .privacy-note {display:none}
 body.atlas-sidebar-light .sidebar > nav {background:#f4f6f8}
 .sidebar > .brand {position:static}
 .sidebar > .account-switcher {
   display:flex!important;flex-direction:column;gap:6px;position:static;
   z-index:39;width:100%;max-width:100%;margin:0;padding:8px 10px;
   border:0;border-radius:0;background:#243447;overflow:visible;
 }
 .sidebar > .account-switcher > :is(.account-identity,.atlas-role-context) {display:none}
 .sidebar > .account-switcher .atlas-mode-switch {margin:0;gap:8px}
 .sidebar > .account-switcher .atlas-mode-switch button {min-height:44px;justify-content:center;font-size:16px}
 .sidebar > .account-switcher > label > select {height:44px!important;font-size:16px}
 .schedule-toolbar .schedule-extra[open] {flex:1 1 100%;width:100%;min-width:0}
 .schedule-extra[open] .schedule-extra-menu {position:static;width:100%;min-width:0;box-sizing:border-box;margin-top:6px}
 .schedule-extra-menu .schedule-date-field {width:100%;max-width:100%;box-sizing:border-box}
 .schedule-extra-menu .schedule-date-field input {width:100%;max-width:100%;box-sizing:border-box;min-width:0}
}

/* Mobile endoscopy: readable navigation, optional legend, real row height. */
.schedule-month-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;min-width:0}
.schedule-month-heading .schedule-load-title {margin:0;min-width:0}
.schedule-colors-button,.schedule-journal-button {min-height:44px;padding:8px 12px;border:1px solid #c9dad7;border-radius:12px;background:#f7fbfa;color:#20584b;font-family:inherit;font-size:15px;font-weight:600;cursor:pointer}
.schedule-journal-button {margin-top:8px}
.schedule-journal-button[hidden] {display:none!important}
.schedule-colors-dialog {width:min(560px,calc(100vw - 24px));max-height:80dvh;overflow:auto;box-sizing:border-box}
.schedule-colors-dialog .schedule-load-legend {display:flex;flex-wrap:wrap;justify-content:flex-start;max-height:none;margin:16px 0}
.endoscopy-journal-dialog {width:min(920px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-sizing:border-box;color:#233546;background:#fff;padding:20px}
.endoscopy-journal-dialog h2 {font-size:24px;margin:16px 0 8px}
.endoscopy-journal-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}
.endoscopy-journal-fields>.endoscopy-journal-wide{grid-column:1/-1}
.endoscopy-journal-form{display:grid;gap:16px;min-width:0}
.endoscopy-journal-dialog .atlas-v49-field{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;max-width:100%;margin:0;align-content:end}
.endoscopy-journal-dialog .atlas-v49-field>span{font-size:14px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
.endoscopy-journal-dialog :is(input,select,textarea) {box-sizing:border-box;min-width:0;max-width:100%;font-size:16px}
.endoscopy-journal-dialog :is(input:not([type=checkbox]),select,textarea) {width:100%;border:1px solid #d7e2ec;border-radius:12px;padding:11px 12px;background:#fff;color:inherit;font-family:inherit;line-height:1.4}
.endoscopy-journal-dialog :is(input:not([type=checkbox]),select){height:48px;min-height:48px;margin:0}
.endoscopy-journal-dialog textarea{min-height:90px;resize:vertical}
.endoscopy-journal-form > button {margin:12px 8px 8px 0;min-height:44px}
.endoscopy-journal-services {border:1px solid #d8e4e0;border-radius:12px;min-width:0;padding:14px;margin:0}
.endoscopy-journal-services legend{font-size:14px;line-height:1.4;font-weight:600;padding:0 6px;max-width:100%;overflow-wrap:anywhere}
.endoscopy-journal-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.endoscopy-journal-services .endoscopy-journal-service {display:flex;align-items:flex-start;gap:10px;min-height:48px;min-width:0;padding:12px;border:1px solid #e2ebe7;border-radius:10px;background:#f8fbfa;line-height:1.4;margin:0}
.endoscopy-journal-service span{min-width:0;overflow-wrap:anywhere}
.endoscopy-journal-services input {width:22px;height:22px;min-height:22px;flex:0 0 22px;margin:0;accent-color:#25877f}
.endoscopy-journal-filters,.endoscopy-journal-pages {display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.endoscopy-journal-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}.endoscopy-journal-actions:has(>[hidden]:only-child){display:none}
.endoscopy-journal-dialog .endoscopy-journal-actions button,.endoscopy-journal-dialog .endoscopy-journal-filters button{width:auto;min-width:220px;min-height:44px;margin:0;align-self:end;box-sizing:border-box}
.endoscopy-journal-filters>label{flex:0 1 260px;min-width:0;margin:0}
@media(max-width:480px){.endoscopy-journal-dialog .endoscopy-journal-actions button,.endoscopy-journal-dialog .endoscopy-journal-filters button{width:100%;min-width:0}.endoscopy-journal-filters>label{flex-basis:100%}}
.endoscopy-journal-row {padding:12px;margin:10px 0;background:#f3f8f6;border:1px solid #d8e4e0;border-radius:12px;overflow-wrap:anywhere}
.endoscopy-journal-row p {margin:6px 0}
.endoscopy-journal-status {color:#285b4e}
.endoscopy-journal-dialog [hidden] {display:none!important}
@media(max-width:760px) {
 .sidebar-menu-toggle {align-items:center;flex-direction:row!important;flex-shrink:0;gap:7px!important;font-size:14px}
 .sidebar-menu-toggle svg {display:block;flex:0 0 22px}
 .sidebar-menu-toggle b {display:block;font-weight:600}
 .atlas-v49-view:has(.schedule-load-month) {height:auto!important;max-height:none!important;min-height:0!important;overflow:auto!important;display:block!important}
 .atlas-v49-body.schedule-shell:has(.schedule-load-month),.schedule-board:has(.schedule-load-month) {height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;flex:0 0 auto!important}
 .schedule-load-month {flex:none!important;height:auto!important;min-height:0!important;max-height:none!important;grid-template-rows:24px repeat(var(--month-weeks,6),72px)!important;overflow:visible!important;gap:4px!important;margin-top:10px}
 .schedule-load-month :is(.schedule-load-day,.booking-day-gap) {height:72px!important;min-height:72px!important;max-height:72px!important;box-sizing:border-box;overflow:hidden!important}
 .schedule-load-day .schedule-load-num {font-size:20px!important;line-height:24px!important}
 .schedule-load-day > :is(.schedule-load-badge,.schedule-load-halves) {margin-top:26px!important;min-height:0!important}
 .schedule-load-half .schedule-load-badge {margin-top:0!important;padding:0!important}
 .schedule-load-day .schedule-load-count {font-size:15px!important;line-height:18px!important}
 .schedule-load-day .schedule-load-caption {display:none!important}
 .schedule-month-heading .schedule-load-title {font-size:20px!important;line-height:1.2}
 .schedule-colors-button {white-space:nowrap;flex:0 0 auto}
 .endoscopy-journal-fields {grid-template-columns:repeat(2,minmax(0,1fr))}
 .endoscopy-journal-dialog {padding:14px}
}
@media(max-width:480px){.endoscopy-journal-service-grid{grid-template-columns:minmax(0,1fr)}.endoscopy-journal-fields{gap:12px}.endoscopy-journal-services{padding:10px}.endoscopy-journal-services .endoscopy-journal-service{padding:10px;font-size:14px}}
/* Reception closures use the approved compact form rhythm. */
.schedule-closure-flag{position:absolute;bottom:3px;left:3px;right:3px;z-index:4;background:#fff0e9;color:#8b3426;border-radius:4px;font-size:10px!important;line-height:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1px 3px}
.reception-block-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.reception-block-form label{min-width:0}.reception-block-form input,.reception-block-form select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;font-size:16px}.reception-block-row{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #dce5eb}.schedule-reception-warning{color:#8b3426;font-weight:700}.reception-block-dialog{max-height:90dvh;overflow:auto}.reception-block-form[hidden]{display:none}@media(max-width:600px){.reception-block-form{grid-template-columns:1fr}.reception-block-row{align-items:stretch;flex-direction:column}}
.access33-dialog [hidden],.stat-board [hidden]{display:none!important}
.access33-footer{position:sticky;bottom:-20px;z-index:10;background:#fff;border-top:1px solid #dce5eb;padding:10px 0;margin-top:12px;display:flex;justify-content:flex-end}
.access33-footer .access33-cancel{min-width:120px;margin:0}
.access33-dialog .access33-datetime,.access33-dialog label{min-width:0}
.schedule-closed-interval{position:absolute;left:0;right:0;z-index:1;box-sizing:border-box;pointer-events:none;background:repeating-linear-gradient(135deg,#f4e4deed 0 8px,#f9efeaed 8px 16px);border-block:1px solid #b66450;color:#783d2e;padding:5px;font-size:11px;line-height:1.25;overflow:hidden;overflow-wrap:anywhere}
.schedule-day-fully-closed{background:repeating-linear-gradient(135deg,#f1ded6 0 8px,#f9ede6 8px 16px)!important}
.schedule-day-fully-closed .schedule-closure-flag{white-space:normal;line-height:1.15!important}
.stat-board{grid-template-columns:minmax(0,1fr)!important}
.stat-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.stat-overview-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:8px;width:100%;height:154px;min-width:0;box-sizing:border-box;padding:16px;background:#fff;border:1px solid #cddde2;border-radius:14px;text-align:left;color:#203847;font:inherit;cursor:pointer;overflow:hidden}
.stat-overview-card:hover{background:#edf8f5;border-color:#88bcb0}
.stat-overview-card h3{font:600 17px/1.25 inherit;margin:0;color:#21483f;overflow-wrap:anywhere}
.stat-overview-summary{font-size:12px;line-height:1.4;color:#627680;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.stat-overview-card small{font-size:12px;color:#008a9d}
.stat-report-dialog{width:calc(100vw - 40px);max-width:1400px;height:calc(100dvh - 40px);max-height:calc(100dvh - 40px);box-sizing:border-box;padding:20px;border:1px solid #bdcfd5;border-radius:16px;background:#f5f8fa;color:#203847;font-family:inherit;overflow:auto}
.stat-report-dialog::backdrop{background:#17354488}
.stat-report-header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;z-index:3;background:#f5f8fa;padding:12px 0}
.stat-report-header h2{font-size:22px;overflow-wrap:anywhere;margin:0}
.stat-report-period{font-size:13px;color:#627680}
.stat-report-dialog .stat-card{font-family:inherit;min-width:0;container:none}
.stat-report-dialog .stat-card h3{display:none}
.stat-report-dialog .stat-card-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
.stat-report-dialog .stat-card-tools button{width:100%;height:44px;padding:5px;box-sizing:border-box;font:inherit;font-size:14px}
.stat-report-data{overflow:auto;max-width:100%;min-width:0}
.stat-report-dialog .stat-table{width:100%;border-collapse:collapse}
.stat-report-dialog .stat-table :is(td,th){padding:10px;overflow-wrap:anywhere;min-width:70px}
.stat-report-dialog .stat-chart{min-height:260px}
.telegram-guide p{white-space:pre-line;line-height:1.6}
.telegram-setup-warning{border-left:4px solid #dba732;padding:10px;background:#fff5d8}
.telegram-code{border:1px solid #9fcabd;border-radius:12px;padding:14px;margin-top:12px;overflow-wrap:anywhere}
.telegram-code a{display:block;min-height:44px;padding:10px;box-sizing:border-box;text-align:center;background:#e5f5ef;color:#205b4b;border-radius:8px}
.telegram-binding-dialog .atlas-v49-header .atlas-v49-back{display:none}
body.atlas-messenger-active .atlas-messenger-tools{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body.atlas-messenger-active .atlas-messenger-tool{width:100%;height:52px;min-height:52px;max-height:52px;min-width:0;padding:5px!important;margin:0!important;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;font-size:12px!important;line-height:1.2;display:flex;align-items:center;justify-content:center}
body.atlas-messenger-active .atlas-messenger-header-actions button{height:44px;min-width:100px;max-width:100%;box-sizing:border-box}
:is(.panel-actions,.schedule-toolbar-row,.statistics-toolbar,.access33-actions) button{box-sizing:border-box;min-width:0;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1100px){.stat-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
 .atlas-statistics .statistics-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 .atlas-statistics .statistics-tab{width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;padding:5px!important;font-size:12px!important;white-space:normal!important;overflow-wrap:anywhere}
 .atlas-statistics[data-statistics-tab="board"] .statistics-description{display:none}
 .atlas-statistics[data-statistics-tab="board"] .atlas-statistics-result{padding:10px!important}
 .stat-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stat-overview-card{height:112px;padding:10px}.stat-overview-card h3{font-size:14px}
 .stat-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.stat-filters label{width:100%;min-width:0}.stat-filters select{width:100%}
 .stat-report-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:12px;border-radius:0}
 .stat-report-header{top:-12px}.stat-report-header h2{font-size:18px}.stat-report-header button{min-height:44px;font-size:13px}
 .stat-report-dialog .stat-card-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat-report-dialog .stat-total{min-width:0}.stat-report-dialog .stat-totals{flex-wrap:wrap}.stat-report-dialog .stat-total strong{font-size:22px}
 .access33-dialog{padding:16px}.access33-footer{bottom:-16px}
}
@media print{
 body.stat-print-report>*:not(.stat-report-dialog){display:none!important}
 body.stat-print-report .stat-report-dialog{position:static;display:block;width:100%;height:auto;max-height:none;border:0;padding:0;overflow:visible}
 body.stat-print-report .stat-report-header button,body.stat-print-report .stat-card-tools{display:none!important}
 body.stat-print-report .stat-report-data{overflow:visible}
}
