/* Apoderats d'Alhora — segueix l'estil d'alhora.cat (tema labstrap5): Bootstrap 5, Roboto + Hanken Grotesk, vermell #FF0043 */
:root {
  --vermell: #FF0043;
  --vermell-fosc: #d90039;
  --vermell-suau: #ffe4ea;
  --negre: #09090b;
  --gris-900: #18181b;
  --gris-700: #3f3f46;
  --gris-500: #71717a;
  --gris-400: #a1a1aa;
  --gris-200: #e4e4e7;
  --gris-100: #f4f4f5;
  --gris-50: #f8f8f9;
  --verd: #18794e;
  --bs-primary: #FF0043;
  --bs-link-color: #dc3545;
  --bs-link-color-rgb: 220, 53, 69;
  --bs-link-hover-color: #a5162a;
}

body { font-family: Roboto, Arial, sans-serif; color: var(--gris-900); background: #fff; }
a { text-decoration: none; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Hanken Grotesk', Roboto, Arial, sans-serif; font-weight: 900; }
.container { max-width: 1200px; }
.container-admin { max-width: 1440px; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 992px) { .container-admin { padding-left: 2rem; padding-right: 2rem; } }

/* Botons (com al tema: negreta, farcit generós) */
.btn { font-weight: 700; }
.btn-danger { --bs-btn-bg: var(--vermell); --bs-btn-border-color: var(--vermell); --bs-btn-hover-bg: var(--vermell-fosc); --bs-btn-hover-border-color: var(--vermell-fosc);
  --bs-btn-active-bg: var(--vermell-fosc); --bs-btn-active-border-color: var(--vermell-fosc); --bs-btn-disabled-bg: var(--vermell); --bs-btn-disabled-border-color: var(--vermell); }
.btn-outline-danger { --bs-btn-color: var(--vermell); --bs-btn-border-color: var(--vermell); --bs-btn-hover-bg: var(--vermell); --bs-btn-hover-border-color: var(--vermell); --bs-btn-active-bg: var(--vermell-fosc); }
.btn-hero { padding: 1.05rem 1.5rem; font-size: 1.1rem; border-width: 1px; }
.text-danger { color: var(--vermell) !important; }

/* Banner de campanya a dalt de tot (com .banner-aporta d'alhora.cat) */
.banner-campanya { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem 1rem; padding: .55rem 1rem;
  background: var(--vermell); color: #fff; font-size: .9rem; text-align: center; }
.banner-campanya:hover { color: #fff; }
.banner-campanya__boto { background: rgba(0,0,0,.18); padding: .2rem .7rem; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.banner-campanya:hover .banner-campanya__boto { background: rgba(0,0,0,.3); }

/* Navegació */
.navbar .nav-link { color: #6c757d; font-weight: 500; }
.navbar .nav-link:hover { color: var(--gris-900); }
.marca-app { font-family: 'Hanken Grotesk', Roboto, sans-serif; font-weight: 900; font-size: 1rem; color: var(--negre); border-left: 2px solid var(--gris-200); padding-left: .6rem; line-height: 1.1; }
.navbar .btn-link.nav-link { text-decoration: none; }

/* Hero fosc (com .hero-fe de la portada) */
.hero { background: var(--negre); color: var(--gris-100); padding: 4.5rem 0 5rem; }
.hero .lead { color: var(--gris-400); font-size: 1.2rem; }
.hero .lead strong { color: #fff; }
.hero__titol { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.02em; margin: 1.2rem 0 1.4rem; color: #fff; font-weight: 900; }
.hero__titol strong { color: var(--vermell); font-weight: 900; }
.pindola { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid #27272a; background: #18181b; color: var(--gris-200); padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500; }
.pindola__punt { width: .55rem; height: .55rem; border-radius: 50%; background: var(--vermell); box-shadow: 0 0 0 0 rgba(255,0,67,.6); animation: batec 1.8s infinite; }
@keyframes batec { 0% { box-shadow: 0 0 0 0 rgba(255,0,67,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,0,67,0); } 100% { box-shadow: 0 0 0 0 rgba(255,0,67,0); } }
@media (prefers-reduced-motion: reduce) { .pindola__punt { animation: none; } }
.hero .btn-outline-light { --bs-btn-color: #fff; --bs-btn-border-color: #3f3f46; --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--negre); }
.hero__xifres { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; background: #18181b; border: 1px solid #27272a; border-radius: 1rem; padding: 1.5rem; }
.xifra { display: flex; flex-direction: column; }
.xifra--barra { grid-column: 1 / -1; border-top: 1px solid #27272a; padding-top: 1rem; }
.xifra__num { font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 2.4rem; color: #fff; line-height: 1; }
.xifra__etiqueta { color: var(--gris-400); font-size: .9rem; margin-top: .35rem; }
.xifra__etiqueta strong { color: #fff; }
.barra { height: .5rem; background: #27272a; border-radius: 999px; overflow: hidden; margin-top: .6rem; }
.barra__ple { height: 100%; background: var(--vermell); border-radius: 999px; }

/* Seccions */
.seccio { padding: 5rem 0; }
.seccio--gris { background: var(--gris-100); }
.seccio--fosca { background: var(--negre); color: var(--gris-100); }
.seccio--fosca .titol-seccio { color: #fff; }
.text-secondary-clar { color: var(--gris-400); }
.eyebrow { display: inline-block; color: var(--vermell); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .5rem; font-family: 'Hanken Grotesk', Roboto, sans-serif; }
.eyebrow--clar { color: #ff6b8e; }
.titol-seccio { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; }
.titol-gran { font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.1; }

/* Targetes numerades 01–04 (com les prioritats d'alhora.cat), fons gris */
.targeta-num { height: 100%; background: var(--gris-100); border-radius: 1rem; padding: 1.6rem; }
.targeta-num__n { display: block; font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 2.2rem; color: var(--vermell); line-height: 1; margin-bottom: .8rem; }
.targeta-num h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.targeta-num p { color: var(--gris-700); margin: 0; }

.passos { counter-reset: pas; list-style: none; padding: 0; margin: 0; }
.passos li { counter-increment: pas; position: relative; padding: 0 0 1.6rem 3.6rem; color: var(--gris-400); }
.passos li strong { color: #fff; display: block; font-size: 1.1rem; margin-bottom: .2rem; }
.passos li::before { content: counter(pas); position: absolute; left: 0; top: -.1rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--vermell); color: #fff;
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; display: grid; place-items: center; }

/* Formularis (com .form-control del tema: 3rem, fons gris clar) */
.formulari .form-control, .formulari .form-select { min-height: 3rem; border-radius: .2rem; border: 1px solid #cbc9c9; background-color: #f8f8f8; }
.formulari textarea.form-control { min-height: auto; }
.formulari .form-control:focus, .formulari .form-select:focus { border-color: var(--vermell); box-shadow: 0 0 0 .2rem rgba(255,0,67,.15); background-color: #fff; }
.formulari .form-control.is-invalid { border-color: #dc3545; }
.form-label { font-weight: 500; }
.form-check-input:checked { background-color: var(--vermell); border-color: var(--vermell); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(255,0,67,.15); border-color: var(--vermell); }
.bloc { background: #fff; border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.25rem; border: 1px solid var(--gris-200); }
.seccio--gris .bloc { border-color: transparent; }
.bloc legend { font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 1.2rem; margin-bottom: 1rem; float: left; width: 100%; padding: 0; }
.bloc legend + * { clear: left; }
.bloc--gris { background: var(--gris-100); border-color: transparent; }
.bloc--destacat { border: 2px solid var(--vermell); }
.opcio { display: flex; gap: .6rem; align-items: center; border: 1px solid #cbc9c9; background: #f8f8f8; border-radius: .2rem; padding: .75rem .9rem; cursor: pointer; height: 100%; }
.opcio:has(input:checked) { border-color: var(--vermell); background: var(--vermell-suau); }
.opcio .form-check-input { margin: 0; flex-shrink: 0; }

/* Cercador de col·legis */
.suggeriments { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); background: #fff; border: 1px solid var(--gris-200); border-radius: .4rem;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.25); max-height: 320px; overflow-y: auto; margin: 0; }
.suggeriments li { padding: .55rem .8rem; cursor: pointer; border-bottom: 1px solid var(--gris-100); }
.suggeriments li:last-child { border-bottom: 0; }
.suggeriments li.actiu, .suggeriments li:hover { background: var(--vermell-suau); }
.suggeriments .nom { font-weight: 600; }
.suggeriments .det { font-size: .82rem; color: var(--gris-500); }
.suggeriments .buit { color: var(--gris-500); cursor: default; }
.cercador-collegi .triat { border-color: var(--verd) !important; background-color: #f0faf4 !important; }

.icona-gran { font-size: 3rem; color: var(--vermell); }

/* Peu */
.peu { border-top: 4px solid #efefef; }
.peu h5 { font-size: 1rem; }

/* Àrea d'apoderats */
.capcalera-privada { background: var(--negre); color: var(--gris-100); padding: 2.5rem 0; }
.capcalera-privada .titol-gran { color: #fff; }
.capcalera-privada .lead { color: var(--gris-400); font-size: 1.1rem; }
.capcalera-privada .lead strong { color: #fff; }
.avis-coordinacio { background: var(--vermell-suau); border-left: 6px solid var(--vermell); padding: 1rem 1.2rem; border-radius: .4rem; }
.collegi-apoderat { background: var(--gris-100); border-radius: 1rem; padding: 1.5rem; }
.collegi-apoderat__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.comptador-meses { text-align: right; line-height: 1.1; }
.comptador-meses strong { display: block; font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 1.8rem; color: var(--vermell); }
.comptador-meses span { font-size: .8rem; color: var(--gris-500); }
.llista-meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.mesa-boto { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; background: var(--negre); color: #fff; border-radius: .6rem; border: 2px solid var(--negre); }
.mesa-boto:hover { color: #fff; border-color: var(--vermell); }
.mesa-boto__nom { font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 1.15rem; }
.mesa-boto__det { font-size: .85rem; color: var(--gris-400); }
.mesa-boto--feta { background: #fff; color: var(--gris-900); border-color: var(--verd); }
.mesa-boto--feta:hover { color: var(--gris-900); }
.mesa-boto--feta .mesa-boto__det { color: var(--verd); font-weight: 600; }
.mesa-boto--avis { border-color: #d97706; }
.mesa-boto--avis .mesa-boto__det { color: #b45309; }
.afegeix-mesa summary { font-size: .85rem; color: var(--gris-500); cursor: pointer; }
.pestanyes-meses { display: flex; flex-wrap: wrap; gap: .4rem; }
.pestanyes-meses a { padding: .35rem .7rem; border-radius: 999px; background: var(--gris-100); color: var(--gris-700); font-size: .85rem; font-weight: 600; }
.pestanyes-meses a.feta { color: var(--verd); }
.pestanyes-meses a.activa { background: var(--negre); color: #fff; }
.camp-num { font-variant-numeric: tabular-nums; font-size: 1.4rem; font-weight: 700; }
.camp-alhora { border: 2px solid var(--vermell) !important; font-size: 2rem; }
.valor-calculat { display: flex; align-items: center; min-height: calc(1.5em + 1rem + 2px); font-size: 1.4rem; font-weight: 700; color: var(--gris-500); font-variant-numeric: tabular-nums; }
.quadre { padding: .7rem 1rem; border-radius: .4rem; font-size: .9rem; }
.quadre--ok { background: #e7f6ee; color: var(--verd); }
.quadre--ko { background: #fff4e5; color: #92400e; }

/* Administració: panells grisos (sense targetes blanques sobre blanc) */
.seccio-admin { background: #fafafa; }
.panell { background: var(--gris-100); border-radius: 1rem; padding: 1.4rem; }
.panell--avis { background: #fff4e5; }
.panell__titol { font-size: 1.05rem; margin-bottom: 1rem; }
.panell .table { --bs-table-bg: transparent; }
.taula-admin { --bs-table-bg: transparent; }
.taula-admin thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-500); font-weight: 700; border-bottom-width: 1px; padding: .8rem; }
.taula-admin td { padding: .7rem .8rem; }
.kpi { height: 100%; background: var(--gris-100); border-radius: 1rem; padding: 1.2rem 1.3rem; display: flex; flex-direction: column; }
.kpi--fosc { background: var(--negre); color: #fff; }
.kpi--fosc .kpi__det, .kpi--fosc .kpi__etiqueta { color: var(--gris-400); }
.kpi--fosc a { color: #ff6b8e; }
.kpi__etiqueta { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gris-500); font-weight: 700; }
.kpi__valor { font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; font-size: 2.2rem; line-height: 1.1; margin: .3rem 0; font-variant-numeric: tabular-nums; }
.kpi__det { font-size: .85rem; color: var(--gris-500); }
.grafic { position: relative; height: 280px; }
.grafic--baix { height: 220px; }
.estat { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.estat--pendent { background: #fef3c7; color: #92400e; }
.estat--confirmat { background: #e0e7ff; color: #3730a3; }
.estat--assignat { background: #dcfce7; color: #166534; }
.estat--descartat { background: var(--gris-200); color: var(--gris-700); }
.etiqueta-militant { background: var(--vermell-suau); color: #a5162a; }
.pagination { --bs-pagination-active-bg: var(--negre); --bs-pagination-active-border-color: var(--negre); --bs-pagination-color: var(--gris-700); }
.mapa { height: 70vh; min-height: 420px; border-radius: 1rem; overflow: hidden; background: var(--gris-100); }
.llegenda-mapa { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.punt { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: -1px; margin-right: .2rem; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.punt--cobert { background: #18794e; }
.punt--interes { background: #f59e0b; }
.punt--buit { background: var(--vermell); }
.punt--resultat { background: #2563eb; }

/* Instruccions per als apoderats (Markdown convertit) */
.instruccions { font-size: 1.05rem; line-height: 1.65; }
.instruccions h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--gris-200); }
.instruccions h2:first-child, .instruccions .avis-instruccions + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.instruccions h3 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
.instruccions ul, .instruccions ol { padding-left: 1.3rem; }
.instruccions li { margin-bottom: .4rem; }
.instruccions ol > li::marker { font-weight: 700; color: var(--vermell); }
.instruccions strong { color: var(--negre); }
.instruccions code { background: var(--gris-100); color: var(--gris-900); padding: .1rem .35rem; border-radius: .25rem; }
.avis-instruccions { background: var(--vermell-suau); border-left: 6px solid var(--vermell); padding: .9rem 1.1rem; border-radius: .4rem; margin: 0 0 1.5rem; }
.avis-instruccions p:last-child, .avis-instruccions ul:last-child { margin-bottom: 0; }
.instruccions--previa { font-size: .95rem; background: #fff; border-radius: .6rem; padding: 1.2rem; max-height: 75vh; overflow-y: auto; }
.enllac-instruccions { display: flex; align-items: center; gap: 1rem; background: var(--negre); color: #fff; border-radius: 1rem; padding: 1.1rem 1.4rem; }
.enllac-instruccions:hover { color: #fff; outline: 2px solid var(--vermell); }
.enllac-instruccions i { font-size: 1.6rem; color: var(--vermell); }
.enllac-instruccions span { color: var(--gris-400); font-size: .9rem; }
