/* Shared PWA finishing layer. Loaded after each screen's local styles. */
:root { --pwa-width: 480px; --pwa-control: 44px; }
html { scroll-padding-top: 108px; }
body { line-height: 1.45; }
body [hidden] { display: none !important; }
body :is(button, input, select, textarea) { font-family: inherit; }
body :is(button, summary, a.btn, .owner-link, .more-link, .schrow__edit, .rexp a,
  .obranch-chip, .cfilter__btn, .mchip--link, .operson__call, .srow__ava) {
  min-height: var(--pwa-control); touch-action: manipulation;
}
body :is(.theme-fab, .ohead__act, .odrawer__close, .operson__call) {
  width: 44px; height: 44px; flex-basis: 44px;
}
body :is(.obranch-chip, .cfilter__btn, .schrow__edit, .rexp a, .mchip--link, .owner-link) {
  display: inline-flex; align-items: center; justify-content: center;
}
body :is(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--primary-2); outline-offset: 3px;
}
/* Screen headings receive announcement focus, but are not interactive controls. */
body :is(h1, h2, .apphead__name, .screen)[tabindex="-1"]:focus { outline: none; }
body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  min-width: 0; max-width: 100%; min-height: 44px; font-size: 16px;
}
/* Keep native select menus and keyboard behavior, while the closed control follows the active theme. */
body select{appearance:auto;color-scheme:dark;background-color:var(--card-2)!important;color:var(--text)!important;border-color:var(--border)!important;accent-color:var(--primary-2)}
[data-theme=light] body select{color-scheme:light}
body select option{background:var(--card);color:var(--text)}
body select:focus{border-color:var(--primary-2)!important;box-shadow:0 0 0 3px var(--ring)!important}
body ::selection{background:var(--primary-2);color:#fff}
body :is(input, textarea) { scroll-margin-block: 112px; }
body :is(.oapp, .app, .setwrap, .sform, .aiwrap, .otab, .screen, .ocard,
  .field, .ff__grid > *, .daycorr__times > *, .brc__field) { min-width: 0; }
body :is(h1, h2, .lead, .sethead__t, .ohead__org, .mrow__name, .mrow__meta,
  .tr__name, .tr__desc, .tr__meta, .tr__cmt, .schrow__name, .schrow__time,
  .asg__cur, .sfield__t, .sfield__h, .lv-row__t, .lv-item__type, .dnav__t,
  .brc__name, .day-sub, .tl__t, .aimsg, .error, .smsg) { overflow-wrap: anywhere; }
body :is(.srow__name, .operson__name, .rrow__name, .asg__name) {
  white-space: normal; line-height: 1.35; overflow-wrap: anywhere;
}
body :is(.srow__meta, .operson__meta, .rrow__sub) { line-height: 1.45; overflow-wrap: anywhere; }
body .srow__body { min-width: 0; }
/* Live mobile component names share the same accessible responsive contracts. */
body .sc-row__name { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
body .sc-row__meta { display: block; overflow-wrap: anywhere; line-height: 1.45; }
body .sc-row__right { min-width: 0; max-width: 44%; }
body .sc-badge { max-width: 100%; white-space: normal; }
body .asg > .sc-row__body { flex-basis: 100%; }
body .sc-btn { min-height: 44px; }
body .sc-branch-assign { display: grid; gap: 8px; min-width: 0; }
body .srow__ava { min-width: 44px; }
body .srow { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 8px 12px; }
body .srow__ava { grid-row: 1 / span 2; }
body .srow .schip { grid-column: 2; margin: 0; justify-self: start; }
body .scode { flex-wrap: wrap; gap: 10px; }
body .scode__val { flex: 1 1 100%; }
body .scode__actions { width: 100%; margin-left: 0; gap: 8px; }
body .scode__actions > button { flex: 1; }
body .scode__actions form button { min-width: 44px; }
body .ssearch { width: 100%; }
body .apphead { gap: 10px; }
body .apphead__user .avatar { flex: 0 0 44px; width: 44px; height: 44px; }
body .apphead__name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
body .sfilter__btn { min-width: 64px; }
body .screen--entry form { display: flex; flex-direction: column; gap: 16px; }
body .screen--entry .brand { margin-bottom: 4px; }
body .screen--entry .owner-link { align-self: stretch; padding: 10px 0; line-height: 1.45; }
body button.owner-link { background: none; border: 0; font: inherit; color: var(--muted); }
body .screen--entry { padding-top: 48px; }
body .pwa-password-entry{position:relative}.pwa-password-entry input{padding-right:92px!important}.pwa-password-entry__toggle{position:absolute;top:50%;right:7px;width:auto;min-height:44px;padding:4px 8px;border:0;border-radius:7px;background:transparent;color:var(--primary-2);cursor:pointer;font:700 12px/1 inherit;transform:translateY(-50%)}.pwa-password-entry__toggle:hover,.pwa-password-entry__toggle:focus-visible{background:color-mix(in srgb,var(--primary-2) 14%,transparent)}
body .pwa-access-help{margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--card-2);color:var(--muted);font-size:13px;line-height:1.5}.pwa-access-help summary{display:flex;align-items:center;min-height:44px;color:var(--text);cursor:pointer;font-weight:700}.pwa-access-help p{margin:8px 0 0}
body .error { line-height: 1.5; border-radius: 12px; }
body .smsg { width: 100%; line-height: 1.5; }
body .errorlist { margin: 0; padding-left: 20px; }
body .oempty { font-size: 14px; line-height: 1.6; padding: 28px 18px; }
body .osection { font-weight: 700; letter-spacing: .04em; line-height: 1.5; }
body .ocard { box-shadow: 0 3px 14px rgba(0, 0, 0, .10); }
[data-theme=light] .ocard { box-shadow: 0 3px 14px rgba(15, 23, 42, .04); }
body .oinfo__row { gap: 16px; }
body .oinfo__row b { flex: 0 0 auto; max-width: 60%; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body .okpi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body .okpi__card { min-width: 0; padding: 16px 5px; }
body .okpi__l { font-size: 11px; }
body .olegend { gap: 8px 14px; flex-wrap: wrap; }
body .obar__btn { min-height: 52px; min-width: 0; font-size: 12px; line-height: 1.2; }
body .obar { padding-inline: max(8px, env(safe-area-inset-left)); }
body .odrawer { visibility: hidden; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
body .odrawer.is-open { visibility: visible; }
body .dnav__t { min-width: 0; }
body .sheet-back { padding-inline: max(12px, env(safe-area-inset-left)); }
body .sheet {
  max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow-y: auto;
  overscroll-behavior: contain; padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
body .sheet__title { line-height: 1.3; overflow-wrap: anywhere; }
body .sw { height: 44px; }
body .sw__t { top: 7px; bottom: 7px; }
body .sfield { gap: 12px; min-height: 64px; }
body .sfield__h { font-size: 13px; line-height: 1.5; }
body .ff__check { min-height: 44px; }
body .ff__check input { flex: 0 0 22px; }
body .ff label { line-height: 1.45; }
body .asg { flex-wrap: wrap; padding-block: 14px; gap: 10px; }
body .asg__l { flex-basis: 100%; }
body .asg > select, body .asg > .sc-select { flex: 1 1 100%; width: 100%; }
body .tr__top { flex-wrap: wrap; }
body .tr__top .st { margin-left: 17px; white-space: normal; }
body .tr__actions { flex-wrap: wrap; }
body .tr__actions > *, body .tr__actions form { min-width: 0; }
body .tret[open] { flex-basis: 100%; }
body .tret__form textarea {
  padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-2); color: var(--text); font: inherit;
}
body .aiwrap { width: 100%; }
body:has(.aiwrap) > .sethead { width: 100%; max-width: 680px; flex-shrink: 0; }
body .aibar textarea { width: 100%; min-width: 0; font-size: 16px; }
body .aimsg { max-width: 94%; }
body .aihint { font-size: 12px; }
body .aiquick__chip { min-height: 44px; }
body .aifeed { scroll-padding-block: 16px; }
body .radrow { min-width: 0; }
body .geosearch input { width: 100%; }
body .geosearch__btn { min-width: 64px; }
body .leaflet-container .leaflet-bar a, body .leaflet-container .leaflet-control-layers-toggle { width: 44px; height: 44px; line-height: 44px; }
body .maplegend { bottom: calc(18px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
body .mapempty { width: max-content; max-width: calc(100% - 32px); overflow-wrap: anywhere; }
body .rkpi, body .hist-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body .rkpi__c, body .hist-sum__item { min-height: 82px; padding: 14px 8px; }
body .rkpi__l, body .hist-sum__item span { font-size: 12px; }
body .rrow { align-items: flex-start; }
body .rrow__pct { max-width: 42%; }
body .rrow__stats { white-space: normal; line-height: 1.5; }
body .cal { gap: 3px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
body .cal__cell { min-height: 44px; aspect-ratio: auto; }
body .cal__cell--tap { padding: 0; font-family: inherit; }
body .pwa-offline {
  max-width: 680px; margin: 8px auto; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; background: var(--card-2); color: var(--warn);
  border: 1px solid var(--border);
}
body .pwa-skip {
  position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 12px 16px;
  color: var(--text); background: var(--card); border: 2px solid var(--primary-2);
  border-radius: 12px; transform: translateY(-180%);
}
body .pwa-skip:focus { transform: none; }
@media (max-width: 599px) {
  body .ohead { display: grid !important; grid-template-columns: 44px minmax(0, 1fr); gap: 10px !important; }
  body .ohead__acts { grid-column: 1 / -1; margin-left: 0; justify-content: flex-end; gap: 8px; }
  body .ohead__ttl .ohead__org { white-space: normal; font-size: 21px; line-height: 1.25; }
  body .ohead__kicker { margin-bottom: 4px; }
  body .sethead__t b { font-size: 18px; line-height: 1.3; }
  body .sethead__t span { font-size: 12px; line-height: 1.4; }
  body .operson__link { flex-wrap: wrap; column-gap: 10px; row-gap: 8px; }
  body .operson__right { flex-basis: 100%; text-align: left; padding-left: 50px; }
  body .operson__body { flex-basis: calc(100% - 50px); }
}
@media (max-width: 359px) {
  body .app { padding-inline: 12px; }
  body .oapp { padding-inline: 12px; }
  body .sethead { gap: 8px; padding-inline: 12px; }
  body .setwrap, body .sform { padding-inline: 12px; }
  body .schrow { flex-wrap: wrap; }
  body .sc-row:has(.schrow__actions) { flex-wrap: wrap; }
  body .sc-row:has(.schrow__actions) > .sc-row__body { flex-basis: 100%; }
  body .schrow__body { flex-basis: 100%; }
  body .schrow__actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  body .ff__grid { grid-template-columns: minmax(0, 1fr); }
  body .cal { gap: 2px; }
  body .hist-cal { padding: 10px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  body .oapp, body .sethead, body .setwrap, body .sform, body .sbar { max-width: 680px; }
  body .obar { max-width: 680px; }
  body .rkpi, body .hist-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
