* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: transparent !important;
}

body{
  overflow: hidden;
}

:root{
  --header-h: 80px;
  --brand: #019BDE;
  --brand-hover: #2861A8;
}

.header{
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #e9f5ff, #f3fbff);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.header__inner{
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 8px 16px 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__text{
  min-width: 0;
  flex: 1;
}

.header__logoBox{
  max-height: 75%;
  height: 75%;
  width: auto;
  flex: none;
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 16px;
  transform: translateY(6px);
  background: #f3fbff;
  box-shadow:
    0 0 10px 5px rgba(243,251,255,.70),
    0 0 18px 8px rgba(233,245,255,.45);
}

.header__logoBox::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  box-shadow:
    inset 0 0 5px 3px rgba(243,251,255,.55),
    inset 0 0 9px 5px rgba(233,245,255,.30);
}

.header__logo{
  height: 100%;
  width: auto;
  display: block;
}

.header h1{
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  color: #0a4f7a;
}

.sub{
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.25;
  color: #2b647f;
}

.updated-at{
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.2;
  color: #6f7f8c;
}

.muted{
  margin-top: 4px;
  font-size: 12px;
  color: #5f7786;
}

.layout--full{
  width: 100%;
  height: calc(100vh - var(--header-h));
  background: transparent !important;
}

#map{
  width: 100%;
  height: 100%;
  background: #d9dde3;
  outline: none;
}

.leaflet-container{
  user-select: none;
  outline: none !important;
  background: #d9eef9;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
.header,
.header *,
.layout--full,
.layout--full *,
#map,
#map * {
  cursor: pointer !important;
}

#map.map-clicking,
#map.map-clicking * {
  cursor: none !important;
}

.leaflet-control,
.leaflet-control * {
  cursor: default;
}

.leaflet-container *,
.leaflet-pane,
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-tile-pane,
.leaflet-shadow-pane,
.leaflet-control-container{
  -webkit-tap-highlight-color: transparent;
}

/* 🔧 FIX ANTICOSTURAS ESTABLE */
.leaflet-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-shadow-pane,
.leaflet-popup-pane,
.leaflet-control-container,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow{
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.leaflet-interactive:focus,
.leaflet-marker-icon:focus,
.leaflet-container a:focus,
.leaflet-container button:focus,
.leaflet-container canvas:focus,
.leaflet-container path:focus{
  outline: none !important;
  box-shadow: none !important;
}

.leaflet-container img,
.leaflet-pane img,
.leaflet-tile-container img{
  max-width: none !important;
}

.leaflet-tile{
  outline: 1px solid transparent;
  border: 0;
  image-rendering: auto;
}

.leaflet-zoom-animated{
  transform-origin: 0 0;
}

.leaflet-control-attribution{
  background: transparent !important;
  z-index: 100 !important;
  box-shadow: none !important;
  font-size: 10px;
  color: rgba(80, 80, 80, 0.75);
  padding: 2px 6px;
  border-radius: 6px;
}

.leaflet-popup-pane{
  z-index: 700 !important;
}

@media (max-width: 600px) {
  .leaflet-control-attribution {
    font-size: 9px;
    padding: 2px 4px;
  }
}

.leaflet-popup-content-wrapper{
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.leaflet-popup-tip{
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
}

.popup {
  min-width: 285px;
  max-width: 380px;
  font-size: 13px;
}

.popup-header {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.dot {
  width:14px;
  height:14px;
  border-radius:50%;
  flex:none;
}

.zona {
  font-weight:800;
  font-size:14px;
}

.popup-status {
  background:rgba(0,0,0,.04);
  padding:8px 10px;
  border-radius:8px;
  margin-bottom:10px;
}

.status-label {
  font-weight:800;
  margin-bottom:2px;
}

.popup-body {
  display:flex;
  flex-direction:column;
  gap:6px;
}

.row{
  display:grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, auto) 78px;
  align-items:baseline;
  column-gap:12px;
}

.label{
  color:#333;
  font-weight:700;
  min-width:0;
}

.value{
  text-align:right;
  font-weight:400;
  color:#333;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
}

.date{
  text-align:right;
  color:#6b7785;
  font-size:12px;
  font-weight:400;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
}

.popup-row.bad .value{
  text-decoration-thickness: 1px;
  font-weight: 600;
  text-underline-offset: 2px;
}

.value.geo-mark{
  font-weight: 600;
}

.popup-note{
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, auto) 78px;
  column-gap: 12px;
}

.popup-note-noapta .popup-note-text{
  font-weight: 400;
}

.popup-note-inner{
  grid-column: 1 / 3;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  color: #333;
  font-size: 10.5px;
  line-height: 1.3;
  font-weight: 400;
}

.popup-note-mark{
  flex: none;
  font-weight: 400;
  color: #333;
}

.popup-note-text{
  font-weight: 400;
  color: #333;
}

.popup-footer {
  margin-top:10px;
  font-size:12px;
  color:#6b7785;
}

.leaflet-bar,
.leaflet-touch .leaflet-bar{
  background: #ffffff !important;
  border: 1px solid #019bde73 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.12) !important;
}

.leaflet-bar a,
.leaflet-touch .leaflet-bar a{
  background: transparent !important;
  color: var(--brand) !important;
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  text-align: center !important;
  border: 0 !important;
  text-decoration: none !important;
  transition: background .15s ease;
}

.leaflet-bar a:hover{
  background: rgba(1,155,222,0.10) !important;
}

.leaflet-control-zoom a + a{
  box-shadow: inset 0 1px 0 #019bde73 !important;
}

.leaflet-bar.aquacheck-reset a{
  font-size: 17px !important;
}

#map.map-clicking,
#map.map-clicking * {
  cursor: none !important;
}

/* ===== ANIMACIÓN GOTA ===== */

.drop-wrap{
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  width: 24px;
  height: 30px;
  position: relative;
  overflow: visible;
  pointer-events: none;
}

.drop-wrap::before{
  content: "";
  position: absolute;
  left: 44%;
  top: 101%;
  width: 20px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(1,155,222,.28);
  background: rgba(1,155,222,.015);
  box-shadow:
    inset 0 0 6px rgba(1,155,222,.10),
    0 0 8px rgba(1,155,222,.08);
  transform: translate(-50%, -50%) scale(.35, .55);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
  filter: blur(.25px);
}

.drop-wrap::after{
  content: "";
  position: absolute;
  left: 44%;
  top: 101%;
  width: 20px;
  height: 9px;
  border-radius: 50%;
  border: 2.5px solid rgba(1,155,222,.50);
  background: rgba(1,155,222,.035);
  box-shadow:
    inset 0 0 5px rgba(1,155,222,.06),
    0 0 6px rgba(1,155,222,.05);
  transform: translate(-50%, -50%) scale(.35, .55);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
  filter: blur(.35px);
  box-shadow: inset 0 0 6px rgba(1,155,222,.15), 0 0 10px rgba(1,155,222,.25);
}

.drop-wrap .drop-img{
  width: 24px;
  height: 30px;
  display: block;
  position: relative;
  z-index: 2;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
  will-change: transform, opacity;
}

.drop-anim .drop-img{
  animation: aquacheckDropBounce 1150ms cubic-bezier(.22,.88,.24,1) both;
}

@keyframes aquacheckDropBounce{
  0%{ transform: translate3d(0,-22px,0) scale(.90); opacity: 0; }
  38%{ transform: translate3d(0,0,0) scale(1.04,.93); opacity: 1; }
  55%{ transform: translate3d(0,4px,0) scale(.94,1.05); opacity: 1; }
  72%{ transform: translate3d(0,-4px,0) scale(1.01,.99); opacity: 1; }
  100%{ transform: translate3d(0,0,0) scale(1); opacity: 1; }
}

.drop-anim::before{
  animation: aquacheckRipple 1150ms ease-out 560ms both;
}

@keyframes aquacheckRipple{
  0%{ transform: translate(-50%, -50%) scale(.20, .30); opacity: 0;}
  18%{ transform: translate(-50%, -50%) scale(.65, .52);opacity: .75; }
  50%{ transform: translate(-50%, -50%) scale(1.6, .85); opacity: .35; }
  100%{ transform: translate(-50%, -50%) scale(3.6, 1.05); opacity: 0; }
}

.drop-anim::after{
  animation: aquacheckRipple2 1250ms ease-out 860ms both;
}

@keyframes aquacheckRipple2{
  0%{ transform: translate(-50%, -50%) scale(.20, .30); opacity: 0; }
  18%{ transform: translate(-50%, -50%) scale(.60, .50); opacity: .55; }
  50%{ transform: translate(-50%, -50%) scale(1.4, .80); opacity: .22; }
  100%{ transform: translate(-50%, -50%) scale(3.2, .95); opacity: 0; }
}

@media (max-width: 720px){
  :root{ --header-h: 92px; }

  .header h1{
    font-size: 18px;
  }
}

@media (max-width: 768px){
  .leaflet-bar a,
  .leaflet-touch .leaflet-bar a{
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 20px !important;
  }
}
