/* Pigeon Path - hoja de estilos compartida
   Paleta tomada de los mockups (Main.dc.html, Territorios.dc.html) */

:root {
  --bg: #E6E9EE;
  --panel: #F7F8FA;
  --purple: #6D4C93;
  --blue: #3E86AE;
  --gold: #E2A62B;
  --border: #CDD3DD;
  --text: #2B303B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

h1, h2, h3, h4, .brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--text);
}

a { color: var(--blue); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--purple);
  text-decoration: none;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-tabs a {
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  border: 1px solid transparent;
}

.nav-tabs a.active, .nav-tabs a:hover {
  background: var(--purple);
  color: #fff;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--purple);
}

.btn-blue { background: var(--blue); }
.btn-gold { background: var(--gold); color: var(--text); }
.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
}

.resource-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.resource-pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th { color: var(--purple); font-family: 'Bricolage Grotesque', sans-serif; }

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.alert-error { background: #fbe4e4; border-color: #e4a0a0; }
.alert-ok { background: #e4f5e6; border-color: #a0dba8; }

input, select, textarea {
  font-family: 'Nunito', sans-serif;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  width: 100%;
}

label { font-weight: 700; display: block; margin: 10px 0 4px; }

footer {
  text-align: center;
  padding: 24px;
  color: #6b7280;
  font-size: 0.9rem;
}

/* ---- Richer visual language (matches Main/Carreras/Territorios/Tienda mockups) ---- */

.topbar .container { gap: 20px; }
.brand-row { display: flex; align-items: center; gap: 9px; }

.nav-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  padding: 10px 16px;
}
.nav-tabs a.active {
  background: #DCE1EA;
  color: var(--text);
}
.nav-tabs a:hover { background: var(--purple); color: #fff; }

.nav-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-tabs a.active .nav-badge { background: var(--purple); }

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFF1C9;
  border: 1px solid #E9CC80;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.coin-pill .coin-add {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  display: block;
  text-decoration: none;
}
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.panel {
  box-shadow: 0 1px 2px rgba(43,48,59,0.04);
}
.panel:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(43,48,59,0.08); }
.panel h2, .panel h3 { margin-top: 0; }

.panel-flat { transition: none; }
.panel-flat:hover { transform: none; box-shadow: 0 1px 2px rgba(43,48,59,0.04); }

.card-table {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.card-table table { margin: 0; }
.card-table th {
  background: #EEF0F4;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-table tr:last-child td { border-bottom: none; }
.card-table tr:hover td { background: rgba(109,76,147,0.04); }

.pigeon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Loft / dashboard hero scene */
.loft-scene {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(#B9C4D3, #E9EDF2 80%);
  border: 1px solid var(--border);
  padding: 20px 24px 76px;
  margin-bottom: 20px;
}
.loft-scene .loft-cloud {
  position: absolute;
  background: #FFFFFF;
  opacity: 0.75;
  border-radius: 999px;
}
.loft-scene .loft-sun {
  position: absolute;
  right: 40px;
  top: 24px;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  background: #F6F1DE;
}
.loft-scene .loft-title {
  position: relative;
  z-index: 1;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #2F4B5C;
}
.loft-scene .loft-buildings {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background: linear-gradient(#BFC8D5, #8b93a2);
  display: flex;
  align-items: flex-end;
}
.loft-scene .loft-buildings span {
  flex: 1;
  margin: 0 3px;
  background: #C3CBD8;
  border-radius: 4px 4px 0 0;
}
.loft-scene .loft-ground {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  background: #5F6878;
}
.loft-pigeons {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  margin-top: 14px;
}
.loft-pigeons .loft-pigeon-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pigeon-tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  background: #F7F8FA;
  color: var(--text);
  border: 1px solid var(--border);
}

.progress-bar {
  height: 10px;
  border-radius: 5px;
  background: #DDE2EA;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--purple);
}
.progress-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.progress-row .progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 800; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.day-pip {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: #DDE2EA;
  color: #5A6577;
  border: 2px solid #DDE2EA;
}
.day-pip.done { background: #2F7F6C; color: #fff; border-color: #2F7F6C; }
.day-pip.today { background: #fff; color: var(--purple); border-color: var(--purple); }

.race-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  background: #2F7F6C;
  color: #fff;
  text-decoration: none;
}
.race-cta .race-cta-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.15rem; }
.race-cta .race-cta-sub { font-size: 0.85rem; font-weight: 600; opacity: 0.9; }
.race-cta .race-cta-btn {
  padding: 10px 18px;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

/* District / territory map */
.district-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.district-map .district-tile {
  aspect-ratio: 1.4;
  border-radius: 10px;
  background: #DCD3EA;
  border: 1px solid var(--border);
}
.district-map .district-tile.mine {
  background: var(--purple);
}

.rank-1 { color: #B9801A; font-weight: 800; }

/* Race route */
.route-track {
  position: relative;
  height: 70px;
  margin: 10px 0 20px;
}
.route-track svg { width: 100%; height: 100%; display: block; }
.route-track .route-endpoint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.route-track .route-endpoint.start { left: 0; }
.route-track .route-endpoint.end { right: 0; }

.shop-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.shop-item:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(43,48,59,0.08); }
.shop-item .shop-coin { font-size: 1.6rem; margin-bottom: 6px; }
.shop-item .shop-price { color: #5A6577; font-weight: 700; margin-bottom: 12px; }

.empty-state {
  text-align: center;
  padding: 26px 16px;
  color: #5A6577;
  font-style: italic;
}

/* ==================================================================
   Mockup-accurate layout system (Main/Carreras/Correo/Territorios/
   Expediciones/Tienda/Login/Movil .dc.html files are ground truth)
   ================================================================== */

.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 900px) { .container-wide { padding: 0 16px; } }

.topbar-v2 { height: 72px; background: var(--panel); border-bottom: 1px solid var(--border); }
.topbar-v2 .container-wide { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand-v2 { display: flex; align-items: center; gap: 10px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 26px; color: var(--purple); text-decoration: none; flex-shrink: 0; }
.nav-tabs-v2 { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-tabs-v2 a { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 52px; height: 52px; padding: 0; border-radius: 16px; color: var(--text); text-decoration: none; }
.nav-tabs-v2 a.active { background: #DCE1EA; }
.nav-tabs-v2 a:hover { color: var(--purple); }
.nav-tab-icon { display: inline-flex; flex-shrink: 0; }
.nav-tab-icon svg { width: 36px; height: 36px; }
.nav-tabs-v2 a .nav-badge { position: absolute; top: 2px; right: 2px; }
.page-body-v2 { flex-grow: 1; display: flex; gap: 24px; padding: 24px 32px; box-sizing: border-box; align-items: flex-start; }
@media (max-width: 1100px) { .page-body-v2 { flex-wrap: wrap; } }

.col-narrow { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { width: 330px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side-wide { width: 350px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side-friends { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side-map { width: 370px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.col-main { flex-grow: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1100px) {
  .col-narrow, .col-side, .col-side-wide, .col-side-friends, .col-side-map { width: 100%; }
}

.card-v2 { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-v2-tight { gap: 10px; }
.card-v2-lg { padding: 20px; }
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 20px; margin: 0; }
.card-title-lg { font-size: 22px; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-subtle { font-size: 13px; color: #5A6577; font-weight: 700; }

/* Daily gift day pips (7 numbered circles) */
.day-pips { display: flex; gap: 6px; }

/* Mochila resource rows */
.resource-row { display: flex; align-items: center; gap: 12px; }
.resource-row .resource-icon { flex-shrink: 0; }
.resource-row .resource-name { flex-grow: 1; font-weight: 700; }
.resource-row .resource-qty { font-weight: 800; }

.optional-box { background: var(--panel); border: 1px dashed #C9B48A; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.optional-box .optional-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #5A6577; }
.optional-box a.optional-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--text); }
.optional-box a.optional-link .price { color: #8A5A0B; font-weight: 800; }
.optional-box a.see-all { font-size: 13px; font-weight: 800; color: var(--purple); }

.btn-full { width: 100%; height: 46px; border: none; border-radius: 14px; background: var(--purple); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-outline-v2 { flex-grow: 1; height: 42px; border-radius: 12px; border: 2px solid var(--purple); background: transparent; color: var(--purple); font-weight: 800; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.btn-outline-v2:disabled { opacity: 0.4; cursor: not-allowed; border-color: #9AA1AE; color: #9AA1AE; }
.btn-row { display: flex; gap: 8px; }

/* Loft hero scene (dashboard) */
.loft-scene-v2 { position: relative; height: 430px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #7C8FBF 0%, #B98FB2 55%, #F3C384 100%); border: 1px solid var(--border); }
.loft-scene-v2 .loft-sun-v2 { position: absolute; left: 70px; top: 36px; width: 70px; height: 70px; border-radius: 35px; background: radial-gradient(circle, #FFEBBB, #F3B25B 70%); box-shadow: 0 0 40px 10px rgba(243, 178, 91, 0.45); }
.loft-scene-v2 .loft-cloud-v2 { position: absolute; border-radius: 17px; background: #FFF8EC; opacity: 0.8; }
.loft-scene-v2 .loft-header-v2 { position: absolute; left: 24px; top: 20px; right: 90px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.loft-scene-v2 .loft-title-row-v2 { display: flex; align-items: center; gap: 10px; }
.loft-scene-v2 .loft-title-v2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 22px; color: #2F4B5C; line-height: 1.25; }
/* Reemplaza al viejo boton "Gestionar palomares" (antes una fila entera en
   una columna aparte, ver col-narrow) -- ahora es solo el icono, junto al
   titulo del palomar. */
.loft-scene-v2 .loft-manage-btn-v2 {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; background: rgba(255, 255, 255, .55);
  color: #2F4B5C; text-decoration: none;
}
.loft-scene-v2 .loft-manage-btn-v2:hover { background: #fff; }
.loft-scene-v2 .loft-pratware-badge { font-weight: 700; font-size: 13px; color: var(--blue); background: #fff; padding: 3px 10px; border-radius: 999px; }
.loft-scene-v2 .loft-buildings-v2 { position: absolute; left: 0; right: 0; bottom: 84px; display: flex; align-items: flex-end; height: 200px; pointer-events: none; }
.loft-scene-v2 .loft-buildings-v2 span { flex: 1; margin: 0 0; background: #6D5B8A; }
.loft-scene-v2 .loft-buildings-v2 span:nth-child(odd) { background: #4F5F8A; }
.loft-scene-v2 .loft-ground-v2 { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: #4A3F5C; }
.loft-scene-v2 .loft-ground-strip-v2 { position: absolute; left: 0; right: 0; bottom: 70px; height: 14px; background: #6B5A80; }
.loft-scene-v2 .loft-pigeons-v2 { position: absolute; left: 40px; right: 40px; bottom: 84px; display: flex; justify-content: space-between; align-items: flex-end; }
.loft-scene-v2 .loft-pigeon-slot-v2 { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.loft-scene-v2 .loft-pigeon-tag-v2 { padding: 5px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--panel); color: var(--text); }
.loft-scene-v2 .loft-status-line { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 10px; font-size: 13px; font-weight: 800; color: #FFF1DA; flex-wrap: wrap; text-align: center; }

.race-cta-v2 { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; background: #2F7F6C; color: #fff; text-decoration: none; }
.race-cta-v2 .race-cta-v2-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 20px; }
.race-cta-v2 .race-cta-v2-sub { font-size: 14px; font-weight: 600; }
.race-cta-v2 .race-cta-v2-btn { padding: 10px 18px; border-radius: 12px; background: #fff; color: var(--text); font-weight: 800; white-space: nowrap; border: none; cursor: pointer; font-size: 15px; font-family: inherit; }

/* Pigeon detail panel (right column, dashboard/carreras) */
.pigeon-detail-head { display: flex; align-items: center; gap: 14px; }
.pigeon-detail-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 26px; }
.pigeon-detail-sub { font-size: 14px; font-weight: 700; color: #5A6577; }

.stat-row { display: flex; flex-direction: column; gap: 7px; }
.stat-row .stat-row-label { display: flex; align-items: center; gap: 7px; justify-content: space-between; font-size: 14.5px; font-weight: 800; }
.stat-row .stat-row-label .stat-row-label-left { display: flex; align-items: center; gap: 7px; }
.stat-row .stat-row-label .stat-row-label-left svg { width: 17px; height: 17px; flex-shrink: 0; }
.stat-row .stat-row-label .stat-row-value { font-size: 13.5px; font-weight: 800; color: #5A6577; }
.stat-bar { height: 20px; border-radius: 10px; background: #DDE2EA; width: 100%; overflow: hidden; }
.stat-bar > span { display: block; height: 20px; border-radius: 10px; transition: width .25s; }
.stat-velocidad { background: linear-gradient(90deg, var(--purple), #8A6BB8); }
.stat-resistencia { background: linear-gradient(90deg, var(--blue), #63A8CC); }
.stat-orientacion { background: linear-gradient(90deg, #2F7F6C, #4FA98F); }
.stat-animo { background: linear-gradient(90deg, var(--gold), #F0C161); }

.training-box { display: flex; flex-direction: column; gap: 5px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.training-box .training-title { font-size: 14px; font-weight: 800; }
.training-bar { height: 8px; border-radius: 4px; background: #CDD3DD; }
.training-bar > span { display: block; height: 8px; border-radius: 4px; background: var(--blue); }
.hallazgos-vuelo { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.hallazgo-item { font-size: 12.5px; font-weight: 700; color: var(--purple); }
.training-note { font-size: 13px; font-weight: 600; color: #5A6577; }
.helper-note { font-size: 13px; font-weight: 600; color: #5A6577; line-height: 1.45; padding: 0 6px; }

/* ---------------------------------------------------------------------------
   Indicador rojo "necesita atencion" -- reemplaza el aviso explicativo fijo
   que antes vivia dentro del modal de cada paloma. Ahora es un punto rojo
   sobre el avatar (en "Tus palomas" y donde haga falta) con un tooltip CSS
   puro (sin JS) que revela el mensaje real (pp_paloma_estado_atencion()) solo
   al pasar el mouse o enfocar con teclado.
--------------------------------------------------------------------------- */
.pp-alert-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.pp-alert-dot {
  position: absolute; top: -2px; right: -2px; width: 15px; height: 15px; border-radius: 50%;
  background: #D9534F; border: 2px solid var(--panel); display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.pp-alert-dot::after { content: "!"; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.pp-tooltip {
  position: absolute; bottom: 128%; left: 50%; transform: translateX(-50%) translateY(4px);
  background: #2B303B; color: #fff; font-size: 11.5px; font-weight: 700; padding: 7px 10px; border-radius: 9px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5;
}
.pp-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #2B303B;
}
.pp-alert-dot:hover + .pp-tooltip, .pp-alert-dot:focus + .pp-tooltip, .pp-alert-wrap:hover .pp-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Punto rojo chico junto a "Resistencia"/"Animo" dentro del modal -- mismo
   color, sin el "!" ni el posicionamiento absoluto del de "Tus palomas". */
.stat-alert-dot { width: 8px; height: 8px; border-radius: 50%; background: #D9534F; display: inline-block; }

/* ---------------------------------------------------------------------------
   Modal de detalle de paloma (app/index.php) -- rediseño pedido por Rafael:
   header degradado con avatar circular, sin el "sigue pareciendo formularios"
   de antes. Ver mockup en Artifact "Modal de paloma - mockup" (Main.dc.html).
--------------------------------------------------------------------------- */
/* IMPORTANTE: estos valores son una copia 1:1 de las medidas reales del
   mockup aprobado (Artifact "Modal de paloma - mockup" -> Main.dc.html,
   frame de 400px de ancho) -- NO numeros inventados. Durante el ida-y-vuelta
   anterior fui subiendo el tamaño a ojo (380/440/580px) tratando de que
   "se sintiera" tan grande como el mockup en vez de volver a leer las medidas
   reales de ese archivo, y terminamos ~45% mas grande de lo aprobado. Esta
   version usa las medidas exactas del mockup, asi que es la referencia real
   de aqui en adelante -- si hay que ajustar el tamaño, se ajusta ESTE numero
   (400px) y no un valor a ojo. */
/* Selector compuesto (.pp-modal.pp-modal-pigeon), no solo ".pp-modal-pigeon":
   antes competia en igualdad de especificidad contra ".pp-modal" (mas abajo en
   este archivo, max-width:320px) y esa ganaba por estar despues en el
   cascade. Con el selector compuesto, la especificidad es mayor y esto gana
   siempre, sin importar el orden en el archivo. */
.pp-modal.pp-modal-pigeon {
  max-width: 400px; padding: 0; align-items: stretch; text-align: left;
  overflow: hidden;
}
.pp-modal-pigeon .pp-modal-close {
  color: #fff; z-index: 2; top: 14px; right: 14px; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.pigeon-modal-header {
  position: relative; padding: 26px 24px 22px; background: linear-gradient(180deg, var(--purple) 0%, #4A3468 100%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.pigeon-modal-avatar {
  width: 116px; height: 116px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF7E8, #E9DFF2 70%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 10, 40, .35);
}
.pigeon-speech-bubble {
  position: absolute; top: 56px; left: 232px; max-width: 148px;
  background: #fff; color: var(--text); padding: 9px 13px; border-radius: 16px 16px 16px 4px;
  font-size: 13px; font-weight: 800; line-height: 1.3; text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}
.pigeon-modal-namerow { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.pigeon-modal-namerow .pigeon-detail-name { color: #fff; font-size: 25px; }
.pigeon-rename-btn {
  width: 25px; height: 25px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0;
}
.pigeon-rename-btn svg { width: 12px; height: 12px; }
/* Fila de edicion de nombre (boton de lapiz en .pigeon-modal-namerow): oculta
   por defecto (style="display:none" inline en el HTML), la muestra el propio
   boton de lapiz via JS. Antes el boton estaba deshabilitado ("proximamente"). */
.pigeon-modal-namerow-edit { align-items: center; gap: 6px; margin-top: 2px; width: 100%; justify-content: center; }
.pigeon-name-input {
  font-family: inherit; font-weight: 800; font-size: 20px; color: #fff; text-align: center;
  background: rgba(255, 255, 255, .15); border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 10px;
  padding: 3px 8px; max-width: 160px; min-width: 0;
}
.pigeon-name-input::placeholder { color: rgba(255, 255, 255, .6); }
.pigeon-name-save-btn, .pigeon-name-cancel-btn {
  width: 25px; height: 25px; border-radius: 50%; border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0;
}
.pigeon-name-save-btn { background: #2F7F6C; }
.pigeon-name-cancel-btn { background: rgba(255, 255, 255, .2); }
.pigeon-modal-sub { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.pigeon-modal-body { padding: 22px 24px 22px; display: flex; flex-direction: column; gap: 18px; }
.pigeon-section-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8A93A3; }
.pigeon-care-group, .pigeon-stats-group { display: flex; flex-direction: column; gap: 12px; }

.care-btn-row { display: flex; gap: 10px; }
/* Cada boton vive dentro de un <form> (para poder hacer submit real), y ese
   form -- no el boton -- es el hijo directo de .care-btn-row. flex:1 en el
   form ya lo reparte a la mitad; sin width:100% aca el <button> quedaba con
   su ancho de contenido (texto/icono) adentro de esa mitad, por eso los dos
   se veian de tamanos distintos y "sueltos" en vez de llenar parejo el hueco. */
.care-btn {
  flex: 1; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 8px; border-radius: 18px; border: none; cursor: pointer; font-family: inherit;
}
.care-btn svg { width: 24px; height: 24px; }
.care-btn:active { transform: translateY(2px); }
.care-btn-feed { background: linear-gradient(180deg, #F0C161, #E2A62B); box-shadow: 0 4px 0 #B9801A; }
.care-btn-vitamina { background: linear-gradient(180deg, #8A6BB8, var(--purple)); box-shadow: 0 4px 0 #4A3468; }
/* Agua es la tercera accion de cuidado (ver pp_alimentar_paloma() /
   PIGEON_PATH_COSTO_DAR_AGUA en includes/functions.php): sube un poco AMBAS
   stats en vez de una sola de lleno, asi que usa un color propio (celeste)
   para no confundirse con Alimentar (maiz/resistencia) ni Vitamina (animo). */
.care-btn-agua { background: linear-gradient(180deg, #6FC3E0, #3E86AE); box-shadow: 0 4px 0 #2C6580; }
.care-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.care-btn .care-btn-title { font-weight: 800; font-size: 13.5px; }
.care-btn-feed .care-btn-title { color: #4A3405; }
.care-btn-vitamina .care-btn-title, .care-btn-agua .care-btn-title { color: #fff; }
.care-btn .care-btn-sub { font-size: 10.5px; font-weight: 700; }
.care-btn-feed .care-btn-sub { color: #7A5405; }
.care-btn-vitamina .care-btn-sub, .care-btn-agua .care-btn-sub { color: rgba(255, 255, 255, .8); }

.btn-full-cta {
  width: 100%; padding: 15px; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(180deg, #8A6BB8, var(--purple)); color: #fff; font-weight: 800; font-size: 15.5px;
  box-shadow: 0 4px 0 #4A3468; display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-family: inherit;
}
.btn-full-cta:active { transform: translateY(2px); }
.btn-full-cta svg { width: 17px; height: 17px; }

/* Carreras page */
.race-header-card { display: flex; flex-direction: column; gap: 14px; }
.race-header-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.race-header-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 24px; flex-grow: 1; }
.race-pill { padding: 6px 12px; border-radius: 999px; background: #DDE2EA; font-weight: 800; font-size: 13px; }
.race-pill-countdown { background: #2F7F6C; color: #fff; }

.results-panel { flex-grow: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.results-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; }
.results-row.you { background: #DCEEE7; }
.results-row.gold { background: #FFF6DC; }
.medal { width: 32px; height: 32px; border-radius: 16px; background: #DDE2EA; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.medal-gold { background: #F2CE6B; }
.medal-silver { background: #D5D8DE; }
.medal-bronze { background: #E0A87C; }
.results-row .results-bird { flex-grow: 1; font-weight: 800; font-size: 16px; }
.results-row .results-owner { width: 180px; font-size: 15px; font-weight: 600; color: #5A6577; }
.results-row .results-time { width: 90px; text-align: right; font-weight: 800; font-size: 16px; }

.entrant-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--border); background: var(--panel); cursor: pointer; }
.entrant-card.selected { border-color: var(--purple); background: #EEE9F5; }
.entrant-card .entrant-dot { width: 14px; height: 14px; border-radius: 7px; border: 2px solid var(--purple); box-sizing: border-box; background: transparent; flex-shrink: 0; }
.entrant-card.selected .entrant-dot { background: var(--purple); }
.entrant-card .entrant-info { flex-grow: 1; }
.entrant-card .entrant-name { font-weight: 800; font-size: 16px; }
.entrant-card .entrant-note { font-size: 13px; font-weight: 600; color: #5A6577; }
.entrant-card .entrant-form { font-weight: 800; font-size: 15px; color: #2F7F6C; }
.entrant-card.busy .entrant-form { color: #5A6577; }
.entrant-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.reward-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; }

/* Amigos page */
.friend-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.friend-row.pending { border-color: var(--purple); background: #EEE9F5; }
.friend-avatar { width: 38px; height: 38px; border-radius: 19px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.friend-row .friend-info { flex-grow: 1; min-width: 0; }
.friend-row .friend-name { font-weight: 800; font-size: 15px; }
.friend-row .friend-place { font-size: 13px; font-weight: 600; color: #5A6577; }
.friend-chip { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip-waiting { background: #FFF1C9; color: #6B4A0A; }
.chip-flying { background: #DCEBF5; color: #1F4B66; }
.chip-ok { background: #DCEEE7; color: #2F5A1F; }
.chip-back { background: #F3DADB; color: #7A2E33; }

.request-row { display: flex; align-items: center; gap: 10px; }
.request-row .request-name { flex-grow: 1; font-weight: 800; font-size: 15px; }
.btn-accept { height: 34px; padding: 0 14px; border: none; border-radius: 10px; background: #2F7F6C; color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.btn-reject { height: 34px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--purple); background: transparent; color: var(--purple); font-weight: 800; font-size: 14px; cursor: pointer; }

.thread-msg { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.thread-msg.sent { align-items: flex-end; }
.thread-msg.received { align-items: flex-start; }
.thread-bubble { max-width: 420px; padding: 10px 16px; border-radius: 16px; font-weight: 700; font-size: 16px; }
.thread-msg.sent .thread-bubble { background: var(--purple); color: #fff; }
.thread-msg.received .thread-bubble { background: #DDE2EA; color: var(--text); }
.thread-meta { font-size: 12px; font-weight: 700; color: #5A6577; }
.thread-meta.read { color: #2F7F6C; }

.cat-pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-pill { padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; background: #DDE2EA; color: var(--text); border: none; cursor: pointer; }
.cat-pill.active { background: var(--purple); color: #fff; }
.phrase-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.phrase-btn { padding: 12px 16px; border-radius: 14px; border: 2px solid var(--border); background: #fff; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer; }
.phrase-btn.selected { border-color: var(--purple); background: #EEE9F5; }
.carrier-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.carrier-pill { padding: 8px 14px; border-radius: 12px; border: 2px solid var(--border); background: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.carrier-pill.selected { border-color: var(--purple); background: #EEE9F5; }
.express-note { font-weight: 800; font-size: 14px; padding: 8px 12px; border-radius: 12px; background: #FFF1C9; margin-left: auto; }

/* Map / territorios / expediciones */
.map-panel { flex-grow: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map-panel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.map-panel-head .map-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 22px; flex-grow: 1; }
.map-toggle { display: flex; padding: 4px; border-radius: 999px; background: #DDE2EA; gap: 4px; }
.map-toggle a, .map-toggle span.active { padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; text-decoration: none; color: var(--text); }
.map-toggle span.active { background: var(--purple); color: #fff; }
.map-note { font-size: 13px; font-weight: 600; color: #5A6577; }
.map-svg-wrap { flex-grow: 1; min-height: 420px; }
.map-svg-wrap svg { width: 100%; height: 100%; }

/* Mapa unico grande y compartido por Carreras/Territorios/Expediciones (ver
   app/mapa.php): generoso en alto, nunca la cajita de 260px de antes. */
.pp-map-canvas { width: 100%; height: 620px; border-radius: 14px; }
@media (max-width: 900px) { .pp-map-canvas { height: 440px; } }

.rank-row { display: flex; flex-direction: column; gap: 4px; }
.rank-row .rank-row-label { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.rank-bar { height: 8px; border-radius: 4px; background: #DDE2EA; }
.rank-bar > span { display: block; height: 8px; border-radius: 4px; }

.expedition-tab-row { display: flex; padding: 4px; border-radius: 999px; background: #DDE2EA; gap: 4px; }
.expedition-tab-row a, .expedition-tab-row .active { flex-grow: 1; text-align: center; padding: 8px 10px; border: none; border-radius: 999px; font-weight: 800; font-size: 14px; text-decoration: none; color: var(--text); background: transparent; cursor: pointer; }
.expedition-tab-row .active { background: var(--purple); color: #fff; }
.event-card-head { display: flex; align-items: center; gap: 14px; }
.event-card-head .event-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.15; }
.event-card-head .event-place { font-size: 13px; font-weight: 700; color: #5A6577; }
.event-benefits { display: flex; flex-direction: column; gap: 6px; background: #EEE9F5; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 700; }
.quota-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; }
.quota-bar { height: 8px; border-radius: 4px; background: #DDE2EA; }
.quota-bar > span { display: block; height: 8px; border-radius: 4px; background: #2F7F6C; }
.send-to-list { display: flex; flex-direction: column; gap: 8px; }
.send-to-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--border); background: #fff; }
.send-to-row.selected { border-color: var(--purple); background: #EEE9F5; }
.send-to-row .send-to-name { flex-grow: 1; font-weight: 800; font-size: 15px; }
.send-to-row .send-to-note { font-size: 13px; font-weight: 700; color: #2F7F6C; }
.in-progress-row { display: flex; align-items: center; gap: 10px; }
.in-progress-row .in-progress-name { flex-grow: 1; font-weight: 800; font-size: 15px; }
.in-progress-row .in-progress-eta { font-size: 13px; font-weight: 800; color: #2F7F6C; }

/* Tienda */
.shop-tab-row { display: flex; padding: 4px; border-radius: 999px; background: #DDE2EA; gap: 4px; width: fit-content; }
.shop-tab-row a, .shop-tab-row span.active { padding: 9px 18px; border: none; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; color: var(--text); }
.shop-tab-row span.active { background: var(--purple); color: #fff; }
.pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 700px) { .pack-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.pack-card { position: relative; padding: 20px 16px; border-radius: 16px; border: 2px solid var(--border); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; color: var(--text); }
.pack-card.selected { border-color: var(--purple); background: #EEE9F5; }
.pack-best { position: absolute; top: -11px; padding: 3px 10px; border-radius: 999px; background: #2F7F6C; color: #fff; font-weight: 800; font-size: 11px; }
.pack-coins { font-weight: 800; font-size: 20px; }
.pack-price { font-size: 13px; font-weight: 700; color: #5A6577; }
.summary-bar { display: flex; align-items: center; gap: 14px; background: #EEE9F5; border-radius: 14px; padding: 14px 18px; flex-wrap: wrap; }
.summary-bar .summary-label { flex-grow: 1; font-weight: 800; font-size: 16px; }
.btn-pay { height: 44px; padding: 0 22px; border: none; border-radius: 12px; background: var(--purple); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.info-numbered { display: flex; gap: 10px; align-items: flex-start; }
.info-numbered .info-num { font-weight: 800; color: #2F7F6C; }
.info-numbered.warn .info-num { color: #8A5A0B; }
.info-numbered .info-text { font-size: 14px; font-weight: 600; }

/* Login */
.login-shell { min-height: 100dvh; background: linear-gradient(135deg,#DCE1EA,#E6E9EE 55%,#EEE9F5); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card-v2 { width: 100%; max-width: 920px; min-height: 600px; background: var(--panel); border: 1px solid var(--border); border-radius: 24px; display: flex; overflow: hidden; box-shadow: 0 24px 60px rgba(43,48,59,0.12); }
@media (max-width: 760px) { .login-card-v2 { flex-direction: column; min-height: 0; } }
.login-illustration { width: 380px; flex-shrink: 0; background: linear-gradient(#B9C4D3, #E9EDF2 80%); position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px; box-sizing: border-box; min-height: 320px; }
@media (max-width: 760px) { .login-illustration { width: 100%; } }
.login-illustration .login-bird { position: absolute; left: 32px; bottom: 150px; }
.login-illustration .login-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; background: #5F6878; }
.login-illustration .login-ground-strip { position: absolute; left: 0; right: 0; bottom: 130px; height: 12px; background: #7D8797; }
.login-illustration .login-brand { position: relative; color: #fff; }
.login-illustration .login-brand-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 30px; line-height: 1.1; }
.login-illustration .login-brand-tagline { font-size: 14px; font-weight: 600; margin-top: 8px; opacity: 0.9; }
.login-panel { flex-grow: 1; padding: 44px 48px; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 760px) { .login-panel { padding: 32px 24px; } }
.login-panel .login-heading { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 24px; margin: 0; }
.login-panel .login-subheading { font-size: 14px; font-weight: 600; color: #5A6577; margin-top: 4px; }
.btn-pratware { height: 52px; border: none; border-radius: 14px; background: #2B303B; color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; width: 100%; }
.login-divider { display: flex; align-items: center; gap: 10px; color: #5A6577; font-size: 13px; font-weight: 700; }
.login-divider .line { flex-grow: 1; height: 1px; background: #DDE2EA; }
.login-footnote { font-size: 13px; font-weight: 600; color: #5A6577; }
.login-preview-link { font-size: 13px; font-weight: 800; color: var(--purple); text-decoration: none; }

/* Mobile bottom nav (Movil.dc.html) */
.mobile-tabbar { display: none; }
@media (max-width: 720px) {
  .page-body-v2 { padding: 16px; flex-direction: column; }
  .col-narrow, .col-side, .col-side-wide, .col-side-friends, .col-side-map, .col-main { width: 100%; }
  .nav-tabs-v2 { display: none; }

  /* En movil no hay texto: ni el nombre de la app junto al logo, ni la
     etiqueta de cada pestaña de abajo (solo icono), y el avatar/usuario se
     mueve de la barra de arriba (donde no entraba bien) a la de abajo. */
  .brand-v2-text { display: none; }
  .topbar-v2 .container-wide { gap: 10px; }
  .avatar-circle-desktop { display: none; }

  .mobile-tabbar {
    display: flex; height: 64px; box-sizing: border-box; background: var(--panel);
    border-top: 1px solid var(--border); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  }
  .mobile-tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; color: #5A6577; text-decoration: none; }
  .mobile-tabbar a svg { width: 26px; height: 26px; }
  .mobile-tabbar a.active { color: var(--purple); }
  .mobile-tabbar-avatar {
    width: 30px; height: 30px; border-radius: 15px; background: var(--blue);
    color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  }
  body { padding-bottom: 64px; }
  .mochila-pills { gap: 6px; }
  .mochila-pill { padding: 4px 8px; font-size: 12px; }
  .notif-panel { right: -8px; }
}

/* ---------------------------------------------------------------------------
   Mochila en la barra superior (antes era una tarjeta entera solo visible en
   "Mi palomar"; ahora se ve siempre, en cualquier pantalla del juego).
--------------------------------------------------------------------------- */
.mochila-pills { display: flex; align-items: center; gap: 10px; }
.mochila-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  font-weight: 800; font-size: 13px; color: var(--text);
}

/* ---------------------------------------------------------------------------
   Campanita de notificaciones + su panel desplegable (reemplaza la tarjeta
   fija de "Regalo diario" que antes vivia en app/index.php).
--------------------------------------------------------------------------- */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; width: 38px; height: 38px; border-radius: 19px;
  background: var(--panel); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.notif-bell:hover { background: #EDEFF3; }
.notif-dot {
  position: absolute; top: 5px; right: 6px; width: 9px; height: 9px;
  border-radius: 5px; background: var(--gold); border: 2px solid var(--panel);
}
.notif-panel {
  display: none; position: absolute; top: 46px; right: 0; z-index: 30;
  width: 280px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px; box-shadow: 0 12px 28px rgba(20, 24, 34, 0.16);
  flex-direction: column; gap: 4px;
}
.notif-panel.open { display: flex; }
.notif-panel-title { font-weight: 800; font-size: 13px; color: #5A6577; padding: 4px 8px 6px; }
.notif-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; font-weight: 700; font-size: 13.5px; color: var(--text);
  text-align: left; cursor: pointer;
}
.notif-item:hover { border-color: var(--gold); }
.notif-item-icon { font-size: 20px; line-height: 1; }
.notif-empty { padding: 10px 8px; font-size: 13.5px; color: #5A6577; }

/* ---------------------------------------------------------------------------
   Modal generico (reclamo del regalo diario, monedas, y ahora "Iniciar
   carrera" desde el mapa -- ver app/mapa.php).
   z-index 2000 (antes 100): Leaflet mete sus propios controles/popups con
   z-index hasta 1000 (.leaflet-top/.leaflet-bottom) SIN crear su propio
   contexto de apilamiento (el contenedor del mapa solo tiene position:
   relative, sin z-index), asi que esos 1000 competian directo contra el 100
   de este modal en el mismo stacking context de la pagina y el mapa le
   ganaba, tapando el modal (controles de zoom por encima del cuadro de
   "Iniciar carrera"). Con 2000 el modal siempre gana.
--------------------------------------------------------------------------- */
.pp-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 24, 34, 0.45);
  align-items: center; justify-content: center; padding: 16px;
}
.pp-modal-overlay.open { display: flex; }
.pp-modal {
  position: relative; width: 100%; max-width: 320px;
  background: var(--panel); border-radius: 20px; padding: 26px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  box-shadow: 0 20px 50px rgba(20, 24, 34, 0.3);
}
.pp-modal-close {
  position: absolute; top: 10px; right: 12px; border: none; background: none;
  font-size: 22px; line-height: 1; color: #5A6577; cursor: pointer; padding: 4px;
}
.pp-modal-icon { font-size: 40px; line-height: 1; }
.pp-modal-title { margin: 0; }
.pp-modal-desc { margin: 0; font-size: 14px; font-weight: 700; color: #5A6577; }
.pp-modal form { width: 100%; }

/* ---------------------------------------------------------------------------
   Tabla con scroll (para "Tus palomas" cuando hay muchas, y para el listado
   compacto de recursos cercanos) en vez de una pagina infinita.
--------------------------------------------------------------------------- */
.card-table-scroll { max-height: 320px; overflow-y: auto; }
.card-table-scroll table { width: 100%; }
.ver-mas-btn {
  align-self: flex-start; background: none; border: none; padding: 0;
  font-size: 13px; font-weight: 800; color: var(--purple); cursor: pointer;
}

/* ---------------------------------------------------------------------------
   <details>/<summary> nativo (sin JS) para contenido secundario que se
   muestra "cerrado" por defecto -- ej. la lista de recursos cercanos en "Mi
   palomar", que antes ocupaba toda la pantalla siempre abierta.
--------------------------------------------------------------------------- */
.panel > summary, .card-v2 > summary {
  cursor: pointer; list-style: none; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px;
}
.panel > summary::-webkit-details-marker, .card-v2 > summary::-webkit-details-marker { display: none; }
.panel > summary::before, .card-v2 > summary::before { content: '\25B8'; color: #8A93A3; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.details-body { margin-top: 12px; }

/* ---------------------------------------------------------------------------
   app/palomares.php: boton sutil "+ palomar anexo", popups de cada marcador
   del mapa (nombre + acciones), y la barrita de confirmar una reasignacion.
--------------------------------------------------------------------------- */
.pp-add-anexo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--border); font-weight: 800; font-size: 13px;
  color: var(--purple); text-decoration: none;
}
.pp-add-anexo-btn:hover { background: #EEE9F5; }
.pp-manage-btn {
  display: flex; align-items: center; gap: 10px; padding: 16px;
  border-radius: 18px; background: var(--panel); border: 1px solid var(--border);
  font-weight: 800; color: var(--text); text-decoration: none;
}
.pp-manage-btn:hover { border-color: var(--purple); color: var(--purple); }
.pp-modal-wide { max-width: 360px; }

.pp-popup { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.pp-popup-title { font-weight: 800; font-size: 14px; }
.pp-popup-sub { font-size: 12px; color: #5A6577; font-weight: 700; margin-bottom: 2px; }
.pp-popup-btn {
  width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-weight: 800; font-size: 12.5px; color: var(--text); cursor: pointer;
}
.pp-popup-btn:hover { border-color: var(--purple); color: var(--purple); }
.pp-popup-btn-gold { background: var(--gold); border-color: var(--gold); color: #4A3405; }
.pp-popup form { margin: 0; }

/* ---------------------------------------------------------------------------
   "Glass" para lo que flota literalmente ENCIMA del mapa (popup de un
   palomar y los controles de zoom) -- vidrio esmerilado semi-transparente en
   vez de tarjetas opacas, como en el overlay de referencia sobre el mapa.
--------------------------------------------------------------------------- */
.pp-map-canvas .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(20, 24, 34, 0.25);
}
.pp-map-canvas .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pp-map-canvas .leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  color: var(--text) !important;
}
.pp-map-canvas .leaflet-control-zoom a:hover { background: rgba(255, 255, 255, 0.9) !important; }

.pp-confirm-bar {
  display: flex; align-items: center; gap: 10px; background: #FFF1C9;
  border: 1px solid #E9CC80; border-radius: 12px; padding: 10px 12px;
  font-weight: 700; font-size: 13.5px; color: var(--text);
}

/* Lista compacta de "Tus palomares" en la columna izquierda de "Mi palomar". */
.palomares-mini-list { display: flex; flex-direction: column; gap: 8px; }
.palomares-mini-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
}
.palomares-mini-item .nombre { font-weight: 800; font-size: 13.5px; }
.palomares-mini-item .distrito { font-size: 12px; color: #5A6577; font-weight: 700; }
.palomares-mini-item .principal-badge {
  font-size: 11px; font-weight: 800; color: #8A5A0B; background: #FFF1C9;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}