/* Optional local underwater appearance. Documents, exports and financial state are untouched. */
.marsa-dive-toggle{width:44px;height:44px;min-width:44px;flex:0 0 44px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:1px solid #96c7d33d;background:transparent;color:inherit;cursor:pointer;padding:0}
.marsa-dive-toggle[aria-pressed="true"]{background:#6bcbd52b;border-color:#a1dce6a6;box-shadow:inset 0 0 14px #94dde520}
.marsa-dive-toggle:focus-visible{outline:2px solid #9edfeb;outline-offset:3px}
.marsa-dive-water,.marsa-dive-near{position:fixed;inset:0;width:100%;height:100%;pointer-events:none!important;user-select:none}
.marsa-dive-water{z-index:0;opacity:.5;animation:marsa-dive-appear 1s ease both}
.marsa-dive-near{z-index:8;opacity:.24;clip-path:inset(110px 0 0)}
html[data-marsa-dive="on"] body{background:#040f1b!important;isolation:isolate}
html[data-marsa-dive="on"] :is(.crm-shell,.erp-access-shell,.library-shell){position:relative;z-index:1;background:transparent!important}
html[data-marsa-dive="on"] :is(.crm-shell>main,.erp-app,.workspace,.erp-workspace,.erp-main,.library-main,#main){background:transparent!important}
html[data-marsa-dive="on"] :is(.crm-marine-widget,.panel,.erp-marine-widget){background:linear-gradient(135deg,#29475bd9,#0d2539d6)!important;border-color:#b4e6ed30!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
html[data-marsa-dive="on"] :is(.crm-workspace-header,.marsa-chrome-header){background:#102839e8!important}
/* Library's opaque brand rail must join the water only while Dive is enabled. */
/* Keep its drawer above the body-level scrim; the shell must not trap z-index 41. */
html[data-marsa-dive="on"] .library-shell{
  z-index:auto;
  /* Same shared chrome color roles as CRM; Library supplies its purple values. */
  --library-glass:#30253fad;
  --library-chip:#a58ac52b;
  --library-dive-surface:linear-gradient(135deg,#49375e99,#21192ebd);
  --mc-solid:#241c34;
  --mc-selection:#d2beef;
}
html[data-marsa-dive="on"] body:has(>.library-shell)>.marsa-dive-water{z-index:-1}
html[data-marsa-dive="on"] .library-shell .library-sidebar{
  --sidebar-ink:#fcfaff;
  --sidebar-muted:#d8ccec;
  --sidebar-edge:#e5d3ff30;
  --sidebar-chip:#c5a8ef1c;
  --action:#d2beef;
  --focus:#e0ceff;
  background:linear-gradient(155deg,#49366199,#1d162eb3 70%)!important;
  border-inline-end:1px solid #e5d3ff24;
  -webkit-backdrop-filter:blur(20px) saturate(1.15);
  backdrop-filter:blur(20px) saturate(1.15);
  box-shadow:-6px 0 25px -16px #150d2466;
}
html[data-marsa-dive="on"] .library-shell :is(.panel,.resume-card,.dashboard-stat,.manager-context,.manager-sheet){background:var(--library-dive-surface)!important;border-color:#d8c3f02e!important}
body:has(dialog[open],[role="dialog"],.modal-backdrop) .marsa-dive-near{visibility:hidden}
@keyframes marsa-dive-appear{from{opacity:0}to{opacity:.5}}
@media(max-width:700px){.marsa-dive-near{opacity:.17}.marsa-dive-toggle{width:44px;height:44px}.marsa-chrome-tools{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.marsa-dive-water{animation:none}.marsa-dive-near{display:none}}
@media print{.marsa-dive-toggle,.marsa-dive-water,.marsa-dive-near{display:none!important}}

.omni-dive-transition {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.dive-tide-water {
  position: absolute;
  left: -10%;
  top: 0;
  width: 120%;
  height: 125%;
  transform: translateY(100%);
  animation: marsa-dive-fill 820ms cubic-bezier(0.28, 0.62, 0.3, 1) both;
  will-change: transform;
}
.dive-tide-water svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dive-tide-frost {
  position: absolute;
  inset: 0;
  background: linear-gradient(#b2f4ef0a, transparent 70%);
  -webkit-backdrop-filter: blur(5px) saturate(1.2);
  backdrop-filter: blur(5px) saturate(1.2);
  clip-path: polygon(
    0 9%,
    10% 7%,
    20% 8%,
    30% 7%,
    40% 9%,
    55% 7%,
    68% 6%,
    80% 8%,
    90% 9%,
    100% 6%,
    100% 100%,
    0 100%
  );
}
.dive-tide-body {
  fill: url(#marsa-tide-depth);
}
.dive-tide-foam {
  fill: #71c5d2;
  opacity: 0.08;
}
.dive-tide-rim {
  fill: none;
  stroke: #b9efe9;
  stroke-width: 1.7;
  opacity: 0.48;
}
.dive-tide-threads {
  fill: none;
  stroke: #a8e3e7;
  stroke-width: 0.7;
  opacity: 0.22;
}
.dive-tide-water svg > path,
.dive-tide-threads {
  animation: marsa-dive-swell 1100ms ease-in-out both;
  transform-origin: center;
}
.omni-dive-transition[data-phase="reveal"] {
  animation: marsa-dive-reveal 440ms ease-out both;
}
@keyframes marsa-dive-fill {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(-16%);
  }
}
@keyframes marsa-dive-swell {
  from {
    transform: translateX(-3%) scaleY(1.03);
  }
  to {
    transform: translateX(3%) scaleY(1);
  }
}
@keyframes marsa-dive-reveal {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

body[data-dive-entering]{transition:background-color 650ms ease}
