/*
 * TOTAPP Workspace OS - Global Visual & Interaction Contract M1
 * Central convergence layer. Capability CSS may express domain layout only;
 * visual grammar, interaction states and accessibility are governed here.
 */
:root {
  --ws-contract-radius-sm: 8px;
  --ws-contract-radius-md: 12px;
  --ws-contract-radius-lg: 16px;
  --ws-contract-control-min-height: 40px;
  --ws-contract-touch-min-height: 44px;
  --ws-contract-focus-width: 3px;
  --ws-contract-focus-offset: 3px;
  --ws-contract-transition: 140ms ease;
  --ws-contract-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body, button, input, select, textarea { font-family: var(--ws-contract-font); }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* Global controls */
button,
input,
select,
textarea,
.wsds-btn,
.ws-top-btn,
.ws-dock-item,
.ws-bottom-dock-item,
[role="button"] {
  border-radius: var(--ws-contract-radius-sm);
  transition: border-color var(--ws-contract-transition), box-shadow var(--ws-contract-transition), transform var(--ws-contract-transition), background-color var(--ws-contract-transition);
}
button,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.wsds-btn,
.ws-top-btn { min-height: var(--ws-contract-control-min-height); }

a, button, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"]) { outline-offset: var(--ws-contract-focus-offset); }
:where(a, button, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: var(--ws-contract-focus-width) solid currentColor;
  outline-offset: var(--ws-contract-focus-offset);
  box-shadow: 0 0 0 2px var(--ws-surface, #fff), 0 0 0 5px currentColor;
}

/* Semantic cards: action, information, expandable action. */
:where(.wsds-card, .ws-card, .card, .metric-card, .dashboard-card, .portal-destination-card, [data-workspace-card]) {
  border-radius: var(--ws-contract-radius-lg);
  transition: transform var(--ws-contract-transition), box-shadow var(--ws-contract-transition), border-color var(--ws-contract-transition);
}
:where([data-card-kind="action"], [data-card-kind="expandable-action"], a.wsds-card, a.ws-card, a.dashboard-card, a.portal-destination-card) { cursor: pointer; }
:where([data-card-kind="action"], [data-card-kind="expandable-action"], a.wsds-card, a.ws-card, a.dashboard-card, a.portal-destination-card):hover {
  transform: translateY(-2px);
}
[data-card-toggle] { position: relative; z-index: 2; }
[data-card-kind="information"] { cursor: default; }

/* Pointer Assist is opt-in and independent from Focus Mode. */
html[data-workspace-pointer-assist="on"] body,
body.ws-pointer-assist { --ws-pointer-assist-active: 1; }
html[data-workspace-pointer-assist="on"] :where(
  a, button, input, select, textarea, [role="button"], [role="link"], [role="menuitem"],
  .wsds-card, .ws-card, .card, .metric-card, .dashboard-card, .panel, .widget,
  [data-workspace-card], [data-pointer-assist-surface]
):hover,
body.ws-pointer-assist :where(
  a, button, input, select, textarea, [role="button"], [role="link"], [role="menuitem"],
  .wsds-card, .ws-card, .card, .metric-card, .dashboard-card, .panel, .widget,
  [data-workspace-card], [data-pointer-assist-surface]
):hover {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--ws-surface, #fff), 0 8px 24px rgba(15, 23, 42, .28);
}

/* Information surfaces must be locatable but never become false links. */
html[data-workspace-pointer-assist="on"] [data-card-kind="information"]:hover,
body.ws-pointer-assist [data-card-kind="information"]:hover { cursor: default; }

/* A consistent selected/current/disabled grammar. */
:where([aria-current="page"], [aria-selected="true"], .active, .is-active, .selected, .is-selected) {
  box-shadow: inset 0 0 0 2px currentColor;
}
:where(button, input, select, textarea, [role="button"], a)[disabled],
:where(button, input, select, textarea, [role="button"], a)[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.18);
}

/* Normalize embedded operational surfaces without erasing domain layout. */
.ws-converged-surface { min-width: 0; width: 100%; }
.ws-converged-surface > :first-child { margin-top: 0; }
.ws-converged-surface .totapp-page-actions { display: none; }
.ws-converged-surface :where(header, nav).legacy-app-header { display: none; }

/* Mobile/touch keeps Workspace ownership while allowing full-width operational UX. */
@media (max-width: 768px) {
  button, input:not([type="checkbox"]):not([type="radio"]), select, textarea, .wsds-btn, .ws-top-btn {
    min-height: var(--ws-contract-touch-min-height);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html[data-workspace-pointer-assist="on"] :where(a, button, input, select, textarea, [role="button"], .wsds-card, .ws-card, .card, [data-workspace-card]):hover,
  body.ws-pointer-assist :where(a, button, input, select, textarea, [role="button"], .wsds-card, .ws-card, .card, [data-workspace-card]):hover {
    transform: none;
  }
}

/* Public/auth/security boundary: not a second application shell. */
.workspace-boundary-body {
  margin: 0;
  min-height: 100vh;
  background: var(--ws-page-bg, #f4f7fb);
  color: var(--ws-text, #172033);
}
.workspace-boundary-main { min-height: 100vh; width: 100%; }
.workspace-boundary-main > .ws-converged-surface { min-height: 100vh; }
.ws-settings-help { margin: 4px 0 0; }

/* ==========================================================================
 * Workspace OS 3.3 - Global Runtime Visual & Interaction Authority M9
 * This block is deliberately loaded after capability CSS. Domain CSS may own
 * data layout; Workspace OS owns interaction, focus, information-surface,
 * dialog, notification and Pointer Assist grammar everywhere.
 * ========================================================================== */
:root {
  --ws-global-hover-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  --ws-global-hover-border: color-mix(in srgb, var(--ws-line, #d7dfec) 72%, var(--ws-ink, #172033) 28%);
  --ws-global-panel-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  --ws-global-notification-width: min(400px, calc(100vw - 32px));
}

/* Common information surfaces across every capability and portal. */
.workspace-shell :where(
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface],
  [data-pointer-assist-surface],
  [data-card-kind="information"],
  [class~="card"], [class*="-card"],
  [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"],
  [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"],
  [class~="summary-card"], [class*="summary-card"],
  [class~="widget"], [class*="-widget"]
) {
  transition:
    box-shadow var(--ws-contract-transition),
    border-color var(--ws-contract-transition),
    transform var(--ws-contract-transition),
    background-color var(--ws-contract-transition) !important;
}

/* M10.4 Global Surface Semantics
 * Every Workspace Design System surface inherits interaction feedback automatically.
 * Capability authors may refine semantics with data-workspace-surface. Operational
 * surfaces (maps, canvases, editors, coordinate-driven widgets) are explicitly
 * excluded so those runtimes retain complete ownership of their geometry.
 */
/* Normal feedback is intentionally subtle and independent from Pointer Assist. */
.workspace-shell :where(
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface],
  [data-pointer-assist-surface],
  [data-card-kind="information"],
  [class~="card"], [class*="-card"],
  [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"],
  [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"],
  [class~="summary-card"], [class*="summary-card"],
  [class~="widget"], [class*="-widget"]
):hover {
  outline: 0 !important;
  border-color: var(--ws-global-hover-border) !important;
  box-shadow: var(--ws-global-hover-shadow) !important;
  transform: translateY(-1px) !important;
}

/* Pointer Assist OFF must never retain the enhanced locator ring. */
html[data-workspace-pointer-assist="off"] .workspace-shell :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [class~="card"], [class*="-card"], [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"], [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"], [class~="widget"], [class*="-widget"]
):hover {
  outline: 0 !important;
  outline-offset: 0 !important;
}

/* Pointer Assist ON is the only owner of the enhanced locator effect. */
html[data-workspace-pointer-assist="on"] .workspace-shell :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [class~="card"], [class*="-card"], [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"], [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"], [class~="widget"], [class*="-widget"]
):hover,
body.ws-pointer-assist .workspace-shell :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [class~="card"], [class*="-card"], [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"], [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"], [class~="widget"], [class*="-widget"]
):hover {
  outline: 3px solid var(--ws-pointer-ring, currentColor) !important;
  outline-offset: 3px !important;
  box-shadow: var(--ws-pointer-shadow, 0 12px 30px rgba(2, 8, 23, .28)) !important;
  position: relative;
  z-index: 3;
}

/* Capability launcher: the acronym is the compact, explicit app entry point. */
.workspace-card .ws-capability-launcher {
  display: grid !important;
  place-items: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
}
.workspace-card .ws-capability-launcher:hover,
.workspace-card .ws-capability-launcher:focus-visible {
  border-color: currentColor !important;
}

/* Global dialog/panel grammar, including capability modals. */
.workspace-shell :where([role="dialog"], dialog, .modal-dialog, [class*="-dialog"]) {
  border-radius: 24px !important;
  border: 1px solid var(--ws-line) !important;
  background: var(--ws-panel) !important;
  color: var(--ws-ink) !important;
  box-shadow: var(--ws-global-panel-shadow) !important;
}

/* Settings always ends with a governed three-action footer. */
.ws-settings-title { font-size: 26px !important; }
.ws-settings-actions {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 4 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  padding: 16px 0 0 !important;
  margin-top: 8px !important;
  background: linear-gradient(to top, var(--ws-panel) 76%, transparent) !important;
}
.ws-settings-actions .wsds-btn { min-width: 132px !important; }

/* Notification Center is a Workspace panel, not a capability-specific popup. */
.workspace-shell .ws-notification-center {
  position: fixed !important;
  top: calc(var(--ws-header-h, 160px) + 16px) !important;
  right: 24px !important;
  bottom: auto !important;
  width: var(--ws-global-notification-width) !important;
  max-width: var(--ws-global-notification-width) !important;
  max-height: min(680px, calc(100vh - var(--ws-header-h, 160px) - 40px)) !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-radius: 26px !important;
  border: 1px solid var(--ws-line) !important;
  background: var(--ws-panel) !important;
  color: var(--ws-ink) !important;
  box-shadow: var(--ws-global-panel-shadow) !important;
}
.workspace-shell .ws-notification-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 20px 22px !important;
  border-bottom: 1px solid var(--ws-line) !important;
  background: color-mix(in srgb, var(--ws-panel) 90%, var(--ws-blue) 10%) !important;
}
.workspace-shell .ws-notification-head strong {
  display: block !important;
  color: var(--ws-ink) !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
}
.workspace-shell .ws-notification-head span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--ws-muted) !important;
  font-size: 13px !important;
}
.workspace-shell .ws-notification-head button {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 1px solid var(--ws-line) !important;
  border-radius: 14px !important;
  background: var(--ws-panel) !important;
  color: var(--ws-ink) !important;
  cursor: pointer !important;
}
.workspace-shell .ws-notification-items {
  min-height: 0 !important;
  max-height: 560px !important;
  overflow-y: auto !important;
  padding: 14px !important;
  display: grid !important;
  gap: 10px !important;
}
.workspace-shell .ws-notification-item,
.workspace-shell .ws-notification-empty {
  display: grid !important;
  gap: 5px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--ws-line) !important;
  border-radius: 18px !important;
  background: color-mix(in srgb, var(--ws-panel) 94%, var(--ws-bg) 6%) !important;
  color: var(--ws-ink) !important;
  box-shadow: none !important;
}
.workspace-shell .ws-notification-item:hover,
.workspace-shell .ws-notification-item:focus-visible {
  border-color: var(--ws-global-hover-border) !important;
  box-shadow: var(--ws-global-hover-shadow) !important;
  transform: translateY(-1px) !important;
}
.workspace-shell .ws-notification-kind {
  color: var(--ws-blue) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
.workspace-shell .ws-notification-item strong { color: var(--ws-ink) !important; }
.workspace-shell .ws-notification-item em {
  color: var(--ws-muted) !important;
  font-style: normal !important;
  line-height: 1.45 !important;
}

/* Customer/Admin/Capability portals inherit exactly the same authority. */
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main,
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-converged-surface {
  color: var(--ws-ink);
}

@media (max-width: 760px) {
  .workspace-shell .ws-notification-center {
    top: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
  }
  .ws-settings-actions { flex-direction: column !important; }
  .ws-settings-actions .wsds-btn { width: 100% !important; }
}

/* M10.3 — Single Visual Layer Authority
   Every Capability/View lives inside .ws-main, which is an isolated stacking
   context. Local z-index values may order domain elements inside a View, but
   can never overtake Workspace Header, Dock, Settings, Notifications or modals. */
:root {
  --ws-layer-content: 0;
  --ws-layer-dock: 420;
  --ws-layer-footer: 430;
  --ws-layer-header: 500;
  --ws-layer-notification: 700;
  --ws-layer-settings: 800;
  --ws-layer-command: 850;
  --ws-layer-modal: 900;
  --ws-layer-critical: 950;
}

.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main {
  position: relative !important;
  z-index: var(--ws-layer-content) !important;
  isolation: isolate !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-header {
  z-index: var(--ws-layer-header) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-dock,
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-bottom-dock {
  z-index: var(--ws-layer-dock) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-footer {
  z-index: var(--ws-layer-footer) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-notification-center {
  z-index: var(--ws-layer-notification) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] [data-workspace-settings-panel] {
  z-index: var(--ws-layer-settings) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-command-palette,
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-theme-panel {
  z-index: var(--ws-layer-command) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] :where(
  .tc-modal,
  [role="dialog"][aria-modal="true"]
) {
  z-index: var(--ws-layer-modal) !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-legacy-refresh-overlay {
  z-index: var(--ws-layer-critical) !important;
}

/* Enhanced pointer location must be obvious but must never take ownership of
   component geometry. Operational engines such as Leaflet use transform for
   coordinates, so the global contract uses outline/shadow only. */
html[data-workspace-pointer-assist="on"] .workspace-shell :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [class~="card"], [class*="-card"], [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"], [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"], [class~="widget"], [class*="-widget"]
):hover,
body.ws-pointer-assist .workspace-shell :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [class~="card"], [class*="-card"], [class~="panel"], [class*="-panel"],
  [class~="kpi"], [class*="-kpi"], [class~="metric"], [class*="-metric"],
  [class~="tile"], [class*="-tile"], [class~="widget"], [class*="-widget"]
):hover {
  outline: 4px solid var(--ws-pointer-ring, #f59e0b) !important;
  outline-offset: 4px !important;
  box-shadow:
    0 0 0 2px var(--ws-panel, #fff),
    0 0 0 7px color-mix(in srgb, var(--ws-pointer-ring, #f59e0b) 55%, transparent),
    0 14px 34px rgba(2, 8, 23, .30) !important;
}

/* Workspace OS M10.4.2 - Operational Engine Interaction Authority
 * Coordinate-driven runtimes own their geometry. Workspace accessibility may
 * decorate them, but must never replace Leaflet's absolute positioning or
 * transform-based coordinates. */
.workspace-shell [data-workspace-surface="operational"] {
}
.workspace-shell [data-workspace-surface="operational"] :where(
  .leaflet-marker-icon,
  .leaflet-marker-shadow
) {
  position: absolute !important;
  pointer-events: auto !important;
  cursor: pointer;
  transition: outline-color .12s ease, box-shadow .12s ease, filter .12s ease !important;
}
.workspace-shell [data-workspace-surface="operational"] :where(
  .leaflet-marker-icon,
  .leaflet-marker-shadow
):hover,
.workspace-shell [data-workspace-surface="operational"] :where(
  .leaflet-marker-icon,
  .leaflet-marker-shadow
):focus-visible {
  /* No transform declaration here: Leaflet's inline transform is the coordinate. */
  outline: 2px solid var(--ws-pointer-ring, #4056d8) !important;
  outline-offset: 2px !important;
}
html[data-workspace-pointer-assist="on"] .workspace-shell [data-workspace-surface="operational"] .leaflet-marker-icon:hover,
html[data-workspace-pointer-assist="on"] .workspace-shell [data-workspace-surface="operational"] .leaflet-marker-icon:focus-visible,
body.ws-pointer-assist .workspace-shell [data-workspace-surface="operational"] .leaflet-marker-icon:hover,
body.ws-pointer-assist .workspace-shell [data-workspace-surface="operational"] .leaflet-marker-icon:focus-visible {
  outline-width: 4px !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px var(--ws-surface, #fff), var(--ws-pointer-shadow, 0 12px 30px rgba(2,8,23,.28)) !important;
  position: absolute !important;
}
/* Workspace OS M10.4.3 - Operational preview selection authority.
 * Leaflet previews are labels for the same selectable object as their marker.
 * They may receive pointer/focus feedback, but never geometry transforms. */
.workspace-shell [data-workspace-surface="operational"] :where(
  .dispatch-technician-preview,
  .dispatch-ticket-preview
) {
  pointer-events: auto !important;
  cursor: pointer;
  user-select: none;
}
.workspace-shell [data-workspace-surface="operational"] :where(
  .dispatch-technician-preview,
  .dispatch-ticket-preview
):hover,
.workspace-shell [data-workspace-surface="operational"] :where(
  .dispatch-technician-preview,
  .dispatch-ticket-preview
):focus-visible {
  outline: 2px solid var(--ws-pointer-ring, #4056d8) !important;
  outline-offset: 2px !important;
}
html[data-workspace-pointer-assist="on"] .workspace-shell [data-workspace-surface="operational"] :where(
  .dispatch-technician-preview,
  .dispatch-ticket-preview
):hover,
body.ws-pointer-assist .workspace-shell [data-workspace-surface="operational"] :where(
  .dispatch-technician-preview,
  .dispatch-ticket-preview
):hover {
  outline-width: 4px !important;
  outline-offset: 3px !important;
}

/* M10.6 Global Workspace UI Closure — legacy/content convergence
   This layer is intentionally capability-agnostic. It normalizes inherited
   legacy content inside the One Shell without recreating local shells. */
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host {
  display: grid;
  gap: 22px;
  width: 100%;
  min-width: 0;
  color: var(--ws-ink);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(h1,h2,h3,h4) {
  color: var(--ws-ink);
  line-height: 1.16;
  margin-top: 0;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(p,small,.helptext,.hint) {
  color: var(--ws-muted);
  line-height: 1.55;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(form,.toolbar,.filters,.filter-bar,.search-bar) {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host form:not(.ws-language):not(.ws-operational-context):not(.ws-persona-switch) {
  padding: 18px;
  border: 1px solid var(--ws-line);
  border-radius: 20px;
  background: var(--ws-panel);
  box-shadow: 0 12px 30px rgba(15,23,42,.055);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host form > p {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: min(100%, 230px);
  flex: 1 1 230px;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host label {
  color: var(--ws-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--ws-line);
  border-radius: 13px;
  background: var(--ws-panel);
  color: var(--ws-ink);
  font: inherit;
  box-sizing: border-box;
  outline: none;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host textarea {
  min-height: 110px;
  resize: vertical;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(input,select,textarea):focus-visible {
  border-color: var(--ws-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--ws-blue) 20%,transparent);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(button,input[type="submit"],input[type="button"],.btn,.primary,.secondary) {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--ws-line);
  border-radius: 13px;
  background: var(--ws-panel);
  color: var(--ws-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(button,input[type="submit"],input[type="button"],.btn,.primary,.secondary):hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb,var(--ws-blue) 45%,var(--ws-line));
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(.primary,.quotes-primary,[data-primary-action]) {
  background: var(--ws-blue) !important;
  border-color: var(--ws-blue) !important;
  color: #fff !important;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--ws-line);
  border-radius: 18px;
  background: var(--ws-panel);
  box-shadow: 0 12px 30px rgba(15,23,42,.05);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(th,td) {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ws-line);
  text-align: left;
  vertical-align: middle;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host th {
  background: color-mix(in srgb,var(--ws-bg) 78%,var(--ws-panel));
  color: var(--ws-muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host tbody tr:last-child td { border-bottom: 0; }
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host tbody tr:hover {
  background: color-mix(in srgb,var(--ws-blue) 4%,var(--ws-panel));
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host a {
  color: var(--ws-blue);
  font-weight: 800;
  text-underline-offset: 3px;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host :where(.panel,.card,.section,article) {
  min-width: 0;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host > :where(section,article,.panel,.card,.wrap,.content) {
  max-width: 100%;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .totapp-search-meta {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb,var(--ws-blue) 8%,var(--ws-panel));
  color: var(--ws-muted);
  font-size: 11px;
  font-weight: 850;
}
.workspace-shell-body[data-workspace-ui-authority="global"] [data-workspace-row-link] {
  cursor: pointer;
}
.workspace-shell-body[data-workspace-ui-authority="global"] [data-workspace-row-link]:focus-visible {
  outline: 3px solid color-mix(in srgb,var(--ws-blue) 42%,transparent);
  outline-offset: -3px;
}
@media (max-width: 760px) {
  .workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host form:not(.ws-language):not(.ws-operational-context):not(.ws-persona-switch) {
    display: grid;
    align-items: stretch;
  }
  .workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host table {
    min-width: 680px;
  }
  .workspace-shell-body[data-workspace-ui-authority="global"] .wsds-legacy-host {
    overflow-x: auto;
  }
}

/* M10.6 bare-element safety net. A Workspace View must never degrade to browser
   default controls just because a capability has not yet adopted a named WSDS
   component. Named component classes remain authoritative through specificity. */
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main :where(input[type="text"],input[type="search"],input[type="email"],input[type="tel"],input[type="url"],input[type="number"],input[type="date"],input[type="datetime-local"],input[type="password"],select,textarea) {
  font: inherit;
  color: var(--ws-ink);
  background-color: var(--ws-panel);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main :where(input,select,textarea,button,a):focus-visible {
  outline: 3px solid color-mix(in srgb,var(--ws-blue) 38%,transparent);
  outline-offset: 2px;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main table:not([class]) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ws-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--ws-panel);
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main table:not([class]) th,
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main table:not([class]) td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--ws-line);
  text-align: left;
  vertical-align: middle;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main table:not([class]) th {
  background: var(--ws-bg);
  color: var(--ws-muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.workspace-shell-body[data-workspace-ui-authority="global"] .ws-main table:not([class]) tr:last-child td { border-bottom: 0; }


/* ========================================================================== 
 * M10.6 RC5 - Universal Surface Feedback Contract
 * Normal hover feedback is mandatory and independent from Pointer Assist.
 * Pointer Assist only adds the enhanced locator ring; it never owns motion.
 * ========================================================================== */
.workspace-shell :where(
  a[href], button, summary,
  [role="button"], [role="link"], [role="menuitem"], [role="option"],
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea
):not([disabled]):not([aria-disabled="true"]):hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--ws-global-hover-shadow) !important;
}
.workspace-shell :where(
  .wsds4-surface:not([data-workspace-surface="operational"]),
  .wsds4-toolbar:not([data-workspace-surface="operational"]),
  [data-workspace-surface]:not([data-workspace-surface="operational"]),
  [data-workspace-information-surface], [data-pointer-assist-surface],
  [data-card-kind], .wf-card, .wf-kpi, .wf-row, .customer360-card,
  .ws-ticket-surface
):hover {
  transform: translateY(-2px) !important;
  border-color: var(--ws-global-hover-border) !important;
  box-shadow: var(--ws-global-hover-shadow) !important;
}
@media (hover:none) {
  .workspace-shell :where(a[href],button,summary,[role="button"],[role="link"],input,select,textarea):hover,
  .workspace-shell :where(.wsds4-surface,[data-workspace-surface],[data-card-kind],.wf-card,.wf-kpi,.wf-row,.customer360-card,.ws-ticket-surface):hover {
    transform:none !important;
  }
}
