/* src/core/shell.css */
/*
  MPRF UI shell (Stage 10.1)
  Goals:
  - reduce global style spillovers from index.html
  - make the "desktop compact" (windowed Telegram Desktop) layout stable
  - provide a single place for layout constants (max width/padding)

  IMPORTANT: keep this file tiny and boring.
*/

:root {
  --mprf-maxw: 720px;
  --mprf-maxw-outer: 744px; /* maxw + 2*pad-x */
  --mprf-pad-x: 12px;
  /* MPRF-BLK-BSA8K4P2 — shared mobile bottom-safe contract. */
  --mprf-safe-bottom: max(16px, var(--tg-content-safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
}

html,
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* MPRF-BLK-MDL5A7G2 — global modal background lock.
   Any semantic modal owns the page interaction layer; the document underneath must not
   scroll/rubber-band in Telegram iOS or MAX/Android WebViews. Modal cards keep their own
   explicit overflow/touch rules, so only the root document is frozen here. */
html:has([aria-modal="true"]),
body:has([aria-modal="true"]),
html:has([data-profi-modal-unified="true"]),
body:has([data-profi-modal-unified="true"]),
html:has([data-enterprise-modal-unified="true"]),
body:has([data-enterprise-modal-unified="true"]),
html:has([data-owner-wallet-overlay="true"]),
body:has([data-owner-wallet-overlay="true"]){
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

/* Telegram iOS WebView: remove gray native tap overlays across app controls. */
html, body, #root, #root *, button, input, textarea, select, a, label, [role="button"] {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
#root * {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
button, input, textarea, select, label, [role="button"] {
  -webkit-touch-callout: none;
}

/* predictable sizing (avoid random width/height changes across screens) */
.mprf-container,
.mprf-container * {
  box-sizing: border-box;
  font-synthesis: none;
}

.mprf-container {
  width: 100%;
  min-width: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}


.mprf-container button,
.mprf-container input,
.mprf-container textarea,
.mprf-container select,
.mprf-container [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.mprf-container button {
  -webkit-appearance: none;
  appearance: none;
}

/* prevent accidental "link-blue" in Telegram WebView, but only inside the app */
.mprf-container a {
  color: inherit;
  text-decoration: none;
}

/*
  Telegram Desktop: when user exits fullscreen, WebApp becomes a resizable "mini" window.
  Fixed overlays (#mprf-topbar/#mprf-top-blur) should stay aligned with the centered content.
*/
html[data-desktop-compact="1"] #mprf-topbar,
html[data-desktop-compact="1"] #mprf-top-blur {
  left: 50% !important;
  right: auto !important;
  width: min(480px, calc(100vw - 20px)) !important;
  transform: translateX(-50%) !important;
}

@keyframes mprfUrgentContourPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.00), 0 0 0 1px rgba(255, 59, 48, 0.26), 0 0 10px rgba(255, 59, 48, 0.10);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.22), 0 0 0 1px rgba(255, 59, 48, 0.52), 0 0 18px rgba(255, 59, 48, 0.22);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.00), 0 0 0 1px rgba(255, 59, 48, 0.26), 0 0 10px rgba(255, 59, 48, 0.10);
  }
}

.mprf-urgent-outline-btn {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  isolation: isolate;
  border-radius: inherit;
  animation: mprfUrgentContourPulse 1.4s ease-in-out infinite;
}

.mprf-urgent-outline-soft {
  overflow: hidden;
}

.mprf-urgent-outline-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 59, 48, 0.22);
}


.mprf-service-card-carousel {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  max-width: 100%;
  min-width: 0;
}

.mprf-service-card-carousel > * {
  flex-shrink: 0;
}

.mprf-service-card-carousel::-webkit-scrollbar {
  display: none;
}

@keyframes mprfServiceTitleMarquee {
  0%, 12% {
    transform: translateX(0);
  }
  88%, 100% {
    transform: translateX(calc(-1 * var(--mprf-service-title-shift, 0px)));
  }
}

.mprf-service-title-marquee {
  animation: mprfServiceTitleMarquee var(--mprf-service-title-duration, 11s) ease-in-out infinite alternate;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .mprf-service-title-marquee,
  .mprf-pending-clock-hand {
    animation: none;
  }
}

@keyframes mprfPendingClockTick {
  0%, 14% { transform: rotate(0deg); }
  50%, 64% { transform: rotate(145deg); }
  100% { transform: rotate(360deg); }
}
.mprf-pending-clock-hand {
  transform-origin: 12px 12px;
  animation: mprfPendingClockTick 3.6s ease-in-out infinite;
}

@keyframes mprfSpinSoft {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.mprf-change-status-loader,
.mprf-pencil-loader-ring {
  animation: mprfSpinSoft 0.9s linear infinite;
}


@keyframes mprfAddressMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mprf-address-marquee {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.mprf-address-static {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.mprf-address-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  animation: mprfAddressMarquee 10.5s linear infinite;
}

.mprf-address-marquee-item {
  display: inline-block;
  flex: 0 0 auto;
  padding-right: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .mprf-address-marquee-track {
    animation: none;
  }
}

@keyframes mprfStatusPillMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mprf-status-pill-marquee {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}

.mprf-status-pill-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: max-content;
  padding-right: 22px;
  animation: mprfStatusPillMarquee 7.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .mprf-status-pill-marquee-track {
    animation: none;
  }
}


@keyframes mprf-dismiss-hold-ring {
  0% { clip-path: inset(0 100% 0 0); opacity: .42; }
  72% { clip-path: inset(0 0 0 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes mprf-dismiss-hold-conic {
  0% { background: conic-gradient(from -90deg, rgba(255,59,48,.92) 0deg, transparent 0deg); opacity: .48; }
  25% { background: conic-gradient(from -90deg, rgba(255,59,48,.92) 90deg, transparent 91deg); opacity: .82; }
  50% { background: conic-gradient(from -90deg, rgba(255,59,48,.92) 180deg, transparent 181deg); opacity: 1; }
  75% { background: conic-gradient(from -90deg, rgba(255,59,48,.92) 270deg, transparent 271deg); opacity: 1; }
  100% { background: conic-gradient(from -90deg, rgba(255,59,48,.92) 360deg, transparent 360deg); opacity: 1; }
}

/* Extra guard: Telegram/iOS sometimes keeps gray tap overlays on nested inline nodes inside custom cards. */
html,
body,
#root,
#root *,
#root *::before,
#root *::after {
  -webkit-tap-highlight-color: transparent !important;
}
#root button,
#root a,
#root [role="button"],
#root label,
#root summary {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Enterprise battery saver.
   Keep functional states visible, but stop continuous motion and remove
   expensive compositor effects for the current owner/manager session. */
html[data-mprf-battery-saver="1"] .mprf-enterprise-workspace {
  scroll-behavior: auto !important;
}

/* Do not apply universal descendant overrides here. In WebKit a selector such
   as #root * invalidates style and compositor state for thousands of Finance
   nodes on every tab switch. Battery saver now disables only known continuous
   motion and expensive ambient layers, leaving ordinary cards/transitions on
   their stable compositor paths. */
html[data-mprf-battery-saver="1"] .mprf-subscription-bubble-pulse,
html[data-mprf-battery-saver="1"] .mprf-finance-due-pulse,
html[data-mprf-battery-saver="1"] .mprf-address-marquee-track,
html[data-mprf-battery-saver="1"] .mprf-status-pill-marquee-track,
html[data-mprf-battery-saver="1"] [data-mprf-decorative-motion="true"] {
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
}

html[data-mprf-battery-saver="1"] .mprf-summary-ambient,
html[data-mprf-battery-saver="1"] .mprf-summary-dot,
html[data-mprf-battery-saver="1"] .mprf-summary-scan,
html[data-mprf-battery-saver="1"] .mprf-summary-benchmark-orb,
html[data-mprf-battery-saver="1"] [data-mprf-decorative-motion="true"] {
  display: none !important;
}

html[data-mprf-battery-saver="1"] .mprf-workload-draw,
html[data-mprf-battery-saver="1"] .mprf-occupancy-progress,
html[data-mprf-battery-saver="1"] [data-mprf-animation-final="true"] {
  opacity: 1 !important;
  transform: none !important;
  stroke-dashoffset: 0 !important;
}

.mprf-sub-select{position:relative;min-width:0}.mprf-sub-select-btn{width:100%;min-height:42px;border-radius:13px;border:1px solid rgba(142,142,147,.25);background:rgba(255,255,255,.96);color:inherit;padding:0 10px 0 12px;font:12.4px -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;text-align:left}.mprf-sub-select-btn span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mprf-sub-select-menu{position:absolute;z-index:4;left:0;right:0;top:calc(100% + 6px);border-radius:14px;border:1px solid rgba(142,142,147,.25);background:rgba(255,255,255,.99);box-shadow:0 14px 34px rgba(0,0,0,.16);padding:4px;display:grid;gap:2px}.mprf-sub-select-menu button{min-height:34px;border:0;border-radius:10px;background:transparent;color:inherit;font:12px -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;text-align:left;padding:0 9px}.mprf-sub-select-menu button.is-active{background:rgba(10,132,255,.10);color:#0a84ff}.mprf-sub-lunch-switch{min-height:42px;border:0;background:transparent;color:inherit;display:inline-flex;align-items:center;gap:8px;justify-content:flex-start;font:610 10.7px -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;white-space:nowrap;cursor:pointer;padding:0 2px}.mprf-sub-lunch-switch>span{width:39px;height:22px;border-radius:999px;background:rgba(142,142,147,.25);position:relative;transition:background .16s ease;box-shadow:0 0 0 1px rgba(142,142,147,.20) inset}.mprf-sub-lunch-switch>span>i{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:999px;background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.20);transition:left .16s ease}.mprf-sub-lunch-switch.is-on>span{background:#34c759;box-shadow:0 0 0 1px rgba(52,199,89,.20) inset}.mprf-sub-lunch-switch.is-on>span>i{left:20px}.mprf-sub-lunch-switch:disabled{opacity:.55;cursor:default}
.mprf-sub-inbox{margin-bottom:12px;border-radius:20px;border:1px solid rgba(142,142,147,.25);background:rgba(255,255,255,.92);padding:12px;display:grid;gap:9px}.mprf-sub-inbox-title{font-size:14px;font-weight:650}.mprf-sub-inbox-muted{margin-top:2px;color:#8e8e93;font-size:10.8px}.mprf-sub-inbox-card{border-radius:15px;border:1px solid rgba(142,142,147,.25);padding:10px;display:grid;gap:8px}.mprf-sub-inbox-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.mprf-sub-inbox-row b{font-size:12.2px}.mprf-sub-inbox-row div div{margin-top:2px;color:#8e8e93;font-size:10.5px}.mprf-sub-inbox-row span{width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:rgba(255,159,10,.18);color:#d87d00}.mprf-sub-inbox-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mprf-sub-inbox-actions button{min-height:38px;border-radius:12px;font-family:var(--mprf-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif)}.mprf-sub-inbox-actions button:first-child{border:1px solid rgba(142,142,147,.25);background:transparent;color:#ff3b30}.mprf-sub-inbox-actions button:last-child{border:0;background:#0a84ff;color:#fff;font-weight:650}.mprf-sub-inbox-error{color:#ff3b30;font-size:11px}
.mprf-sub-overlay{position:fixed;inset:0;z-index:30120;display:grid;place-items:center;padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));font-family:var(--mprf-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.mprf-sub-overlay.is-light{background:rgba(15,23,42,.45)}.mprf-sub-overlay.is-dark{background:rgba(0,0,0,.72)}.mprf-sub-modal{width:min(1120px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:hidden;border-radius:28px;border:1px solid var(--sub-line);background:var(--sub-card);color:var(--sub-text);box-shadow:0 28px 90px rgba(0,0,0,.30);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}.mprf-sub-modal.is-history{grid-template-rows:auto minmax(0,1fr) auto}.mprf-sub-modal-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px 16px 12px;border-bottom:1px solid var(--sub-line)}.mprf-sub-modal-title{min-width:0}.mprf-sub-modal-title div{font-size:20px;font-weight:500;line-height:1.18;letter-spacing:-.012em}.mprf-sub-modal-title span{display:block;margin-top:4px;color:var(--sub-muted);font-size:12px;line-height:1.35;font-weight:400}.mprf-sub-close{width:40px;height:40px;border-radius:999px;border:1px solid var(--sub-line);background:var(--sub-soft);color:var(--sub-text);display:grid;place-items:center;padding:0}.mprf-sub-history{min-height:0;overflow:auto;padding:14px;display:grid;align-content:start;gap:10px;scrollbar-width:none;overscroll-behavior:contain}.mprf-sub-history.is-empty{align-content:center}.mprf-sub-history-alert{border-radius:17px;border:1px solid rgba(255,59,48,.24);background:rgba(255,59,48,.07);color:var(--sub-red);padding:10px;font-size:11.5px;line-height:1.35}.mprf-sub-history-card{border-radius:18px;border:1px solid var(--sub-line);background:var(--sub-soft);padding:12px;display:grid;gap:6px}.mprf-sub-history-card-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start}.mprf-sub-history-card-top b{font-size:14.2px}.mprf-sub-history-card-top small{display:block;margin-top:2px;color:var(--sub-muted);font-size:10.8px}.mprf-sub-history-card-top span{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:rgba(255,159,10,.13);color:#d87d00;padding:5px 8px;font-size:10px}.mprf-sub-history-card-main{color:var(--sub-text);font-size:12.2px;line-height:1.4}.mprf-sub-history-card-foot{color:var(--sub-muted);font-size:10.3px}.mprf-sub-empty{border-radius:18px;border:1px dashed var(--sub-line);padding:22px;text-align:center;color:var(--sub-muted);font-size:12px}.mprf-sub-controls{padding:10px 14px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:9px;border-bottom:1px solid var(--sub-line)}.mprf-sub-field{display:grid;gap:7px}.mprf-sub-field>div:first-child{color:var(--sub-muted);font-size:10.8px}.mprf-sub-field-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.mprf-sub-board{min-height:0;overflow:auto;padding:12px;display:grid;grid-template-columns:minmax(320px,1fr) minmax(420px,1fr);gap:12px;scrollbar-width:none;overscroll-behavior:contain}.mprf-sub-col{min-width:0;display:grid;align-content:start;gap:9px;border-radius:20px;border:1px solid var(--sub-line);background:var(--sub-column);padding:10px}/* C14437-028: substitution overlay uses its own bounded scroll contract.
   Keep the action footer reachable while expanded cards scroll inside the board. */
.mprf-sub-overlay,.mprf-sub-overlay *{box-sizing:border-box}
.mprf-sub-modal{min-height:0;max-height:calc(var(--mprf-platform-viewport-height,100dvh) - max(10px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)));}
.mprf-sub-modal-head,.mprf-sub-controls,.mprf-sub-footer{min-width:0;}
.mprf-sub-board,.mprf-sub-history{min-height:0;overflow-x:hidden;overflow-y:auto;max-height:min(520px,calc(var(--mprf-platform-viewport-height,100dvh) - 240px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.mprf-sub-footer{max-height:min(33dvh,240px);overflow-y:auto;overscroll-behavior:contain;}
@media(max-width:760px){
  .mprf-sub-modal{min-width:0;max-width:100%;}
  .mprf-sub-board,.mprf-sub-history{max-height:100%;}
  .mprf-sub-controls{overflow-x:hidden;}
  .mprf-sub-field-row{grid-template-columns:minmax(0,1fr) auto;}
}
/* C14437-028 / BLK-14438-SUB-VIEWPORT: one modal geometry contract.
   MAX uses the WebView content viewport; TG reserves the native host chrome.
   The former MAX 10px !important and later mobile 90px !important rules
   contradicted each other, leaving the MAX sheet below the visible edge. */
.mprf-sub-overlay{
  --mprf-sub-top: max(10px,env(safe-area-inset-top,0px));
  --mprf-sub-bottom: max(12px,env(safe-area-inset-bottom,0px));
  padding:var(--mprf-sub-top) 10px var(--mprf-sub-bottom);
}
@media(max-width:760px){
  .mprf-sub-overlay{
    --mprf-sub-top:max(90px,calc(var(--tg-content-safe-area-inset-top,0px) + 54px),calc(var(--tg-safe-area-inset-top,0px) + 54px),calc(env(safe-area-inset-top,0px) + 58px));
    place-items:start center;overflow:hidden;
  }
  html[data-mprf-platform="max"] .mprf-sub-overlay{
    --mprf-sub-top:max(10px,env(safe-area-inset-top,0px));
    /* P22: portal backdrop and the sheet must share the actual visible MAX
       viewport, not the taller layout viewport behind native messenger chrome. */
    inset:auto;
    top:var(--mprf-platform-viewport-top,0px);
    left:var(--mprf-platform-viewport-left,0px);
    width:var(--mprf-platform-viewport-width,100vw);
    height:var(--mprf-platform-viewport-height,100dvh);
  }
  .mprf-sub-modal{
    width:100%;max-width:100%;min-height:0;
    max-height:max(0px,calc(var(--mprf-platform-viewport-height,100dvh) - var(--mprf-sub-top) - var(--mprf-sub-bottom)));
    border-radius:26px;
  }
  .mprf-sub-modal-head{padding:14px}
  .mprf-sub-modal-title div{font-size:18px;font-weight:500}
  .mprf-sub-modal-title span{font-size:11.8px}
  .mprf-sub-history{padding:10px}
  .mprf-sub-controls,.mprf-sub-board{grid-template-columns:1fr}
  .mprf-sub-board{overflow:auto}
}
.mprf-sub-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border-radius:15px;border:1px solid var(--sub-line);background:rgba(118,118,128,.07)}.mprf-sub-seg button{min-height:34px;border:0;border-radius:11px;background:transparent;color:inherit;font:500 11.2px -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;padding:0 8px;cursor:pointer}.mprf-sub-seg button.is-active{background:var(--sub-blue);color:#fff;font-weight:650}

.mprf-sub-unresolved,.mprf-sub-alt-list{display:grid;gap:6px}.mprf-sub-alt-list{gap:5px}.mprf-sub-unresolved button{font-family:inherit}.mprf-sub-alt-open,.mprf-sub-cancel-open{min-height:32px;border-radius:10px;font-size:10.4px;background:transparent}.mprf-sub-alt-open{border:1px solid color-mix(in srgb,var(--sub-blue) 27%,transparent);background:color-mix(in srgb,var(--sub-blue) 8%,transparent);color:var(--sub-blue);font-weight:650}.mprf-sub-cancel-open{min-height:31px;border:1px solid color-mix(in srgb,var(--sub-red) 25%,transparent);background:color-mix(in srgb,var(--sub-red) 6%,transparent);color:var(--sub-red);font-size:10.2px}.mprf-sub-alt-option{min-height:36px;border-radius:10px;border:1px solid var(--sub-line);background:var(--sub-soft);color:var(--sub-text);padding:6px 8px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;text-align:left;font-size:10.2px}.mprf-sub-alt-option small{display:block;margin-top:2px;color:var(--sub-muted)}.mprf-sub-alt-option em{color:var(--sub-blue);font-style:normal;font-weight:680}.mprf-sub-cancel-confirm{border-radius:11px;border:1px solid color-mix(in srgb,var(--sub-red) 25%,transparent);background:color-mix(in srgb,var(--sub-red) 7%,transparent);padding:7px;display:grid;gap:6px;color:var(--sub-text);font-size:10.2px;line-height:1.35}.mprf-sub-cancel-confirm>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:6px}.mprf-sub-cancel-confirm button{min-height:30px;border-radius:9px}.mprf-sub-cancel-confirm button:first-child{border:1px solid var(--sub-line);background:var(--sub-soft);color:var(--sub-text)}.mprf-sub-cancel-confirm button:last-child{border:0;background:var(--sub-red);color:#fff;font-weight:650}
.mprf-sub-case-tabs,.mprf-sub-pills{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}.mprf-sub-case-tabs button{flex:0 0 auto;min-height:34px;border-radius:12px;border:1px solid var(--sub-line);background:var(--sub-soft);color:var(--sub-text);padding:0 9px;font:10.4px inherit}.mprf-sub-case-tabs button.is-active{border-color:var(--sub-blue);background:color-mix(in srgb,var(--sub-blue) 9%,transparent)}.mprf-sub-col-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.mprf-sub-col-head b{font-size:13.5px;font-weight:650}.mprf-sub-col-head span{display:block;margin-top:2px;color:var(--sub-muted);font-size:10.7px}.mprf-sub-col-head>i{min-width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:color-mix(in srgb,var(--sub-red) 10%,transparent);color:var(--sub-red);font:700 11px inherit}.mprf-sub-loading{color:var(--sub-muted);padding:14px}.mprf-sub-slot-card{border-radius:16px;border:1px solid var(--sub-line);background:color-mix(in srgb,var(--sub-card) 88%,transparent);padding:10px;display:grid;gap:7px}.mprf-sub-slot-card.is-selected{border-color:var(--sub-blue);background:color-mix(in srgb,var(--sub-blue) 8%,transparent)}.mprf-sub-slot-card.is-assigned{border-color:color-mix(in srgb,var(--sub-green) 35%,transparent)}.mprf-sub-slot-card.is-manual{cursor:grab}.mprf-sub-slot-main{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:start}.mprf-sub-slot-main>b{color:var(--sub-blue);font-size:12.5px;font-weight:720}.mprf-sub-slot-main>div{min-width:0}.mprf-sub-slot-main strong{display:block;font-size:12.4px;font-weight:650}.mprf-sub-slot-main span{display:block;margin-top:2px;color:var(--sub-muted);font-size:10.5px}.mprf-sub-slot-main em{color:var(--sub-muted);font:normal 10px inherit}.mprf-sub-slot-status,.mprf-sub-slot-assigned{display:flex;align-items:center;gap:6px;border-radius:11px;padding:6px 8px;font-size:10.5px}.mprf-sub-slot-status.is-accepted,.mprf-sub-slot-assigned{background:color-mix(in srgb,var(--sub-green) 9%,transparent);color:var(--sub-green)}.mprf-sub-slot-status.is-declined{background:color-mix(in srgb,var(--sub-red) 8%,transparent);color:var(--sub-red)}.mprf-sub-slot-status.is-pending,.mprf-sub-slot-status.is-pending_client{background:rgba(255,159,10,.12);color:#d87d00}.mprf-sub-slot-assigned{justify-content:space-between}.mprf-sub-slot-assigned button{border:0;background:transparent;color:var(--sub-red);padding:2px}.mprf-sub-manual-hint{color:var(--sub-muted);font-size:10.3px}.mprf-sub-employee-card{border-radius:16px;border:1px solid var(--sub-line);background:color-mix(in srgb,var(--sub-card) 90%,transparent);padding:10px;display:grid;gap:7px}.mprf-sub-employee-card.is-assigned{border-color:color-mix(in srgb,var(--sub-green) 35%,transparent)}.mprf-sub-employee-card.is-disabled{background:rgba(118,118,128,.12);opacity:.52}.mprf-sub-employee-card.is-clickable{cursor:pointer}.mprf-sub-employee-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:start}.mprf-sub-employee-top>div{min-width:0}.mprf-sub-employee-top>div>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.mprf-sub-employee-top b{font-size:12.6px}.mprf-sub-employee-top>div>div>span{width:23px;height:23px;border-radius:999px;display:grid;place-items:center;background:rgba(255,159,10,.18);color:#d87d00}.mprf-sub-employee-top small{display:block;margin-top:2px;color:var(--sub-muted);font-size:10.4px}.mprf-sub-employee-top>em{border-radius:999px;padding:3px 7px;background:rgba(255,159,10,.12);color:#d87d00;font:650 9.6px inherit}.mprf-sub-employee-top>em.is-working{background:color-mix(in srgb,var(--sub-green) 10%,transparent);color:var(--sub-green)}.mprf-sub-employee-meta{display:flex;gap:7px;flex-wrap:wrap;color:var(--sub-muted);font-size:10.2px}.mprf-sub-employee-meta span:last-child:not(:first-child){color:var(--sub-green)}.mprf-sub-phone{justify-self:start;min-height:27px;border-radius:10px;border:1px solid var(--sub-line);background:transparent;color:var(--sub-muted);display:inline-flex;align-items:center;gap:5px;padding:0 7px;font:9.8px inherit}.mprf-sub-unavailable{color:var(--sub-red);font-size:9.8px;line-height:1.35}.mprf-sub-footer{border-top:1px solid var(--sub-line);padding:10px 14px 12px;display:grid;gap:8px}.mprf-sub-pill{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 8px;font-size:9.8px;border:1px solid rgba(255,159,10,.30);background:rgba(255,159,10,.09);color:#d87d00}.mprf-sub-pill.is-accepted{border-color:color-mix(in srgb,var(--sub-green) 30%,transparent);background:color-mix(in srgb,var(--sub-green) 9%,transparent);color:var(--sub-green)}.mprf-sub-pill.is-declined{border-color:color-mix(in srgb,var(--sub-red) 28%,transparent);background:color-mix(in srgb,var(--sub-red) 8%,transparent);color:var(--sub-red)}.mprf-sub-error{color:var(--sub-red);font-size:11.5px}.mprf-sub-notice{color:var(--sub-green);font-size:11.5px}.mprf-sub-commit{min-height:44px;width:100%;border-radius:14px;border:0;background:var(--sub-soft);color:var(--sub-muted);font-weight:650}.mprf-sub-commit.is-active{background:var(--sub-blue);color:#fff}.mprf-sub-commit:disabled{opacity:.58}

.mprf-sub-select svg{transition:transform .16s ease}.mprf-sub-select svg.is-open{transform:rotate(180deg)}

/* Security modal stack: explicit-close only, body-portal ownership and a
   single centered sheet over a blurred backdrop. Nested settings must never
   turn into a second opaque full-screen page or expose gaps while inputs focus. */
.mprf-security-modal-backdrop{
  width:100vw;
  height:100dvh;
  overscroll-behavior:none;
  touch-action:manipulation;
  overflow:hidden;
  pointer-events:auto;
  isolation:isolate;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.mprf-security-modal-card{
  box-sizing:border-box;
  overscroll-behavior:contain;
  scroll-padding-block:12px;
  -webkit-overflow-scrolling:touch;
}
.mprf-security-modal-card button,
.mprf-security-modal-card input,
.mprf-security-modal-card textarea,
.mprf-security-modal-card select{
  font-family:inherit!important;
}
.mprf-security-modal-card input{
  -webkit-appearance:none!important;
  appearance:none!important;
  scroll-margin:0!important;
  background-clip:padding-box!important;
}
.mprf-security-modal-card input:focus{
  outline:none!important;
  box-shadow:none!important;
  filter:none!important;
}
@media(max-width:760px){
  .mprf-security-modal-backdrop{
    position:fixed!important;
    inset:0!important;
    width:auto!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:none!important;
    display:grid!important;
    place-items:center!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important;
  }
  .mprf-security-modal-card{
    position:relative!important;
    width:min(388px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - max(28px,calc(env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px)))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    border-color:rgba(142,142,147,.22)!important;
    background:var(--mprf-security-surface,#fff)!important;
    transform:translateZ(0)!important;
  }
  .mprf-totp-enrollment-card{
    scroll-behavior:smooth;
  }
}
/* Visually hidden scrollbars while keeping touch/mouse scrolling available. */
.mprf-scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mprf-scrollbar-hidden::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


/* Profile shortcut lists: iOS-style inset grouped visual shell.
   Content, order, labels, descriptions and icon dimensions remain unchanged. */
.mprf-inset-list-card {
  border-radius: 20px !important;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.mprf-inset-list-card[data-theme="light"] {
  background: rgba(255, 255, 255, .90) !important;
  border: 1px solid rgba(60, 60, 67, .105) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .84),
    0 1px 2px rgba(15, 23, 42, .035),
    0 10px 28px rgba(15, 23, 42, .045) !important;
}

.mprf-inset-list-card[data-theme="dark"] {
  background: rgba(28, 28, 30, .92) !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 12px 30px rgba(0, 0, 0, .18) !important;
}

/* Grouped profile rows already have a wrapper in the existing layout. Modern
   Telegram WebViews support :has(); older clients keep the previous wrapper
   styling rather than losing the standalone-card fallback above. */
@supports selector(div:has(> button)) {
  .mprf-container div:has(> .mprf-inset-list-row) {
    border-radius: 20px !important;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  }

  .mprf-container div:has(> .mprf-inset-list-row[data-theme="light"]) {
    background: rgba(255, 255, 255, .90) !important;
    border: 1px solid rgba(60, 60, 67, .105) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .84),
      0 1px 2px rgba(15, 23, 42, .035),
      0 10px 28px rgba(15, 23, 42, .045) !important;
  }

  .mprf-container div:has(> .mprf-inset-list-row[data-theme="dark"]) {
    background: rgba(28, 28, 30, .92) !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .055),
      0 12px 30px rgba(0, 0, 0, .18) !important;
  }
}

.mprf-inset-list-row {
  position: relative;
  z-index: 0;
  transition: background-color 110ms ease, opacity 110ms ease;
  transform: translateZ(0);
}

.mprf-inset-list-row[data-divider="1"]::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: var(--mprf-inset-divider-left, 55px);
  right: 0;
  height: .5px;
  pointer-events: none;
  transform: translateZ(0);
}

.mprf-inset-list-row[data-theme="light"][data-divider="1"]::before {
  background: rgba(60, 60, 67, .16);
}

.mprf-inset-list-row[data-theme="dark"][data-divider="1"]::before {
  background: rgba(84, 84, 88, .58);
}

.mprf-inset-list-row:not(:disabled):active {
  background: rgba(120, 120, 128, .115) !important;
}

@media (hover: hover) and (pointer: fine) {
  .mprf-inset-list-row:not(:disabled):hover {
    background: rgba(120, 120, 128, .07) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mprf-inset-list-card,
  .mprf-inset-list-row {
    transition: none;
  }
}

/* v1.9.995.12: keep every profile shortcut chevron on one shared iOS-style box. */
.mprf-inset-chevron-box {
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 24px !important;
  flex: 0 0 16px !important;
}
.mprf-inset-chevron {
  width: 7px !important;
  min-width: 7px !important;
  max-width: 7px !important;
  height: 12px !important;
  transform: none !important;
}
/* MPRF-BLK-RDM5F8Q2 — old Android/Redmi WebView may paint its native orange
   focus ring after a touch on the client-search card. Suppress that touch-era
   UA outline while retaining an explicit keyboard focus indicator where
   :focus-visible is supported. */
.mprf-client-search-master-card:focus,
.mprf-client-search-open-button:focus {
  outline: none !important;
}
@supports selector(:focus-visible) {
  .mprf-client-search-master-card:focus-visible,
  .mprf-client-search-open-button:focus-visible {
    outline: 2px solid rgba(52, 199, 89, .38) !important;
    outline-offset: 1px;
  }
  @media (hover: none) and (pointer: coarse) {
    .mprf-client-search-master-card:focus-visible,
    .mprf-client-search-open-button:focus-visible {
      outline: none !important;
    }
  }
}



/* MPRF-BLK-RDM6T2V7 — legacy Android/WebView pointer-focus cleanup.
   Input modality is set before focus by core/toast.js. Suppress only browser
   native outlines reached by pointer/touch; keyboard focus remains untouched. */
html[data-mprf-input-modality="pointer"] .mprf-container button:focus,
html[data-mprf-input-modality="pointer"] .mprf-container a[href]:focus,
html[data-mprf-input-modality="pointer"] .mprf-container summary:focus,
html[data-mprf-input-modality="pointer"] .mprf-container [role="button"]:focus,
html[data-mprf-input-modality="pointer"] .mprf-container [role="tab"]:focus,
html[data-mprf-input-modality="pointer"] .mprf-container [role="menuitem"]:focus,
html[data-mprf-input-modality="pointer"] .mprf-container [tabindex]:not([tabindex="-1"]):focus {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* MPRF-BLK-CMX6T8Q4 — client portals render under <body>, outside .mprf-container.
   Old Redmi WebView keeps an orange UA focus ring after touch; suppress it only
   in pointer modality so keyboard focus accessibility remains intact. */
html[data-mprf-input-modality="pointer"] .mprf-client-modal-portal button:focus,
html[data-mprf-input-modality="pointer"] .mprf-client-modal-portal a[href]:focus,
html[data-mprf-input-modality="pointer"] .mprf-client-modal-portal [role="button"]:focus,
html[data-mprf-input-modality="pointer"] .mprf-client-modal-portal [tabindex]:not([tabindex="-1"]):focus {
  outline: none !important;
  box-shadow: none;
}

/* MPRF-BLK-MODAL14424 */
@keyframes mprf-booking-change-spin { to { transform: rotate(360deg); } }

/* MPRF-MAX-BLK-14436-S269-LOWPOWER: avoid large GPU backdrop textures
   on old/low-memory Android MAX WebViews. Dim layers and hit targets remain. */
html[data-mprf-platform="max"][data-mprf-low-power="1"] .mprf-security-modal-backdrop,
html[data-mprf-platform="max"][data-mprf-low-power="1"] .mprf-sub-overlay,
html[data-mprf-platform="max"][data-mprf-low-power="1"] [data-max-notes-editor-overlay="true"] {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* MPRF-BLK-14436-S270: MAX small-screen employee name fields. Only <=360px. */
@media (max-width:360px) {
  [data-max-employee-name-fields="true"] { grid-template-columns: minmax(0,1fr) !important; }
}

/* P36/N09: MAX enterprise filters now have one layout contract in businessChats.css.
   Removed conflicting 34px/6px duplicated rules from the general shell. */
html[data-mprf-platform="max"] .mprf-sub-overlay {
 -webkit-backdrop-filter:blur(16px)!important;backdrop-filter:blur(16px)!important;
}

/* src/core/modalCenteringContracts.css */
/* MPRF-BLK-MODC14444 — content-centered modal geometry contract.
   Short AND dynamically growing sheets share the exact center of the already
   accepted available content rectangle, not the physical device screen.
   Existing platform boundaries remain owned by the prior modal CSS and MAX
   viewport bridge. Full-page workspaces, wallets, lightboxes and keyboards are
   deliberately not converted into dialog sheets. */
@media (max-width: 760px), (pointer: coarse) {
  html:not([data-mprf-platform="max"]) :is(.mprf-profi-modal-overlay,[data-profi-modal-unified="true"]):has(> :is(.mprf-profi-modal-sheet,[data-profi-modal-sheet="true"])) {
    align-items: center !important;
    justify-content: center !important;
    padding-top: var(--mprf-profi-modal-safe-top) !important;
    padding-bottom: var(--mprf-profi-modal-safe-bottom) !important;
  }
  html[data-mprf-platform="max"] :is(.mprf-profi-modal-overlay,[data-profi-modal-unified="true"]):has(> :is(.mprf-profi-modal-sheet,[data-profi-modal-sheet="true"])) {
    align-items: center !important;
    justify-content: center !important;
    padding-top: var(--mprf-unified-sheet-top) !important;
    padding-bottom: var(--mprf-unified-sheet-bottom) !important;
    height: var(--mprf-platform-viewport-height,100dvh) !important;
    max-height: var(--mprf-platform-viewport-height,100dvh) !important;
  }
  :is(.mprf-profi-modal-overlay,[data-profi-modal-unified="true"]) > :is(.mprf-profi-modal-sheet,[data-profi-modal-sheet="true"]) {
    flex-shrink: 1 !important;
    min-height: 0;
    scrollbar-width: none;
    overscroll-behavior-y: contain;
  }
  /* Other standalone app dialogs (client, PRO, enterprise and admin) built
     with a presentation backdrop and an immediately nested dialog. This is a
     positioning-only rule: it intentionally does not override any accepted
     padding, modal dimensions, overlay top/bottom or host viewport values. */
  [role="presentation"]:has(> [role="dialog"][aria-modal="true"]):not([data-mprf-fullscreen="true"]):not([data-owner-wallet-overlay="true"]) {
    align-items: center !important;
    justify-items: center !important;
    place-items: center !important;
  }
  /* Legacy fixed-backdrop dialogs without a class on the outer wrapper:
     select only an immediate canonical sheet / semantic dialog. Computed
     position is fixed and the existing inset/padding stays completely intact.
     This bridges old Enterprise, Personal Profi and client modal entry points
     without centering arbitrary app layout containers, toast hosts, lightboxes
     or toolbars. */
  [style*="position: fixed"]:has(> .mprf-enterprise-modal-shell),
  [style*="position: fixed"]:has(> [role="dialog"][aria-modal="true"]) {
    align-items: safe center !important;
    justify-content: center !important;
    justify-items: center !important;
    place-items: safe center !important;
  }
  /* Enterprise: use each platform's currently accepted margin. TG had the
     88px top host clearance; MAX had 6px / 10px in maxEnterpriseGeometry.js. */
  html:not([data-mprf-platform="max"]) .mprf-enterprise-modal-overlay:has(> .mprf-enterprise-modal-shell) {
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
  }
  html[data-mprf-platform="max"] .mprf-enterprise-modal-overlay:has(> .mprf-enterprise-modal-shell) {
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
  }
  .mprf-enterprise-modal-overlay > .mprf-enterprise-modal-shell {
    min-height: 0;
    overscroll-behavior-y: contain;
  }
  /* Employee substitution: long workspaces have a bounded internal scroll.
     Keep existing variable insets but center the growing sheet. */
  .mprf-sub-overlay:has(> .mprf-sub-modal) {
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
  }
}

/* MPRF-BLK-QA14444: role-promo sheets are bounded in the actual host-safe rectangle.
   Keep the prior native Telegram top clearance, host viewport and bottom safe inset. */
html:not([data-mprf-platform="max"]) {
  --mprf-role-promo-top: var(--mprf-profi-modal-safe-top);
  --mprf-role-promo-bottom: max(14px,var(--tg-content-safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px),calc(env(safe-area-inset-bottom,0px) + 12px));
}
html[data-mprf-platform="max"] {
  --mprf-role-promo-top: max(12px,var(--mprf-platform-modal-top,0px),env(safe-area-inset-top,0px));
  --mprf-role-promo-bottom: max(12px,env(safe-area-inset-bottom,0px));
}
.mprf-role-promo-overlay {
  box-sizing:border-box;
  overflow:hidden;
  min-height:0;
  height:var(--mprf-platform-viewport-height,100dvh);
  max-height:var(--mprf-platform-viewport-height,100dvh);
}
.mprf-role-promo-overlay > .mprf-scrollless {min-height:0!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.mprf-client-modal-portal, .mprf-client-modal-portal button, .mprf-client-modal-portal input {font-family:var(--mprf-font-family,-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Arial,sans-serif)!important;font-synthesis:none;}


/* MPRF-BLK-GEOMETRY14444-296342 — ONLY the OUTER geometry of ordinary pop-up sheets.
   One mobile sheet width for client, Personal Profi, Enterprise and security.
   This is NOT a typography, colour, header, content or behavior migration.
   Exclude true workspaces (tasks, employee substitution board, chat threads),
   keyboards, native pickers, lightboxes, wallets and fullscreen media.
   Keep the previously accepted TG/MAX top/bottom clearance variables. */
@media (max-width: 760px), (pointer: coarse) {
  :root {
    --mprf-unified-sheet-width: min(560px, calc(100vw - 24px));
  }
  html:not([data-mprf-platform="max"]) {
    --mprf-unified-sheet-top: var(--mprf-profi-modal-safe-top);
    --mprf-unified-sheet-bottom: max(14px, var(--tg-content-safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  }
  html[data-mprf-platform="max"] {
    --mprf-unified-sheet-top: max(12px, var(--mprf-platform-modal-top, 0px), env(safe-area-inset-top, 0px));
    --mprf-unified-sheet-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  /* These containers host *ordinary* dialogs, not document-sized screens. */
  html :is(
    .mprf-client-modal-portal,
    .mprf-enterprise-modal-overlay,
    .mprf-profi-modal-overlay,
    [data-profi-modal-unified="true"],
    .mprf-security-modal-backdrop,
    .mprf-autoslots-modal-overlay,
    .mprf-efficiency-modal-overlay,
    .mprf-workload-modal-overlay,
    .mprf-enterprise-datetime-overlay,
    .mprf-enterprise-text-entry-overlay,
    .mprf-photo-control-modal-overlay,
    .mprf-prebooking-overlay,
    .mprf-public-enterprise-overlay,
    .mprf-business-sphere-overlay,
    .mprf-business-application-preview-overlay,
    .mprf-role-promo-overlay,
    .enterprise-admin__modal-backdrop
  ) {
    box-sizing: border-box !important;
    padding-inline: 12px !important;
    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;
    place-items: center !important;
    height: var(--mprf-platform-viewport-height, 100dvh) !important;
    max-height: var(--mprf-platform-viewport-height, 100dvh) !important;
  }
  /* Existing platform clearance wins; never extend a sheet into TG chrome. */
  html:not([data-mprf-platform="max"]) :is(
    .mprf-client-modal-portal,
    .mprf-enterprise-modal-overlay,
    .mprf-security-modal-backdrop,
    .mprf-autoslots-modal-overlay,
    .mprf-efficiency-modal-overlay,
    .mprf-workload-modal-overlay,
    .mprf-enterprise-datetime-overlay,
    .mprf-enterprise-text-entry-overlay,
    .mprf-photo-control-modal-overlay,
    .mprf-prebooking-overlay,
    .mprf-public-enterprise-overlay,
    .mprf-business-sphere-overlay,
    .mprf-business-application-preview-overlay,
    .enterprise-admin__modal-backdrop
  ) {
    padding-top: var(--mprf-unified-sheet-top) !important;
    padding-bottom: var(--mprf-unified-sheet-bottom) !important;
  }
  /* MAX stays inside its existing mini-app viewport, not TG full screen. */
  html[data-mprf-platform="max"] :is(
    .mprf-client-modal-portal,
    .mprf-enterprise-modal-overlay,
    .mprf-security-modal-backdrop,
    .mprf-autoslots-modal-overlay,
    .mprf-efficiency-modal-overlay,
    .mprf-workload-modal-overlay,
    .mprf-enterprise-datetime-overlay,
    .mprf-enterprise-text-entry-overlay,
    .mprf-photo-control-modal-overlay,
    .mprf-prebooking-overlay,
    .mprf-public-enterprise-overlay,
    .mprf-business-sphere-overlay,
    .mprf-business-application-preview-overlay,
    .enterprise-admin__modal-backdrop
  ) {
    padding-top: var(--mprf-unified-sheet-top) !important;
    padding-bottom: var(--mprf-unified-sheet-bottom) !important;
  }
  /* More ordinary dialog families: client recovery/proposal and chat cards.
     These were previously absent from the older shared center contract. */
  html :is(
    [data-mprf-decline-recovery="true"],
    [data-mprf-proposal-modal="true"],
    .bec-tag-info-backdrop,
    .bec-calendar-backdrop,
    .bec-support-peer-overlay
  ) {
    box-sizing: border-box !important;
    height: var(--mprf-platform-viewport-height, 100dvh) !important;
    max-height: var(--mprf-platform-viewport-height, 100dvh) !important;
    padding: var(--mprf-unified-sheet-top) 12px var(--mprf-unified-sheet-bottom) !important;
    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;
    place-items: center !important;
  }
  /* Cards only. In particular, NEVER set a width on the backdrop itself. */
  html :is(
    .mprf-profi-modal-sheet,
    [data-profi-modal-sheet="true"],
    .mprf-enterprise-modal-shell,
    .mprf-security-modal-card,
    .mprf-efficiency-modal-shell,
    .mprf-workload-modal-shell,
    .mprf-enterprise-datetime-shell,
    .mprf-autoslots-modal-overlay > section,
    .mprf-role-promo-overlay > .mprf-scrollless,
    .mprf-public-enterprise-panel,
    .mprf-prebooking-panel,
    .enterprise-admin__modal,
    .bec-tag-info,
    .bec-support-peer-card,
    [data-mprf-decline-recovery="true"] > :is(div,section):first-of-type,
    [data-mprf-proposal-modal="true"] > :is(div,section):first-of-type
  ),
  html .mprf-client-modal-portal > :is(div, section):first-child,
  html [role="presentation"] > :is([role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]),
  html :is(.mprf-efficiency-modal-overlay,.mprf-workload-modal-overlay,.mprf-enterprise-modal-overlay,.mprf-autoslots-modal-overlay) > :is(div,section)[role="dialog"] {
    box-sizing: border-box !important;
    width: var(--mprf-unified-sheet-width) !important;
    max-width: var(--mprf-unified-sheet-width) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin-inline: auto !important;
  }
  html[data-mprf-platform="max"] :is(.mprf-profi-modal-overlay,[data-profi-modal-unified="true"]) {
    padding-top: var(--mprf-unified-sheet-top) !important;
    padding-bottom: var(--mprf-unified-sheet-bottom) !important;
  }
  /* Ordinary center-aligned standalone portals must reserve the same actual
     host-safe rectangle; native flex bottom sheets are deliberately untouched. */
  html [role="presentation"][style*="place-items"]:has(> :is([role="dialog"][aria-modal="true"],[role="alertdialog"][aria-modal="true"])) {
    padding-top: var(--mprf-unified-sheet-top) !important;
    padding-bottom: var(--mprf-unified-sheet-bottom) !important;
    align-items: center !important;
    justify-items: center !important;
  }
  /* Standalone semantic card portals can have an 18px legacy gutter.
     Normalize only the horizontal geometry, preserving bottom-sheet vertical UX. */
  html [role="presentation"]:not(.bec-dialog-overlay):has(> :is([role="dialog"][aria-modal="true"],[role="alertdialog"][aria-modal="true"])) {
    padding-inline: 12px !important;
  }
  html:not([data-mprf-platform="max"]) .mprf-role-promo-overlay {
    padding-top: var(--mprf-role-promo-top) !important;
    padding-bottom: var(--mprf-role-promo-bottom) !important;
  }
  html[data-mprf-platform="max"] .mprf-role-promo-overlay {
    padding-top: var(--mprf-role-promo-top) !important;
    padding-bottom: var(--mprf-role-promo-bottom) !important;
  }
  /* The available content rectangle is defined by the overlay's original
     platform safe area. Growing content scrolls inside the SAME centered card. */
  html :is(
    .mprf-enterprise-modal-overlay > .mprf-enterprise-modal-shell,
    .mprf-profi-modal-overlay > .mprf-profi-modal-sheet,
    .mprf-client-modal-portal > :is(div,section):first-child,
    .mprf-security-modal-backdrop > .mprf-security-modal-card,
    .mprf-autoslots-modal-overlay > section,
    .mprf-efficiency-modal-overlay > .mprf-efficiency-modal-shell,
    .mprf-workload-modal-overlay > .mprf-workload-modal-shell,
    .mprf-enterprise-datetime-overlay > .mprf-enterprise-datetime-shell,
    .enterprise-admin__modal-backdrop > .enterprise-admin__modal,
    .mprf-prebooking-overlay > .mprf-prebooking-panel,
    .mprf-public-enterprise-overlay > .mprf-public-enterprise-panel,
    .bec-tag-info-backdrop > .bec-tag-info,
    .bec-support-peer-overlay > .bec-support-peer-card,
    [data-mprf-decline-recovery="true"] > :is(div,section):first-of-type,
    [data-mprf-proposal-modal="true"] > :is(div,section):first-of-type
  ) {
    max-height: calc(var(--mprf-platform-viewport-height, 100dvh) - var(--mprf-unified-sheet-top) - var(--mprf-unified-sheet-bottom)) !important;
    min-height: 0 !important;
    flex-shrink: 1 !important;
    overscroll-behavior-y: contain;
  }
  /* Some standalone modal portals have no class, but carry a semantic card.
     Their original top/bottom offset remains untouched; only the card's
     width is standardized above and height clipped to the available area. */
  html [role="presentation"] > :is([role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]) {
    max-height: calc(var(--mprf-platform-viewport-height, 100dvh) - var(--mprf-unified-sheet-top) - var(--mprf-unified-sheet-bottom)) !important;
  }
  html :is(.mprf-role-promo-overlay > .mprf-scrollless,.mprf-public-enterprise-overlay > .mprf-public-enterprise-panel) {
    max-height: calc(var(--mprf-platform-viewport-height, 100dvh) - var(--mprf-unified-sheet-top) - var(--mprf-unified-sheet-bottom)) !important;
    overflow-y: auto;
  }
  /* Never let the card overflow the accepted horizontal mobile gutters. */
  html :is(.mprf-client-modal-portal,.mprf-enterprise-modal-overlay,.mprf-profi-modal-overlay,.mprf-security-modal-backdrop,.mprf-role-promo-overlay) > :is(div,section) {
    min-width: 0 !important;
  }
}

/* MPRF CHAT14445: MAX long modal owner contract. Generic important centering
   above applies only to SHORT sheets; long content fills the host WebView safe
   rectangle (6px top / 10px bottom) with exactly one internal Y scroller.
   Do not add Telegram native safe-area inset inside the MAX WebView. */
@media (max-width: 760px), (pointer: coarse) {
  html[data-mprf-platform="max"] :is(
    .mprf-enterprise-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-efficiency-modal-overlay[data-max="true"],
    .mprf-autoslots-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-workload-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-enterprise-activity-overlay[data-enterprise-modal-kind="long"],
    [data-enterprise-modal-kind="long"][role="dialog"]:has(> .mprf-enterprise-modal-shell)
  ) {
    height:var(--mprf-platform-viewport-height,100dvh)!important;
    max-height:var(--mprf-platform-viewport-height,100dvh)!important;
    align-items:start!important;
    justify-content:center!important;
    justify-items:center!important;
    place-items:start center!important;
    padding:6px 10px 10px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  html[data-mprf-platform="max"] :is(
    .mprf-enterprise-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-efficiency-modal-overlay[data-max="true"],
    .mprf-autoslots-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-workload-modal-overlay[data-enterprise-modal-kind="long"],
    .mprf-enterprise-activity-overlay[data-enterprise-modal-kind="long"],
    [data-enterprise-modal-kind="long"][role="dialog"]:has(> .mprf-enterprise-modal-shell)
  ) > :is(.mprf-enterprise-modal-shell,.mprf-efficiency-modal-shell,.mprf-workload-modal-shell,section[role="dialog"]) {
    box-sizing:border-box!important;
    max-height:calc(var(--mprf-platform-viewport-height,100dvh) - 16px)!important;
    min-height:0!important;
    min-width:0!important;
    overscroll-behavior-y:contain;
  }
  html[data-mprf-platform="max"] .mprf-max-referral-modal {
    overflow:hidden!important;
    padding:6px 10px 10px!important;
    touch-action:auto;
  }
  html[data-mprf-platform="max"] .mprf-max-referral-modal > [data-max-referral-scroller="true"] {
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y!important;
    overscroll-behavior-y:contain;
    max-height:calc(var(--mprf-platform-viewport-height,100dvh) - 16px)!important;
    clip-path:none!important;
  }
}

/* MPRF-MAX-LONG-PRO-DIALOGS-350: address previously unhandled MAX PRO
   settings/notifications/create-enterprise. Short profile dialogs and all TG
   geometry are deliberately excluded. Only one scroll owner per long sheet. */
@media (max-width:760px), (pointer:coarse) {
  html[data-mprf-platform="max"] .mprf-profi-modal-overlay[data-profi-modal-kind="long"],
  html[data-mprf-platform="max"] .mprf-role-promo-overlay[data-role-promo-kind="long"] {
    box-sizing:border-box!important;
    height:var(--mprf-platform-viewport-height,100dvh)!important;
    max-height:var(--mprf-platform-viewport-height,100dvh)!important;
    padding:6px 10px 10px!important;
    align-items:flex-start!important;
    justify-content:center!important;
    justify-items:center!important;
    place-items:start center!important;
    overflow:hidden!important;
  }
  html[data-mprf-platform="max"] .mprf-profi-modal-overlay[data-profi-modal-kind="long"] > .mprf-profi-modal-sheet,
  html[data-mprf-platform="max"] .mprf-role-promo-overlay[data-role-promo-kind="long"] > .mprf-scrollless {
    box-sizing:border-box!important;
    width:min(100%,calc(100vw - 20px))!important;
    max-width:min(100%,calc(100vw - 20px))!important;
    max-height:calc(var(--mprf-platform-viewport-height,100dvh) - 16px)!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
  }
}

/* MPRF-14447-ENTERPRISE-CENTER — short public cards stay on the visual
   centerline; long cards grow within the safe content rectangle. */
@media (max-width:760px), (pointer:coarse) {
  html .mprf-public-enterprise-overlay {
    display:grid !important;
    place-items:center !important;
    align-items:center !important;
    justify-items:center !important;
    padding-top:max(14px,env(safe-area-inset-top,0px)) !important;
    padding-bottom:max(14px,env(safe-area-inset-bottom,0px)) !important;
    overflow:hidden !important;
  }
  html .mprf-public-enterprise-overlay > .mprf-public-enterprise-panel {
    height:auto !important;
    min-height:0 !important;
    max-height:calc(var(--mprf-platform-viewport-height,100dvh) - max(14px,env(safe-area-inset-top,0px)) - max(14px,env(safe-area-inset-bottom,0px))) !important;
    overflow:hidden !important;
    align-self:center !important;
  }
}

/* 14446 MAX Profi statistics: a long report is a near-full-height scroll sheet,
   not a small centered popup. Scope to statistics; ordinary modals untouched. */
@media(max-width:720px) {
  html[data-mprf-platform="max"] [data-mprf-statistics-overlay="true"] {
    align-items:flex-start!important;
    justify-content:center!important;
    padding-top:max(8px, env(safe-area-inset-top, 0px))!important;
    padding-bottom:max(8px, env(safe-area-inset-bottom, 0px))!important;
  }
  html[data-mprf-platform="max"] [data-mprf-statistics-overlay="true"] > [data-profi-modal-sheet="true"] {
    align-self:stretch!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    overflow-y:auto;
  }
}

/* 14446-308/354: Statistics is a long scrolling workspace, NOT a short
   centered alert. It must fill the safe height like Tasks while its content
   scrolls internally. Do not modify the accepted compact dialog families. */
@media (max-width:760px), (pointer:coarse) {
  html[data-mprf-platform="max"] .mprf-profi-modal-overlay[data-mprf-statistics-overlay="true"] {
    height:100dvh !important;
    max-height:100dvh !important;
    box-sizing:border-box !important;
    padding:8px 10px 10px !important;
    align-items:stretch !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  html:not([data-mprf-platform="max"]) .mprf-profi-modal-overlay[data-mprf-statistics-overlay="true"] {
    height:100dvh !important;
    max-height:100dvh !important;
    box-sizing:border-box !important;
    padding:max(92px,calc(var(--tg-content-safe-area-inset-top,0px) + 54px)) 10px max(14px,var(--tg-content-safe-area-inset-bottom,0px),env(safe-area-inset-bottom,0px)) !important;
    align-items:stretch !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  html .mprf-profi-modal-overlay[data-mprf-statistics-overlay="true"] > .mprf-profi-modal-sheet {
    flex:1 1 auto !important;
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
  }
}

/* 14446-308/354: one height policy for LONG Personal Profi sheets only.
   Short sheets keep natural centered height. Enterprise and client-specific
   windows retain their separate, already accepted geometry contracts. */
@media (max-width:760px), (pointer:coarse) {
  html[data-mprf-platform="max"] .mprf-profi-modal-overlay[data-profi-modal-kind="long"] {
    box-sizing:border-box !important;
    height:100dvh !important;
    max-height:100dvh !important;
    padding:8px 10px 10px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  html:not([data-mprf-platform="max"]) .mprf-profi-modal-overlay[data-profi-modal-kind="long"] {
    box-sizing:border-box !important;
    height:100dvh !important;
    max-height:100dvh !important;
    padding:max(92px,calc(var(--tg-content-safe-area-inset-top,0px) + 54px)) 10px max(14px,var(--tg-content-safe-area-inset-bottom,0px),env(safe-area-inset-bottom,0px)) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
  }
  html .mprf-profi-modal-overlay[data-profi-modal-kind="long"] > .mprf-profi-modal-sheet {
    min-height:0 !important;
    max-height:100% !important;
    flex-shrink:1 !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
  }
}

/* src/ui/business/enterpriseModalContracts.css */
/* Canonical modal header contract for Enterprise owner/manager workspaces.
   The visual model is intentionally inherited from accepted Finance windows. */
.mprf-enterprise-modal-shell,
.mprf-enterprise-modal-shell button,
.mprf-enterprise-modal-shell input,
.mprf-enterprise-modal-shell select,
.mprf-enterprise-modal-shell textarea,
[data-enterprise-modal-unified="true"],
[data-enterprise-modal-unified="true"] button,
[data-enterprise-modal-unified="true"] input,
[data-enterprise-modal-unified="true"] select,
[data-enterprise-modal-unified="true"] textarea {
  font-family: var(--mprf-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif) !important;
  font-synthesis: none;
}

.mprf-enterprise-modal-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mprf-enterprise-modal-heading-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.mprf-enterprise-modal-leading {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mprf-enterprise-modal-heading {
  min-width: 0;
}

.mprf-enterprise-modal-title {
  min-width: 0;
  color: inherit;
  font-family: var(--mprf-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.012em !important;
  overflow-wrap: anywhere;
}

.mprf-enterprise-modal-subtitle {
  min-width: 0;
  margin-top: 4px;
  font-family: var(--mprf-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif) !important;
  font-size: 11.8px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere;
}

.mprf-enterprise-section-title {
  font-family: var(--mprf-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif) !important;
  font-size: 13.6px !important;
  font-weight: 600 !important;
  line-height: 1.24 !important;
  letter-spacing: -0.006em !important;
}

.mprf-enterprise-modal-close-hit {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
}

.mprf-enterprise-modal-close-visual {
  width: 30px !important;
  height: 30px !important;
}

@media (max-width: 720px), (pointer: coarse) {
  .mprf-enterprise-modal-title {
    font-size: 15.5px !important;
    font-weight: 600 !important;
  }
}

/* MPRF-14438-284/256: one Enterprise modal chrome in MAX and TG.
   Telegram's vertical safe area is owned by its overlay, not by this header. */
.mprf-enterprise-modal-header {
  border-bottom: 0 !important;
  align-items: center !important;
  box-sizing: border-box;
}
.mprf-enterprise-modal-heading-row { align-self: center; }
.mprf-enterprise-modal-heading { display: grid; align-content: center; }
.mprf-enterprise-modal-header .mprf-enterprise-modal-close-hit { align-self: center; }
/* A single grid permits lengthy subtitles without colliding with the close button. */
.mprf-enterprise-modal-title, .mprf-enterprise-modal-subtitle { white-space: normal; }

html[data-mprf-platform="max"] .mprf-enterprise-datetime-overlay {
  place-items: center !important;
  align-items: center !important;
  overflow: hidden !important;
  padding: 10px !important;
}
html[data-mprf-platform="max"] .mprf-enterprise-datetime-shell {
  max-height: calc(100dvh - 20px) !important;
  overscroll-behavior: contain;
}
html[data-mprf-platform="max"] .mprf-enterprise-datetime-confirm {
  position: sticky !important;
  bottom: 0 !important;
}

/* MPRF-14439: MAX-only; dynamic enterprise modals do not inherit Telegram safe area. */
html[data-mprf-platform="max"] .mprf-enterprise-invite-actions,
html[data-mprf-platform="max"] .mprf-enterprise-invite-actions > button {
  width: 100% !important; min-width: 0 !important; justify-self: stretch !important; box-sizing: border-box !important;
}

/* CHAT 144.41 MAX314: MAX enterprise overlay/sheet geometry is owned by
   maxEnterpriseGeometry.js. Do not apply CSS !important overrides to their
   padding/height/alignment: such rules previously ignored modal purpose and
   double-counted the native Android safe-area. Telegram retains its own code. */

/* MAX318: public mode sizing is now in BusinessRegistration.jsx; no !important overrides. */

/* CHAT 144.41 / MAX317: 34px outlined circles for calendar navigation and close.
   38px close hit target is preserved; Telegram chrome unchanged. */
html[data-mprf-platform="max"] [data-finance-date-calendar="true"] .mprf-enterprise-modal-close-visual,
html[data-mprf-platform="max"] [data-expense-month-picker="true"] .mprf-enterprise-modal-close-visual {
  width: 34px !important; height: 34px !important;
}

/* src/screens/admin/enterprise/enterpriseAdmin.css */
.enterprise-admin {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.enterprise-admin__header,
.enterprise-admin__toolbar,
.enterprise-admin__panel,
.enterprise-admin__detail {
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 18px;
  background: rgba(127, 127, 127, 0.045);
}

.enterprise-admin__header,
.enterprise-admin__panel,
.enterprise-admin__detail {
  padding: 14px;
}

.enterprise-admin__header-row,
.enterprise-admin__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.enterprise-admin__tabs,
.enterprise-admin__detail-tabs,
.enterprise-admin__actions,
.enterprise-admin__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enterprise-admin__tab {
  appearance: none;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(127, 127, 127, 0.07);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.enterprise-admin__tab[data-active="true"] {
  border-color: rgba(54, 129, 255, 0.55);
  background: rgba(54, 129, 255, 0.14);
  font-weight: 700;
}

.enterprise-admin__toolbar {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.enterprise-admin__filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.enterprise-admin__filters input,
.enterprise-admin__filters select,
.enterprise-admin__form input,
.enterprise-admin__form select,
.enterprise-admin__form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(127, 127, 127, 0.24);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(127, 127, 127, 0.06);
  color: inherit;
  font: inherit;
}

.enterprise-admin__form textarea {
  min-height: 88px;
  resize: vertical;
}

.enterprise-admin__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.enterprise-admin__metric {
  appearance: none;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(127, 127, 127, 0.055);
}

button.enterprise-admin__metric {
  cursor: pointer;
}

.enterprise-admin__metric-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
}

.enterprise-admin__registry,
.enterprise-admin__list,
.enterprise-admin__form,
.enterprise-admin__stack {
  display: grid;
  gap: 10px;
}

.enterprise-admin__registry-card,
.enterprise-admin__item,
.enterprise-admin__action-box {
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(127, 127, 127, 0.035);
}

.enterprise-admin__registry-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.enterprise-admin__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(127, 127, 127, 0.12);
}

.enterprise-admin__logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.enterprise-admin__badge {
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  background: rgba(127, 127, 127, 0.07);
}

.enterprise-admin__badge--warning {
  border-color: rgba(255, 149, 0, 0.38);
  background: rgba(255, 149, 0, 0.12);
}

.enterprise-admin__badge--danger {
  border-color: rgba(255, 59, 48, 0.4);
  background: rgba(255, 59, 48, 0.12);
}

.enterprise-admin__badge--ok {
  border-color: rgba(52, 199, 89, 0.36);
  background: rgba(52, 199, 89, 0.1);
}

.enterprise-admin__kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.enterprise-admin__kv > div {
  border: 1px solid rgba(127, 127, 127, 0.13);
  border-radius: 12px;
  padding: 9px;
  min-width: 0;
}

.enterprise-admin__kv small,
.enterprise-admin__muted {
  opacity: 0.7;
  font-size: 12px;
}

.enterprise-admin__value {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.enterprise-admin__pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.enterprise-admin__modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7500;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.enterprise-admin__modal {
  width: min(100%, 640px);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: 20px;
  padding: 16px;
  background: var(--enterprise-admin-modal-bg, #fff);
  color: var(--enterprise-admin-modal-text, #111);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.enterprise-admin__notice {
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(54, 129, 255, 0.1);
  border: 1px solid rgba(54, 129, 255, 0.18);
}

.enterprise-admin__error {
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.enterprise-admin__table-wrap {
  overflow-x: auto;
}

.enterprise-admin__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.enterprise-admin__table th,
.enterprise-admin__table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.14);
  text-align: left;
  vertical-align: top;
}

@media (max-width: 900px) {
  .enterprise-admin__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .enterprise-admin__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .enterprise-admin__kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .enterprise-admin__metrics,
  .enterprise-admin__filters,
  .enterprise-admin__kv {
    grid-template-columns: 1fr;
  }
  .enterprise-admin__registry-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .enterprise-admin__registry-card > :last-child {
    grid-column: 1 / -1;
  }
  .enterprise-admin__header,
  .enterprise-admin__panel,
  .enterprise-admin__detail {
    padding: 12px;
  }
}

/* All potentially long Enterprise Admin collections are bounded scroll boxes. */
.enterprise-admin__list,
.enterprise-admin__registry,
.enterprise-admin__table-wrap,
.enterprise-admin__chat-list,
.enterprise-admin__messages {
  max-height: 480px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.enterprise-admin__table-wrap {
  max-height: 520px;
}

.enterprise-admin__edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.enterprise-admin__edit-grid label,
.enterprise-admin__checks label {
  display: grid;
  gap: 5px;
}

.enterprise-admin__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.enterprise-admin__checks label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.enterprise-admin__link-button,
.enterprise-admin__item-button,
.enterprise-admin__chat-thread {
  color: inherit;
  font: inherit;
}

.enterprise-admin__link-button {
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}

.enterprise-admin__item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.enterprise-admin__chat-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.6fr);
  gap: 12px;
  min-width: 0;
}

.enterprise-admin__chat-list,
.enterprise-admin__messages {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 560px;
}

.enterprise-admin__chat-thread {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: 14px;
  padding: 10px;
  background: rgba(127, 127, 127, 0.035);
  cursor: pointer;
}

.enterprise-admin__chat-thread[data-active="true"] {
  border-color: rgba(54, 129, 255, 0.55);
  background: rgba(54, 129, 255, 0.11);
}

.enterprise-admin__chat-window {
  min-width: 0;
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: 16px;
  padding: 10px;
  background: rgba(127, 127, 127, 0.025);
}

.enterprise-admin__chat-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.enterprise-admin__message {
  width: min(82%, 620px);
  border-radius: 15px;
  padding: 9px 11px;
  border: 1px solid rgba(127, 127, 127, 0.15);
  overflow-wrap: anywhere;
}

.enterprise-admin__message--client {
  justify-self: start;
  background: rgba(127, 127, 127, 0.075);
}

.enterprise-admin__message--business {
  justify-self: end;
  background: rgba(52, 199, 89, 0.11);
}

.enterprise-admin__message img {
  display: block;
  max-width: min(100%, 420px);
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 7px;
}

.enterprise-admin__message-author {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.enterprise-admin__message-time {
  font-size: 11px;
  opacity: 0.66;
  text-align: right;
  margin-top: 5px;
}

.enterprise-admin__action-box pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  max-height: 300px;
  overflow: auto;
}

@media (max-width: 900px) {
  .enterprise-admin__edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .enterprise-admin__chat-layout {
    grid-template-columns: 1fr;
  }
  .enterprise-admin__chat-list,
  .enterprise-admin__messages {
    max-height: 420px;
  }
}

@media (max-width: 620px) {
  .enterprise-admin__edit-grid,
  .enterprise-admin__checks {
    grid-template-columns: 1fr;
  }
  .enterprise-admin__message {
    width: 92%;
  }
}

.enterprise-admin__section-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.enterprise-admin__title-with-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.enterprise-admin__action-beacon,
.enterprise-admin__tab-beacon {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  box-sizing: border-box;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff9500;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(255, 149, 0, .24);
}

.enterprise-admin__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.enterprise-admin__tab-beacon {
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  padding: 0 5px;
}

.enterprise-admin__pending-hint {
  margin-top: 5px;
  color: #c56b00;
  font-size: 12px;
  font-weight: 650;
}

/* src/ui/profi/profiModalContracts.css */
/* MPRF-BLK-U8S3P5T2 — scrollbar-free six-plus daily load container */
/* MPRF-BLK-POM7C4R9 — canonical mobile/iOS modal geometry for ordinary Personal Profi.
   Applies to primary, nested and utility sheets in the ordinary Profi contour.
   Balance/wallet flows keep their own accepted layout and are intentionally excluded. */
:root{
  --mprf-profi-modal-safe-top:max(92px,calc(var(--tg-content-safe-area-inset-top,0px) + 54px),calc(var(--tg-safe-area-inset-top,0px) + 54px),calc(env(safe-area-inset-top,0px) + 58px));
  --mprf-profi-modal-safe-bottom:max(14px,env(safe-area-inset-bottom,0px));
}
.mprf-profi-modal-overlay,
[data-profi-modal-unified="true"]{
  box-sizing:border-box!important;
  overscroll-behavior:none!important;
  touch-action:none!important;
}
.mprf-profi-modal-sheet,
[data-profi-modal-sheet="true"]{
  box-sizing:border-box!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
}
/* MPRF-BLK-MDL5A5L1 — any canonical modal owns the interaction layer.
   This prevents the document below a modal from moving on iOS/Telegram and MAX WebViews. */
html:has([data-profi-modal-unified="true"]),
body:has([data-profi-modal-unified="true"]){
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
.mprf-profi-modal-sheet::-webkit-scrollbar,
[data-profi-modal-sheet="true"]::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}

@media(max-width:760px),(pointer:coarse){
  .mprf-profi-modal-overlay,
  [data-profi-modal-unified="true"]{
    align-items:flex-start!important;
    justify-content:center!important;
    padding:var(--mprf-profi-modal-safe-top) 12px var(--mprf-profi-modal-safe-bottom)!important;
    overflow:hidden!important;
  }
  .mprf-profi-modal-sheet,
  [data-profi-modal-sheet="true"]{
    width:min(100%,560px)!important;
    margin:0 auto!important;
    max-height:calc(100dvh - var(--mprf-profi-modal-safe-top) - var(--mprf-profi-modal-safe-bottom))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .mprf-profi-modal-overlay.is-compact-center,
  [data-profi-modal-unified="true"].is-compact-center{
    align-items:center!important;
    padding: max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px))!important;
  }
}

/* MPRF-BLK-PMM4D7K2 — Personal Profi Documents/Gallery manager now follows the same
   canonical rounded modal grammar as Statistics and My Clients. Geometry, safe-area and
   internal scrolling are inherited from the shared ordinary-Profi modal contract above. */


/* MPRF-MAX-BLK-MOD9F6T2 — MAX modal/text-fit contract.
   MAX's native title bar is outside the WebView. Ordinary Profi windows therefore
   use the actual MAX visual viewport instead of Telegram-era 72–92px top reserves. */
html[data-mprf-platform="max"] {
  --mprf-profi-modal-safe-top: 7px;
  --mprf-profi-modal-safe-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

html[data-mprf-platform="max"] .mprf-profi-modal-overlay,
html[data-mprf-platform="max"] [data-profi-modal-unified="true"] {
  padding: var(--mprf-profi-modal-safe-top) 6px var(--mprf-profi-modal-safe-bottom) !important;
  align-items: flex-start !important;
}

html[data-mprf-platform="max"] .mprf-profi-modal-sheet,
html[data-mprf-platform="max"] [data-profi-modal-sheet="true"] {
  width: min(100%, calc(var(--mprf-platform-viewport-width, 100vw) - 12px)) !important;
  max-height: calc(var(--mprf-platform-viewport-height, 100dvh) - var(--mprf-profi-modal-safe-top) - var(--mprf-profi-modal-safe-bottom)) !important;
  min-width: 0 !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

html[data-mprf-platform="max"] .mprf-profi-modal-sheet > *,
html[data-mprf-platform="max"] [data-profi-modal-sheet="true"] > * {
  min-width: 0;
  max-width: 100%;
}

html[data-mprf-platform="max"] .mprf-profi-modal-sheet img,
html[data-mprf-platform="max"] .mprf-profi-modal-sheet video,
html[data-mprf-platform="max"] .mprf-profi-modal-sheet canvas,
html[data-mprf-platform="max"] [data-profi-modal-sheet="true"] img,
html[data-mprf-platform="max"] [data-profi-modal-sheet="true"] video,
html[data-mprf-platform="max"] [data-profi-modal-sheet="true"] canvas {
  max-width: 100%;
}

/* Nested confirmations remain centered; only primary product windows are pulled
   toward the MAX content boundary. */
html[data-mprf-platform="max"] .mprf-profi-modal-overlay.is-compact-center,
html[data-mprf-platform="max"] [data-profi-modal-unified="true"].is-compact-center {
  align-items: center !important;
  padding-top: var(--mprf-profi-modal-safe-top) !important;
}

/* MPRF-BLK-U8S3P5T2 — scrollbar remains usable by touch, never shows a visual track. */
.mprf-upcoming-slot-scroll::-webkit-scrollbar { display:none; width:0; height:0; }

/* MPRF-BLK-U8S3P5T2 — pause at either end; no animation for reduced motion. */
@keyframes mprfUpcomingNamePan {
  0%, 16% { transform: translate3d(0,0,0); }
  76%, 91% { transform: translate3d(calc(-1 * var(--mprf-upcoming-name-shift, 0px)),0,0); }
  100% { transform: translate3d(0,0,0); }
}
.mprf-upcoming-name-pan { animation: mprfUpcomingNamePan var(--mprf-upcoming-name-duration, 8s) ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .mprf-upcoming-name-pan { animation: none !important; }
  .mprf-upcoming-name-viewport { -webkit-mask-image: none !important; mask-image: none !important; text-overflow: ellipsis !important; }
}

/* MPRF-BLK-MODAL14430: only slot deletion follows its edit-dialog width on narrow devices. */
[data-profi-modal-sheet="true"][data-mprf-slot-delete-sheet="true"]{width:min(100%,430px)!important;max-width:430px!important;}

/* MPRF-BLK-P5-MODAL-CENTER: only the short Personal Profi work-mode dialog.
   Overrides the shared long-form top-aligned modal geometry without affecting others. */
@media(max-width:760px),(pointer:coarse){
  .mprf-profi-modal-overlay[data-profi-booking-modes="true"].is-compact-center{
    align-items:center!important;
    padding:max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px))!important;
  }
  [data-profi-booking-modes="true"] > .mprf-profi-modal-sheet{
    max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
  }
}

/* MPRF-BLK-14430-S32-PROFILE-ACTION-CONTRACT — shared iOS action geometry.
   Opt-in only: modal tabs, row buttons, switches, compact close controls,
   payment components and calendar touch targets remain unchanged. */
.mprf-profi-ios-action{
  min-height:46px!important;
  border-radius:14px!important;
  padding:10px 14px!important;
  box-sizing:border-box!important;
  font-family:var(--mprf-font-family,-apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif)!important;
  font-size:14px!important;
  font-weight:650!important;
  line-height:1.35!important;
  letter-spacing:-.01em!important;
  box-shadow:none!important;
  transition:opacity .18s ease, background-color .18s ease, border-color .18s ease!important;
  -webkit-tap-highlight-color:transparent;
}
.mprf-profi-ios-action:disabled{cursor:not-allowed!important;}
@media(prefers-reduced-motion:reduce){.mprf-profi-ios-action{transition:none!important;}}

/* S78: the short three-dot profile action sheet is centered in the visible safe viewport.
   Do not alter the top-aligned full-height profile editors. */
@media(max-width:760px),(pointer:coarse){
  .mprf-profi-modal-overlay.is-profile-actions-center[data-mprf-profile-actions-centered="true"]{
    align-items:center!important;
    padding:var(--mprf-profi-modal-safe-top) 12px var(--mprf-profi-modal-safe-bottom)!important;
  }
}

/* src/screens/profi/components/profile/profiClientTag.css */
/* MPRF-BLK-TAG3A7F9 — preserve editable field width on narrow iPhone/Android mini-apps. */
@media (max-width: 370px) {
  .mprf-private-client-row { gap: 6px !important; padding-left: 9px !important; padding-right: 9px !important; }
  .mprf-private-client-row .mprf-private-client-avatar { flex: 0 0 39px !important; width: 39px !important; }
  .mprf-private-client-row .mprf-private-client-avatar > img,
  .mprf-private-client-row .mprf-private-client-avatar > div { width: 39px !important; height: 39px !important; }
  .mprf-private-client-row .mprf-private-client-arrow { flex: 0 0 14px !important; width: 14px !important; }
}

/* src/screens/business/businessChats.css */
/* Enterprise Chats unified UI layer (v1.9.1328).
   One stylesheet for owner/manager/employee/client and desktop/mobile.
   Do not append role-specific overrides below this file: extend the shared shell. */

.bec-root {
  --bec-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  min-width: 0;
  color: var(--bec-text);
  font-family: var(--bec-font);
  display: grid;
  gap: 10px;
}

.bec-root *,
.bec-root *::before,
.bec-root *::after { box-sizing: border-box; }

button, textarea { font-family: inherit; }
/* ---------- list / filters ---------- */
.bec-filters {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  border: 0;
  border-radius: 14px;
  /* MPRF-BLK-CFT6I2S9 — iOS-style owner chat segmented control: soft track, no heavy outer frame. */
  background: color-mix(in srgb, var(--bec-soft) 58%, transparent);
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.bec-filters::-webkit-scrollbar { display: none; }
.bec-filters button {
  min-width: 0;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--bec-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  font: 570 11.5px/1.1 var(--bec-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.bec-filters button.is-active {
  color: var(--bec-text);
  background: color-mix(in srgb, var(--bec-surface) 88%, transparent);
  box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 3px 9px rgba(15,23,42,.045);
}

.bec-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  color: #fff;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bec-count.is-red { background: var(--bec-red); }
.bec-count.is-green { background: var(--bec-green); }
.bec-count.is-blue { background: var(--bec-blue); }
.bec-count.is-neutral { background: rgba(118,118,128,.58); }

.bec-list {
  min-width: 0;
  display: grid;
  gap: 7px;
  touch-action: pan-y;
}
.bec-thread {
  min-width: 0;
  display: grid;
  grid-template-columns:44px minmax(0,1fr) minmax(48px,auto);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--bec-line);
  border-radius: 18px;
  background: var(--bec-surface);
  box-shadow: 0 7px 22px rgba(15,23,42,.045);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.bec-thread:active { transform: scale(.996); }
.bec-thread:focus-visible { outline: 2px solid color-mix(in srgb, var(--bec-blue) 60%, transparent); outline-offset: 2px; }
.bec-thread.is-actionable { border-color: color-mix(in srgb, var(--bec-blue) 24%, var(--bec-line)); }

.bec-root.is-ordinary .bec-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--bec-line);
  border-radius: 19px;
  background: var(--bec-surface);
}
.bec-root.is-ordinary .bec-thread {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 11px 12px;
}
.bec-root.is-ordinary .bec-thread:not(:last-child) { border-bottom: 1px solid var(--bec-line); }

.bec-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--bec-text);
  background: linear-gradient(145deg, color-mix(in srgb,var(--bec-blue) 24%,var(--bec-soft)), color-mix(in srgb,var(--bec-green) 17%,var(--bec-soft)));
  border: 1px solid color-mix(in srgb,var(--bec-line) 70%,transparent);
  font-size: 13px;
  font-weight: 720;
}
.bec-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* MPRF-BLK-SAC8V2M6 — immediate shipping underlay for branded/support avatars; persistent media overlays it when ready. */
.bec-avatar img.bec-avatar-underlay { z-index:0; }
.bec-avatar img:not(.bec-avatar-underlay) { z-index:1; }
.bec-avatar.is-small { width:20px; height:20px; border:0; background:transparent; font-size:8px; }
.bec-avatar.is-business { border:0; border-radius:5px; background:transparent; }
.bec-avatar.is-business img { object-fit:contain; }

.bec-thread-main { min-width:0; display:grid; gap:2px; align-content:center; }
.bec-thread-meta { min-width:48px; align-self:stretch; position:relative; display:block; padding:1px 0; }
/* MPRF-BLK-CHM8Q2R6 + MPRF-BLK-CHR6K2M9 — conditional dialog-row meta.
   Read rows keep date/time visually centered at the right edge. Unread rows lift
   date/time (and VIP/FAV) to the top and keep the unread badge on its own
   centered right-edge line, with optical compensation for the 17px badge. */
.bec-thread-meta > .bec-thread-time,
.bec-thread-meta-top > .bec-thread-time { position:absolute; top:1px; right:0; transform:none; white-space:nowrap; }
.bec-thread-meta-top { position:absolute; inset:0 0 auto 0; min-height:16px; }
.bec-thread-meta-top > .bec-thread-pin { position:absolute; top:0; right:0; }
.bec-thread-meta-top > .bec-thread-time + .bec-thread-pin { right:auto; left:0; }
.bec-thread-meta:not(.has-badge) > .bec-thread-meta-top { top:50%; bottom:auto; transform:translateY(-50%); }
.bec-thread-meta:not(.has-badge) > .bec-thread-time { top:50%; bottom:auto; transform:translateY(-50%); }
/* MPRF-BLK-CUI4R7M3 — VIP/FAV + timestamp stay on the same line. */
.bec-thread-meta-center { position:absolute; right:0; display:flex; align-items:center; justify-content:flex-end; gap:7px; white-space:nowrap; }
.bec-thread-meta:not(.has-badge) > .bec-thread-meta-center { top:50%; transform:translateY(-50%); }
.bec-thread-meta.has-badge > .bec-thread-meta-center { top:1px; transform:none; }
.bec-thread-meta-center > .bec-thread-time { position:static; transform:none; }
.bec-thread-meta.has-profi-tags { min-width:128px; }
.bec-thread-meta > .bec-count { position:absolute; right:0; top:50%; bottom:auto; transform:translateY(-50%); }
.bec-thread-meta.has-badge > .bec-count { top:auto; bottom:7px; transform:none; }
/* Client and Profi unread counters share badge geometry and glyph centering. */
.bec-count-value { display:inline-block; line-height:1; }
.bec-root[data-audience="client"] .bec-count-value { transform:none; }
.bec-thread-main.is-ordinary { gap:3px; }
.bec-thread-top { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:9px; }
.bec-thread-top strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13.5px; font-weight:650; }
.bec-thread-time { flex:0 0 auto; color:var(--bec-muted); font-size:11.5px; font-weight:500; }
.bec-root.is-ordinary .bec-thread-time { font-size:12.5px; font-weight:480; }
.bec-service { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--bec-text); font-size:11px; font-weight:540; }
.bec-preview { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--bec-muted); font-size:11px; }
.bec-preview > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bec-title-inline, .bec-workspace-title, .bec-for { min-width:0; display:flex; align-items:center; gap:5px; }
.bec-title-inline { overflow:hidden; }
.bec-title-inline > strong { min-width:0; flex:1 1 auto; max-width:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bec-title-inline > .bec-business-inline { flex:0 1 auto; max-width:56%; }
.bec-title-inline > .bec-title-pin { position:static; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; margin-left:2px; }
.bec-workspace-title { overflow:hidden; }
.bec-workspace-title > strong { min-width:0; max-width:min(42vw,420px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bec-title-separator { color:var(--bec-muted); font-size:10px; }
.bec-for { color:var(--bec-muted); font-size:10.5px; overflow:hidden; }
.bec-for b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--bec-text); font-weight:590; }

.bec-business-inline {
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:var(--bec-muted);
  font-size:11px;
  font-weight:580;
  white-space:nowrap;
  overflow:hidden;
  vertical-align:middle;
}
.bec-business-inline > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bec-business-inline.is-button { border:0; padding:0; margin:0; background:transparent; cursor:pointer; }

.bec-state, .bec-empty, .bec-error {
  min-height:132px;
  border:1px solid var(--bec-line);
  border-radius:18px;
  background:var(--bec-surface);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:var(--bec-muted);
  font-size:13px;
}
.bec-error { color:var(--bec-red); }
.bec-spinner { width:17px; height:17px; border-radius:50%; border:2px solid color-mix(in srgb,var(--bec-muted) 28%,transparent); border-top-color:var(--bec-blue); animation:bec-spin .7s linear infinite; }
@keyframes bec-spin { to { transform:rotate(360deg); } }
/* ---------- dialog page ---------- */
.bec-dialog-overlay {
  /* One portalled-chat viewport owner; scoped variables are set by useChatViewportShell. */
  position:fixed;
  top:var(--bec-visual-top,0px);
  left:var(--bec-visual-left,0px);
  right:auto;
  bottom:auto;
  width:var(--bec-visual-width,100vw);
  height:var(--bec-visual-height,100dvh);
  z-index:30060;
  display:block;
  padding:0;
  background:var(--bec-solid-surface);
  overscroll-behavior:contain;
}
.bec-dialog {
  --bec-head-control:46px; --bec-head-gap:10px;
  --bec-composer-extra-height:0px;
  --bec-head-pad-left:18px; --bec-head-pad-right:clamp(150px,10vw,190px);
  --bec-center-track-left:calc(var(--bec-head-pad-left) + var(--bec-head-control) + var(--bec-head-gap));
  --bec-center-track-right:calc(var(--bec-head-pad-right) + var(--bec-head-control) + var(--bec-head-control) + var(--bec-head-gap) + var(--bec-head-gap));
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:var(--bec-solid-surface);
  color:var(--bec-text);
  box-shadow:none;
  display:grid;
  grid-template-areas:"messages" "composer";
  grid-template-rows:minmax(0,1fr) auto;
  position:relative;
  isolation:isolate;
}
.bec-dialog.is-resolving .bec-messages { visibility:hidden; opacity:0; }

.bec-dialog-head {
  grid-area:head;
  min-width:0;
  display:grid;
  grid-template-columns:var(--bec-head-control) minmax(0,1fr) var(--bec-head-control) var(--bec-head-control);
  align-items:center;
  gap:var(--bec-head-gap);
  padding:max(9px,env(safe-area-inset-top,0px)) var(--bec-head-pad-right) 6px var(--bec-head-pad-left);
  position:absolute;
  inset:0 0 auto 0;
  z-index:24;
  isolation:isolate;
  background:transparent;
}
.bec-dialog-head::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  display:none;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.bec-dialog-head > * { position:relative; z-index:1; }
.bec-back, .bec-peer-avatar-button, .bec-topic-trigger.is-header, .bec-topic-static.is-icon {
  width:var(--bec-head-control);
  height:var(--bec-head-control);
  min-width:var(--bec-head-control);
  min-height:var(--bec-head-control);
  padding:0;
  border-radius:50%;
  border:1px solid var(--bec-line);
  background:color-mix(in srgb,var(--bec-solid-surface) 86%,transparent);
  backdrop-filter:blur(18px) saturate(1.18);
  -webkit-backdrop-filter:blur(18px) saturate(1.18);
  color:var(--bec-text);
  display:grid;
  place-items:center;
  box-shadow:0 7px 20px rgba(15,23,42,.08), inset 0 1px 0 color-mix(in srgb,#fff 58%,transparent);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.bec-back:active, .bec-peer-avatar-button:active, .bec-topic-trigger.is-header:active { transform:scale(.96); }
.bec-back span { display:none; }
.bec-peer-card {
  min-width:0;
  height:var(--bec-head-control);
  padding:4px 14px;
  border:1px solid var(--bec-line);
  border-radius:999px;
  background:color-mix(in srgb,var(--bec-solid-surface) 86%,transparent);
  backdrop-filter:blur(18px) saturate(1.18);
  -webkit-backdrop-filter:blur(18px) saturate(1.18);
  color:var(--bec-text);
  box-shadow:0 7px 20px rgba(15,23,42,.08), inset 0 1px 0 color-mix(in srgb,#fff 58%,transparent);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  overflow:hidden;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.bec-peer-card:disabled, .bec-peer-avatar-button:disabled { cursor:default; }
.bec-peer-title-line, .bec-peer-topic-line {
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  white-space:nowrap;
  text-align:center;
}
.bec-peer-title-line { gap:5px; line-height:1.05; }
.bec-peer-title-line strong {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
  font-weight:560;
}
.bec-peer-title-line em {
  flex:0 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--bec-muted);
  font-size:11px;
  font-style:normal;
  font-weight:480;
}
.bec-peer-topic-line { color:var(--bec-muted); font-size:11.5px; line-height:1.1; }
.bec-header-marquee {
  min-width:0;
  max-width:100%;
  overflow:hidden;
  display:block;
  white-space:nowrap;
}
.bec-header-marquee-track { display:inline-block; min-width:max-content; will-change:transform; }
.bec-header-marquee.is-overflowing .bec-header-marquee-track { animation:bec-header-marquee 8s ease-in-out 1s infinite alternate; }
@keyframes bec-header-marquee { to { transform:translateX(calc(-1 * var(--bec-marquee-shift,0px))); } }
.bec-peer-avatar-button { overflow:hidden; }
.bec-peer-avatar-button .bec-avatar { width:100%; height:100%; border:0; }
.bec-dialog-topic-slot { min-width:0; justify-self:center; display:flex; align-items:center; }

.bec-close, .bec-image-viewer-close {
  width:38px;
  height:38px;
  flex:0 0 auto;
  padding:0;
  border-radius:999px;
  border:1px solid var(--bec-line);
  background:transparent;
  color:var(--bec-text);
  display:grid;
  place-items:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease, background .12s ease;
}
.bec-close:active, .bec-image-viewer-close:active { transform:scale(.94); }

.bec-topic-switch { position:relative; min-width:0; }
.bec-topic-trigger, .bec-topic-static {
  color:var(--bec-text);
  overflow:visible;
}
.bec-topic-trigger { cursor:pointer; }
.bec-topic-trigger.is-header.is-open {
  color:var(--bec-blue);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--bec-blue) 14%,transparent),0 7px 20px rgba(15,23,42,.08);
}
.bec-topic-trigger svg { flex:0 0 auto; }
.bec-topic-menu {
  position:absolute;
  top:calc(100% + 9px);
  left:auto;
  right:-52px;
  z-index:20;
  width:min(320px,calc(100vw - 36px));
  max-height:min(360px,60dvh);
  overflow:auto;
  padding:6px;
  border:1px solid var(--bec-line);
  border-radius:16px;
  background:var(--bec-solid-surface);
  box-shadow:0 18px 50px rgba(15,23,42,.20);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  scrollbar-width:none;
}
.bec-topic-menu::-webkit-scrollbar { display:none; }
.bec-topic-menu-hint { padding:7px 9px 8px; color:var(--bec-muted); font-size:11.5px; }
.bec-topic-menu.is-send-picker { box-shadow:0 0 0 3px color-mix(in srgb,var(--bec-blue) 13%,transparent),0 20px 55px rgba(15,23,42,.22); }
.bec-topic-menu button {
  width:100%;
  min-height:40px;
  padding:0 10px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--bec-text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  text-align:left;
  font-size:13px;
  cursor:pointer;
}
.bec-topic-menu button.is-active { background:color-mix(in srgb,var(--bec-blue) 13%,var(--bec-soft)); }
.bec-topic-menu button.is-history { color:var(--bec-muted); }
.bec-service-closed { color:var(--bec-red); font-size:10.5px; }

.bec-context {
  grid-area:context;
  min-width:0;
  min-height:34px;
  position:absolute;
  top:64px;
  left:var(--bec-center-track-left);
  right:var(--bec-center-track-right);
  z-index:23;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  pointer-events:none;
}

.bec-context-person {
  min-width:0;
  width:100%;
  max-width:100%;
  min-height:34px;
  height:34px;
  border:1px solid var(--bec-line);
  border-radius:999px;
  padding:0 12px;
  background:color-mix(in srgb,var(--bec-solid-surface) 86%,transparent);
  backdrop-filter:blur(18px) saturate(1.18);
  -webkit-backdrop-filter:blur(18px) saturate(1.18);
  box-shadow:0 7px 20px rgba(15,23,42,.08), inset 0 1px 0 color-mix(in srgb,#fff 58%,transparent);
  color:var(--bec-muted);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  cursor:pointer;
  font-size:11.5px;
  pointer-events:auto;
}
.bec-context-person > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bec-context-person strong { color:var(--bec-text); font-weight:650; }
/* ---------- messages ---------- */
/* MPRF-BLK-CVG7H2N5 — keep a small visual breathing room between the newest bubble and the composer, including after iOS keyboard collapse. */
.bec-messages {
  grid-area:messages;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:116px clamp(22px,8vw,180px) 14px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
  scroll-padding-top:116px;
  scroll-padding-bottom:14px;
  transition:opacity .12s ease;
  overflow-anchor:none;
}
.bec-messages::-webkit-scrollbar { display:none; }
.bec-messages > * { flex:0 0 auto; }
/* MPRF-BLK-CVG7H2N5 — default/short dialogs must end at the same composer gap as a
   scrolled long dialog. This flexible top filler collapses to 0 once content overflows. */
.bec-messages > .bec-tail-fill-spacer{flex:1 1 auto;min-height:0;height:0;pointer-events:none}
.bec-messages-end { width:100%; height:1px; min-height:1px; pointer-events:none; }
.bec-dialog-skeleton { width:100%; display:flex; flex-direction:column; gap:9px; padding-top:8px; pointer-events:none; opacity:.82; }
.bec-dialog-skeleton span { height:34px; border-radius:18px; background:var(--bec-soft); animation:bec-pulse 1.1s ease-in-out infinite alternate; }
.bec-dialog-skeleton span:nth-child(1) { width:min(58%,360px); align-self:flex-end; }
.bec-dialog-skeleton span:nth-child(2) { width:min(74%,440px); align-self:flex-start; }
.bec-dialog-skeleton span:nth-child(3) { width:min(48%,300px); align-self:flex-start; }
@keyframes bec-pulse { to { opacity:.35; } }
.bec-message-empty { margin:auto; color:var(--bec-muted); font-size:13px; font-weight:400; }
.bec-date-separator {
  align-self:center;
  flex:0 0 auto;
  margin:8px 0;
  padding:6px 11px;
  border:0;
  border-radius:999px;
  background:var(--bec-soft);
  color:var(--bec-text);
  font-size:10.5px;
  font-weight:560;
  line-height:1;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.bec-date-separator:active { transform:scale(.97); }

.bec-message {
  align-self:flex-start;
  flex:0 0 auto;
  min-height:26px;
  width:fit-content;
  max-width:min(78%,560px);
  padding:7px 10px 6px;
  border:0;
  border-radius:17px 17px 17px 6px;
  background:color-mix(in srgb,var(--bec-soft) 82%,transparent);
  color:var(--bec-text);
  box-shadow:none;
  overflow:visible;
}
.bec-message.is-right { align-self:flex-end; border-radius:17px 17px 6px 17px; }
.bec-message.is-green { background:color-mix(in srgb,var(--bec-green) 16%,var(--bec-surface)); }
.bec-message.is-blue { background:color-mix(in srgb,var(--bec-blue) 17%,var(--bec-surface)); }
.bec-message-author { display:block; margin-bottom:2px; color:var(--bec-muted); font-size:10px; font-weight:500; line-height:1.15; }
.bec-message-body {
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,auto) auto;
  align-items:end;
  column-gap:8px;
  row-gap:2px;
}
/* MPRF-BLK-CMP3V7N8 — Telegram-style bubble flow: only the final text line
   reserves metadata width; previous lines may use the full bubble width. */
.bec-message-body.has-text:not(.has-action) { display:block; position:relative; }
.bec-message-body.has-text:not(.has-action) > .bec-message-meta { position:absolute; right:0; bottom:0; }
.bec-message-text { min-width:0; white-space:pre-wrap; overflow-wrap:break-word; word-break:normal; hyphens:none; font-size:13.5px; line-height:1.28; }
.bec-message-body.has-text:not(.has-action) > .bec-message-text { display:inline; }
.bec-message-meta-spacer { display:inline-block; width:36px; height:1px; pointer-events:none; }
.bec-message-meta-spacer.is-right { width:56px; }
.bec-message.is-deleted { background:color-mix(in srgb,var(--bec-soft) 70%,transparent); }
.bec-message.is-deleted { max-width:calc(100% - 44px); }
.bec-message.is-deleted .bec-message-body { display:flex; flex-wrap:nowrap; align-items:flex-end; position:static; }
.bec-message.is-deleted .bec-message-body > .bec-message-meta { position:static; }
.bec-message.is-deleted .bec-message-text { color:var(--bec-muted); font-style:italic; white-space:nowrap; overflow:visible; text-overflow:clip; }
.bec-message, .bec-message-image { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.bec-message-text { -webkit-user-select:text; user-select:text; }
.bec-message.is-deleting { opacity:.55; pointer-events:none; }
.bec-message-meta {
  align-self:end;
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:2px;
  white-space:nowrap;
  color:var(--bec-muted);
  line-height:1;
  min-height:11px;
  margin-left:auto;
}
.bec-message-meta time { font-size:9.5px; font-weight:480; font-variant-numeric:tabular-nums; line-height:11px; }
.bec-read-ticks { width:17px; height:11px; display:block; flex:0 0 17px; color:color-mix(in srgb,var(--bec-muted) 88%,transparent); }
.bec-read-ticks.is-read { color:#20b95a; }

.bec-message.has-image {
  padding:5px;
  width:min(480px,calc(520px * var(--bec-image-ratio-number,.75)),var(--bec-image-natural-width,480px));
  min-width:132px;
  max-width:min(78%,480px);
}
.bec-message.has-image .bec-message-author { padding:2px 5px 0; }
.bec-message.has-image .bec-message-body { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px 7px; position:static; }
.bec-message.has-image .bec-message-body > .bec-message-meta { position:static; }
.bec-message-image { width:100%; aspect-ratio:var(--bec-image-ratio,3/4); border:0; padding:0; background:color-mix(in srgb,var(--bec-soft) 72%,transparent); border-radius:13px; overflow:hidden; cursor:zoom-in; display:block; }
.bec-message-image img { display:block; width:100%; height:100%; object-fit:contain; background:transparent; opacity:0; transition:opacity .12s ease; }
.bec-message-image img.is-loaded { opacity:1; }
.bec-message.has-image .bec-message-text { width:100%; padding:2px 5px 0; }
.bec-message.has-image .bec-message-meta { margin:0 4px 1px auto; }

.bec-jump-bottom {
  position:absolute;
  right:clamp(24px,8vw,182px);
  bottom:74px;
  z-index:18;
  min-height:38px;
  padding:0 13px 0 10px;
  border:1px solid color-mix(in srgb,var(--bec-line) 74%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--bec-solid-surface) 80%,transparent);
  color:var(--bec-text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  box-shadow:0 10px 30px rgba(15,23,42,.15);
  backdrop-filter:blur(18px) saturate(1.25);
  -webkit-backdrop-filter:blur(18px) saturate(1.25);
  cursor:pointer;
  font-size:12px;
  font-weight:520;
}
.bec-jump-bottom:active { transform:scale(.96); }
/* ---------- composer ---------- */
.bec-dialog-notices {
  grid-area:notices;
  position:absolute;
  left:0;
  right:0;
  bottom:72px;
  z-index:22;
  min-width:0;
  display:grid;
  gap:5px;
  padding:0 14px 5px;
}
.bec-topic-prompt, .bec-dialog-error {
  margin:0;
  padding:8px 11px;
  border-radius:12px;
  font-size:11.5px;
}
.bec-topic-prompt { color:var(--bec-blue); background:color-mix(in srgb,var(--bec-blue) 10%,transparent); }
.bec-dialog-error { color:var(--bec-red); background:color-mix(in srgb,var(--bec-red) 10%,transparent); }
.bec-readonly { grid-area:composer; position:relative; z-index:22; margin:0; padding:10px 12px; border-radius:13px; background:var(--bec-soft); color:var(--bec-muted); text-align:center; font-size:11.5px; }

.bec-composer {
  grid-area:composer;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  align-items:center;
  gap:8px;
  padding:10px clamp(22px,8vw,180px) 12px;
  position:relative;
  z-index:24;
  background:transparent;
  isolation:isolate;
}
.bec-composer::before {
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  inset:0;
  display:none;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.bec-composer.has-attachment { grid-template-columns:42px minmax(0,1fr) 42px; }
.bec-image-input { display:none; }
/* MPRF-BLK-CMP3V7N8 — auto-growing 1..8-line composer shared by ordinary/business/support chats. */
.bec-composer textarea {
  width:100%;
  min-width:0;
  min-height:38px;
  height:auto;
  resize:none;
  overflow-x:hidden;
  overflow-y:hidden;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  padding:9px 13px;
  border:1px solid color-mix(in srgb,var(--bec-line) 85%,transparent);
  border-radius:19px;
  outline:0;
  background:color-mix(in srgb,var(--bec-solid-surface) 88%,transparent);
  backdrop-filter:blur(16px) saturate(1.16);
  -webkit-backdrop-filter:blur(16px) saturate(1.16);
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 55%,transparent);
  color:var(--bec-text);
  font-size:13.5px;
  line-height:18px;
  caret-color:var(--bec-blue);
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--bec-muted) 40%,transparent) transparent;
  transition:box-shadow .14s ease, background .14s ease;
}
.bec-composer textarea::placeholder { color:var(--bec-muted); opacity:.9; }
.bec-composer textarea:focus { border-color:transparent; background:color-mix(in srgb,var(--bec-soft) 74%,transparent); box-shadow:0 0 0 3px color-mix(in srgb,var(--bec-blue) 15%,transparent); }
.bec-composer textarea:not(.is-scrollable)::-webkit-scrollbar { display:none; }
.bec-composer textarea.is-scrollable::-webkit-scrollbar { width:4px; }
.bec-composer textarea.is-scrollable::-webkit-scrollbar-track { background:transparent; margin:8px 2px; }
.bec-composer textarea.is-scrollable::-webkit-scrollbar-thumb { background:color-mix(in srgb,var(--bec-muted) 42%,transparent); border-radius:999px; }
.bec-attach, .bec-send {
  width:42px;
  height:42px;
  min-width:42px;
  max-width:42px;
  aspect-ratio:1;
  padding:0;
  border:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.bec-attach { color:#19b858; background:color-mix(in srgb,var(--bec-solid-surface) 86%,transparent); backdrop-filter:blur(16px) saturate(1.16); -webkit-backdrop-filter:blur(16px) saturate(1.16); box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 55%,transparent); }
.bec-send { color:#fff; background:var(--bec-blue); }
.bec-attach:disabled, .bec-send:disabled { opacity:.45; cursor:default; }
/* ---------- calendar / message actions ---------- */
.bec-calendar-backdrop {
  position:fixed;
  inset:0;
  z-index:30100;
  display:grid;
  place-items:center;
  width:100vw;
  height:100dvh;
  padding:14px;
  background:rgba(15,18,24,.24);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
.bec-calendar {
  width:min(286px,calc(100vw - 30px));
  padding:8px;
  border:1px solid var(--bec-line);
  border-radius:17px;
  background:var(--bec-solid-surface);
  color:var(--bec-text);
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  display:grid;
  gap:7px;
}
.bec-calendar-head { align-items:center; gap:8px; }
.bec-calendar-month { text-align:center; text-transform:capitalize; font-size:13px; font-weight:400; }
.bec-calendar-head button { width:30px; height:30px; border:0; border-radius:50%; background:var(--bec-soft); color:var(--bec-text); display:grid; place-items:center; }
.bec-calendar-close { background:transparent !important; border:1px solid var(--bec-line) !important; }
.bec-calendar-head button.is-next svg { transform:rotate(180deg); }
.bec-calendar-head button:disabled { opacity:.28; }
.bec-calendar-weekdays, .bec-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
.bec-calendar-weekdays span { text-align:center; color:var(--bec-muted); font-size:10px; }
.bec-calendar-grid button {
  aspect-ratio:1;
  min-width:0;
  border:0;
  border-radius:11px;
  background:transparent;
  color:var(--bec-muted);
  font-size:12px;
  display:grid;
  place-items:center;
}
.bec-calendar-grid button.has-messages { background:color-mix(in srgb,var(--bec-blue) 12%,var(--bec-soft)); color:var(--bec-text); font-weight:400; cursor:pointer; }
.bec-calendar-grid button.has-messages:active { transform:scale(.94); }
.bec-calendar-grid button.is-outside { opacity:0; pointer-events:none; }
.bec-calendar-grid button:disabled:not(.is-outside) { opacity:.28; }

.bec-message-menu {
  position:fixed;
  z-index:30110;
  width:180px;
  padding:5px;
  border:1px solid var(--bec-line);
  border-radius:14px;
  background:var(--bec-solid-surface);
  box-shadow:0 18px 48px rgba(15,23,42,.24);
  display:grid;
  gap:2px;
}
.bec-message-menu button {
  width:100%;
  min-height:40px;
  padding:0 11px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--bec-text);
  text-align:left;
  font-size:13px;
  cursor:pointer;
}
.bec-message-menu button:hover, .bec-message-menu button:active { background:var(--bec-soft); }
.bec-message-menu button.is-delete { color:var(--bec-red); }

.bec-copy-toast {
  position:fixed;
  left:50%;
  bottom:max(78px,calc(env(safe-area-inset-bottom,0px) + 62px));
  z-index:30118;
  transform:translateX(-50%);
  padding:7px 11px;
  border:1px solid var(--bec-line);
  border-radius:999px;
  background:color-mix(in srgb,var(--bec-solid-surface) 94%,transparent);
  color:var(--bec-text);
  box-shadow:0 10px 28px rgba(15,23,42,.18);
  font-size:11.5px;
  font-weight:500;
  line-height:1;
  white-space:nowrap;
  pointer-events:none;
}
/* ---------- full image viewer ---------- */
.bec-image-viewer {
  position:fixed;
  inset:0;
  z-index:30120;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(18px,env(safe-area-inset-top,0px)) max(18px,env(safe-area-inset-right,0px)) max(18px,env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));
  background:rgba(12,13,16,.94);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  touch-action:pan-y;
  overscroll-behavior:contain;
}
.bec-image-viewer img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; object-position:center; border-radius:12px; box-shadow:0 24px 80px rgba(0,0,0,.35); }
.bec-image-viewer-close { position:fixed; top:max(18px,env(safe-area-inset-top,0px)); left:max(18px,env(safe-area-inset-left,0px)); right:auto; z-index:2; color:#fff; border-color:rgba(255,255,255,.25); background:rgba(0,0,0,.58); }

@media (min-width:761px) {
  .bec-peer-card,
  .bec-dialog-topic-slot,
  .bec-peer-avatar-button { transform:none; }
  .bec-dialog.has-context .bec-context {
    left:var(--bec-center-track-left);
    right:var(--bec-center-track-right);
  }
}

/* ---------- mobile ---------- */
@media (max-width:760px) {
  .bec-filters { max-width:100%; }
  .bec-workspace-title > strong { max-width:38vw; }
  .bec-message { max-width:84%; }
}

@media (max-width:600px) {
  /* VID-058: scrolling tabs instead of narrow two-line labels. */
  .bec-filters {
    width:100%; display:flex; align-items:center; justify-content:flex-start;
    gap:4px; padding:3px; overflow-x:auto; overflow-y:hidden;
    -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity;
  }
  .bec-filters button {
    flex:0 0 auto; width:auto; min-height:34px; padding:0 12px;
    white-space:nowrap; text-align:center; font-size:11px;
    line-height:1.14; gap:6px; scroll-snap-align:start;
  }
  .bec-filters button > span:first-child { white-space:nowrap; overflow-wrap:normal; }
  .bec-dialog {
    --bec-head-control:44px; --bec-head-gap:6px;
    --bec-head-pad-left:8px; --bec-head-pad-right:8px;
    --bec-mobile-head-top:max(8px,calc(env(safe-area-inset-top,0px) + 4px)); /* MPRF-MAX-BLK-MXL7V2P4 MAX native chrome is outside the WebView */
  }
  .bec-dialog-head {
    grid-template-columns:var(--bec-head-control) minmax(0,1fr) var(--bec-head-control) var(--bec-head-control);
    gap:var(--bec-head-gap);
    padding:var(--bec-mobile-head-top) var(--bec-head-pad-right) 5px var(--bec-head-pad-left);
    position:absolute;
    inset:0 0 auto 0;
    background:transparent;
  }
  .bec-dialog-head::before {
    display:block;
    inset:0 0 -20px;
    background:linear-gradient(to bottom,color-mix(in srgb,var(--bec-solid-surface) 76%,transparent) 0%,color-mix(in srgb,var(--bec-solid-surface) 34%,transparent) 58%,transparent 100%);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    -webkit-mask-image:none;
    mask-image:none;
    transform:translateZ(0);
    contain:paint;
  }
  .bec-back, .bec-peer-avatar-button, .bec-topic-trigger.is-header, .bec-topic-static.is-icon, .bec-peer-card {
    background:color-mix(in srgb,var(--bec-surface) 70%,transparent);
    border-color:color-mix(in srgb,var(--bec-line) 72%,transparent);
    backdrop-filter:blur(11px) saturate(1.12);
    -webkit-backdrop-filter:blur(11px) saturate(1.12);
    transform:translateZ(0);
    backface-visibility:hidden;
    contain:paint;
    box-shadow:0 7px 20px rgba(15,23,42,.07);
  }
  .bec-peer-card { height:var(--bec-head-control); padding:3px 8px; gap:1px; }
  .bec-peer-title-line strong { font-size:14.5px; }
  .bec-peer-title-line em { font-size:10.2px; }
  .bec-peer-topic-line { font-size:10.8px; }
  .bec-topic-menu {
    position:absolute;
    top:calc(100% + 8px);
    left:auto;
    right:-56px;
    bottom:auto;
    width:min(340px,calc(100vw - 32px));
    max-height:min(330px,44dvh);
    border-radius:18px;
  }
  .bec-close { width:42px; height:42px; background:var(--bec-soft); border:0; }
  .bec-context { min-height:34px; padding:3px 9px; }
  .bec-dialog.has-context .bec-context {
    position:absolute;
    top:calc(var(--bec-mobile-head-top) + 49px);
    left:18px;
    right:18px;
    z-index:23;
    margin:0;
    background:transparent;
    border:0;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .bec-context-person {
    width:100%;
    min-height:34px;
    padding:0 11px;
    font-size:11px;
    background:color-mix(in srgb,var(--bec-surface) 68%,transparent);
    border-color:color-mix(in srgb,var(--bec-line) 70%,transparent);
    backdrop-filter:blur(10px) saturate(1.1);
    -webkit-backdrop-filter:blur(10px) saturate(1.1);
    transform:translateZ(0);
    backface-visibility:hidden;
    contain:paint;
    box-shadow:0 7px 20px rgba(15,23,42,.07);
  }
  .bec-messages { padding:8px 20px 14px; scroll-padding-bottom:14px; gap:8px; }
  .bec-dialog:not(.has-context) .bec-messages { padding-top:calc(var(--bec-mobile-head-top) + 66px); }
  .bec-dialog.has-context .bec-messages { padding-top:calc(var(--bec-mobile-head-top) + 108px); }
  .bec-message { max-width:82%; padding:8px 11px 7px; }
  .bec-date-separator { margin:12px 0; padding:7px 12px; font-size:11px; }
  .bec-message-text { font-size:16px; line-height:1.25; }
  .bec-message-author { font-size:11.5px; }
  .bec-message-meta time { font-size:10.5px; }
  .bec-message.has-image {
    width:min(86vw,calc(55dvh * var(--bec-image-ratio-number,.75)),var(--bec-image-natural-width,480px));
    max-width:86%;
  }
  .bec-composer {
    padding:8px 10px max(10px,env(safe-area-inset-bottom,0px));
    background:transparent;
    gap:8px;
    isolation:isolate;
  }
  .bec-composer::before {
    display:block;
    inset:-30px 0 0;
    background:linear-gradient(to top,color-mix(in srgb,var(--bec-solid-surface) 78%,transparent) 0%,color-mix(in srgb,var(--bec-solid-surface) 32%,transparent) 62%,transparent 100%);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    -webkit-mask-image:none;
    mask-image:none;
    transform:translateZ(0);
    contain:paint;
  }
  .bec-composer textarea, .bec-attach, .bec-send {
    backdrop-filter:blur(10px) saturate(1.1);
    -webkit-backdrop-filter:blur(10px) saturate(1.1);
    transform:translateZ(0);
    backface-visibility:hidden;
    contain:paint;
  }
  .bec-composer textarea { background:color-mix(in srgb,var(--bec-solid-surface) 72%,transparent); box-shadow:none; }
  .bec-attach { background:color-mix(in srgb,var(--bec-solid-surface) 72%,transparent); box-shadow:none; }
  .bec-jump-bottom { right:18px; bottom:max(calc(82px + var(--bec-composer-extra-height)),calc(env(safe-area-inset-bottom,0px) + 72px + var(--bec-composer-extra-height))); min-height:36px; }
  .bec-composer textarea { min-height:42px; padding:11px 14px; border-radius:22px; font-size:16px; line-height:20px; }
  .bec-dialog-notices { padding-inline:18px; }
  .bec-calendar-backdrop { place-items:center; padding:10px; }
  .bec-calendar { width:min(278px,calc(100vw - 24px)); align-self:center; justify-self:center; }
  .bec-image-viewer { padding:max(78px,calc(var(--tg-content-safe-area-inset-top,0px) + 58px),calc(env(safe-area-inset-top,0px) + 58px)) 12px max(22px,calc(env(safe-area-inset-bottom,0px) + 14px)); }
  .bec-image-viewer-close { top:max(76px,calc(var(--tg-content-safe-area-inset-top,0px) + 56px),calc(env(safe-area-inset-top,0px) + 56px)); left:16px; right:auto; width:44px; height:44px; }
}

@media (prefers-reduced-motion:reduce) {
  .bec-spinner, .bec-dialog-skeleton span { animation:none; }
  .bec-thread, .bec-back, .bec-close, .bec-image-viewer-close, .bec-topic-trigger svg { transition:none; }
}

/* Global Messages role-specific action inside the canonical Enterprise bubble. */
.bec-message-action { border:0; min-height:30px; padding:6px 10px; border-radius:10px; background:rgba(10,132,255,.14); color:inherit; font:inherit; font-size:12px; font-weight:750; cursor:pointer; align-self:flex-start; }
.bec-message.is-right .bec-message-action { background:rgba(255,255,255,.18); }
.bec-message-action:active { transform:scale(.98); }


.bec-dialog .bec-messages-list > :last-child{margin-bottom:8px;}


/* MPRF-MAX-BLK-GST0R2M8 — keep chat/list vertical gestures inside the MAX WebView. */
html[data-mprf-platform="max"] .bec-root,
html[data-mprf-platform="max"] .bec-list-stage,
html[data-mprf-platform="max"] .bec-list,
html[data-mprf-platform="max"] .bec-messages {
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
}


/* MPRF-BLK-PROMOCHAT-2188 — structured Profi promo card inside ordinary chat. */
.bec-message.has-profi-promo { width:min(86%,420px); max-width:min(86%,420px); }
.bec-message.has-profi-promo .bec-message-body { display:flex; flex-direction:column; gap:6px; position:static; width:100%; }
.bec-message.has-profi-promo .bec-message-meta { position:static; margin-left:auto; }
.bec-profi-promo-card { width:100%; min-width:0; display:grid; gap:7px; }
.bec-profi-promo-media { width:100%; padding:0; border:0; border-radius:13px; overflow:hidden; background:color-mix(in srgb,var(--bec-soft) 72%,transparent); cursor:zoom-in; display:grid; place-items:center; }
.bec-profi-promo-media img { display:block; width:100%; height:auto; max-height:min(58vh,440px); object-fit:contain; object-position:center; }
.bec-profi-promo-title { display:block; min-width:0; font-size:15px; line-height:1.25; font-weight:700; overflow-wrap:anywhere; margin-bottom:7px; }
.bec-profi-promo-body { min-width:0; font-size:13.5px; line-height:1.32; white-space:pre-wrap; overflow-wrap:anywhere; }
/* MPRF-BLK-PRM6S4L2 — bot-like promo footer: one adaptive italic service/price row, with a deliberate blank-line gap after body. */
.bec-profi-promo-price { margin-top:7px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; column-gap:8px; row-gap:6px; font-size:12.5px; line-height:1.2; font-family:var(--bec-font); font-style:italic; }
.bec-profi-promo-service-name { flex:1 1 auto; min-width:88px; font-weight:600; line-height:24px; overflow-wrap:anywhere; }
.bec-profi-promo-price-group { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; min-height:24px; white-space:nowrap; font-style:italic; }
.bec-profi-promo-price-group>* { height:24px; min-height:24px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; line-height:24px; }
.bec-profi-promo-price .is-old { opacity:.58; text-decoration:line-through; transform:translateY(.75px); }
.bec-profi-promo-arrow { font-family:var(--bec-font); font-weight:700; font-size:12.5px; opacity:.72; }
.bec-profi-promo-price .is-new { padding:0 8px; border-radius:999px; background:rgba(255,159,10,.22); color:inherit; font-weight:700; }
.bec-profi-promo-action { width:100%; min-height:38px; border:0; border-radius:13px; padding:0 11px; display:grid; grid-template-columns:24px minmax(0,1fr) 24px; align-items:center; background:linear-gradient(180deg,#2f95ff 0%,#0a84ff 100%); color:#fff; font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bec-profi-promo-action>span:first-child { grid-column:2; text-align:center; }
.bec-profi-promo-action>span:last-child { grid-column:3; justify-self:end; font-size:19px; font-weight:400; line-height:1; transform:translateY(-.5px); }
@media (max-width:560px){ .bec-message.has-profi-promo { width:86%; max-width:86%; } .bec-profi-promo-title{font-size:16px}.bec-profi-promo-body{font-size:15px}.bec-profi-promo-action{min-height:40px;font-size:13px} }

/* MPRF-BLK-BDG2189 — accepted Client optical baseline; Profi/Enterprise stay at the canonical zero-shift baseline. */
.bec-root[data-audience="client"] .bec-count > span { transform:none!important; display:flex; align-items:center; justify-content:center; }

/* MPRF-BLK-PRM7W8L2 — long service names keep the trailing price group right-aligned, never squeezed. */
.bec-profi-promo-price { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; align-items:end; min-width:0; }
.bec-profi-promo-service-name { min-width:0; overflow-wrap:break-word; word-break:normal; line-height:1.3; }
.bec-profi-promo-price-group { white-space:nowrap; justify-self:end; }
@media(max-width:330px){.bec-profi-promo-price{grid-template-columns:minmax(0,1fr)}.bec-profi-promo-price-group{justify-self:end}}

/* MPRF-BLK-UI155-CBADGE — the Client list's unread badge is centered in its
   meta column; the previous bottom:7px anchored it visibly below the row center. */
.bec-root[data-audience="client"] .bec-thread-meta.has-badge > .bec-count {
  top: 50%; bottom: auto; transform: translateY(-50%); right: 0;
}
.bec-root[data-audience="client"] .bec-thread-meta.has-badge > .bec-thread-meta-center { top: 0; }
/* Message timestamps must never ghost through the translucent composer in MAX/TG.
   Opaque bottom and a gentle top fade preserve chat focus without extra GPU blur. */
@media (max-width:600px) {
  .bec-composer::before {
    background: linear-gradient(to top, var(--bec-solid-surface) 0%, var(--bec-solid-surface) 25%, color-mix(in srgb,var(--bec-solid-surface) 96%,transparent) 62%, transparent 100%);
    inset: -35px 0 0;
  }
}

/* MPRF 14437 MAX 277: responsive, non-scrolling Enterprise filter group.
   Center text+badge as one inline group; badge always follows label on the right. */
@media (max-width: 760px) {
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters {
    display: grid !important;
    /* P36 / 29.10 owner audit: one compact full-width row per filter. */
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(35px, auto));
    gap: 4px !important;
    padding: 3px !important;
    width: 100%; max-width: 100%; overflow: visible !important;
    border-radius: 17px;
  }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button {
    display: flex; align-items:center; justify-content:center;
    width:100%; min-width:0; max-width:100%; min-height:35px;
    padding: 3px 6px; flex:initial; white-space:normal;
    font-size: clamp(10px, 2.9vw, 11.6px); line-height:1.14;
    text-align:center; gap:5px;
  }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button:first-child { grid-column:1; grid-row:1; align-self:stretch; min-height:35px; }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button:nth-child(2) { grid-column:1; grid-row:2; }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button:nth-child(3) { grid-column:1; grid-row:3; }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button > span:first-child {
    white-space:normal; overflow:visible; overflow-wrap:normal;
    flex: 0 1 auto; min-width:0;
  }
  .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters .bec-count { flex:0 0 auto; }
}

/* MPRF-14440: single MAX-only compact contract (P36/N09).
   Previous successive !important layers had competing row heights.
   Telegram's existing mobile filter layout above remains untouched. */
@media (max-width:760px) {
  html[data-mprf-platform="max"] .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters {
    display:grid!important; height:auto!important; min-height:0!important;
    grid-template-rows:repeat(3,minmax(28px,auto))!important;
    gap:1px!important; padding:2px!important; margin-block:0 8px!important;
  }
  html[data-mprf-platform="max"] .bec-root[data-global-messages="enterprise-canonical-v1"] .bec-filters button {
    min-height:28px!important; height:auto!important; padding:2px 9px!important;
    line-height:1.15!important; border-radius:10px!important;
    font-size:clamp(10px,2.8vw,11px)!important;
  }
}

/* MPRF 144.47: keyboard-specific safe padding only. Portalled-chat
   rectangle, grid cells and button sizes are defined once above. */
@media(max-width:600px) {
  .bec-dialog-overlay.bec-root[data-bec-keyboard-open="true"] .bec-composer {
    padding-bottom:8px;
  }
  .bec-dialog-overlay.bec-root .bec-readonly {
    margin:8px 12px max(10px,env(safe-area-inset-bottom,0px));
  }
}

/* src/screens/business/businessChatsMobileSearch.css */
/* Enterprise Chats mobile list/search decomposition (v1.9.1457).
   One scoped contract: lightweight iOS list, finger-follow pull-down search and exact result focus. */
.bec-list-stage{--bec-search-height:40px;--bec-search-pull:0;min-width:0;display:grid;gap:0;touch-action:pan-y}
.bec-search-wrap{min-width:0;height:0;margin:0;opacity:0;overflow:hidden;transform:translate3d(0,-6px,0);pointer-events:none;transition:height .15s cubic-bezier(.2,.75,.2,1),margin-bottom .15s cubic-bezier(.2,.75,.2,1),opacity .11s linear,transform .15s cubic-bezier(.2,.75,.2,1);will-change:height,opacity,transform;contain:layout paint}
.bec-search-wrap.is-visible{height:var(--bec-search-height);margin-bottom:7px;opacity:1;transform:translate3d(0,0,0);pointer-events:auto}
.bec-list-stage.is-search-pulling .bec-search-wrap{height:calc(var(--bec-search-height) * var(--bec-search-pull));margin-bottom:calc(7px * var(--bec-search-pull));opacity:var(--bec-search-pull);transform:translate3d(0,0,0);pointer-events:none;transition:none}
.bec-search-bar{position:relative;min-width:0;width:100%;height:var(--bec-search-height);padding:0 11px;border:1px solid color-mix(in srgb,var(--bec-line) 74%,transparent);border-radius:999px;background:color-mix(in srgb,var(--bec-soft) 78%,transparent);color:var(--bec-muted);display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:7px;overflow:hidden;isolation:isolate;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.bec-search-leading{width:20px;height:20px;display:grid;place-items:center;opacity:0;transform:scale(.92);transition:opacity .12s ease,transform .12s ease}.bec-search-leading svg,.bec-search-placeholder svg{width:18px;height:18px}
.bec-search-placeholder{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;gap:7px;color:var(--bec-muted);font:400 15px/1.2 var(--bec-font);pointer-events:none;opacity:.84;transform:translate3d(0,0,0);transition:opacity .1s ease,transform .12s ease}
.bec-search-bar.is-active .bec-search-placeholder{opacity:0;transform:scale(.98)}.bec-search-bar.is-active .bec-search-leading{opacity:.82;transform:scale(1)}
.bec-search-bar input{position:relative;z-index:2;min-width:0;width:100%;height:var(--bec-search-height);padding:0;border:0;outline:0;background:transparent;color:var(--bec-text);font:450 15px/1.2 var(--bec-font);-webkit-appearance:none;appearance:none}
.bec-search-bar input::placeholder{color:var(--bec-muted);font-weight:400;opacity:.82}.bec-search-bar input::-webkit-search-cancel-button{display:none}
.bec-search-clear{position:relative;z-index:2;width:28px;height:28px;border:0;border-radius:50%;padding:0;background:color-mix(in srgb,var(--bec-muted) 17%,transparent);color:var(--bec-muted);display:grid;place-items:center;cursor:pointer}.bec-search-clear svg{width:12px;height:12px}
.bec-search-spinner{position:relative;z-index:2;width:15px;height:15px;border-radius:50%;border:1.7px solid color-mix(in srgb,var(--bec-muted) 28%,transparent);border-top-color:var(--bec-blue);animation:bec-spin .7s linear infinite}
.bec-preview mark{padding:0 1px;border-radius:3px;background:color-mix(in srgb,var(--bec-blue) 19%,transparent);color:inherit}
.bec-thread-meta-top{position:static;min-width:0;width:100%}.bec-thread-pin{position:absolute;top:1px;right:0;width:15px;height:15px;display:grid;place-items:center;color:var(--bec-muted);opacity:.72}.bec-thread-pin svg{width:13px;height:13px}
.bec-message.is-search-hit{animation:bec-search-hit 2.25s ease-out both}
@keyframes bec-search-hit{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--bec-blue) 0%,transparent)}14%{box-shadow:0 0 0 5px color-mix(in srgb,var(--bec-blue) 22%,transparent)}55%{box-shadow:0 0 0 3px color-mix(in srgb,var(--bec-blue) 14%,transparent)}100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--bec-blue) 0%,transparent)}}
@media(max-width:600px){
  .bec-search-bar{border:0;background:color-mix(in srgb,var(--bec-muted) 10%,var(--bec-soft));box-shadow:inset 0 0 0 .5px color-mix(in srgb,var(--bec-line) 54%,transparent)}
  .bec-list,.bec-root.is-ordinary .bec-list{gap:0;overflow:visible;border:0;border-radius:0;background:transparent}
  .bec-thread,.bec-root.is-ordinary .bec-thread{position:relative;grid-template-columns:44px minmax(0,1fr) minmax(48px,auto);gap:10px;min-height:72px;padding:10px 4px 10px 0;border:0;border-radius:0;background:transparent;box-shadow:none}
  .bec-thread.is-actionable{border:0}.bec-thread:active{transform:none;background:color-mix(in srgb,var(--bec-soft) 54%,transparent)}
  .bec-thread:not(:last-child)::after,.bec-root.is-ordinary .bec-thread:not(:last-child)::after{content:"";position:absolute;left:54px;right:0;bottom:0;height:1px;background:color-mix(in srgb,var(--bec-line) 82%,transparent);transform:scaleY(.55);transform-origin:center bottom;pointer-events:none}.bec-thread.is-support:not(:last-child)::after,.bec-root.is-ordinary .bec-thread.is-support:not(:last-child)::after{left:0;right:0;background:color-mix(in srgb,var(--bec-line) 100%,transparent);transform:none}
  .bec-root.is-ordinary .bec-thread:not(:last-child){border-bottom:0}.bec-thread-main{gap:2px}.bec-thread-top strong{font-size:14px;font-weight:650}.bec-service{font-size:11.5px;font-weight:520}.bec-preview{font-size:11.5px}.bec-thread-time,.bec-root.is-ordinary .bec-thread-time{font-size:11.5px;font-weight:450}.bec-empty.is-search-empty{min-height:112px;border:0;background:transparent}
}
@media(prefers-reduced-motion:reduce){.bec-search-spinner,.bec-message.is-search-hit{animation:none}.bec-search-wrap,.bec-search-leading,.bec-search-placeholder{transition:none}}

/* src/screens/messages/globalMessagesProduct.css */
/* v2.0.9 — restored Personal Profi VIP/FAV controls inside the global Messages row. */
.bec-profi-tags { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.bec-profi-tag { border:0; padding:0; min-height:24px; background:transparent; color:rgba(235,235,245,.55); font:900 10.5px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bec-profi-tag.is-active { color:#00a05a; }
.bec-root.is-light .bec-profi-tag { color:rgba(0,0,0,.45); }
.bec-root.is-light .bec-profi-tag.is-active { color:#00a05a; }
.bec-profi-tag:disabled { opacity:.5; cursor:default; }
.bec-tag-info-backdrop { position:fixed; inset:0; z-index:10020; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(0,0,0,.46); -webkit-tap-highlight-color:transparent; }
.bec-tag-info { width:min(360px,100%); border:1px solid rgba(255,255,255,.12); border-radius:24px; padding:18px; background:rgba(28,28,30,.98); color:#fff; box-shadow:0 18px 48px rgba(0,0,0,.28); text-align:left; }
.bec-tag-info.is-light { border-color:rgba(60,60,67,.13); background:rgba(255,255,255,.98); color:#111; }
.bec-tag-info-label { display:inline-flex; margin-bottom:8px; font-size:12px; font-weight:900; letter-spacing:.05em; }
.bec-tag-info strong { display:block; font-size:18px; line-height:1.2; }
.bec-tag-info p { margin:9px 0 16px; color:rgba(235,235,245,.72); font-size:14px; line-height:1.42; }
.bec-tag-info.is-light p { color:rgba(60,60,67,.72); }
.bec-tag-info button { width:100%; min-height:44px; border:0; border-radius:14px; background:#0a84ff; color:#fff; font:700 15px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif; }

/* v2.0.10 — canonical MPRF typography + 30-day VIP/FAV education suppression. */
.bec-tag-info {
  font-family:var(--mprf-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif);
  font-synthesis:none;
}
.bec-tag-info strong,
.bec-tag-info p,
.bec-tag-info-label,
.bec-tag-info-suppress {
  font-family:inherit;
}
.bec-tag-info strong { font-weight:650; letter-spacing:-.012em; }
.bec-tag-info p { font-weight:400; }
.bec-tag-info-suppress {
  margin:-3px 0 14px;
  min-height:30px;
  display:flex;
  align-items:center;
  gap:9px;
  color:inherit;
  font-size:12.5px;
  font-weight:450;
  line-height:1.25;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
}
.bec-tag-info-suppress input { position:absolute; opacity:0; pointer-events:none; }
/* MPRF-BLK-VIP7Q2M4 — VIP/FAV education checkbox: visible in both light/dark themes. */
.bec-tag-info-check {
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:grid;
  place-items:center;
  border:1.5px solid rgba(174,174,178,.78);
  border-radius:6px;
  background:rgba(118,118,128,.10);
  color:#fff;
  box-shadow:inset 0 0 0 .5px rgba(0,0,0,.03);
  font-size:13px;
  font-weight:800;
  line-height:1;
}
.bec-tag-info.is-light .bec-tag-info-check {
  border-color:rgba(60,60,67,.38);
  background:rgba(118,118,128,.08);
}
.bec-tag-info-suppress input:focus-visible + .bec-tag-info-check {
  outline:2px solid color-mix(in srgb,#0a84ff 48%,transparent);
  outline-offset:2px;
}
.bec-tag-info-suppress input:checked + .bec-tag-info-check {
  border-color:#0a84ff;
  background:#0a84ff;
}

/* v2.0.10 — content-aware dialog title fitting. Standard typography is kept
   when it fits; only genuinely overflowing name+city metadata steps down. */
.bec-peer-title-line.is-condensed { gap:4px; }
.bec-peer-title-line.is-condensed strong { font-size:13.25px; }
.bec-peer-title-line.is-condensed em { font-size:9.7px; }
.bec-peer-title-line.is-tight { gap:3px; }
.bec-peer-title-line.is-tight strong { font-size:11.75px; }
.bec-peer-title-line.is-tight em { font-size:8.8px; }
@media (max-width:760px) {
  .bec-peer-title-line.is-condensed strong { font-size:12.4px; }
  .bec-peer-title-line.is-condensed em { font-size:9.1px; }
  .bec-peer-title-line.is-tight strong { font-size:11px; }
  .bec-peer-title-line.is-tight em { font-size:8.2px; }
}

/* v2.0.15 — support operator center lives inside canonical GlobalMessages. */
.bec-support-center-nav{display:grid;gap:10px;margin:0 0 12px;padding:0 2px}.bec-support-center-tabs,.bec-support-center-subtabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bec-support-center-tabs button,.bec-support-center-subtabs button{border:0;border-radius:999px;min-height:36px;padding:0 16px;background:var(--bec-control,#e9e9ed);color:var(--bec-text);font:inherit;font-weight:800;cursor:pointer}.bec-support-center-tabs button.is-active,.bec-support-center-subtabs button.is-active{background:color-mix(in srgb,var(--bec-blue,#0a84ff) 17%,var(--bec-control,#e9e9ed));color:var(--bec-text)}.bec-support-center-tabs button.is-support{background:color-mix(in srgb,#ff9f0a 14%,var(--bec-control,#e9e9ed))}.bec-support-center-tabs button.is-support.is-active{background:color-mix(in srgb,#ff9f0a 24%,var(--bec-control,#e9e9ed))}.bec-support-center-subtabs button{min-height:34px;padding:0 14px;font-size:13px}.bec-support-pill{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:22px;padding:0 7px;margin-left:7px;border-radius:999px;background:color-mix(in srgb,var(--bec-blue,#0a84ff) 16%,transparent);color:var(--bec-blue,#0a84ff);font-size:11px;font-weight:900;line-height:1}.bec-support-broadcast-shell{min-height:0;overflow:auto;padding:2px 0 18px}.bec-support-broadcast-shell>div{max-width:900px;margin:0 auto}
@media(max-width:600px){.bec-support-center-nav{padding:0 10px}.bec-support-center-tabs,.bec-support-center-subtabs{gap:7px}.bec-support-center-tabs button{min-height:34px;padding:0 14px}.bec-support-center-subtabs button{min-height:32px;padding:0 12px}.bec-support-broadcast-shell{padding:0 10px 18px}}

/* MPRF-BLK-SPH6N2Q9 — Support dialog has no service filter, so the header must not
   reserve an empty fourth control column. This widens the central identity pill. */
.bec-dialog.is-support .bec-dialog-head{
  grid-template-columns:var(--bec-head-control) minmax(0,1fr) var(--bec-head-control);
}
.bec-dialog.is-support .bec-dialog-topic-slot{display:none}

/* MPRF-BLK-SOP8J4R6 — operator mark/hide workflow. */
.bec-thread.is-support-marked{
  background:linear-gradient(105deg,color-mix(in srgb,var(--bec-blue,#0a84ff) 16%,var(--bec-surface)) 0%,color-mix(in srgb,#ff9f0a 10%,var(--bec-surface)) 100%);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bec-blue,#0a84ff) 28%,transparent),0 8px 24px color-mix(in srgb,var(--bec-blue,#0a84ff) 9%,transparent);
}
.bec-service.is-support-identity{display:flex;align-items:center;gap:7px;min-width:0;overflow:hidden}
.bec-service.is-support-identity>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bec-support-did{display:inline-flex;align-items:center;flex:0 0 auto;max-width:46%;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--bec-text) 7%,transparent);color:var(--bec-muted);font-size:10px;font-weight:800;letter-spacing:.015em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bec-support-marked-label{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;background:color-mix(in srgb,var(--bec-blue,#0a84ff) 17%,transparent);color:var(--bec-blue,#0a84ff);font-size:10px;font-weight:900;line-height:1}
.bec-support-thread-menu-layer{position:fixed;inset:0;z-index:43050;background:transparent}
.bec-support-thread-menu{position:fixed;display:grid;gap:5px;width:196px;padding:6px;border:1px solid color-mix(in srgb,var(--bec-line) 88%,transparent);border-radius:16px;background:color-mix(in srgb,var(--bec-solid-surface) 94%,transparent);box-shadow:0 18px 48px rgba(0,0,0,.22);backdrop-filter:blur(20px) saturate(1.12);-webkit-backdrop-filter:blur(20px) saturate(1.12);overflow:hidden}
.bec-support-thread-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:11px;background:transparent;color:var(--bec-text);font:inherit;font-size:14px;font-weight:800;text-align:left;cursor:pointer}
.bec-support-thread-menu button:hover,.bec-support-thread-menu button:focus-visible{background:color-mix(in srgb,var(--bec-text) 7%,transparent);outline:none}
.bec-support-thread-menu button.is-hide{color:var(--bec-red,#ff453a)}
.bec-support-thread-menu button:disabled{opacity:.5;cursor:default}
.bec-support-thread-menu button>span:first-child{display:grid;place-items:center;width:20px;height:20px;font-size:21px;line-height:1}

/* MPRF-BLK-SID3M7Q5 — operator-only role-independent user/profile inspector. */
.bec-support-peer-overlay{position:fixed;inset:0;z-index:43100;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top,0px)) 16px max(16px,env(safe-area-inset-bottom,0px));background:rgba(0,0,0,.42);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.bec-support-peer-card{width:min(520px,100%);max-height:min(760px,calc(100dvh - 32px));overflow:auto;border:1px solid color-mix(in srgb,var(--bec-line) 88%,transparent);border-radius:24px;background:var(--bec-solid-surface);color:var(--bec-text);box-shadow:0 28px 80px rgba(0,0,0,.3)}
.bec-support-peer-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 14px 10px 18px;background:color-mix(in srgb,var(--bec-solid-surface) 92%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid color-mix(in srgb,var(--bec-line) 70%,transparent)}
.bec-support-peer-head>div{display:grid;gap:2px;min-width:0}.bec-support-peer-head strong{font-size:17px}.bec-support-peer-head span{color:var(--bec-muted);font-size:12px}
.bec-support-peer-head>button{width:36px;height:36px;border:0;border-radius:50%;background:color-mix(in srgb,var(--bec-text) 8%,transparent);color:var(--bec-text);font:inherit;font-size:24px;line-height:1;cursor:pointer}
.bec-support-peer-body{display:grid;gap:15px;padding:16px 18px 20px}
.bec-support-peer-identity{display:flex;align-items:center;gap:12px;min-width:0}.bec-support-peer-identity>.bec-avatar{width:58px;height:58px;flex:0 0 58px}.bec-support-peer-identity>div{display:grid;gap:3px;min-width:0}.bec-support-peer-identity strong{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bec-support-peer-identity span{color:var(--bec-muted);font-size:13px;font-weight:700}
.bec-support-peer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.bec-support-peer-grid>div{display:grid;gap:3px;min-width:0;padding:10px 11px;border-radius:14px;background:color-mix(in srgb,var(--bec-text) 5%,transparent)}.bec-support-peer-grid span{color:var(--bec-muted);font-size:11px;font-weight:700}.bec-support-peer-grid strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bec-support-peer-grid strong.is-did{font-size:12px;letter-spacing:.02em}
.bec-support-peer-contexts{display:grid;gap:9px}.bec-support-peer-contexts>section{display:grid;gap:5px;padding:12px 13px;border:1px solid color-mix(in srgb,var(--bec-line) 80%,transparent);border-radius:16px;background:color-mix(in srgb,var(--bec-surface) 72%,transparent)}.bec-support-peer-contexts>section.is-profi{border-color:color-mix(in srgb,var(--bec-blue,#0a84ff) 24%,var(--bec-line))}.bec-support-peer-type{width:max-content;padding:3px 8px;border-radius:999px;background:color-mix(in srgb,var(--bec-blue,#0a84ff) 12%,transparent);color:var(--bec-blue,#0a84ff);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.025em}.bec-support-peer-contexts strong{font-size:15px}.bec-support-peer-contexts p{margin:0;color:var(--bec-muted);font-size:13px;line-height:1.35}.bec-support-peer-contexts p.is-bio{white-space:pre-wrap;color:var(--bec-text)}

@media(max-width:600px){
  .bec-service.is-support-identity{gap:5px}.bec-support-did{max-width:43%;font-size:9px;padding:2px 5px}.bec-support-marked-label{height:18px;font-size:9px;padding:0 6px}
  .bec-support-thread-menu{width:188px}
  .bec-support-peer-overlay{align-items:end;padding:0}
  .bec-support-peer-card{width:100%;max-height:min(82dvh,760px);border-radius:24px 24px 0 0;border-bottom:0;padding-bottom:max(0px,env(safe-area-inset-bottom,0px))}
  .bec-support-peer-grid{grid-template-columns:1fr 1fr}
}

/* MPRF-BLK-TPR4A7M1 — support avatar ring, support inbox badges and compact support dialog spacing. */
.bec-tab-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;margin-left:6px;border-radius:999px;background:#0a84ff;color:#fff;font-size:11px;font-weight:700;line-height:1;}

/* MPRF-BLK-SAR4V9N2 — TP story/comet ring in both chat list and open dialog.
   Thin conic tail + transform-only rotation keeps the animation visible without a paint-heavy filter. */
.bec-support-story-ring{position:relative;display:grid;place-items:center;width:48px;height:48px;padding:1.5px;border-radius:999px;isolation:isolate;flex:0 0 48px}
.bec-support-story-ring::before{content:"";position:absolute;inset:0;border-radius:inherit;background:conic-gradient(from 12deg,rgba(10,132,255,0) 0deg,rgba(10,132,255,.05) 72deg,rgba(48,160,255,.20) 146deg,#85d8ff 230deg,#238cff 292deg,#0a84ff 326deg,rgba(10,132,255,0) 360deg);animation:mprf-support-avatar-ring 7.5s linear infinite;will-change:transform;transform:translateZ(0);z-index:0}
.bec-support-story-ring>.bec-avatar{position:relative;z-index:1;width:44px;height:44px;border:1.5px solid var(--bec-solid-surface,#fff);border-radius:999px;overflow:hidden}
.bec-peer-avatar-button .bec-support-story-ring{width:40px;height:40px;flex-basis:40px;padding:1px}
.bec-peer-avatar-button .bec-support-story-ring>.bec-avatar{width:36px;height:36px;border-width:1.25px}
@keyframes mprf-support-avatar-ring{to{transform:translateZ(0) rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.bec-support-story-ring::before{animation:none!important}}

/* MPRF-BLK-SAB6K3P8 — resolved-but-visible support row has an orange bullet, not a numeric unread badge. */
.bec-support-resolved-dot,.bec-bullet-badge{width:9px;height:9px;display:inline-block;border-radius:50%;background:#ff9f0a;box-shadow:0 0 0 3px color-mix(in srgb,#ff9f0a 16%,transparent)}
.bec-support-center-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.bec-support-center-tabs button>.bec-count{position:static;min-width:18px;height:18px;padding-inline:5px;font-size:10.5px}

/* MPRF-BLK-SID3M7Q5 — operator identity facts are copyable; Telegram username remains a direct link action. */
.bec-support-peer-grid>.bec-support-peer-field{display:grid;gap:3px;min-width:0;padding:10px 11px;border:0;border-radius:14px;background:color-mix(in srgb,var(--bec-text) 5%,transparent);color:var(--bec-text);font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.bec-support-peer-field>span{color:var(--bec-muted);font-size:11px;font-weight:700}.bec-support-peer-field>strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bec-support-peer-field>strong.is-did{font-size:12px;letter-spacing:.02em}.bec-support-peer-field>em{color:var(--bec-muted);font-size:9.5px;font-style:normal;opacity:.72}
.bec-support-peer-field:active{transform:scale(.992)}.bec-support-peer-field:focus-visible{outline:2px solid color-mix(in srgb,var(--bec-blue,#0a84ff) 45%,transparent);outline-offset:1px}
.bec-support-peer-field.is-telegram{cursor:default}.bec-support-peer-field.is-telegram>.is-link,.bec-support-peer-field.is-telegram>.is-copy{width:max-content;max-width:100%;padding:0;border:0;background:transparent;font:inherit;cursor:pointer}.bec-support-peer-field.is-telegram>.is-link{color:var(--bec-blue,#0a84ff);font-size:13px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bec-support-peer-field.is-telegram>.is-copy{color:var(--bec-muted);font-size:9.5px;font-weight:700}

/* MPRF-BLK-FLX7S4M2 — accepted flexible/agreement system-message presentation.
   v2.1.5 keeps the historical centered blue system card but removes inherited
   ordinary-bubble grid geometry. The card is container-responsive: desktop gets
   a bounded centered surface; phone/tablet uses the full safe message column. */
.bec-message.is-system-flexible{
  align-self:center!important;
  width:min(84%,760px)!important;
  max-width:760px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  border-radius:20px!important;
  padding:11px 14px 10px!important;
  background:rgba(187,200,251,.32)!important;
  border:0!important;
  color:var(--bec-text)!important;
  box-shadow:0 4px 14px rgba(15,23,42,.04)!important;
}
.bec-message.is-system-flexible .bec-message-body{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  position:static!important;
}
.bec-system-flexible-content{display:grid;gap:7px;width:100%;min-width:0;}
.bec-system-flexible-title{text-align:center;font-size:12.5px;font-weight:800;line-height:1.2;overflow-wrap:anywhere;}
.bec-system-flexible-body{display:grid;gap:6px;width:100%;min-width:0;}
.bec-system-flexible-body>div{width:100%;min-width:0;font-size:12.5px;line-height:1.34;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;}
.bec-system-flexible-body>div.is-bullet{padding-left:4px;}
/* MPRF-BLK-AGR4C7M2 — agreement action stays centered in the system card. */
.bec-system-flexible-footer{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:end;
  gap:8px;
  width:100%;
  min-width:0;
}
.bec-system-flexible-action-slot{display:grid;justify-items:center;min-width:0;width:100%;}
.bec-message.is-system-flexible .bec-message-action.is-system-action{
  justify-self:center;
  align-self:end;
  width:max-content;
  max-width:100%;
  min-height:34px;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(10,132,255,.16);
  color:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.15;
  text-align:center;
  white-space:normal;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-inline:auto;
}
.bec-message.is-system-flexible .bec-message-meta.is-system-meta{
  position:static!important;
  justify-self:end;
  align-self:end;
  margin:0 0 2px!important;
  font-size:10.5px;
  opacity:.72;
}
@media(max-width:760px){
  .bec-message.is-system-flexible{width:100%!important;max-width:100%!important;min-width:0!important;padding:11px 13px 10px!important;}
  .bec-system-flexible-title{font-size:13px;}
  .bec-system-flexible-body>div{font-size:13.5px;line-height:1.32;}
  .bec-system-flexible-footer{gap:7px;}
  .bec-message.is-system-flexible .bec-message-action.is-system-action{font-size:12px;padding-inline:12px;}
}
@media(min-width:761px){
  .bec-message.is-system-flexible{width:min(84%,760px)!important;}
}


/* MPRF-BLK-RCH153C — actions MUST be a sibling of the bubble, never overlap message time. */
/* MPRF-BLK-UI154-CHAT-WIDTH: bubble, action row and resolved accordion share one exact width. */
.bec-message.is-reschedule-trigger,.bec-reschedule-inline{width:min(82%,560px)!important;max-width:min(82%,560px)!important;min-width:0;box-sizing:border-box}
.bec-reschedule-inline{display:grid;gap:6px;align-self:flex-start;justify-self:start;margin:3px 0 10px 0;font-family:inherit}
.bec-reschedule-inline-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%}
.bec-reschedule-inline-actions button{appearance:none;border:none;min-height:40px;border-radius:13px;font:inherit;font-size:12.5px;font-weight:750;color:#fff;cursor:pointer;box-shadow:0 5px 12px rgba(0,0,0,.08);white-space:nowrap}
.bec-reschedule-inline-actions button:disabled{opacity:.55;cursor:wait}
.bec-reschedule-inline-actions .bec-reschedule-decline{background:linear-gradient(180deg,#FF625A,#FF3B30)}
.bec-reschedule-inline-actions .bec-reschedule-confirm{background:linear-gradient(180deg,#49D778,#34C759)}
.bec-reschedule-inline-summary{appearance:none;border:1px solid var(--mprf-card-border,rgba(120,120,128,.16));border-radius:14px;background:var(--mprf-card-bg-strong,#f5f5f7);color:var(--mprf-text,#202124);min-height:36px;padding:7px 12px;display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;font:inherit;font-size:12px;font-weight:400;text-align:center;cursor:pointer;line-height:1.3}
.bec-reschedule-inline-detail{display:grid;gap:6px;padding:9px;background:var(--mprf-card-bg-strong,#f7f7f8);border:1px solid var(--mprf-card-border,rgba(120,120,128,.16));border-radius:14px;width:100%;box-sizing:border-box}
.bec-reschedule-inline-detail-row{display:grid;gap:3px;padding:9px 11px;border-radius:10px;background:var(--mprf-modal-bg,#fff);text-align:center;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.bec-reschedule-inline-detail-row span{opacity:.64;font-weight:400}
.bec-reschedule-inline-detail-row strong{font-size:12px;font-weight:400}

/* MPRF-BLK-UI155-CSTATUS: centered outcome with aligned chevron, including
   long localized labels; preserve 1:1 width with the original message. */
.bec-reschedule-inline-summary {position:relative;justify-content:center;padding-inline:30px;min-height:38px;}
.bec-reschedule-inline-summary > span {flex:1;min-width:0;text-align:center;font-weight:400;}
.bec-reschedule-inline-summary > svg {position:absolute;right:11px;top:50%;margin-top:-8px;}

/* src/screens/business/businessStaffChat.css */
/* Enterprise staff-group chat (v1.9.1462).
   Isolated from client/support chat rules to keep the existing Chats contract stable. */
.bec-staff-avatar{position:relative;width:44px;height:44px;display:grid;place-items:center;flex:0 0 auto}
.bec-staff-avatar>.bec-avatar{width:44px;height:44px;border-radius:14px;background:color-mix(in srgb,var(--bec-blue) 9%,var(--bec-soft));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bec-line) 76%,transparent)}
.bec-staff-avatar-badge{display:none}.bec-staff-avatar.is-thread-list .bec-staff-avatar-badge{position:absolute;right:-4px;bottom:-3px;width:21px;height:21px;border-radius:50%;display:grid;place-items:center;color:var(--bec-blue);background:var(--bec-solid-surface);box-shadow:0 2px 8px rgba(15,23,42,.16),inset 0 0 0 1px color-mix(in srgb,var(--bec-blue) 28%,var(--bec-line))}
.bec-staff-avatar-badge svg{width:14px;height:14px}
.bec-staff-avatar.is-head{width:42px;height:42px}
.bec-staff-avatar.is-head>.bec-avatar{width:42px;height:42px;border-radius:13px}
.bec-staff-avatar.is-info{width:58px;height:58px}
.bec-staff-avatar.is-info>.bec-avatar{width:58px;height:58px;border-radius:18px}
.bec-staff-avatar.is-info .bec-staff-avatar-badge{display:none}
.bec-thread-main.is-staff-group{gap:2px}
.bec-thread.is-staff-group{border-color:color-mix(in srgb,var(--bec-blue) 18%,var(--bec-line));background:linear-gradient(120deg,color-mix(in srgb,var(--bec-blue) 5%,var(--bec-surface)),var(--bec-surface))}
.bec-dialog.is-staff-group .bec-dialog-head{grid-template-columns:var(--bec-head-control) minmax(0,1fr) var(--bec-head-control);background:transparent}
.bec-dialog.is-staff-group .bec-dialog-topic-slot{display:none}

.bec-staff-info-overlay{position:fixed;inset:0;z-index:43020;display:block;padding:0;background:rgba(10,14,22,.48);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-sizing:border-box;overflow:hidden}
.bec-staff-info-viewport{position:absolute;inset-inline:0;top:0;height:100dvh;display:grid;place-items:center;padding:clamp(14px,3vw,32px);box-sizing:border-box;overflow:hidden}
.bec-staff-info{width:min(560px,100%);max-width:100%;max-height:min(760px,calc(100dvh - 30px));overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid color-mix(in srgb,var(--bec-line,rgba(60,60,67,.14)) 88%,transparent);border-radius:28px;background:var(--bec-solid-surface,#fff);color:var(--bec-text,#17191f);box-shadow:0 26px 80px rgba(0,0,0,.28);justify-self:center;margin-inline:auto;box-sizing:border-box}
.bec-staff-info-head{min-width:0;padding:20px 20px 16px;border-bottom:1px solid var(--bec-line,rgba(60,60,67,.14))}
.bec-staff-info-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 20px 24px;display:grid;gap:16px}
.bec-staff-identity{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--bec-line,rgba(60,60,67,.14));border-radius:20px;background:color-mix(in srgb,var(--bec-soft,rgba(118,118,128,.075)) 42%,var(--bec-solid-surface,#fff))}
.bec-staff-identity>div{min-width:0;display:grid;gap:4px}
.bec-staff-identity strong{font-size:16px;font-weight:560;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bec-staff-identity span{color:var(--bec-muted);font-size:12.5px;line-height:1.35}
.bec-staff-title-editor{display:grid;gap:6px;padding:10px;border:1px solid var(--bec-line,rgba(60,60,67,.14));border-radius:18px}
.bec-staff-title-editor>label{font-size:12px;font-weight:560}
.bec-staff-title-editor>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.bec-staff-title-editor input{min-width:0;height:38px;border:1px solid var(--bec-line);border-radius:13px;padding:0 12px;background:var(--bec-surface);color:var(--bec-text);font:400 13px/1 var(--bec-font);outline:0}
.bec-staff-title-editor input:focus{border-color:color-mix(in srgb,var(--bec-blue) 58%,var(--bec-line));box-shadow:0 0 0 3px color-mix(in srgb,var(--bec-blue) 12%,transparent)}
.bec-staff-title-editor button{height:38px;border:0;border-radius:13px;padding:0 12px;background:var(--bec-blue);color:#fff;font:560 13px/1 var(--bec-font);cursor:pointer}
.bec-staff-title-editor button:disabled{opacity:.42;cursor:default}
.bec-staff-participants-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px}
.bec-staff-participants-head strong{font-size:15px;font-weight:560}
.bec-staff-participants-head span{min-width:28px;height:24px;padding:0 8px;border-radius:999px;display:grid;place-items:center;background:var(--bec-soft);color:var(--bec-muted);font-size:12px}
.bec-staff-participants{display:grid;border:1px solid var(--bec-line,rgba(60,60,67,.14));border-radius:20px;overflow:hidden;background:var(--bec-surface,rgba(255,255,255,.86))}
.bec-staff-participant{min-width:0;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px}
.bec-staff-participant+.bec-staff-participant{border-top:1px solid var(--bec-line)}
.bec-staff-participant.is-muted{background:color-mix(in srgb,var(--bec-red) 5%,transparent)}
.bec-staff-participant-main{min-width:0;display:grid;gap:3px}
.bec-staff-participant-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:520}
.bec-staff-participant-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--bec-muted);font-size:11.5px}
.bec-staff-mute{width:32px;height:32px;border:1px solid var(--bec-line);border-radius:50%;background:var(--bec-soft);color:var(--bec-muted);display:grid;place-items:center;cursor:pointer}
.bec-staff-mute.is-active{border-color:color-mix(in srgb,var(--bec-red) 34%,var(--bec-line));background:color-mix(in srgb,var(--bec-red) 10%,transparent);color:var(--bec-red)}
.bec-staff-mute:disabled{opacity:.5;cursor:default}

@media(max-width:600px){
  .bec-thread.is-staff-group{background:transparent}
  .bec-thread.is-staff-group:not(:last-child)::after,.bec-root.is-ordinary .bec-thread.is-staff-group:not(:last-child)::after{left:0;right:0;background:color-mix(in srgb,var(--bec-line) 100%,transparent);transform:none}
  .bec-staff-info-overlay{background:rgba(10,14,22,.42);box-sizing:border-box}
  .bec-staff-info-viewport{inset-inline:0;padding:max(92px,calc(env(safe-area-inset-top,0px) + 70px),calc(var(--tg-content-safe-area-inset-top,0px) + 70px)) 14px max(22px,env(safe-area-inset-bottom,0px),calc(var(--tg-content-safe-area-inset-bottom,0px) + 14px));box-sizing:border-box}
  .bec-staff-info.mprf-enterprise-modal-shell{width:min(560px,100%)!important;max-width:100%!important;max-height:100%!important;border-radius:26px;border-bottom:1px solid color-mix(in srgb,var(--bec-line) 88%,transparent);margin:auto!important;box-sizing:border-box}
  .bec-staff-info-head{padding:17px 17px 13px}
  .bec-staff-info-body{padding:15px 15px max(18px,env(safe-area-inset-bottom,0px))}
  .bec-staff-title-editor>div{grid-template-columns:1fr}
  .bec-staff-title-editor button{width:100%}
}

@media(prefers-reduced-motion:reduce){.bec-staff-info-overlay{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* src/screens/business/businessFinanceMobileContracts.css */
.mprf-enterprise-modal-overlay {
  box-sizing: border-box;
  overflow: hidden;
}
.mprf-enterprise-modal-shell {
  box-sizing: border-box;
  min-width: 0;
  max-width: calc(var(--mprf-enterprise-modal-vw, 100dvw) - 20px);
  max-height: calc(var(--mprf-enterprise-modal-vh, 100dvh) - 20px);
  overflow: hidden;
}
.mprf-enterprise-modal-shell,
.mprf-enterprise-modal-shell * {
  box-sizing: border-box;
  min-width: 0;
}
.mprf-enterprise-modal-shell input,
.mprf-enterprise-modal-shell select,
.mprf-enterprise-modal-shell textarea,
.mprf-enterprise-modal-shell button {
  max-width: 100%;
}
/* MPRF-14440 — one ownership boundary for messenger modal geometry.
   Telegram retains its previously effective geometry; MAX uses the visible host WebView.
   The old unscoped rules contradicted each other. Keep each platform's
   currently effective insets instead of silently changing Telegram. */
@media (max-width: 720px), (pointer: coarse) {
  html:not([data-mprf-platform="max"]) .mprf-enterprise-modal-overlay {
    inset: 0 !important;
    width: 100dvw !important;
    max-width: 100dvw !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px max(9px, env(safe-area-inset-bottom, 0px)) !important;
    place-items: start center !important;
    justify-items: center !important;
  }
  /* Explicitly short dialogs (links/invitation/personal details) are centred,
     unlike long content. This does not affect long enterprise windows. */
  html:not([data-mprf-platform="max"]) .mprf-enterprise-modal-overlay[data-enterprise-modal-kind="short"] {
    place-items: center !important;
  }
  html:not([data-mprf-platform="max"]) .mprf-enterprise-modal-shell {
    width: min(100%, calc(100dvw - 20px)) !important;
    max-width: calc(100dvw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    margin-inline: auto !important;
    transform: none !important;
  }
}

/* CHAT 144.36 / MPRF-MAX-ENT-UI-251
   VID-047: a fixed 104+82+82+32 grid overflowed Android modal content.
   Preserve desktop grid; allow a second, full-width heading row on phones.
   No financial calculations, input values or payout validation are changed. */
@media (max-width: 600px) {
  .mprf-payout-schedule-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .mprf-payout-schedule-row > .mprf-payout-schedule-title {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .mprf-payout-schedule-row > .mprf-payout-schedule-share {
    grid-column: 2 / 3 !important;
    min-width: 0;
  }
  .mprf-payout-schedule-row.is-salary > .mprf-payout-schedule-share {
    grid-column: 2 / -1 !important;
  }
}

/* MPRF-14437: native-sized centered MAX modal layout. */
@keyframes mprf-draft-pulse { 0%,100% {box-shadow:0 0 0 0 rgba(52,199,89,.19)} 50% {box-shadow:0 0 0 5px rgba(52,199,89,0)} }
@media (prefers-reduced-motion:reduce) { [style*="mprf-draft-pulse"]{animation:none !important} }

/* MAX Android: ONE WebView viewport/safe-area owner in JS. This shared
   stylesheet must NOT overwrite per-dialog inline geometry with !important.
   Earlier rules re-applied Android native top inset (about 50-60px) after the
   host header was already excluded, causing the repeated physical failure. */
@media (max-width:720px), (pointer:coarse) {
  html[data-mprf-platform="max"] .mprf-enterprise-modal-shell > .mprf-scrollless {
    overflow-y: auto;
  }
  /* Employee editors retain an independent scrollbox and safe visible height. */
  html[data-mprf-platform="max"] [data-employee-editor-overlay="true"] {
    padding-top: 6px !important;
    padding-bottom: 10px !important;
  }
  html[data-mprf-platform="max"] [data-employee-editor-shell="true"] {
    max-height: max(1px, calc(var(--mprf-platform-viewport-height, 100dvh) - 16px)) !important;
    overflow-y: auto !important;
  }
}

/* src/screens/business/businessStatistics.css */
.bs{--bs-radius:22px;color:var(--bs-text);display:grid;gap:13px;min-width:0;font-family:var(--mprf-font-family,system-ui,-apple-system,"Segoe UI",sans-serif)}
.bs button,.bs summary{font:inherit;-webkit-tap-highlight-color:transparent}.bs-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.bs-head h2{font-size:24px;font-weight:560;letter-spacing:-.025em;margin:0 0 4px}.bs-head p,.bs-section-head p{color:var(--bs-muted);font-size:13px;line-height:1.4;margin:0}.bs-export{display:flex;gap:7px;flex-wrap:wrap}.bs-export button{min-height:34px;border:1px solid var(--bs-line);border-radius:13px;background:var(--bs-surface);color:var(--bs-text);padding:7px 11px;display:flex;align-items:center;gap:6px;cursor:pointer}.bs-export button:disabled{opacity:.55;cursor:default}
.bs-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;position:relative;z-index:5}.bs-periods{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--bs-line);border-radius:16px;background:var(--bs-soft);min-width:0}.bs-periods>button,.bs-menu>summary{min-height:33px;border:0;border-radius:12px;background:transparent;color:var(--bs-muted);padding:6px 12px;white-space:nowrap;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px}.bs-menu>summary::-webkit-details-marker{display:none}.bs-periods>button.is-active,.bs-menu>summary.is-active{background:var(--bs-surface);color:var(--bs-text);box-shadow:0 4px 13px rgba(15,23,42,.08)}.bs-menu{position:relative}.bs-menu[open]>summary svg{transform:rotate(180deg)}.bs-menu-list{position:absolute;top:calc(100% + 7px);right:0;width:252px;max-height:310px;overflow:auto;padding:6px;border:1px solid var(--bs-line);border-radius:16px;background:var(--bs-surface);box-shadow:0 20px 55px rgba(15,23,42,.18);backdrop-filter:blur(18px);display:grid;gap:3px;z-index:20}.bs-menu-list button{border:0;border-radius:11px;background:transparent;color:var(--bs-text);padding:9px 10px;text-align:left;cursor:pointer;display:grid;gap:2px}.bs-menu-list button:hover,.bs-menu-list button.is-active{background:color-mix(in srgb,var(--bs-blue) 11%,var(--bs-soft));color:var(--bs-blue)}.bs-menu-list small{color:var(--bs-muted);font-size:10.5px}.bs-employee>summary{min-width:180px;border:1px solid var(--bs-line);background:var(--bs-surface);color:var(--bs-text);justify-content:space-between}.bs-month .bs-menu-list{left:0;right:auto}.bs-month .bs-menu-list button{text-transform:none}.bs-employee-option{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px}.bs-employee-option>span:last-child{display:grid;gap:1px;min-width:0}.bs-employee-option span span{font-weight:450;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.bs-card{min-width:0;border:1px solid var(--bs-line);border-radius:20px;background:var(--bs-surface);padding:14px 16px;box-shadow:var(--bs-shadow);position:relative;overflow:hidden;display:grid;align-content:start;gap:4px}.bs-card:before{content:"";position:absolute;right:-27px;top:-31px;width:80px;height:80px;border-radius:50%;background:color-mix(in srgb,var(--card-tone) 15%,transparent)}.tone-blue{--card-tone:var(--bs-blue)}.tone-violet{--card-tone:#af52de}.tone-cyan{--card-tone:#32ade6}.tone-green{--card-tone:var(--bs-green)}.bs-card-title{color:var(--bs-muted);font-size:12px}.bs-card-value{display:block;font-size:27px;line-height:1.05;font-weight:630;letter-spacing:-.035em;margin:4px 0 1px}.bs-card-hint{font-size:11px;color:var(--bs-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bs-card-delta{font-size:10.5px;color:var(--bs-muted);margin-top:3px}.bs-card-delta.is-up{color:var(--bs-green)}.bs-card-delta.is-down{color:var(--bs-red)}
.bs-quality,.bs-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.bs-insights{grid-template-columns:repeat(3,minmax(0,1fr))}.bs-compact,.bs-insight{border:1px solid var(--bs-line);border-radius:18px;background:var(--bs-surface);padding:11px 14px;display:grid;gap:3px;min-width:0;box-shadow:var(--bs-shadow);border-left:3px solid var(--compact-tone)}.compact-green,.insight-green{--compact-tone:var(--bs-green)}.compact-red{--compact-tone:var(--bs-red)}.compact-orange{--compact-tone:#ff9f0a}.compact-violet,.insight-violet{--compact-tone:#af52de}.insight-blue{--compact-tone:var(--bs-blue)}.bs-compact>span,.bs-insight>span{color:var(--bs-muted);font-size:11.5px}.bs-compact>strong,.bs-insight>strong{font-size:21px;line-height:1.1}.bs-insight>strong{font-size:18px}.bs-compact>small,.bs-insight>small{color:var(--bs-muted);font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-section{border:1px solid var(--bs-line);border-radius:var(--bs-radius);background:var(--bs-surface);padding:16px;box-shadow:var(--bs-shadow);min-width:0}.bs-section-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.bs-section-head h3{font-size:17px;font-weight:560;margin:0 0 3px}.bs-updating{color:var(--bs-blue);font-size:11px}.bs-chart{height:200px;display:flex;align-items:flex-end;gap:7px;padding:8px 4px 0;border-bottom:1px solid var(--bs-line)}.bs-bar-item{height:100%;flex:1;min-width:14px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px}.bs-bar{width:min(24px,75%);min-height:5px;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,var(--bs-blue),color-mix(in srgb,var(--bs-blue) 55%,var(--bs-green)));transition:height .22s ease}.bs-bar-item span{color:var(--bs-muted);font-size:9px;height:16px;white-space:nowrap}.bs-chart-empty{min-height:170px;border:1px dashed var(--bs-line);border-radius:18px;background:var(--bs-soft);display:grid;place-content:center;justify-items:center;text-align:center;gap:5px;color:var(--bs-muted);padding:18px}.bs-chart-empty strong{color:var(--bs-text);font-size:16px}.bs-chart-empty span{font-size:12px}
.bs-rankings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.bs-list,.bs-client-list{display:grid;gap:4px}.bs-rank-row,.bs-client-row{display:grid;grid-template-columns:26px auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:7px 6px;border-radius:14px;min-width:0}.bs-client-row{grid-template-columns:26px minmax(0,1fr) auto}.bs-rank-row:hover,.bs-client-row:hover{background:var(--bs-soft)}.bs-rank{width:24px;height:24px;border-radius:9px;background:var(--bs-soft);display:grid;place-items:center;color:var(--bs-muted);font-size:11px}.bs-avatar{width:34px;height:34px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--bs-blue) 14%,var(--bs-soft));color:var(--bs-blue);font-weight:650;overflow:hidden}.bs-avatar.is-small{width:28px;height:28px;border-radius:11px;font-size:12px}.bs-avatar img{width:100%;height:100%;object-fit:cover;display:block}.bs-rank-name,.bs-rank-value,.bs-client-row>span:nth-child(2){display:grid;gap:2px;min-width:0}.bs-rank-name strong,.bs-client-row strong{font-size:13.5px;font-weight:560;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bs-rank-row small,.bs-client-row small{color:var(--bs-muted);font-size:11px}.bs-rank-value{text-align:right}.bs-rank-value strong{font-size:15px}.bs-client-row b{font-size:13px;white-space:nowrap}.bs-mini-empty{min-height:126px;border:1px dashed var(--bs-line);border-radius:16px;background:var(--bs-soft);display:grid;place-content:center;text-align:center;color:var(--bs-muted);font-size:12px;padding:14px}
.bs-loading,.bs-error{min-height:220px;border:1px solid var(--bs-line);border-radius:var(--bs-radius);background:var(--bs-surface);display:grid;place-content:center;justify-items:center;text-align:center;gap:9px;padding:22px;color:var(--bs-muted)}.bs-error strong{color:var(--bs-text);font-size:17px}.bs-spinner{width:28px;height:28px;border:3px solid var(--bs-line);border-top-color:var(--bs-blue);border-radius:50%;animation:bs-spin .8s linear infinite}.bs-inline-error{border:1px solid color-mix(in srgb,var(--bs-red) 40%,var(--bs-line));border-radius:14px;background:color-mix(in srgb,var(--bs-red) 8%,var(--bs-surface));color:var(--bs-red);padding:10px 12px;font-size:12px}@keyframes bs-spin{to{transform:rotate(360deg)}}
@media(max-width:1160px){.bs-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.bs-quality{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.bs-insights{grid-template-columns:1fr}.bs-rankings{grid-template-columns:1fr}.bs-head{flex-direction:column}.bs-export{justify-content:flex-start}}
@media(max-width:760px){.bs-head h2{font-size:21px}.bs-tools{align-items:stretch;flex-direction:column}.bs-periods{width:100%;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.bs-periods>button,.bs-periods .bs-menu>summary{width:100%;padding:6px 4px;font-size:12px}.bs-employee>summary{width:100%;box-sizing:border-box}.bs-summary,.bs-quality{grid-template-columns:1fr}.bs-section{padding:14px}.bs-chart{height:175px;gap:4px}.bs-bar-item span{font-size:8.5px}.bs-menu-list{width:min(280px,calc(100vw - 34px));max-height:280px}.bs-month .bs-menu-list{left:auto;right:0}}
@media(max-width:430px){.bs-periods{grid-template-columns:repeat(2,minmax(0,1fr))}.bs-month .bs-menu-list{left:0;right:auto}.bs-card-value{font-size:26px}.bs-rank-row{grid-template-columns:24px auto minmax(0,1fr) auto}.bs-section-head{margin-bottom:11px}.bs-export{width:100%;display:grid;grid-template-columns:1fr 1fr}}
.bs-current-period{color:var(--bs-muted);font-size:11.8px;margin-top:-2px}.bs-current-period b{color:var(--bs-text);font-weight:560}.bs-export-menu>summary{border:1px solid var(--bs-line);background:var(--bs-surface);color:var(--bs-text);min-height:32px;padding:6px 10px;border-radius:12px}.bs-export-menu>summary:before{content:"";width:15px;height:15px;display:inline-block;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v9.2l3.1-3.1 1.4 1.4L12 16l-5.5-5.5 1.4-1.4 3.1 3.1V3Zm-6 15h14v2H5v-2Z'/%3E%3C/svg%3E") center/contain no-repeat}.bs-export-menu .bs-menu-list{width:164px}.bs-menu-icon{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:var(--bs-soft);color:var(--bs-text)}.bs-export-menu .bs-menu-list button{grid-template-columns:24px minmax(0,1fr);align-items:center;font-size:12px;font-weight:520;min-height:38px}.bs-week .bs-menu-list{left:0;right:auto;width:190px}.bs-periods>button svg{width:13px;height:13px;color:var(--bs-muted)}.bs-custom-range{display:none;position:relative;max-width:330px}.bs-custom-range.is-visible{display:grid;gap:7px}.bs-chart-wrap{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px}.bs-yaxis{height:210px;padding-top:8px;padding-bottom:23px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;color:var(--bs-muted);font-size:10px;text-align:right}.bs-chart-wrap .bs-chart{height:210px;position:relative}.bs-bar-item{position:relative}.bs-bar-bg{position:absolute;bottom:23px;width:min(26px,78%);border-radius:8px 8px 3px 3px;background:color-mix(in srgb,var(--bs-blue) 12%,var(--bs-soft));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bs-blue) 15%,transparent)}.bs-bar-item .bs-bar{z-index:2}.bs-bar-item b{color:var(--bs-muted);font-size:9px;line-height:1;height:10px}.bs-table-list{display:grid;gap:4px}.bs-table-head,.bs-table-row{display:grid;align-items:center;gap:8px;padding:7px 8px;border-radius:12px}.bs-table-head{background:var(--bs-soft);color:var(--bs-muted);font-size:10.5px}.bs-table-row{font-size:12.2px}.bs-table-row:hover{background:var(--bs-soft)}.bs-employee-table .bs-table-head,.bs-employee-table .bs-table-row{grid-template-columns:58px minmax(170px,1fr) 58px 58px 90px 100px}.bs-service-table .bs-table-head,.bs-service-table .bs-table-row{grid-template-columns:86px minmax(170px,1fr) 74px 64px 92px}.bs-person{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:center;min-width:0}.bs-person>span:last-child{display:grid;gap:2px;min-width:0}.bs-person strong,.bs-service-name strong{font-weight:520;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bs-person small{color:var(--bs-muted);font-size:10.5px}.bs-hours{display:inline-flex;align-items:center;gap:4px;color:var(--bs-muted)}.bs-hours.is-over{color:var(--bs-red);font-weight:620}.bs-pop-bars{height:24px;display:inline-flex;align-items:flex-end;gap:3px}.bs-pop-bars i{width:5px;border-radius:999px;background:color-mix(in srgb,var(--bs-muted) 24%,transparent)}.bs-pop-bars i:nth-child(1){height:8px}.bs-pop-bars i:nth-child(2){height:14px}.bs-pop-bars i:nth-child(3){height:20px}.bs-pop-bars.level-1 i:nth-child(1){background:#b24bdc}.bs-pop-bars.level-2 i:nth-child(-n+2){background:linear-gradient(180deg,#c73567,#7e61ff)}.bs-pop-bars.level-3 i{background:linear-gradient(180deg,var(--bs-blue),var(--bs-green))}.bs-service-name{display:inline-flex;align-items:center;gap:6px;min-width:0}.bs-up-arrow{color:var(--bs-red);display:inline-grid;place-items:center}.bs-efficiency{min-height:116px;display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:14px;align-items:center;color:var(--bs-muted)}.bs-efficiency div{height:100px;border-left:1px solid var(--bs-line);border-bottom:1px solid var(--bs-line);display:flex;align-items:flex-end;gap:10px;padding:0 10px}.bs-efficiency i{width:20px;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,var(--bs-blue),var(--bs-green))}.bs-inline-success{border:1px solid color-mix(in srgb,var(--bs-green) 36%,var(--bs-line));border-radius:14px;background:color-mix(in srgb,var(--bs-green) 8%,var(--bs-surface));color:var(--bs-green);padding:10px 12px;font-size:12px}
@media(max-width:980px){.bs-employee-table .bs-table-head,.bs-employee-table .bs-table-row{grid-template-columns:50px minmax(150px,1fr) 48px 48px 78px}.bs-employee-table .bs-table-head span:nth-child(6),.bs-employee-table .bs-table-row span:nth-child(6){display:none}.bs-service-table .bs-table-head,.bs-service-table .bs-table-row{grid-template-columns:70px minmax(140px,1fr) 54px 54px 78px}.bs-efficiency{grid-template-columns:1fr}}
@media(max-width:760px){.bs-periods{grid-template-columns:repeat(3,minmax(0,1fr))}.bs-custom-range{max-width:100%}.bs-table-head{display:none}.bs-table-row,.bs-employee-table .bs-table-row,.bs-service-table .bs-table-row{grid-template-columns:1fr auto;align-items:start}.bs-table-row>*:first-child{grid-column:1 / 2}.bs-table-row>*:not(:first-child):not(:nth-child(2)){font-size:11px;color:var(--bs-muted)}.bs-person,.bs-service-name{grid-column:1 / -1}.bs-chart-wrap{grid-template-columns:28px minmax(0,1fr)}}
/* v1.9.1294 Statistics compact controls and line-chart refinement */
.bs{gap:11px}
.bs-head h2{font-size:22px}.bs-head p{font-size:12px}
.bs-tools{align-items:center}.bs-periods{border-radius:14px;padding:2px;gap:2px}
.bs-periods>button,.bs-menu>summary{min-height:30px;height:30px;padding:5px 10px;border-radius:10px;font-size:12px;line-height:1}
.bs-month>summary,.bs-week>summary{height:30px;box-sizing:border-box}.bs-chevron{transition:transform .16s ease}
.bs-menu-list{top:calc(100% + 6px);padding:5px;border-radius:14px}.bs-menu-list button{padding:8px 9px;border-radius:10px;font-size:12px}
.bs-week .bs-menu-list{width:205px}.bs-month .bs-menu-list{width:220px;max-height:274px}
.bs-employee>summary{min-width:172px;max-width:230px;height:32px}.bs-export-menu>summary{height:31px;min-height:31px;padding:5px 9px}
.bs-export-menu .bs-menu-list{width:146px}.bs-export-menu .bs-menu-list button{min-height:34px}
.bs-avatar{position:relative}.bs-avatar-letter{position:absolute;inset:0;display:grid;place-items:center}.bs-avatar img{position:relative;z-index:1;background:var(--bs-soft)}
.bs-card{padding:12px 14px;border-radius:18px}.bs-card-value{font-size:25px}.bs-quality{gap:8px}.bs-compact{padding:10px 13px;border-radius:16px}
.bs-delta{display:inline-flex;align-items:center;gap:3px;margin-top:3px;font-size:10.5px;font-weight:560;color:var(--bs-muted)}.bs-delta.is-up{color:var(--bs-green)}.bs-delta.is-down{color:var(--bs-red)}
.bs-line-chart{position:relative;min-height:240px}.bs-line-chart svg{display:block;width:100%;height:260px;overflow:visible}.bs-grid-line{stroke:color-mix(in srgb,var(--bs-line) 78%,transparent);stroke-width:1}.bs-axis-text{font-size:10px;fill:var(--bs-muted)}.bs-created-line{fill:none;stroke:color-mix(in srgb,var(--bs-blue) 42%,var(--bs-muted));stroke-width:2;stroke-dasharray:6 5}.bs-booked-line{fill:none;stroke:url(#bs-booked-line);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.bs-booked-dot{fill:var(--bs-surface);stroke:var(--bs-blue);stroke-width:3}.bs-chart-legend{display:flex;justify-content:flex-end;gap:14px;color:var(--bs-muted);font-size:10.5px;margin-top:-7px}.bs-chart-legend span{display:inline-flex;align-items:center;gap:5px}.bs-chart-legend i{width:18px;height:4px;border-radius:999px}.bs-chart-legend .is-created{background:color-mix(in srgb,var(--bs-blue) 35%,var(--bs-muted))}.bs-chart-legend .is-booked{background:linear-gradient(90deg,var(--bs-blue),var(--bs-green))}
.bs-efficiency-empty{min-height:100px;border:1px dashed var(--bs-line);border-radius:16px;display:grid;place-content:center;color:var(--bs-muted);font-size:12px;text-align:center}.bs-efficiency-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px;align-items:stretch}.bs-efficiency-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bs-efficiency-kpis>div{border:1px solid var(--bs-line);border-radius:14px;background:var(--bs-soft);padding:10px;display:grid;gap:3px}.bs-efficiency-kpis span{font-size:10.5px;color:var(--bs-muted)}.bs-efficiency-kpis strong{font-size:15px}.bs-efficiency-chart{height:112px;border-left:1px solid var(--bs-line);border-bottom:1px solid var(--bs-line);display:flex;align-items:flex-end;gap:4px;padding:0 8px}.bs-efficiency-chart span{flex:1;min-width:4px;max-width:18px;border-radius:6px 6px 2px 2px;background:linear-gradient(180deg,var(--bs-blue),var(--bs-green))}.bs-efficiency-grid>p{grid-column:1/-1;margin:0;color:var(--bs-muted);font-size:10.5px}
.bs-float-toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);z-index:10050;padding:8px 12px;border-radius:12px;background:rgba(24,27,35,.92);color:white;font-size:12px;box-shadow:0 12px 32px rgba(0,0,0,.22);animation:bs-toast-in .15s ease}.bs-float-toast.is-error{background:color-mix(in srgb,var(--bs-red) 88%,#1d1d1f)}@keyframes bs-toast-in{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:980px){.bs-efficiency-grid{grid-template-columns:1fr}.bs-efficiency-chart{height:90px}}
@media(max-width:760px){.bs-periods>button,.bs-menu>summary{height:30px;min-height:30px}.bs-line-chart svg{height:220px}.bs-efficiency-kpis{grid-template-columns:1fr 1fr}}

/* v1.9.1295 Statistics final acceptance: distinct series and employee growth */
.bs{--bs-created:#ff8a00;--bs-booked:#007aff;--bs-growth-enterprise:#8e44ad;--bs-growth-employee:#007aff;--bs-growth-net:#19a65a}
.bs-created-line{stroke:var(--bs-created);stroke-width:2.5;stroke-dasharray:8 6}.bs-created-dot{fill:var(--bs-surface);stroke:var(--bs-created);stroke-width:2.5}.bs-booked-line{stroke:var(--bs-booked);stroke-width:4.2}.bs-booked-dot{stroke:var(--bs-booked);fill:var(--bs-surface)}
.bs-created-value,.bs-booked-value{font-size:10px;font-weight:700;paint-order:stroke;stroke:var(--bs-surface);stroke-width:4px;stroke-linejoin:round}.bs-created-value{fill:var(--bs-created)}.bs-booked-value{fill:var(--bs-booked)}
.bs-chart-legend{align-items:center;flex-wrap:wrap}.bs-chart-legend .is-created{background:var(--bs-created)}.bs-chart-legend .is-booked{background:var(--bs-booked)}.bs-chart-legend small{color:var(--bs-muted);font-size:9.5px}
.bs-efficiency-growth{display:grid;gap:12px}.bs-efficiency-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.bs-efficiency-kpis small{color:var(--bs-muted);font-size:10px}.bs-growth-chart{min-height:220px}.bs-growth-chart svg{display:block;width:100%;height:230px}.bs-growth-enterprise,.bs-growth-employee,.bs-growth-net{fill:none;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}.bs-growth-enterprise{stroke:var(--bs-growth-enterprise)}.bs-growth-employee{stroke:var(--bs-growth-employee)}.bs-growth-net{stroke:var(--bs-growth-net)}.bs-growth-enterprise-dot{fill:var(--bs-surface);stroke:var(--bs-growth-enterprise);stroke-width:3}.bs-growth-employee-dot{fill:var(--bs-surface);stroke:var(--bs-growth-employee);stroke-width:3}.bs-growth-net-dot{fill:var(--bs-surface);stroke:var(--bs-growth-net);stroke-width:3}
.bs-growth-legend{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;color:var(--bs-muted);font-size:10.5px}.bs-growth-legend span{display:inline-flex;align-items:center;gap:5px}.bs-growth-legend i{width:16px;height:4px;border-radius:999px}.bs-growth-legend .is-enterprise{background:var(--bs-growth-enterprise)}.bs-growth-legend .is-employee{background:var(--bs-growth-employee)}.bs-growth-legend .is-net{background:var(--bs-growth-net)}.bs-efficiency-growth>p{margin:0;color:var(--bs-muted);font-size:10.5px}
@media(max-width:980px){.bs-efficiency-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.bs-efficiency-kpis{grid-template-columns:1fr}.bs-line-chart svg{height:235px}.bs-growth-chart svg{height:210px}.bs-chart-legend,.bs-growth-legend{justify-content:flex-start}}


/* v1.9.1297 Statistics final date-floor and actual-time polish: explanatory efficiency, trends and selector avatar */
.bs-employee-current{display:inline-flex;align-items:center;gap:7px;min-width:0}.bs-employee-current>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bs-employee>summary>span{min-width:0}
.bs-service-trend{position:relative;display:inline-grid;place-items:center}.bs-service-trend>summary{display:grid;place-items:center;width:22px;height:22px;padding:0;border-radius:8px;list-style:none;cursor:pointer}.bs-service-trend>summary::-webkit-details-marker{display:none}.bs-service-trend.is-up>summary{color:var(--bs-green);background:color-mix(in srgb,var(--bs-green) 10%,transparent)}.bs-service-trend.is-down>summary{color:var(--bs-red);background:color-mix(in srgb,var(--bs-red) 10%,transparent)}.bs-service-trend-popover{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-45%);z-index:40;width:max-content;max-width:270px;display:grid;gap:4px;padding:10px 12px;border:1px solid var(--bs-line);border-radius:13px;background:var(--bs-surface);box-shadow:0 16px 42px rgba(15,23,42,.18);color:var(--bs-text);font-size:11px;line-height:1.35}.bs-service-trend-popover:after{content:"";position:absolute;left:44%;top:100%;width:10px;height:10px;background:var(--bs-surface);border-right:1px solid var(--bs-line);border-bottom:1px solid var(--bs-line);transform:translate(-50%,-5px) rotate(45deg)}.bs-service-trend-popover strong{font-size:11.5px}.bs-service-trend-popover span{color:var(--bs-muted)}
.bs-growth-enterprise{stroke-dasharray:8 6;stroke-width:3;opacity:.95}.bs-growth-enterprise-dot{stroke-dasharray:3 2}.bs-growth-legend{line-height:1.35}.bs-growth-legend .is-enterprise{background:repeating-linear-gradient(90deg,var(--bs-growth-enterprise) 0 8px,transparent 8px 12px);border:1px solid color-mix(in srgb,var(--bs-growth-enterprise) 35%,transparent)}.bs-growth-coincidence{margin:5px 0 0!important;padding:7px 9px;border-radius:10px;background:color-mix(in srgb,var(--bs-growth-enterprise) 7%,var(--bs-soft));color:var(--bs-muted);font-size:10px!important}.bs-efficiency-kpis>div{align-content:start}.bs-efficiency-kpis span{line-height:1.28}.bs-efficiency-kpis small{line-height:1.35}
@media(hover:hover){.bs-service-trend:not([open]):hover .bs-service-trend-popover{display:grid}}
@media(max-width:620px){.bs-service-trend-popover{left:auto;right:-8px;transform:none;max-width:235px}.bs-service-trend-popover:after{left:auto;right:14px}}
.bs-service-trend:not([open])>.bs-service-trend-popover{display:none}
@media(hover:hover){.bs-service-trend:not([open]):hover>.bs-service-trend-popover{display:grid}}

.bs-pair-value{font-size:10px;font-weight:760;paint-order:stroke;stroke:var(--bs-surface);stroke-width:3px;stroke-linejoin:round}
.bs-pair-value .bs-created-value{fill:#ff8a00}
.bs-pair-value .bs-booked-value{fill:#087cf0}
.bs-pair-bracket{fill:var(--bs-muted)}


/* v1.9.1447 Statistics mobile closure: export anchoring, ambient deltas and ranking cards */
.bs-card,.bs-compact{position:relative;overflow:hidden}
.bs-card>*:not(.bs-delta),.bs-compact>*:not(.bs-delta){position:relative;z-index:1}
.bs-card .bs-delta,.bs-compact .bs-delta{position:absolute;z-index:0;right:10px;bottom:-2px;margin:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;color:var(--card-tone,var(--compact-tone,var(--bs-muted)));font-size:30px;font-weight:760;line-height:1;letter-spacing:-.045em;opacity:.13;pointer-events:none;white-space:nowrap;user-select:none}
.bs-card .bs-delta svg,.bs-compact .bs-delta svg{width:29px;height:29px;stroke-width:1.65}
.bs-compact .bs-delta{right:8px;bottom:-1px;font-size:24px;opacity:.12}
.bs-compact .bs-delta svg{width:23px;height:23px}
.bs-stat-label{display:none}
.bs-stat-cell{min-width:0}
.bs-popularity-cell{display:inline-flex;align-items:center;gap:7px;min-width:0}

@media(max-width:760px){
  .bs-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;width:100%}
  .bs-head>div:first-child{grid-column:1/-1;min-width:0}
  .bs-export-menu{grid-column:2;justify-self:end;z-index:30}
  .bs-export-menu>summary{justify-content:center}
  .bs-export-menu .bs-menu-list{left:auto;right:0;width:min(164px,calc(100vw - 28px));max-width:calc(100vw - 28px);box-sizing:border-box}

  .bs-table-list{gap:9px}
  .bs-table-row,.bs-employee-table .bs-table-row,.bs-service-table .bs-table-row{border:1px solid var(--bs-line);border-radius:17px;background:var(--bs-soft);padding:11px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 8px;align-items:stretch;box-sizing:border-box;overflow:hidden}
  .bs-table-row:hover{background:var(--bs-soft)}
  .bs-stat-label{display:block;color:var(--bs-muted);font-size:9.8px;line-height:1.2;font-weight:500}
  .bs-stat-cell{border-radius:12px;background:var(--bs-surface);padding:8px 9px;display:grid;align-content:center;gap:3px;min-height:48px;box-sizing:border-box}
  .bs-stat-cell b,.bs-stat-cell>span{font-size:12px;color:var(--bs-text);font-weight:620;line-height:1.25;overflow-wrap:anywhere}

  .bs-employee-table .bs-person{grid-column:1;grid-row:1;min-width:0}
  .bs-employee-table .bs-rank{grid-column:2;grid-row:1;justify-self:end;align-self:center;width:auto;min-width:42px;padding:0 8px;box-sizing:border-box;font-weight:650;color:var(--bs-text);background:var(--bs-surface)}
  .bs-employee-table .bs-hours{display:grid;color:var(--bs-text)}
  .bs-employee-table .bs-hours>span{display:inline-flex;align-items:center;gap:4px}
  .bs-employee-table .bs-hours.is-over>span{color:var(--bs-red)}

  .bs-service-table .bs-service-name{grid-column:1;grid-row:1;display:flex;align-items:center;gap:7px;min-width:0;padding:3px 2px}
  .bs-service-table .bs-service-name strong{font-size:13px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3}
  .bs-service-table .bs-popularity-cell{grid-column:2;grid-row:1;justify-self:end;align-self:center}
  .bs-service-table .bs-popularity-cell .bs-stat-label{display:none}
  .bs-service-table .bs-stat-cell{grid-column:auto!important}
  .bs-service-table .bs-stat-wide{grid-column:1/-1!important}
  .bs-pop-bars{height:23px}
}

@media(max-width:430px){
  .bs-card{padding-right:64px}
  .bs-compact{padding-right:56px}
  .bs-export-menu{width:auto!important;display:block!important}
}

/* v1.9.1447 employee-hours visibility follow-up */
@media(max-width:760px){
  .bs-employee-table .bs-table-row>.bs-hours{display:grid!important}
  .bs-employee-table .bs-person strong{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
}

/* v1.9.1453 Statistics consolidated responsive contract.
   One desktop contract + one mobile contract; no release-layer overrides below this block. */
.bs-card:before,.bs-compact:before{content:"";position:absolute;right:-27px;top:-31px;width:80px;height:80px;border-radius:50%;background:color-mix(in srgb,var(--card-tone,var(--compact-tone)) 19%,transparent);pointer-events:none}
.bs-compact:before{right:-25px;top:-29px;width:76px;height:76px}
.bs-card .bs-delta,.bs-compact .bs-delta{position:absolute;z-index:0;right:10px;bottom:-2px;margin:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;color:var(--card-tone,var(--compact-tone,var(--bs-muted)));font-family:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;font-size:30px;font-style:italic;font-weight:700;line-height:1;letter-spacing:-.055em;opacity:.48;pointer-events:none;white-space:nowrap;user-select:none;transform:none}
.bs-compact .bs-delta{right:8px;bottom:-1px;font-size:24px;opacity:.43}
.bs-card .bs-delta svg,.bs-compact .bs-delta svg{display:block;flex:0 0 auto;width:28px;height:28px;align-self:center;transform:none}
.bs-compact .bs-delta svg{width:23px;height:23px}
.bs-card .bs-delta span,.bs-compact .bs-delta span{display:block;color:var(--card-tone,var(--compact-tone,var(--bs-muted)));transform:rotate(-2deg);transform-origin:center}
.bs-card .bs-delta.is-up svg,.bs-compact .bs-delta.is-up svg{color:var(--bs-green)}
.bs-card .bs-delta.is-down svg,.bs-compact .bs-delta.is-down svg{color:var(--bs-red)}
.bs-card .bs-delta.is-flat svg,.bs-compact .bs-delta.is-flat svg{color:var(--bs-muted)}
.bs-card>*:not(.bs-delta),.bs-compact>*:not(.bs-delta){position:relative;z-index:1}
.bs-mobile-actions,.bs-current-period.is-mobile{display:none}
.bs-person{border:0;background:transparent;color:inherit;padding:0;margin:0;text-align:left;font:inherit;cursor:pointer;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;min-width:0}
.bs-person>span:last-child{display:grid;gap:2px;min-width:0}
.bs-person strong{font-size:13.5px;font-weight:560;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-person small{color:var(--bs-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-rank-art{font-family:inherit;font-style:normal;font-weight:700;letter-spacing:0;display:inline-flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap;line-height:1}
.bs-rank-art i{font-style:normal;margin:0;color:var(--bs-muted)}
.bs-employee-accrual{display:none}
.bs-service-trend>summary{display:grid!important;place-items:center!important;line-height:1!important}
.bs-service-trend>summary svg{display:block;margin:auto}

@media(min-width:761px){
  .bs-employee-table .bs-table-head,.bs-employee-table .bs-table-row{grid-template-columns:84px minmax(170px,1fr) 58px 58px 90px 100px}
  .bs-employee-table .bs-rank{display:inline-flex;width:74px;min-width:74px;max-width:74px;height:26px;padding:0 6px;box-sizing:border-box;justify-self:center;justify-content:center;align-items:center;overflow:hidden;font-size:12px;line-height:1;letter-spacing:0}
  .bs-employee-table .bs-person:hover strong{color:var(--bs-blue)}
  .bs-employee-table .bs-person:focus-visible{outline:2px solid color-mix(in srgb,var(--bs-blue) 45%,transparent);outline-offset:3px;border-radius:10px}
}
@media(min-width:761px) and (max-width:980px){
  .bs-employee-table .bs-table-head,.bs-employee-table .bs-table-row{grid-template-columns:84px minmax(150px,1fr) 48px 48px 78px}
}

@media(max-width:760px){
  .bs-head{display:block;width:100%}
  .bs-export-desktop,.bs-employee-desktop,.bs-current-period.is-desktop{display:none!important}
  .bs-tools{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:stretch;align-items:stretch;gap:7px;width:100%;min-width:0;position:relative;z-index:5;box-sizing:border-box}
  .bs-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"today week recent" "d30 month custom";gap:4px;width:100%;min-width:0;margin:0;padding:3px;box-sizing:border-box;position:relative;z-index:40}
  .bs-period-today{grid-area:today}.bs-period-week{grid-area:week}.bs-period-lastdays{grid-area:recent}.bs-period-30d{grid-area:d30}.bs-period-month{grid-area:month}.bs-period-custom{grid-area:custom}
  .bs-periods>button,.bs-periods .bs-menu>summary{width:100%;min-width:0;box-sizing:border-box;justify-content:center;padding:6px 7px;text-align:center;font-size:12px}
  .bs-periods .bs-menu{position:relative;z-index:1;min-width:0}
  .bs-periods .bs-menu[open]{z-index:100}
  .bs-periods .bs-menu-list{top:calc(100% + 6px);left:0;right:auto;z-index:120;max-width:min(220px,calc(100vw - 28px));touch-action:manipulation}
  .bs-week .bs-menu-list{width:min(188px,calc(100vw - 28px))}
  .bs-period-lastdays .bs-menu-list{left:auto;right:0;width:min(150px,calc(100vw - 28px))}
  .bs-period-month .bs-menu-list{left:auto;right:0;width:min(210px,calc(100vw - 28px))}
  .bs-periods .bs-menu-list button{pointer-events:auto;touch-action:manipulation}
  .bs-current-period.is-mobile{display:block;margin:0;padding:0 1px;color:var(--bs-muted);font-size:11.6px;line-height:1.35}
  .bs-mobile-actions{display:grid;grid-template-columns:minmax(0,1fr) 136px;gap:8px;align-items:stretch;width:100%;min-width:0;margin:0;padding:0;box-sizing:border-box;position:relative;z-index:20}
  .bs-mobile-actions .bs-employee,.bs-mobile-actions .bs-export-menu{display:block;width:100%;min-width:0;max-width:none;margin:0;justify-self:stretch}
  .bs-mobile-actions .bs-employee>summary,.bs-mobile-actions .bs-export-menu>summary{width:100%;height:34px;min-height:34px;min-width:0;margin:0;padding:0 11px;box-sizing:border-box;border:1px solid var(--bs-line);border-radius:12px;background:var(--bs-surface);color:var(--bs-text)}
  .bs-mobile-actions .bs-employee>summary{justify-content:space-between}
  .bs-mobile-actions .bs-export-menu>summary{justify-content:center}
  .bs-mobile-actions .bs-menu[open]{z-index:80}
  .bs-mobile-actions .bs-export-menu .bs-menu-list{top:calc(100% + 6px);left:auto;right:0;width:148px;max-width:calc(100vw - 28px);z-index:100}
  .bs-mobile-actions .bs-employee .bs-menu-list{top:calc(100% + 6px);left:0;right:auto;width:min(268px,calc(100vw - 28px));max-width:calc(100vw - 28px);z-index:100}
  .bs-summary,.bs-quality{grid-template-columns:1fr}
  .bs-card,.bs-compact{padding-right:68px}

  .bs-table-list{gap:9px}
  .bs-table-head{display:none}
  .bs-table-row,.bs-service-table .bs-table-row{border:1px solid var(--bs-line);border-radius:17px;background:var(--bs-soft);padding:11px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 8px;align-items:stretch;box-sizing:border-box;overflow:hidden}
  .bs-table-row:hover{background:var(--bs-soft)}
  .bs-stat-label{display:block;color:var(--bs-muted);font-size:9.8px;line-height:1.2;font-weight:500}
  .bs-stat-cell{border-radius:12px;background:var(--bs-surface);padding:8px 9px;display:grid;align-content:center;gap:3px;min-height:48px;min-width:0;box-sizing:border-box}
  .bs-stat-cell b,.bs-stat-cell>span{font-size:12px;color:var(--bs-text);font-weight:620;line-height:1.25;overflow-wrap:anywhere}

  .bs-employee-table .bs-table-row{position:relative;grid-template-columns:minmax(0,1fr) 112px;grid-template-areas:"person rank" "revenue services" "hours records";align-items:stretch;overflow:hidden;padding:12px;gap:9px 8px}
  .bs-employee-table .bs-person{grid-column:1;grid-row:1;width:100%;min-width:0;padding:0;align-self:center}
  .bs-employee-table .bs-person strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
  .bs-employee-table .bs-rank{grid-column:2;grid-row:1;position:static;display:inline-flex;align-items:center;justify-content:flex-end;align-self:center;justify-self:end;width:auto;min-width:0;height:auto;margin:0;padding:0;border:0;background:transparent;color:var(--bs-green);font-size:18px;font-weight:700;line-height:1;letter-spacing:-.01em;transform:none;white-space:nowrap}
  .bs-employee-table .bs-rank i{color:inherit}
  .bs-employee-table .bs-employee-records{grid-column:2;grid-row:3}.bs-employee-table .bs-employee-services{grid-column:2;grid-row:2}.bs-employee-table .bs-employee-revenue{grid-column:1;grid-row:2}.bs-employee-table .bs-employee-hours{grid-column:1;grid-row:3}
  .bs-employee-table .bs-employee-revenue,.bs-employee-table .bs-employee-hours{min-width:0}
  .bs-employee-table .bs-employee-services,.bs-employee-table .bs-employee-records{min-width:0}
  .bs-employee-revenue-line{display:flex;align-items:baseline;gap:4px;min-width:0;flex-wrap:nowrap}
  .bs-employee-revenue-line>b{white-space:nowrap}
  .bs-employee-accrual{display:inline;color:var(--bs-muted);font-size:9.5px;line-height:1.2;font-weight:520;white-space:nowrap}
  .bs-employee-table .bs-hours{display:grid!important;color:var(--bs-text)}
  .bs-employee-table .bs-hours>span{display:inline-flex;align-items:center;gap:4px}
  .bs-employee-table .bs-hours.is-over>span{color:var(--bs-red)}

  .bs-service-table .bs-service-name{grid-column:1;grid-row:1;display:flex;align-items:center;gap:7px;min-width:0;padding:3px 2px}
  .bs-service-table .bs-service-name strong{font-size:13px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3}
  .bs-service-table .bs-popularity-cell{grid-column:2;grid-row:1;justify-self:end;align-self:center}
  .bs-service-table .bs-popularity-cell .bs-stat-label{display:none}
  .bs-service-table .bs-stat-cell{grid-column:auto!important}
  .bs-service-table .bs-stat-wide{grid-column:1/-1!important}
  .bs-pop-bars{height:23px}
  .bs-service-trend>summary{width:24px;height:24px;border-radius:9px}
}

@media(max-width:430px){
  .bs-card{padding-right:64px}.bs-compact{padding-right:56px}
  .bs-mobile-actions{grid-template-columns:minmax(0,1fr) 132px}
  .bs-periods>button,.bs-periods .bs-menu>summary{padding:6px 5px;font-size:11.5px}
}


/* MPRF-BLK-EMC4P7Q2 — mobile-only post-merge Statistics UX corrective. */
.bs-chart-mobile-tools{display:none}
.bs-line-chart-viewport{min-width:0}
.bs-line-chart-canvas{width:100%;min-width:0}
@media(max-width:760px){
  .bs-float-toast{left:50%;top:50%;bottom:auto;z-index:30050;max-width:calc(100dvw - 32px);box-sizing:border-box;text-align:center;transform:translate(-50%,-50%);font-size:12.2px;padding:9px 13px}
  .bs-chart-mobile-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 7px;color:var(--bs-muted);font-size:9.8px;line-height:1.2}
  .bs-chart-mobile-tools button{min-height:30px;border:1px solid var(--bs-line);border-radius:10px;background:var(--bs-surface);color:var(--bs-text);padding:0 10px;font:inherit;font-size:10.5px;font-weight:620;white-space:nowrap;-webkit-tap-highlight-color:transparent}
  .bs-chart-mobile-tools span{text-align:right}
  .bs-line-chart-viewport{width:100%;overflow-x:hidden;overflow-y:hidden;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .bs-line-chart-viewport::-webkit-scrollbar{display:none}
  .bs-line-chart-viewport.is-zoomed{overflow-x:auto;touch-action:pan-x pan-y}
  .bs-line-chart-viewport.is-zoomed .bs-line-chart-canvas{width:900px;max-width:none}
  .bs-line-chart-viewport.is-zoomed svg{width:900px;max-width:none;height:260px}
}
@keyframes bs-toast-in-mobile{from{opacity:0;transform:translate(-50%,calc(-50% + 7px))}to{opacity:1;transform:translate(-50%,-50%)}}
@media(max-width:760px){.bs-float-toast{animation:bs-toast-in-mobile .15s ease}}

/* MPRF-BLK-STZ5P3N8 — mobile chart zoom control on the right + fixed Y axis while panning. */
.bs-line-chart-stage{position:relative;min-width:0}
.bs-chart-sticky-axis{display:none}
@media(max-width:760px){
  .bs-chart-mobile-tools{justify-content:flex-end}
  .bs-chart-mobile-tools span{flex:1 1 auto;text-align:left}
  .bs-chart-mobile-tools button{order:2;width:32px;min-width:32px;height:32px;min-height:32px;padding:0;display:block;position:relative;overflow:hidden;line-height:0;color:#111;background:var(--bs-surface);border-radius:10px}
  .bs-chart-mobile-tools button svg{display:block;position:absolute;left:50%;top:50%;margin:0;transform:translate(-50%,-50%)}
  .bs-line-chart-stage{position:relative}
  .bs-chart-sticky-axis{display:block;position:absolute;z-index:4;left:0;top:0;width:44px;height:260px;pointer-events:none;background:linear-gradient(90deg,var(--bs-surface) 72%,color-mix(in srgb,var(--bs-surface) 0%,transparent) 100%)}
  .bs-chart-sticky-axis span{position:absolute;right:9px;transform:translateY(-50%);color:var(--bs-muted);font-size:8.6px;line-height:1;white-space:nowrap}
  .bs-line-chart-viewport.is-zoomed .bs-axis-y-label{opacity:0}
}

/* MPRF-BLK-STZ5P3N8 — v2.0.35 mobile chart control micro-calibration. */
@media(max-width:760px){
  .bs-chart-mobile-tools button{width:29px;min-width:29px;height:29px;min-height:29px;transform:translateY(-4px);border-radius:9px}
  .bs-chart-mobile-tools button svg{width:16px;height:16px}
  .bs-chart-legend{position:relative;z-index:8;background:transparent;padding-top:4px;margin-top:-3px}
}


/* MPRF-BLK-STZ5P3N8 — v2.0.36 final mobile chart fit/toolbar calibration. */
@media(max-width:760px){
  .bs-chart-mobile-tools{justify-content:flex-end;gap:6px}
  .bs-chart-mobile-tools span{flex:0 0 auto;text-align:right;white-space:nowrap;margin-left:auto}
  .bs-chart-sticky-axis{left:-10px;width:42px}
  .bs-chart-sticky-axis span{right:6px}
  .bs-line-chart-viewport:not(.is-zoomed) .bs-line-chart-canvas{width:100%;max-width:100%}
}

/* MPRF-BLK-STZ5P3N8 — v2.0.37 fit must expose the full date range; Y axis uses the left gutter only. */
@media(max-width:760px){
  .bs-chart-sticky-axis{left:-31px;width:33px;background:linear-gradient(90deg,var(--bs-surface) 84%,color-mix(in srgb,var(--bs-surface) 0%,transparent) 100%)}
  .bs-chart-sticky-axis span{right:3px;font-size:8.5px}
  .bs-line-chart-viewport:not(.is-zoomed){margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important}
  .bs-line-chart-viewport:not(.is-zoomed) .bs-line-chart-canvas{width:100%!important;min-width:0!important;max-width:100%!important}
  .bs-chart-mobile-tools{align-items:center}
  .bs-chart-mobile-tools span{margin-left:auto;margin-right:0}
}

/* MPRF-BLK-STZ5P3N8 — v2.0.37 final edge-date/Y-axis fit correction after physical iPhone review. */
@media(max-width:760px){
  .bs-chart-sticky-axis{left:-42px!important;width:31px!important;background:transparent!important}
  .bs-chart-sticky-axis span{right:0!important}
  .bs-chart-mobile-tools{padding-right:0!important}
  .bs-chart-mobile-tools span{max-width:calc(100% - 38px);margin-left:auto!important;margin-right:0!important}
  .bs-line-chart-viewport:not(.is-zoomed){width:100%!important;overflow:hidden!important}
  .bs-line-chart-viewport:not(.is-zoomed) svg{display:block;width:100%!important;max-width:100%!important;height:auto!important}
}


/* MPRF-BLK-STZ5P3N8 — v2.1.13: Y-axis is reserved INSIDE the chart card on every phone width.
   This intentionally overrides the old negative-left iPhone calibration chain. */
@media(max-width:760px){
  .bs-line-chart-stage{padding-left:0!important;box-sizing:border-box!important;overflow:hidden!important}
  .bs-line-chart-stage.is-zoomed{padding-left:34px!important}
  .bs-chart-sticky-axis{left:0!important;top:0!important;width:32px!important;height:var(--bs-chart-axis-height,260px)!important;background:transparent!important;overflow:visible!important}
  .bs-chart-sticky-axis span{right:4px!important;font-size:8.5px!important;background:var(--bs-surface)!important;padding:2px 2px!important;border-radius:5px!important}
  .bs-line-chart-viewport{width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .bs-line-chart-viewport:not(.is-zoomed){overflow:hidden!important}
  .bs-line-chart-viewport.is-zoomed{overflow-x:auto!important}
}

/* MPRF 14437 MAX 277: increase legibility of subtle delta stamps by ~30%. */
html[data-mprf-platform="max"] .bs-card .bs-delta {opacity:.62}
html[data-mprf-platform="max"] .bs-compact .bs-delta {opacity:.56}

/* src/core/standardModalGuard.css */
/* MPRF-BLK-14445-MODAL-GUARD. In app modal state, keep underlying document stationary. */
html.mprf-standard-modal-is-open,
html.mprf-standard-modal-is-open body {
  overflow:hidden; overscroll-behavior:none;
}
html.mprf-standard-modal-is-open .mprf-profi-modal-sheet,
html.mprf-standard-modal-is-open .mprf-enterprise-modal-shell,
html.mprf-standard-modal-is-open [role="dialog"][aria-modal="true"] {
  overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
}
