/* PescaRadar · paginas de identidad (landing, inicio, elegir usuario).
 *
 * Hoja independiente: base.css fija `body{overflow:hidden}` para el mapa a
 * pantalla completa y estas paginas necesitan hacer scroll.
 * Mobile-first, como exige el pack.
 */

:root {
  --bg: #061116;
  --bg-soft: #0a1a21;
  --panel: #0b2027;
  --panel-2: #0d2831;
  --line: rgba(255, 255, 255, .1);
  --text: #f3fbfd;
  --muted: #94adb6;
  --aqua: #42c9ff;
  --aqua-deep: #1b8fbe;
  --green: #43d17f;
  --yellow: #f5c84b;
  --red: #ff6b6b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

/* `hidden` debe ganar siempre. Cualquier `display` declarado en una clase pisa
   el atributo, y elementos ocultos acaban viendose: es lo que hacia aparecer
   el separador "o" sin proveedores de acceso. */
[hidden] { display: none !important; }


html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: var(--aqua); }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- cabecera ---- */

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(6, 17, 22, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.siteHeader .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.brandMark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
}

.brandMark .logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #104355, #082832);
  border: 1px solid var(--line);
  font-size: 19px;
}

.brandMark small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.headerActions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---- botones ---- */

.btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 11px 18px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn.primary {
  background: linear-gradient(140deg, var(--aqua), var(--aqua-deep));
  border-color: transparent;
  color: #04161d;
}

.btn.ghost { background: transparent; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }

/* ---- hero ---- */

.hero {
  padding: 46px 0 26px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(66, 201, 255, .16), transparent 60%),
    radial-gradient(700px 380px at 92% 0%, rgba(67, 209, 127, .1), transparent 55%);
}

.hero h1 {
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}

.hero .lead {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 62ch;
}

.heroActions { display: flex; flex-wrap: wrap; gap: 10px; }

.heroPoints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.heroPoints li {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, .03);
}

/* ---- mapa de la landing ---- */

.mapSection { padding: 10px 0 34px; }

.mapShell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.mapPreview {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
}

.mapPreview:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

#landingMap {
  height: min(58vh, 470px);
  width: 100%;
  background: #0a171c;
  pointer-events: none;
}

.mapPreviewOverlay {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(6, 17, 22, 0) 45%, rgba(6, 17, 22, .82) 100%);
}

.mapPreviewCta {
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 15px;
  color: #04161d;
  background: linear-gradient(140deg, var(--aqua), var(--aqua-deep));
  box-shadow: 0 10px 26px rgba(66, 201, 255, .3);
}

.mapPreview:hover .mapPreviewCta { transform: translateY(-1px); }

.mapPreviewNote { font-size: 13px; color: var(--muted); }

/* La atribucion no debe quedar tapada por el degradado. */
.mapPreview .leaflet-control-attribution { z-index: 600; font-size: 9px; }

/* Burbuja de agrupacion, igual que en la aplicacion del mapa. */
.marker-cluster { background: transparent; }

.clusterBubble {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 15px;
  display: grid; place-items: center;
  background: #0b2027;
  color: #f5fbfd;
  border: 3px solid #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42);
}

.clusterBubble::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  left: 50%; bottom: -5px;
  transform: translateX(-50%);
}

/* ---- secciones ---- */

.section { padding: 34px 0; border-top: 1px solid var(--line); }

.section h2 {
  font-size: clamp(21px, 3.4vw, 30px);
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.section .sectionLead {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 68ch;
}

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .icon { font-size: 22px; display: block; margin-bottom: 10px; }

.soonCard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.soonBadge {
  font-size: 11px;
  font-weight: 800;
  color: #04161d;
  background: var(--yellow);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---- CTA final ---- */

.finalCta {
  margin: 34px 0 50px;
  padding: 30px 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(66, 201, 255, .14), rgba(6, 17, 22, .2));
  text-align: center;
}

.finalCta h2 { margin: 0 0 10px; }
.finalCta p { color: var(--muted); margin: 0 0 20px; }

.siteFooter {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.siteFooter nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }

/* ---- paginas de cuenta ---- */

.accountPage { padding: 30px 0 60px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel + .panel { margin-top: 16px; }
.panel h2 { margin: 0 0 6px; font-size: 19px; }
.panel .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.formRow { margin-bottom: 14px; }
.formRow label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

.formRow input,
.formRow textarea,
.formRow select {
  width: 100%;
  background: rgba(6, 17, 22, .8);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.formRow textarea { min-height: 92px; resize: vertical; }
.formRow input:focus-visible,
.formRow textarea:focus-visible { outline: 2px solid var(--aqua); }

.usernameField { display: flex; align-items: center; gap: 0; }

.usernameField .at {
  padding: 12px 6px 12px 14px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 14px 0 0 14px;
  background: rgba(6, 17, 22, .8);
  color: var(--muted);
  font-weight: 800;
}

.usernameField input { border-radius: 0 14px 14px 0; }

.fieldNote { font-size: 13px; margin-top: 8px; min-height: 20px; }
.fieldNote.ok { color: var(--green); }
.fieldNote.error { color: var(--red); }
.fieldNote.checking { color: var(--muted); }

.message { border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-top: 14px; display: none; }
.message.open { display: block; }
.message.ok { background: rgba(67, 209, 127, .12); color: var(--green); }
.message.error { background: rgba(255, 107, 107, .12); color: var(--red); }

/* ---- paginas de entrar y crear cuenta ---- */

.authWrap { max-width: 480px; }

.providerList { display: grid; gap: 8px; margin-bottom: 4px; }

.providerBtn { text-decoration: none; }

.orSeparator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.orSeparator::before,
.orSeparator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.authSwitch {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.authFootnote {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.linkBtn {
  width: 100%;
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--aqua);
  font-size: 13px;
  font-weight: 700;
  padding: 8px;
}

/* ---- foto de perfil ---- */

.avatarRow { display: flex; gap: 14px; align-items: center; }

.avatarPreview {
  width: 76px; height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 30px;
}

.avatarPreview img { width: 100%; height: 100%; object-fit: cover; }

.avatarActions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatarActions .fieldNote { width: 100%; margin: 0; }

/* ---- aviso de verificacion ---- */

.verifyBanner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(245, 200, 75, .35);
  background: rgba(245, 200, 75, .1);
}

.verifyBanner b { display: block; color: var(--yellow); margin-bottom: 4px; }
.verifyBanner p { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }

/* ---- progreso y XP ---- */

.levelHead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.levelBadge {
  width: 62px; height: 62px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #104355, #082832);
  border: 1px solid var(--line);
}

.levelBadge b { font-size: 22px; line-height: 1; }
.levelBadge small { font-size: 8px; color: var(--muted); }

.progressBar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  margin: 12px 0 6px;
}

.progressBar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--green));
  transition: width .4s ease;
}

.checklist { list-style: none; margin: 12px 0 0; padding: 0; }

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.checklist li:last-child { border-bottom: none; }
.checklist .mark { font-size: 15px; width: 20px; }
.checklist li.done { color: var(--muted); }
.checklist li.done .mark { color: var(--green); }
.checklist .reward { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--aqua); }
.checklist li.done .reward { color: var(--muted); }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }

.tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.tile b { display: block; font-size: 20px; }
.tile small { color: var(--muted); font-size: 11px; }

/* ---- directorio ---- */

.filterBar { margin-bottom: 16px; }

.chipRow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.chipRow::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
}

.chip.active {
  background: #113947;
  border-color: #3fa0bd;
  color: var(--text);
}

.filterRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filterRow input[type="search"],
.filterRow select {
  background: rgba(6, 17, 22, .8);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 10px 15px;
  font: inherit;
  font-size: 14px;
}

.filterRow input[type="search"] { flex: 1 1 200px; min-width: 0; }

.directoryLayout { display: grid; gap: 16px; }

#directoryMap { height: min(52vh, 440px); width: 100%; background: #0a171c; }

.listPanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}

.listHead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.listHead h2 { margin: 0; font-size: 18px; }

.entityCard {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  margin-bottom: 10px;
  cursor: pointer;
}

.entityCard:hover { border-color: #3fa0bd; }
.entityCard:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.entityCard h3 { margin: 0; font-size: 15px; }
.entityCard p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

.entityCardIcon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid; place-items: center;
  background: #0d232a;
  border: 1px solid var(--line);
  font-size: 19px;
}

.entityCardIcon.big { width: 54px; height: 54px; font-size: 24px; }

.verifiedBadge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #04161d;
  background: var(--green);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

.emptyState {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.emptyState p { margin: 0 0 8px; }
.emptyState p:last-child { margin: 0; }

/* Chincheta de negocio: distinta de los circulos de los pesqueros. */
.entityMarker {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 11px 11px 11px 3px;
  display: grid; place-items: center;
  background: #0b2027;
  border: 2px solid #fff;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}

.entityMarkerCheck {
  position: absolute;
  right: -6px; top: -6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #04161d;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  display: grid; place-items: center;
  border: 2px solid #0b2027;
}

.entitySheet {
  position: fixed;
  z-index: 940;
  left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  overflow: auto;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .5);
}

.entitySheetInner { position: relative; padding: 20px; }
.entitySheet .teaserClose { position: absolute; top: 12px; right: 12px; margin: 0; }

.sheetHead { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding-right: 36px; }
.sheetHead h2 { margin: 0; font-size: 19px; }
.sheetSubtitle { font-size: 15px; margin: 18px 0 8px; }

.sheetRows { border-top: 1px solid var(--line); margin-top: 12px; }

.sheetRow {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.sheetRow span { color: var(--muted); flex: 0 0 auto; }
.sheetRow b { text-align: right; overflow-wrap: anywhere; }

.sheetNote { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.sheetNote.ok { color: var(--green); }

.baitState { font-size: 12px; font-weight: 800; color: var(--muted); }
.baitState.ok { color: var(--green); }
.baitState.no { color: var(--red); }
.baitState.old { color: var(--yellow); }

/* ---- navegacion movil ---- */

.mobileNav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 950;
  display: flex;
  background: rgba(6, 17, 22, .97);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobileNav a,
.mobileNav button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  padding: 9px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mobileNav .icon { font-size: 17px; }
.mobileNav .current { color: var(--aqua); }

.mobileNav .plus .icon {
  width: 38px; height: 38px;
  margin-top: -14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--aqua), var(--aqua-deep));
  color: #04161d;
  box-shadow: 0 8px 20px rgba(66, 201, 255, .35);
}

body.hasMobileNav { padding-bottom: 74px; }

/* ---- responsive ---- */

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .directoryLayout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; }
  #directoryMap { height: 62vh; }
  .listPanel { max-height: 62vh; overflow-y: auto; }
  .entitySheet {
    left: auto; right: 24px; bottom: 24px;
    width: min(420px, calc(100vw - 48px));
    border-radius: 22px;
    border: 1px solid var(--line);
  }
  .hero { padding: 66px 0 30px; }
  .accountGrid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .accountGrid .panel + .panel { margin-top: 0; }
  .accountGrid .stack > .panel + .panel { margin-top: 16px; }
  .mobileNav { display: none; }
  body.hasMobileNav { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Aviso de las acciones que llegan por email (verificacion, cambio de email). */
.actionBanner {
  padding: 14px 0;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.actionBanner.ok { background: rgba(67, 209, 127, .14); color: var(--green); }
.actionBanner.error { background: rgba(255, 107, 107, .12); color: var(--red); }
.actionBanner a { color: inherit; text-decoration: underline; }
