/* ============================================================
   El Escampadero · Llano Lindo
   Paleta tomada de la caseta: letrero, pared y techo
   ============================================================ */

:root {
    --verde: #1d4d3c;
    --verde-oscuro: #163d30;
    --verde-suave: #3f6b5a;
    --crema: #f7f1e3;
    --terracota: #b0503a;
    --tinta: #1f2a25;
    --tinta-suave: #4a5751;
    --linea: rgba(29, 77, 60, 0.15);
    --anillo: 0 0 0 3px rgba(29, 77, 60, 0.15);
    --foto: url('../img/fondo.png');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { min-height: 100%; }

body {
    font-family: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--tinta);
    -webkit-font-smoothing: antialiased;
    /* Fondo estático, sin animación ni escalado extra, para máxima nitidez */
    background: #9cc3e0 var(--foto) 40% 88% / cover no-repeat fixed;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: var(--verde); }

.icono { width: 18px; height: 18px; flex-shrink: 0; }

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

/* ===== Vidrio ===== */
.vidrio {
    backdrop-filter: blur(14px) saturate(170%);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.85),
        inset -1px -1px 0 rgba(255, 255, 255, 0.35),
        inset 0 0 24px rgba(255, 255, 255, 0.18),
        0 18px 50px -18px rgba(15, 30, 25, 0.5);
}

.burbuja {
    border-radius: 999px;
    background: rgba(250, 246, 236, 0.55);
    padding: 9px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* ===== Marca ===== */
.barra-marca {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--verde);
    text-decoration: none;
}
.barra-sep {
    width: 1px;
    height: 16px;
    background: rgba(29, 77, 60, 0.3);
}
.barra-lugar {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}

/* ===== Botones ===== */
.boton {
    display: inline-block;
    width: 100%;
    margin-top: 4px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--verde);
    color: #fff;
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px -8px rgba(29, 77, 60, 0.8);
    transition: background .2s, opacity .2s;
}
.boton:hover { background: var(--verde-oscuro); }
.boton:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
.boton:disabled { opacity: .55; cursor: not-allowed; }
.boton--auto { width: auto; }
.boton--mini { width: auto; margin: 0; padding: 7px 16px; font-size: 13.5px; flex-shrink: 0; }
.boton--claro { background: var(--crema); color: var(--verde); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.4); }
.boton--claro:hover { background: #fff; }

/* ============================================================
   PORTADA PÚBLICA
   ============================================================ */

.barra {
    position: relative;
    z-index: 20;
    max-width: 1272px;
    width: 100%;
    margin: 0 auto;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.barra-accion {
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--verde);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;
}
.barra-accion:hover,
.barra-accion[aria-expanded="true"] { background: rgba(250, 246, 236, 0.8); }
.barra-accion .icono { width: 16px; height: 16px; }
.barra-accion:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; }

/* Panel de acceso */
.acceso {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    width: 340px;
    border-radius: 26px;
    background: rgba(250, 246, 236, 0.72);
    padding: 26px 26px 22px;
}
.acceso > * { animation: asomar .35s cubic-bezier(.22, .8, .24, 1) both; }
@keyframes asomar {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
.acceso h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 24px;
    letter-spacing: -0.015em;
    color: var(--verde);
}
.acceso-intro {
    margin: 4px 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tinta-suave);
}
.acceso-error {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #7a2e1f;
    background: rgba(176, 80, 58, 0.12);
    border: 1px solid rgba(176, 80, 58, 0.3);
}
.acceso-ayuda {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--tinta-suave);
    text-align: center;
}

/* Tarjeta de la portada */
.portada-contenido {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px 16px 12px;
}
.tarjeta {
    width: 100%;
    max-width: 1240px;
    border-radius: 30px;
    background: rgba(250, 246, 236, 0.62);
    padding: 34px 40px 30px;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
    gap: 44px;
}
.tarjeta--sola {
    max-width: 680px;
    grid-template-columns: 1fr;
}
/* La animación va en el contenido: animar el vidrio anula su desenfoque */
.tarjeta > * { animation: llegar .9s cubic-bezier(.22, .8, .24, 1) both; }
.tarjeta > :nth-child(2) { animation-delay: .12s; }
@keyframes llegar {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.antetitulo {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--verde-suave);
    margin-bottom: 12px;
}
.antetitulo::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--terracota);
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 2px;
}
em.acento {
    font-style: italic;
    font-weight: 400;
    color: var(--terracota);
}

.nota {
    display: flex;
    flex-direction: column;
}
.nota h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--verde);
    margin-bottom: 16px;
}
.nota .texto {
    font-size: 16px;
    line-height: 1.65;
    color: var(--tinta);
}
.firma {
    margin-top: auto;
    padding-top: 22px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tinta-suave);
}
.firma strong {
    display: block;
    color: var(--verde);
    font-weight: 600;
}
.lema {
    margin-top: 6px;
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-size: 17px;
    color: var(--terracota);
}

.lista {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
}
.lista li {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-content: start;
    gap: 2px 0;
    padding: 14px 0;
    border-top: 1px solid var(--linea);
}
.lista .num {
    grid-row: span 2;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    color: var(--terracota);
    line-height: 1.35;
}
.lista h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.lista p {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--tinta-suave);
}

.futuro {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
    border-radius: 20px;
    background: var(--verde);
}
.futuro h2 {
    flex-shrink: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.15;
    color: #fff;
}
.futuro h2 em { font-style: italic; font-weight: 400; color: #f1c7a8; }
.futuro p {
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(238, 243, 239, 0.9);
}

/* Pie común */
.pie {
    display: flex;
    justify-content: center;
    padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px));
}
.pie .burbuja {
    padding: 6px 16px;
    font-size: 12.5px;
    color: var(--tinta);
}

/* ============================================================
   FORMULARIOS
   ============================================================ */

.campo { margin-bottom: 14px; }
fieldset.campo { border: 0; }
.campo label,
.campo legend {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tinta);
}
.opcional { font-weight: 400; color: var(--tinta-suave); }

.campo input:not([type=checkbox]):not([type=radio]):not([type=file]),
.campo select,
.campo textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(29, 77, 60, 0.2);
    background: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 16px;
    color: var(--tinta);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.campo textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--verde);
    box-shadow: var(--anillo);
}

.campo-clave { position: relative; }
.campo-clave input { padding-right: 64px !important; }
.ver-clave {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--verde-suave);
    cursor: pointer;
}
.ver-clave:hover { background: rgba(29, 77, 60, 0.08); }

.campos-dobles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Opciones seleccionables (cuotas, votos, casillas) */
.opcion {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(29, 77, 60, 0.14);
    cursor: pointer;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.opcion + .opcion { margin-top: 8px; }
.opcion:hover { border-color: rgba(29, 77, 60, 0.35); }
.opcion:has(input:checked) {
    border-color: var(--verde);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--anillo);
}
.opcion input { width: 18px; height: 18px; accent-color: var(--verde); flex-shrink: 0; }
.opcion-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tinta);
}
.opcion-texto small { font-size: 13px; font-weight: 400; color: var(--tinta-suave); }
.opcion-dato { font-weight: 600; font-variant-numeric: tabular-nums; }
.opcion--check { align-items: flex-start; margin-bottom: 14px !important; }

/* Selector de tipo de reporte */
.tipos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.tipo {
    position: relative;
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    margin: 0 !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(29, 77, 60, 0.14);
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tipo strong { font-size: 14.5px; color: var(--tinta); }
.tipo small { font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--tinta-suave); }
.tipo:hover { border-color: rgba(29, 77, 60, 0.35); }
.tipo:has(input:checked) { border-color: var(--verde); background: rgba(255, 255, 255, 0.88); box-shadow: var(--anillo); }
.tipo:has(input:checked) strong { color: var(--verde); }
.tipo:has(input:focus-visible) { outline: 2px solid var(--verde); outline-offset: 2px; }

/* Adjuntar archivo */
.archivo {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 0 !important;
    border: 1.5px dashed rgba(29, 77, 60, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--verde-suave) !important;
}
.archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.archivo:hover { border-color: var(--verde); }
.archivo:focus-within { border-color: var(--verde); box-shadow: var(--anillo); }
.archivo.con-archivo { border-style: solid; color: var(--verde) !important; background: rgba(255, 255, 255, 0.8); }

/* ============================================================
   PANEL DE PROPIETARIOS
   ============================================================ */

/* Barra superior con menú de vidrio */
.app-barra {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    max-width: 1272px;
    width: 100%;
    margin: 0 auto;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
}
.app-marca { justify-self: start; text-decoration: none; }

.menu {
    position: relative;
    display: flex;
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(250, 246, 236, 0.58);
}
.menu-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 999px;
    color: var(--tinta-suave);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, color .3s;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.6); color: var(--verde); }
.menu-item.activo {
    background: var(--verde);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 14px -6px rgba(29, 77, 60, 0.8);
}
.menu-item:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; }

/* Píldora que se desliza entre secciones (la mueve movimiento.js; sin JS se ve el fondo del activo) */
.menu-pastilla {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 999px;
    background: var(--verde);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 14px -6px rgba(29, 77, 60, 0.8);
    opacity: 0;
    pointer-events: none;
}
.menu--vivo .menu-pastilla { opacity: 1; }
.menu-pastilla.moviendo {
    transition:
        transform .55s cubic-bezier(.34, 1.32, .5, 1),
        width .55s cubic-bezier(.34, 1.32, .5, 1),
        height .4s ease;
}
.menu--vivo .menu-item.activo,
.menu--vivo .menu-item.activo:hover { background: transparent; box-shadow: none; }
.menu--llegando .menu-item.activo { color: var(--tinta-suave); }

.app-usuario {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-casa { font-size: 13.5px; font-weight: 600; color: var(--verde); text-decoration: none; transition: background .2s; }
.app-casa:hover { background: rgba(250, 246, 236, 0.85); }
.app-casa.activa { background: var(--verde); color: #fff; }
.app-salir {
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tinta-suave);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.app-salir:hover { background: rgba(250, 246, 236, 0.85); color: var(--terracota); }
.app-salir .icono { width: 16px; height: 16px; }

.app-contenido {
    flex: 1;
    width: 100%;
    max-width: 1272px;
    margin: 0 auto;
    padding: 12px 16px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Mensajes */
.aviso {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.5;
}
.aviso .icono { width: 20px; height: 20px; }
.aviso--ok { background: rgba(236, 245, 238, 0.86); color: #1d5e3f; }
.aviso--error { background: rgba(250, 232, 226, 0.92); color: #7a2e1f; }

/* Paneles */
.panel {
    min-width: 0;
    border-radius: 24px;
    background: rgba(250, 246, 236, 0.76);
    padding: 22px 24px;
}
.panel--verde {
    background: var(--verde);
    color: #eef3ef;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 18px 50px -18px rgba(15, 30, 25, 0.55);
}
.panel-cabeza {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.panel h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 21px;
    letter-spacing: -0.01em;
    color: var(--verde);
}
.ver-todo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--verde-suave);
    text-decoration: none;
    white-space: nowrap;
}
.ver-todo .icono { width: 15px; height: 15px; transition: transform .2s; }
.ver-todo:hover { color: var(--verde); }
.ver-todo:hover .icono { transform: translateX(2px); }

.texto { font-size: 15.5px; line-height: 1.6; }

/* Encabezado de cada sección */
.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 28px 32px;
}
.encabezado h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--verde);
    margin-bottom: 8px;
}
.encabezado .texto { max-width: 62ch; }
.encabezado-dato {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
    flex-shrink: 0;
}
.encabezado-dato span { font-size: 13px; color: var(--tinta-suave); }
.encabezado-dato strong {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 2.1rem;
    color: var(--verde);
    font-variant-numeric: tabular-nums;
}

/* Dashboard */
.tablero {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}
.tablero > .panel { grid-column: span 4; }
.tablero > .saludo { grid-column: span 8; padding: 28px 32px; }
.tablero > .noticias { grid-column: 1 / -1; }

.saludo h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--verde);
    margin-bottom: 10px;
}
.enlace-suave {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--terracota);
    text-decoration: none;
}
.enlace-suave:hover { text-decoration: underline; }
.enlace-suave .icono { width: 16px; height: 16px; }

.saldo { display: flex; flex-direction: column; gap: 6px; }
.saldo-etiqueta { font-size: 13.5px; font-weight: 500; color: rgba(238, 243, 239, 0.8); }
.saldo-monto {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 2.6rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.saldo-detalle {
    margin-bottom: auto;
    padding-bottom: 16px;
    font-size: 14px;
    color: rgba(238, 243, 239, 0.86);
}

/* Listas de filas */
.lista-simple { list-style: none; }
.lista-simple > li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--linea);
}
.lista-simple > li:first-child { border-top: 0; padding-top: 4px; }
.lista-simple > li.fila-apilada { flex-direction: column; align-items: stretch; gap: 6px; }
.fila-principal { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fila-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fila-titulo {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tinta);
    text-decoration: none;
}
a.fila-titulo:hover { color: var(--verde); text-decoration: underline; }
.fila-meta { font-size: 13px; line-height: 1.45; color: var(--tinta-suave); }
.fila-meta .icono { width: 14px; height: 14px; vertical-align: -2px; }
.fila-meta a { font-weight: 500; }
.fila-nota { font-size: 13px; color: #7a2e1f; }
.fila-derecha {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.monto {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.monto--ingreso { color: var(--verde); }
.etiqueta-tipo {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracota);
}
.vacio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--tinta-suave);
}
.vacio .icono { color: var(--verde); }

/* Etiquetas de estado: siempre con texto */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
.chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.chip--ok      { color: #1d5e3f; background: rgba(46, 125, 82, 0.15); }
.chip--activo  { color: #fff;    background: var(--verde); }
.chip--espera  { color: #6f520e; background: rgba(191, 145, 40, 0.2); }
.chip--alerta  { color: #8a3f22; background: rgba(176, 80, 58, 0.14); }
.chip--critico { color: #fff;    background: var(--terracota); }
.chip--neutro  { color: var(--tinta-suave); background: rgba(31, 42, 37, 0.08); }

/* Barras de avance y de resultados (una sola serie, un solo tono) */
.avance { display: flex; align-items: center; gap: 10px; }
.avance-barra {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(29, 77, 60, 0.13);
    overflow: hidden;
}
.avance-barra span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--verde);
}
.avance-valor {
    font-size: 13px;
    font-weight: 600;
    color: var(--verde);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Noticias */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 12px;
}
.noticia {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.noticia--urgente { background: rgba(176, 80, 58, 0.1); border-color: rgba(176, 80, 58, 0.35); }
.noticia-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}
.noticia--urgente .noticia-meta { color: var(--terracota); }
.noticia-meta .icono { width: 15px; height: 15px; }
.noticia h3 { font-size: 16px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.noticia p { font-size: 14px; line-height: 1.5; color: var(--tinta-suave); }

/* Dos columnas */
.columnas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.columna { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Bloques con título en burbuja */
.bloque { display: flex; flex-direction: column; gap: 12px; }
.bloque-cabeza {
    align-self: flex-start;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(250, 246, 236, 0.62);
}
.bloque-cabeza h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--verde);
}
.bloque-cabeza span { font-size: 13px; color: var(--tinta-suave); }

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 16px;
}
.tarjetas--anchas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }

/* Proyectos */
.proyecto { display: flex; flex-direction: column; gap: 12px; }
.proyecto h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 21px;
    line-height: 1.2;
}
.proyecto h3 a { color: var(--verde); text-decoration: none; }
.proyecto h3 a:hover { text-decoration: underline; }
.proyecto-desc { font-size: 14.5px; line-height: 1.55; color: var(--tinta-suave); }
.proyecto .ver-todo { margin-top: auto; }

.cifras { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.cifras dt { font-size: 12.5px; color: var(--tinta-suave); }
.cifras dd { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cifras--grandes { margin-bottom: 16px; }
.cifras--grandes dd {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 26px;
    color: var(--verde);
}

.volver {
    align-self: flex-start;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(250, 246, 236, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.espacio-arriba { margin-top: 14px; }

.linea-tiempo { list-style: none; padding-left: 6px; }
.linea-tiempo li {
    position: relative;
    padding: 0 0 18px 20px;
    border-left: 2px solid rgba(29, 77, 60, 0.2);
}
.linea-tiempo li:last-child { border-left-color: transparent; padding-bottom: 0; }
.linea-tiempo li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--verde);
    box-shadow: 0 0 0 3px rgba(250, 246, 236, 0.95);
}
.linea-fecha { font-size: 12.5px; font-weight: 600; color: var(--verde-suave); }
.linea-tiempo p { margin-top: 2px; font-size: 14.5px; line-height: 1.5; }

/* Votaciones */
.votacion { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.votacion h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    color: var(--verde);
}
.form-voto fieldset { border: 0; margin-bottom: 12px; }
.voto-hecho {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(46, 125, 82, 0.13);
    color: #1d5e3f;
    font-size: 14.5px;
}
.participacion {
    padding-top: 10px;
    border-top: 1px solid var(--linea);
    font-size: 13px;
    color: var(--tinta-suave);
}

.resultados,
.barras { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.resultado-linea {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    font-size: 14.5px;
}
.resultado-linea strong { font-variant-numeric: tabular-nums; }
.resultados .avance-barra,
.barras .avance-barra { height: 10px; }
.resultados li:not(.gana) .avance-barra span { background: var(--verde-suave); opacity: .55; }
.resultados .gana .resultado-linea span { font-weight: 600; }
.tu-voto {
    margin-left: 6px;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terracota);
}

/* Cuentas */
.controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(250, 246, 236, 0.64);
}
.segmentos { display: flex; gap: 2px; }
.segmentos a {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tinta-suave);
    text-decoration: none;
    text-align: center;
}
.segmentos a:hover { background: rgba(255, 255, 255, 0.6); color: var(--verde); }
.segmentos a.activo { background: var(--verde); color: #fff; }
.periodo { display: flex; align-items: center; gap: 10px; padding-right: 4px; }
.periodo strong { font-size: 15px; font-weight: 600; color: var(--verde); text-align: center; }
.periodo-flecha {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    font-size: 20px;
    line-height: 1;
    color: var(--verde);
    text-decoration: none;
}
.periodo-flecha:hover { background: #fff; }
.periodo-flecha.desactivada { opacity: .35; }

.indicadores {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.indicador { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; }
.indicador span { font-size: 13px; color: var(--tinta-suave); }
.indicador strong {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.8rem;
    color: var(--verde);
    font-variant-numeric: tabular-nums;
}
.indicador small { font-size: 12px; }
.panel--verde.indicador span,
.panel--verde.indicador small { color: rgba(238, 243, 239, 0.8); }
.panel--verde.indicador strong { color: #fff; }
.negativo { color: var(--terracota) !important; }

.tabla-envoltura { overflow-x: auto; }
.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.tabla th,
.tabla td { padding: 9px 8px; text-align: right; border-top: 1px solid var(--linea); white-space: nowrap; }
.tabla th:first-child { text-align: left; font-weight: 500; }
.tabla thead th {
    border-top: 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}
.tabla tfoot th,
.tabla tfoot td { font-weight: 700; border-top: 2px solid rgba(29, 77, 60, 0.3); }

/* Datos para pagar */
.datos-pago dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin-bottom: 10px;
    font-size: 14.5px;
}
.datos-pago dt { color: var(--tinta-suave); }
.datos-pago dd { font-weight: 600; word-break: break-word; }

/* Respuestas de la Junta */
.respuesta {
    margin-top: 4px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(29, 77, 60, 0.08);
    border-left: 3px solid var(--verde);
}
.respuesta strong { font-size: 12.5px; color: var(--verde); }
.respuesta p { font-size: 14px; line-height: 1.5; }

/* ============================================================
   SERVICIOS, RECARGOS Y VENTANILLA DEL SALDO
   ============================================================ */

.menu-corto { display: none; }
.tablero > .ancho { grid-column: 1 / -1; }

.servicio-icono {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: var(--verde);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4));
    box-shadow: inset 0 1px 0 #fff, 0 3px 10px -5px rgba(15, 30, 25, 0.35);
}
.servicio-icono .icono { width: 18px; height: 18px; }
.servicio-icono--grande { width: 46px; height: 46px; border-radius: 15px; }
.servicio-icono--grande .icono { width: 24px; height: 24px; }

/* Resumen en el inicio del vecino */
.servicios-resumen {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 10px;
}
.servicio-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.servicio-mini--novedad { background: rgba(255, 250, 240, 0.8); border-color: rgba(191, 145, 40, 0.3); }
.servicio-mini-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.servicio-mini-texto strong { font-size: 14px; font-weight: 600; line-height: 1.3; }

/* Tarjetas de la sección Servicios */
.servicio { display: flex; flex-direction: column; gap: 12px; }
.servicio-cabeza { display: flex; align-items: center; gap: 14px; }
.servicio-cabeza h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    color: var(--verde);
    margin-bottom: 4px;
}
.servicio-desc { font-size: 14.5px; line-height: 1.55; color: var(--tinta-suave); }
.servicio-datos { display: grid; gap: 6px; font-size: 14px; }
.servicio-datos div { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--linea); padding-top: 6px; }
.servicio-datos dt { color: var(--tinta-suave); }
.servicio-datos dd { font-weight: 600; text-align: right; }
.linea-tiempo .chip { margin-top: 4px; }

/* Recargo por mora */
.aviso-recargo { color: var(--terracota); font-weight: 500; }
.nota-regla {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #6f4a14;
    background: rgba(191, 145, 40, 0.12);
}
.nota-regla .icono { width: 17px; height: 17px; margin-top: 1px; }

/* Indicador que abre la ventanilla */
.indicador--boton {
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.indicador--boton:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 22px 44px -18px rgba(15, 30, 25, 0.6); }
.indicador--boton:focus-visible { outline: 3px solid rgba(29, 77, 60, 0.45); outline-offset: 3px; }
.indicador--boton u { text-underline-offset: 3px; }

/* Ventanilla (dialog) con dos globos de vidrio */
.ventanilla {
    margin: auto;
    width: min(980px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: var(--tinta);
    outline: none;
}
.ventanilla::backdrop {
    background: rgba(15, 30, 25, 0.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.ventanilla[open] .globo { animation: globo-aparece .45s cubic-bezier(.22, .9, .3, 1.1) both; }
.ventanilla[open] .globo + .globo { animation-delay: .08s; }
@keyframes globo-aparece {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.ventanilla-globos {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 4px;
}
.globo {
    border-radius: 28px;
    background: rgba(250, 246, 236, 0.84);
    padding: 24px 26px;
}
.globo-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.globo-cabeza .antetitulo { margin-bottom: 4px; }
.globo h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 24px;
    color: var(--verde);
}
.globo-saldo {
    margin: 12px 0 6px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--verde);
    font-variant-numeric: tabular-nums;
}
.globo-sub {
    margin: 18px 0 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}
.globo-nota {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(29, 77, 60, 0.08);
    font-size: 14px;
    line-height: 1.55;
}
.globo-nota p + p { margin-top: 6px; }
.cerrar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    color: var(--tinta);
    cursor: pointer;
    flex-shrink: 0;
}
.cerrar:hover { background: #fff; }

.desglose { list-style: none; font-size: 14.5px; }
.desglose li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--linea);
}
.desglose li:first-child { border-top: 0; }
.desglose li > span { display: flex; flex-direction: column; }
.desglose small { font-size: 12px; color: var(--tinta-suave); }
.desglose strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.desglose .desglose-total { font-weight: 600; border-top: 1.5px solid rgba(29, 77, 60, 0.3); }
.desglose--resultado li {
    margin-top: 12px;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: var(--verde);
    color: #fff;
    font-weight: 600;
}
.desglose--iconos li { justify-content: flex-start; }
.desglose--iconos li > strong { margin-left: auto; }
.desglose--iconos .desglose-total { justify-content: space-between; }

/* ============================================================
   BOLÍVARES Y TASA BCV
   ============================================================ */

.monto-bs { display: block; }
.monto-ref {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--tinta-suave);
    font-variant-numeric: tabular-nums;
}
.opcion-dato { text-align: right; }
.panel--verde .monto-ref { color: rgba(238, 243, 239, 0.75); }
.saldo-ref { margin-top: -2px; font-size: 12.5px; color: rgba(238, 243, 239, 0.8); }
.globo-saldo small { font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 14px; font-weight: 500; color: var(--tinta-suave); }
.nota-tasa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 14px;
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--verde);
    background: rgba(29, 77, 60, 0.08);
}
.nota-tasa .icono { width: 16px; height: 16px; }
.encabezado .nota-tasa { margin-bottom: 0; }
.tasa-grande {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--verde);
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}
.tasa-grande small { display: block; font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 13px; font-weight: 500; color: var(--tinta-suave); }
.monto-moneda { display: flex; gap: 6px; }
.monto-moneda input { flex: 1; min-width: 0; }
.monto-moneda select { width: auto !important; flex-shrink: 0; }
.fila-formulario { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: flex-end; }
.fila-formulario .campo { flex: 1; min-width: 140px; }
.fila-formulario .boton { margin-bottom: 14px; }

/* ============================================================
   APORTES Y MURO DE GRATITUD
   ============================================================ */

.tipos--tres { grid-template-columns: repeat(3, 1fr); }
.tipo-icono { color: var(--terracota); margin-bottom: 2px; }
.tipo-icono .icono { width: 22px; height: 22px; }
.tipo:has(input:checked) .tipo-icono { color: var(--verde); }

.muro-lista { list-style: none; display: flex; flex-direction: column; }
.muro-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--linea);
}
.muro-item:first-child { border-top: 0; padding-top: 4px; }
.muro-item .servicio-icono { color: var(--terracota); }
.muro-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.muro-quien {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--verde);
}
.muro-que { font-size: 14.5px; line-height: 1.5; }
.muro-mensaje { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 15px; color: var(--tinta-suave); }
.muro-gracias {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(176, 80, 58, 0.09);
    color: #7a3a28;
    font-size: 14px;
    line-height: 1.45;
}
.muro-gracias .icono { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

.gratitud-lista {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 10px;
}
.gratitud-lista li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.gratitud-lista .servicio-icono { color: var(--terracota); }
.gratitud-lista span:last-child { display: flex; flex-direction: column; min-width: 0; }
.gratitud-lista strong { font-size: 14px; }
.gratitud-lista small { font-size: 13px; color: var(--tinta-suave); }
.confirmar-aporte { flex: 2; min-width: 240px; }

@media (max-width: 640px) {
    .tipos--tres { grid-template-columns: 1fr; }
}

/* ============================================================
   FICHA DE LA CASA, REGISTRO INICIAL, CORREOS Y AVISO
   ============================================================ */

.ficha-sub {
    margin: 18px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--linea);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--verde-suave);
}
.ficha-sub:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.filas-vehiculos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.fila-vehiculo { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; }
.fila-vehiculo input {
    width: 100%;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(29, 77, 60, 0.2);
    background: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 15px;
}
.fila-vehiculo input:focus { outline: none; background: #fff; border-color: var(--verde); box-shadow: var(--anillo); }
.fila-vehiculo .placa { text-transform: uppercase; font-weight: 600; letter-spacing: 0.06em; }

.ficha-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 12px 20px;
    font-size: 14.5px;
}
.ficha-resumen dt { font-size: 12px; color: var(--tinta-suave); }
.ficha-resumen dd { font-weight: 600; word-break: break-word; }
.ficha-resumen .ancho-completo { grid-column: 1 / -1; }
.placa-chip {
    display: inline-flex;
    gap: 6px;
    margin: 2px 6px 2px 0;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(29, 77, 60, 0.08);
    font-weight: 500;
}
.placa-chip strong { letter-spacing: 0.06em; }

.pasos { flex-direction: row; gap: 6px; flex-wrap: wrap; }
.paso {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px !important;
    font-weight: 600;
    background: rgba(29, 77, 60, 0.08);
}
.paso.activo { background: var(--verde); color: #fff !important; }

.correo-tarjeta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.correo-tarjeta h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 20px; color: var(--verde); }
.correo-tarjeta .campo { width: 100%; margin-bottom: 0; }
.correo-tarjeta .boton { margin-top: auto; }
.correo-tarjeta .servicio-icono { color: var(--terracota); }

.ventanilla--aviso { width: min(520px, calc(100% - 24px)); }
.ventanilla--aviso .globo { animation: globo-aparece .5s cubic-bezier(.22, .9, .3, 1.1) both; }
.firma-aviso { margin-top: 14px; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 16px; color: var(--terracota); }

@media (max-width: 640px) {
    .fila-vehiculo { grid-template-columns: minmax(0, 1fr) 96px auto; }
}

/* ============================================================
   PANEL DE LA JUNTA
   ============================================================ */

.admin-marco {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 24px;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    flex: 1;
}
.admin-lateral {
    position: sticky;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100dvh - 28px);
    padding: 18px 12px 14px;
    border-radius: 28px;
    background: rgba(250, 246, 236, 0.66);
}
.admin-marca {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 2px 10px 6px;
    text-decoration: none;
}
.admin-marca .barra-marca { font-size: 18px; }
.admin-contenido { padding: 0; max-width: none; }

.menu--vertical {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    background: none;
    border-radius: 0;
    overflow-y: auto;
}
.menu--vertical .menu-item { padding: 9px 12px; border-radius: 14px; font-size: 14.5px; }
.menu--vertical .menu-pastilla { border-radius: 14px; }
.menu-contador {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--terracota);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.admin-usuario {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 6px 0 10px;
    border-top: 1px solid var(--linea);
}
.admin-quien { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.3; }
.admin-quien small { font-weight: 400; font-size: 12px; color: var(--tinta-suave); }

/* Acceso de la Junta como página */
.portada-contenido--centro { align-items: center; }
.acceso--pagina {
    position: static;
    width: min(400px, 100%);
    padding: 30px 30px 24px;
}
.acceso--pagina .antetitulo { margin-bottom: 6px; }

/* Botones extra */
.boton .icono { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.boton--secundario {
    background: rgba(255, 255, 255, 0.75);
    color: var(--verde);
    box-shadow: inset 0 0 0 1px rgba(29, 77, 60, 0.22);
}
.boton--secundario:hover { background: #fff; }
.boton--peligro { background: var(--terracota); box-shadow: 0 8px 18px -8px rgba(176, 80, 58, 0.8); }
.boton--peligro:hover { background: #963f2c; }
.boton-texto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--verde-suave);
    cursor: pointer;
    border-radius: 8px;
}
.boton-texto:hover { color: var(--terracota); background: rgba(176, 80, 58, 0.08); }
.boton-texto .icono { width: 15px; height: 15px; }

.encabezado-acciones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex-shrink: 0; }
.acciones-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.acciones-estado { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.formulario-panel { max-width: 760px; padding: 28px 32px; }
.titulo-pagina {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    color: var(--verde);
    margin-bottom: 20px;
}
.ayuda { display: block; margin-top: 5px; font-size: 12.5px; color: var(--tinta-suave); }
.espacio-abajo { margin-bottom: 12px; }
.campos-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tipos--dos { grid-template-columns: 1fr 1fr; }
.generar-clave { margin-top: 4px; }
.desplegable > summary { list-style: none; }
.desplegable > summary::-webkit-details-marker { display: none; }

/* Tablas de datos */
.tabla--datos th, .tabla--datos td { text-align: left; white-space: normal; vertical-align: middle; }
.tabla--datos tbody tr { transition: background .15s; }
.tabla--datos tbody tr:hover { background: rgba(255, 255, 255, 0.45); }
.tabla--datos th a { color: var(--verde); font-weight: 600; text-decoration: none; }
.tabla--datos th a:hover { text-decoration: underline; }
.tabla--datos small { display: block; font-size: 12px; }
.celda-suave { color: var(--tinta-suave); }
.celda-larga { min-width: 220px; }
.celda-avance { min-width: 150px; }
.fila-apagada { opacity: .55; }
.fila-con-icono { display: inline-flex; align-items: center; gap: 12px; }

.buscador { display: flex; gap: 8px; margin-bottom: 12px; }
.buscador input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(29, 77, 60, 0.2);
    background: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 15px;
}
.buscador input:focus { outline: none; border-color: var(--verde); box-shadow: var(--anillo); }

.filtros { padding: 8px 10px 8px 18px; }
.filtros-campos { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.filtros label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--tinta-suave); }
.filtros input, .filtros select {
    padding: 7px 10px;
    border-radius: 12px;
    border: 1px solid rgba(29, 77, 60, 0.2);
    background: rgba(255, 255, 255, 0.8);
    font: inherit;
    font-size: 14px;
}
.segmentos--suaves a { padding: 6px 14px; font-size: 13.5px; }
.indicadores--tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.indicador--enlace { text-decoration: none; color: inherit; transition: transform .2s; }
.indicador--enlace:hover { transform: translateY(-2px); }
.columnas--form { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.avance--corto { width: 140px; flex-shrink: 0; }
.avance--ancho { max-width: 420px; margin-top: 8px; }

/* Verificación de pagos */
.pago-revision { display: flex; flex-direction: column; gap: 10px; }
.pago-monto {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--verde);
    font-variant-numeric: tabular-nums;
}
.acciones-pago {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    padding-top: 12px;
    border-top: 1px solid var(--linea);
}
.rechazo { flex: 1; min-width: 200px; }
.rechazo > summary { list-style: none; cursor: pointer; }
.rechazo > summary::-webkit-details-marker { display: none; }
.rechazo[open] > summary { margin-bottom: 10px; }

/* Elegir casas y participación */
.casas-elegir { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.casa-chip { position: relative; cursor: pointer; }
.casa-chip input { position: absolute; opacity: 0; }
.casa-chip span {
    display: inline-block;
    min-width: 44px;
    padding: 6px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(29, 77, 60, 0.18);
}
.casa-chip input:checked + span { background: var(--verde); color: #fff; border-color: var(--verde); }
.casa-chip input:focus-visible + span { outline: 2px solid var(--verde); outline-offset: 2px; }

.casas-participacion { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.casas-participacion li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 6px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed rgba(29, 77, 60, 0.25);
    color: var(--tinta-suave);
}
.casas-participacion li.voto { background: rgba(46, 125, 82, 0.14); border: 1px solid rgba(46, 125, 82, 0.3); color: #1d5e3f; }
.casas-participacion .icono { width: 14px; height: 14px; }

.opciones-editables { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.opcion-editable { display: flex; gap: 6px; align-items: center; }
.opcion-editable input { flex: 1; }

.foto-reporte { display: block; margin-top: 14px; }
.foto-reporte img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 18px; }

@media (max-width: 1000px) {
    .admin-marco { grid-template-columns: minmax(0, 1fr); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    .admin-lateral, .admin-contenido, .menu--vertical { min-width: 0; }
    .admin-lateral {
        position: sticky;
        top: 8px;
        z-index: 30;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        max-height: none;
        padding: 10px 12px;
        border-radius: 24px;
    }
    .admin-marca { padding: 0 6px; }
    .admin-marca .barra-lugar { display: none; }
    .menu--vertical {
        order: 3;
        flex-basis: 100%;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .menu--vertical .menu-item { flex-shrink: 0; padding: 8px 12px; font-size: 13.5px; }
    .admin-usuario { margin: 0 0 0 auto; padding: 0; border: 0; }
    .admin-quien small { display: none; }
    .ventanilla-globos { grid-template-columns: 1fr; }
    .columnas--form { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .campos-tres, .tipos--dos { grid-template-columns: 1fr; }
    .indicadores--tres { grid-template-columns: 1fr; }
    .encabezado-acciones { justify-content: flex-start; }
    .formulario-panel { padding: 22px 18px; }
    .globo { padding: 20px 18px; border-radius: 24px; }
    .filtros { border-radius: 22px; }
    .admin-quien { display: none; }
}

/* ============================================================
   PANTALLAS MEDIANAS Y TELÉFONOS
   ============================================================ */

@media (max-width: 1320px) {
    .app-barra .barra-sep,
    .app-barra .barra-lugar { display: none; }
    .app-barra .menu-item { padding: 8px 11px; font-size: 13.5px; }
}

@media (max-width: 1120px) {
    /* El menú del vecino baja y se vuelve una barra de pestañas */
    body.app:not(.admin) { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    .app-barra { grid-template-columns: 1fr auto; }
    .app-barra .menu {
        position: fixed;
        z-index: 40;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        justify-content: space-between;
        padding: 6px;
        border-radius: 26px;
        background: rgba(250, 246, 236, 0.8);
    }
    .app-barra .menu-item {
        flex: 1;
        min-width: 0;
        flex-direction: column;
        gap: 3px;
        padding: 8px 2px 7px;
        border-radius: 20px;
        font-size: 11.5px;
    }
    .app-barra .menu-item .icono { width: 22px; height: 22px; }
    .app-barra .menu-pastilla { border-radius: 20px; }
    .app-barra .menu-largo { display: none; }
    .app-barra .menu-corto { display: inline; }
}

@media (max-width: 1000px) {
    .tarjeta { grid-template-columns: 1fr; gap: 26px; }
    .firma { margin-top: 0; }

    .tablero > .panel { grid-column: span 6; }
    .tablero > .saludo,
    .tablero > .noticias { grid-column: 1 / -1; }
    .columnas { grid-template-columns: 1fr; }
    .indicadores { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    /* Portada: la foto arriba y la tarjeta debajo */
    body.portada { background-attachment: scroll; background-size: auto 100vh; background-position: 38% 0; }
    .barra .barra-sep, .barra .barra-lugar { display: none; }
    .burbuja { padding: 8px 14px; }
    .acceso { left: 10px; right: 10px; width: auto; }
    .portada-contenido { padding: 42vh 10px 12px; }
    .tarjeta { padding: 26px 20px 22px; border-radius: 24px; }
    .lista { grid-template-columns: 1fr; }
    .futuro { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Panel: fondo fijo que sí funciona en teléfonos */
    body.app { background: #9cc3e0; }
    body.app::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        background: var(--foto) 38% 30% / cover no-repeat;
    }
    .app-barra { padding-inline: 10px; }
    .app-salir span { display: none; }
    .app-salir { padding: 8px 11px; }
    .app-contenido { padding: 8px 10px 20px; gap: 12px; }
    /* Barra de pestañas deslizable: 8 secciones no caben en pantallas angostas */
    .app-barra .menu {
        left: 6px;
        right: 6px;
        padding: 5px;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .app-barra .menu::-webkit-scrollbar { display: none; }
    .app-barra .menu-item {
        flex: 0 0 auto;
        min-width: 60px;
        padding: 8px 6px 7px;
        font-size: 10.5px;
        scroll-snap-align: center;
    }
    .app-barra .menu-item .icono { width: 20px; height: 20px; }

    .tablero { gap: 12px; }
    .tablero > .panel { grid-column: 1 / -1; }
    .tablero > .saludo { padding: 22px 20px; }
    .panel { padding: 18px; border-radius: 22px; }
    .encabezado { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 20px; }
    .encabezado-dato { align-items: flex-start; text-align: left; }
    .campos-dobles,
    .tipos { grid-template-columns: 1fr; }
    .indicadores { gap: 10px; }
    .indicador { padding: 14px 16px; }
    .indicador strong { font-size: 1.35rem; }
    .controles { border-radius: 22px; }
    .segmentos { width: 100%; }
    .segmentos a { flex: 1; }
    .periodo { width: 100%; justify-content: space-between; padding: 0 2px 2px; }
    .lista-simple > li { align-items: flex-start; }
    .saldo-monto { font-size: 2.2rem; }
}

/* ============================================================
   MOVIMIENTO
   ============================================================ */

/* Paso suave entre páginas (Edge/Chrome). La foto es igual en todas, así que no se mueve. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .38s;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

/* El vidrio aparece al instante y su contenido se asienta en cascada.
   (Se anima el contenido, nunca el elemento con backdrop-filter.) */
.app-contenido :is(.panel, .aviso, .bloque-cabeza, .controles) > * {
    animation: asentarse .6s cubic-bezier(.22, .8, .24, 1) var(--retraso, 40ms) both;
}
@keyframes asentarse {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
:is(.app-contenido, .tablero, .columnas, .columna, .tarjetas, .indicadores, .bloque) > :nth-child(2) { --retraso: 100ms; }
:is(.app-contenido, .tablero, .columnas, .columna, .tarjetas, .indicadores, .bloque) > :nth-child(3) { --retraso: 160ms; }
:is(.app-contenido, .tablero, .columnas, .columna, .tarjetas, .indicadores, .bloque) > :nth-child(4) { --retraso: 220ms; }
:is(.app-contenido, .tablero, .columnas, .columna, .tarjetas, .indicadores, .bloque) > :nth-child(5) { --retraso: 280ms; }
:is(.app-contenido, .tablero, .columnas, .columna, .tarjetas, .indicadores, .bloque) > :nth-child(n+6) { --retraso: 330ms; }

/* Las barras se llenan desde cero hasta su valor */
.avance-barra span {
    animation: llenar 1.1s cubic-bezier(.22, .8, .24, 1) calc(var(--retraso, 40ms) + 200ms) both;
}
@keyframes llenar { from { width: 0; } }

/* Respuesta al tacto */
.boton { transition: background .2s, opacity .2s, transform .15s; }
.boton:active:not(:disabled) { transform: scale(.97); }
.menu-item:active { transform: scale(.96); }
.noticia { transition: transform .3s cubic-bezier(.22, .8, .24, 1), box-shadow .3s; }
.noticia:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(15, 30, 25, 0.45); }
.opcion, .tipo { transition: border-color .2s, background .2s, box-shadow .2s, transform .15s; }
.opcion:active, .tipo:active { transform: scale(.99); }
.avance-barra span, .resultados .avance-barra span { transition: width .6s cubic-bezier(.22, .8, .24, 1); }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .tarjeta > *, .acceso > *,
    .app-contenido :is(.panel, .aviso, .bloque-cabeza, .controles) > *,
    .avance-barra span { animation: none; }
    .menu-pastilla.moviendo { transition: none; }
    .noticia:hover { transform: none; }
}

/* Barra superior sin menú (registro inicial) */
.app-barra--simple { grid-template-columns: 1fr auto; }

.texto-lineas { white-space: pre-line; }
.vista-aviso { max-width: 520px; }

.version { font-size: 11px; color: var(--tinta-suave); opacity: .75; }

.pronto-pago { color: var(--verde); font-weight: 600; }
