/*
  MARÉ — Identidade Oceânica Canônica (docs/prototipos/assets/ocean-identity.css)
  Correntes e profundidade no ambiente, conteúdo em superfícies limpas e escala precisa.
*/
:root {
  --surface-selected: #edf3fb;
  --surface-soft: #fafbfc;
  --deep-space-blue: #06253d;
  --steel-blue: #2d7dd2;
  --white: #ffffff;

  --ocean-canvas: #f4f7fb;
  --ocean-canvas: color-mix(in srgb, var(--surface-selected) 42%, var(--surface-soft));

  --ocean-depth: #0d3558;
  --ocean-depth: color-mix(in srgb, var(--deep-space-blue) 82%, var(--steel-blue));

  --ocean-glow: rgba(237, 243, 251, 0.74);
  --ocean-glow: color-mix(in srgb, var(--surface-selected) 74%, transparent);

  --ocean-contours: url("/static/images/ocean-currents.svg");
}

/* Background suave com atmosfera náutica */
body {
  background: var(--ocean-canvas) !important;
  color: var(--ink, #172536);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Área principal com gradiente radial oceânico */
main:not(.auth) {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse 780px 360px at 100% 0, var(--ocean-glow), transparent) !important;
}

/* Camada decorativa com curvas batimétricas */
main:not(.auth)::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0 0 auto auto;
  width: min(66%, 760px);
  height: 230px;
  background: var(--steel-blue);
  opacity: .23;
  -webkit-mask: var(--ocean-contours) right top / 760px 230px no-repeat;
  mask: var(--ocean-contours) right top / 760px 230px no-repeat;
  -webkit-mask-image: var(--ocean-contours);
  mask-image: var(--ocean-contours);
  -webkit-mask-position: right top;
  mask-position: right top;
  -webkit-mask-size: 760px 230px;
  mask-size: 760px 230px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Barra lateral com gradiente de profundidade */
#app-sidebar {
  isolation: isolate;
  background: linear-gradient(165deg, var(--deep-space-blue) 20%, var(--ocean-depth) 74%, var(--deep-space-blue)) !important;
  box-shadow: 2px 0 12px rgba(6, 37, 61, 0.08);
}

/* Contorno sutil de corrente marítima na sidebar */
#app-sidebar::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 220px 0 195px;
  background: var(--white);
  opacity: .12;
  -webkit-mask: var(--ocean-contours) 58% center / 660px auto no-repeat;
  mask: var(--ocean-contours) 58% center / 660px auto no-repeat;
  -webkit-mask-image: var(--ocean-contours);
  mask-image: var(--ocean-contours);
  -webkit-mask-position: 58% center;
  mask-position: 58% center;
  -webkit-mask-size: 660px auto;
  mask-size: 660px auto;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Detalhe de maré sutil sob o título principal */
.page-header h1 {
  position: relative;
}

.page-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 42px;
  height: 3px;
  border-radius: 50% 20% 50% 20%;
  background: var(--steel-blue);
  opacity: .6;
}

@media (max-width: 900px) {
  #app-sidebar {
    position: relative;
  }
  #app-sidebar::before {
    inset: 0;
    opacity: .1;
    -webkit-mask-position: right 44%;
    mask-position: right 44%;
  }
  main:not(.auth)::before {
    width: 52%;
    height: 170px;
    opacity: .15;
    -webkit-mask-size: 560px 170px;
    mask-size: 560px 170px;
  }
}

@media (max-width: 650px) {
  main:not(.auth)::before {
    display: none;
  }
  .page-header h1::after {
    bottom: -5px;
    width: 32px;
    height: 2px;
  }
}

@media (forced-colors: active) {
  main:not(.auth)::before,
  #app-sidebar::before,
  .page-header h1::after {
    display: none;
  }
}
