*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: #1e293b;
    background: #f8fafc;
    line-height: 1.5;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

.site-header {
    background: #0f3344;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    color: #ffffff;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
}

.site-header.nav-open .nav-toggle {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
}

.nav-toggle-bar {
    display: block;
    width: 1.35rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.site-nav a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
}

.site-nav a:hover {
    color: #bfdbfe;
    text-decoration: none;
}

.site-nav-title {
    display: none;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 28, 38, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: #ffffff;
    padding: 0.3rem 0.65rem;
    border-radius: 0.375rem;
}

.logo:hover { text-decoration: none; }

.logo-img {
    display: block;
    height: 48px;
    width: auto;
    max-width: min(280px, 70vw);
    object-fit: contain;
}

main.container,
main.main-home {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1.5rem 0;
    background: #0f3344;
    color: #ffffff;
    font-size: 0.875rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #ffffff;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 200;
    background: #ffffff;
    color: #0f3344;
    padding: 0.65rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.25rem;
}

.site-footer-nav a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.site-footer-nav a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.hero {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

.hero h1 { margin: 0 0 1rem; font-size: 2rem; line-height: 1.2; }
.hero p { margin: 0; color: #bfdbfe; max-width: 40rem; }

.hero-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.grid-3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary { background: #fff; color: #1e3a5f; }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-blue { background: #2563eb; color: #fff; }
.btn-blue:hover { background: #1d4ed8; text-decoration: none; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.captcha-group .captcha-input {
    max-width: 8rem;
}

.captcha-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}

.alert { padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.badge-green {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 999px;
}

.badge-red {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 999px;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th, .data-table td { padding: 0.5rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
.data-table th { color: #64748b; font-weight: 600; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.actions button { font-size: 0.8rem; padding: 0.35rem 0.6rem; }

.text-muted { color: #64748b; font-size: 0.875rem; }
.text-center { text-align: center; }

dl.data-list { margin: 0; }
dl.data-list div { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; }
dl.data-list dt { font-weight: 600; color: #64748b; }

.page-home .site-header { margin-bottom: 0; }
.page-registro .site-header { margin-bottom: 0; }
.page-programa .site-header {
    margin-bottom: 0;
}

.page-admin .site-header {
    margin-bottom: 0;
}

.page-admin .site-footer {
    position: relative;
    z-index: 1;
}

body.page-admin {
    position: relative;
}

body.page-admin::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #eef3f7;
    background-image: url('/assets/adminwall.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.page-admin::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

body.page-admin main,
body.page-admin .site-footer {
    position: relative;
    z-index: 1;
}

.admin-page {
    min-height: calc(100vh - 8rem);
    padding: 2rem 1rem 3rem;
}

.admin-page-inner {
    max-width: 960px;
    margin: 0 auto;
}

.page-admin .card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 45, 66, 0.12);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(15, 45, 66, 0.08);
    margin-bottom: 1.25rem;
}

.page-admin h1 {
    color: #0f2d42;
}

.page-admin h2 {
    color: #0f2d42;
}

.page-programa .site-footer {
    position: relative;
    z-index: 1;
}

body.page-programa {
    position: relative;
}

body.page-programa::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #eef3f7;
    background-image: url('/assets/programacertifica.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.page-programa::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

body.page-programa main,
body.page-programa .site-footer {
    position: relative;
    z-index: 1;
}

.main-home {
    max-width: none;
    padding: 0;
    margin: 0;
}

.home-page {
    position: relative;
    min-height: calc(100vh - 8rem);
    padding: 2.5rem 1rem 3rem;
}

.home-page::before,
.home-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-page::before {
    background: url('/assets/imagen1.webp') center / cover no-repeat;
}

.home-page::after {
    background: rgba(255, 255, 255, 0.12);
}

.home-page-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

.home-page .hero {
    background: transparent;
    color: #0f2d42;
    border-radius: 0;
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.home-page .hero h1,
.home-page .hero p {
    margin-left: auto;
    margin-right: auto;
}

.home-page .hero-actions-center {
    justify-content: center;
    margin-top: 2.5rem;
}

.home-page .btn-hero-verify {
    background: #0f2d42;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 1.25rem 3.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(15, 45, 66, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
}

.home-page .btn-hero-verify:hover {
    background: #1a4458;
    text-decoration: none;
    transform: translateY(-2px);
}

.verify-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 45, 66, 0.2);
    color: #0f2d42;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}

.hero-verify h1 {
    max-width: 36rem;
    font-size: 2.25rem;
    line-height: 1.25;
    color: #0f2d42;
}

.hero-lead {
    max-width: 34rem;
    font-size: 1.1rem;
    line-height: 1.65;
    color: #1a4458;
}

.hero-lead strong {
    color: #0a2236;
}

.verify-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 42rem;
    margin: 2rem auto 0;
    text-align: left;
}

.verify-step {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 45, 66, 0.15);
    border-radius: 0.75rem;
    padding: 1rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(15, 45, 66, 0.08);
}

.verify-step p {
    margin: 0;
    font-size: 0.9rem;
    color: #1a4458;
    line-height: 1.45;
}

.verify-step p strong {
    color: #0f2d42;
}

.verify-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #0f2d42;
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.hero-note {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    color: #3d6578;
}

.home-parish-link {
    text-align: center;
    margin: 0;
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.95rem;
    color: #1a4458;
}

.home-parish-link a {
    color: #0f2d42;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-parish-link a:hover {
    color: #0a2236;
}

.home-demo-promo {
    text-align: center;
    margin: 0;
    padding: 1.75rem 1.25rem 0.75rem;
    border-top: 1px solid rgba(15, 45, 66, 0.1);
}

.home-demo-promo p {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a4458;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.home-demo-promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: center;
    align-items: center;
}

.home-demo-link {
    color: #0f2d42;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-demo-link:hover {
    color: #0a2236;
}

/* —— Página El programa —— */

.programa-wallpaper {
    position: relative;
    min-height: calc(100vh - 8rem);
    padding: 2rem 1rem 3rem;
}

.programa-wallpaper-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

.programa-page {
    padding-bottom: 2rem;
}

.programa-hero {
    text-align: center;
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid rgba(15, 45, 66, 0.12);
    margin-bottom: 2.5rem;
}

.programa-kicker {
    color: #1a4458;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem;
}

.programa-demo-badge {
    display: inline-block;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.programa-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.programa-hero-note {
    margin: 0;
    font-size: 0.9rem;
    color: #3d6578;
}

.programa-demo-card {
    max-width: 42rem;
}

.programa-demo-list {
    margin: 1rem 0 1.25rem;
    padding-left: 1.25rem;
    color: #1a4458;
    line-height: 1.65;
}

.programa-demo-list li {
    margin-bottom: 0.5rem;
}

.programa-hero h1 {
    color: #0f2d42;
    font-size: 2rem;
    line-height: 1.25;
    margin: 0 0 1rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.programa-lead {
    color: #1a4458;
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.programa-wallpaper .btn-blue {
    background: #0f2d42;
}

.programa-wallpaper .btn-blue:hover {
    background: #1a4458;
}

.btn-lg {
    font-size: 1.05rem;
    padding: 0.85rem 1.75rem;
}

.btn-outline {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #fff;
    text-decoration: none;
    font-size: 1.05rem;
}

.btn-outline:hover {
    background: #f8fafc;
    text-decoration: none;
}

.programa-section {
    margin-bottom: 2.75rem;
}

.programa-section h2 {
    color: #0f2d42;
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
}

.programa-wallpaper .card,
.programa-wallpaper .flow-item,
.programa-wallpaper .benefit-item {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 45, 66, 0.12);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(15, 45, 66, 0.06);
}

.programa-wallpaper .programa-trust .card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 45, 66, 0.15);
}

.programa-intro p {
    margin: 0 0 1rem;
    line-height: 1.65;
}

.programa-intro p:last-child {
    margin-bottom: 0;
}

.programa-flow {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.flow-item {
    flex: 1 1 180px;
    max-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: #0f2d42;
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.flow-item h3 {
    color: #0f2d42;
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.flow-item p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.flow-arrow {
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-size: 1.5rem;
    padding: 0 0.25rem;
}

.programa-feature h3 {
    color: #0f2d42;
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.programa-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.benefit-item {
    padding: 1.25rem;
    border: 1px solid rgba(15, 45, 66, 0.12);
    border-radius: 0.75rem;
}

.benefit-item h3 {
    color: #0f2d42;
    font-size: 1rem;
    margin: 0 0 0.4rem;
}

.benefit-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
}

.programa-trust .card {
    border-color: rgba(15, 45, 66, 0.15);
}

.programa-trust h2 {
    margin-top: 0;
    color: #0f2d42;
}

.programa-cta {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #0f2d42;
    color: #fff;
    border-radius: 1rem;
    margin-top: 1rem;
    box-shadow: 0 8px 28px rgba(15, 45, 66, 0.25);
}

.programa-cta h2 {
    color: #fff;
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.programa-cta > p {
    color: #bfdbfe;
    max-width: 28rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.programa-cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.programa-cta .btn-blue {
    background: #fff;
    color: #1e3a5f;
}

.programa-cta .btn-blue:hover {
    background: #f1f5f9;
}

.programa-cta-note {
    margin: 1.25rem 0 0 !important;
    color: #93c5fd !important;
}

.programa-cta-note a {
    color: #fff;
    font-weight: 600;
}

.registro-page {
    position: relative;
    min-height: calc(100vh - 8rem);
    padding: 2.5rem 1rem 3rem;
}

.registro-page::before,
.registro-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.registro-page::before {
    background: url('/assets/registro.webp') center / cover no-repeat;
}

.registro-page::after {
    background: rgba(0, 0, 0, 0.09);
}

.registro-page-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

.registro-card {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.registro-card h1 {
    color: #1e3a5f;
}

.registro-intro {
    color: #475569;
    line-height: 1.65;
    margin: 0 0 1.25rem;
}

.registro-license-choice {
    border: 1px solid rgba(15, 45, 66, 0.12);
    border-radius: 12px;
    padding: 1rem 1rem 0.25rem;
    margin: 0 0 1.25rem;
}

.registro-license-legend {
    font-weight: 700;
    color: #1e3a5f;
    padding: 0 0.35rem;
}

.registro-license-option span {
    display: block;
}

.registro-license-option small {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
}

.home-page .hero h1 {
    color: #0f2d42;
}

.home-page .hero p {
    color: #1a4458;
}

.home-page .card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.home-page .card h2 {
    color: #1e3a5f;
}

/* —— Página Login —— */

.page-login .site-header {
    margin-bottom: 0;
}

.page-login .site-footer {
    position: relative;
    z-index: 1;
}

body.page-login {
    position: relative;
}

body.page-login::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #eef3f7;
    background-image: url('/assets/login.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.page-login::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.06);
}

body.page-login main,
body.page-login .site-footer {
    position: relative;
    z-index: 1;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 8rem);
    padding: 2rem 1rem 3rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 12px 40px rgba(15, 45, 66, 0.14);
    border: 1px solid rgba(15, 45, 66, 0.06);
}

.login-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.login-avatar {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-avatar svg {
    width: 1.65rem;
    height: 1.65rem;
}

.login-card h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #0f2d42;
    font-weight: 700;
}

.login-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.login-card-intro {
    margin: -0.75rem 0 1.25rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #64748b;
}

.login-field {
    position: relative;
    margin-bottom: 1rem;
}

.login-field input {
    width: 100%;
    padding: 0.85rem 2.75rem 0.85rem 2.75rem;
    border: none;
    border-radius: 0.65rem;
    background: #f1f5f9;
    font-size: 0.95rem;
    color: #0f2d42;
    outline: none;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.login-field input::placeholder {
    color: #94a3b8;
}

.login-field input:focus {
    background: #e8f0f7;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.login-card .captcha-group {
    margin: 0 0 1.1rem;
}

.login-card .captcha-group label {
    color: #334155;
    font-size: 0.9rem;
}

.login-card .captcha-group .captcha-input {
    max-width: 100%;
    padding: 0.75rem 0.9rem;
    border: none;
    border-radius: 0.65rem;
    background: #f1f5f9;
}

.login-field-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.login-field-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.login-toggle-pw {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0.35rem;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.login-toggle-pw:hover {
    color: #64748b;
}

.login-toggle-pw svg {
    width: 1.15rem;
    height: 1.15rem;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: #0d9488;
    cursor: pointer;
}

.login-forgot {
    font-size: 0.875rem;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit svg {
    width: 1.15rem;
    height: 1.15rem;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-alt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    background: #fff;
    color: #2563eb;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.login-alt-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

.login-alt-btn:hover {
    background: #eff6ff;
    text-decoration: none;
}

.login-register-link {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.login-register-link a {
    color: #2563eb;
    font-weight: 600;
}

@media (max-width: 700px) {
    .verify-steps {
        grid-template-columns: 1fr;
        max-width: 20rem;
    }

    .hero-verify h1 {
        font-size: 1.65rem;
    }

    .home-page .btn-hero-verify {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        width: 100%;
        max-width: 20rem;
    }

    .flow-arrow { display: none; }

    .flow-item { max-width: none; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.5rem; }
    dl.data-list div { grid-template-columns: 1fr; }
}

/* —— Página verificación —— */
body.page-verify {
    position: relative;
}

body.page-verify::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #eef6fc;
    background-image: url('/assets/walllegitimo.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.page-verify::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.06);
}

body.page-verify main,
body.page-verify .site-footer {
    position: relative;
    z-index: 1;
}

.page-verify .site-header {
    margin-bottom: 1.5rem;
}

.page-verify .site-footer {
    position: relative;
    z-index: 1;
}

.verify-page {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.verify-result-card,
.verify-details-card,
.verify-not-found,
.page-verify .card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 45, 66, 0.1);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 40px rgba(15, 45, 66, 0.1);
    border-radius: 1rem;
    overflow: hidden;
}

.verify-result-header {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 0.25rem 0.5rem;
}

.verify-result-seal {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-legitimo-img {
    display: block;
    width: min(240px, 52vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(15, 45, 66, 0.12));
}

.verify-result-seal-invalid {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fee2e2;
    border: 3px solid #fecaca;
}

.verify-invalid-mark {
    font-size: 3rem;
    line-height: 1;
    color: #b91c1c;
    font-weight: 700;
}

.verify-result-summary {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.verify-invalid-label {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b91c1c;
}

.verify-result-title {
    margin: 0 0 0.65rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.55rem, 3.5vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
    color: #0f2d42;
    letter-spacing: 0.01em;
}

.verify-result-church {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: #475569;
    font-weight: 500;
}

.verify-result-sep {
    margin: 0 0.35rem;
    color: #94a3b8;
}

.verify-result-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 0.85rem 2rem;
    margin: 0;
}

.verify-result-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.verify-result-meta dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.verify-result-meta dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f2d42;
}

.verify-details-card {
    margin-top: 1.25rem;
    padding-top: 1.5rem;
}

.verify-details-title {
    margin: 0 0 1.25rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f2d42;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.verify-details-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.verify-details-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.verify-details-item:nth-child(odd) {
    border-right: 1px solid #f8fafc;
}

.verify-details-item dt {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.verify-details-item dd {
    margin: 0;
    font-size: 0.98rem;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
}

.verify-actions {
    margin-top: 1.5rem;
}

.verify-back-btn {
    min-width: 14rem;
}

.verify-fea-card {
    margin-top: 1.25rem;
    padding-top: 1.5rem;
    border-left: 4px solid #059669;
}

.verify-fea-title {
    margin: 0 0 0.75rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #065f46;
}

.verify-fea-intro {
    margin: 0 0 1rem;
    color: #475569;
    line-height: 1.5;
}

.verify-fea-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.verify-fea-grid div {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.verify-fea-grid div:nth-child(odd) {
    border-right: 1px solid #f8fafc;
}

.verify-fea-grid dt {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.verify-fea-grid dd {
    margin: 0;
    font-size: 0.98rem;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
}

.verify-fea-hash {
    grid-column: 1 / -1;
}

.verify-fea-hash code {
    display: block;
    margin-top: 0.25rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82rem;
    word-break: break-all;
    color: #0f172a;
}

.verify-not-found h1 {
    color: #b91c1c;
    font-size: 1.5rem;
}

/* —— Panel parroquial —— */

.page-panel .main-inner {
    max-width: 1100px;
}

.panel-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.panel-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    color: #0f2d42;
}

.panel-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.panel-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 45, 66, 0.04);
}

.panel-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.panel-stat-value {
    margin-top: 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f2d42;
    line-height: 1.2;
}

.panel-stat-sub {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.panel-section h2 {
    margin-top: 0;
}

.panel-license-number {
    font-size: 1.25rem;
}

.panel-subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    color: #475569;
}

.panel-table {
    margin-top: 0.75rem;
}

.panel-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.panel-revoke-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.panel-input {
    flex: 1;
    min-width: 220px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.panel-device-history {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: #64748b;
    font-size: 0.9rem;
}

.btn-sm {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: #dcfce7; color: #166534; }
.badge-demo { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.badge-idle { background: #fef3c7; color: #92400e; }
.badge-stale { background: #fee2e2; color: #991b1b; }
.badge-never_synced { background: #e2e8f0; color: #475569; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

.panel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.panel-tab {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.panel-tab:hover {
    background: #eef2ff;
    border-color: #93c5fd;
}

.panel-tab.is-active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

.panel-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.panel-pagination-actions {
    display: flex;
    gap: 0.5rem;
}

.text-ok { color: #166534; font-weight: 600; }
.text-bad { color: #b91c1c; font-weight: 600; }

.treasury-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.treasury-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.treasury-period-btn {
    border: 1px solid #cbd5e1;
    background: #64748b;
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.treasury-period-btn.is-active {
    background: #1e3a5f;
    border-color: #1e3a5f;
}

.treasury-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.treasury-date-input {
    width: auto;
    min-width: 150px;
}

.treasury-period-label {
    margin: 0.5rem 0 1rem;
    font-size: 1.05rem;
    color: #0f2d42;
}

.treasury-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.5rem;
}

.treasury-total-row td {
    border-top: 2px solid #cbd5e1;
    background: #f8fafc;
}

.admin-license-actions {
    min-width: 220px;
}

.admin-license-actions button {
    margin: 0.15rem 0.15rem 0.15rem 0;
}

.btn-danger-text {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff;
}

.btn-danger-text:hover {
    color: #fff;
    background: #b91c1c;
    border-color: #b91c1c;
}

.mail-settings-form {
    margin-top: 0.75rem;
}

.mail-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.mail-settings-actions {
    margin-top: 1.25rem;
}

.mail-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    font-weight: 600;
    color: #334155;
}

.mail-settings-form .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}

@media (max-width: 768px) {
    .mail-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .panel-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (max-width: 640px) {
    .verify-result-header {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .verify-result-summary {
        text-align: center;
    }

    .verify-result-meta {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .verify-details-grid {
        grid-template-columns: 1fr;
    }

    .verify-details-item:nth-child(odd) {
        border-right: none;
    }

    .verify-fea-grid {
        grid-template-columns: 1fr;
    }

    .verify-fea-grid div:nth-child(odd) {
        border-right: none;
    }
}

/* —— Responsive: menú hamburguesa y sitio móvil/tablet —— */

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .site-header {
        z-index: 100;
        margin-bottom: 1.25rem;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-nav-title {
        display: block;
        margin: 0;
        padding: 0.4rem 0.75rem 0.15rem;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(191, 219, 254, 0.72);
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: 0;
        left: auto;
        width: min(15.5rem, calc(100vw - 1.75rem));
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.45rem;
        border-radius: 0.875rem;
        background: linear-gradient(165deg, #154a5f 0%, #0f3344 55%, #0c2a38 100%);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow:
            0 18px 42px rgba(0, 0, 0, 0.28),
            0 0 0 1px rgba(255, 255, 255, 0.04) inset;
        z-index: 110;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px) scale(0.97);
        transform-origin: top right;
        transition:
            opacity 0.22s ease,
            transform 0.22s ease,
            visibility 0.22s ease;
    }

    .site-header.nav-open .site-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .site-nav a {
        padding: 0.62rem 0.75rem;
        border-radius: 0.55rem;
        border-bottom: none;
        font-size: 0.925rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.94);
        transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

    .site-nav a:hover,
    .site-nav a:focus-visible {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
        text-decoration: none;
    }

    .site-nav a:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.14);
    }

    body.nav-menu-open {
        overflow: hidden;
    }

    .logo-img {
        height: 42px;
    }

    .programa-hero h1 {
        font-size: 1.65rem;
    }

    .programa-section h2 {
        font-size: 1.3rem;
    }

    .programa-cta {
        padding: 2rem 1rem;
    }

    .programa-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .programa-cta-actions .btn-blue,
    .programa-cta-actions .btn-outline {
        width: 100%;
        text-align: center;
    }

    .login-card {
        padding: 1.5rem 1.25rem 1.35rem;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 36rem;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions .btn,
    .actions button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    body.page-login::before,
    body.page-legal::before,
    body.page-admin::before,
    body.page-programa::before,
    body.page-verify::before {
        background-attachment: scroll;
    }

    .container {
        padding: 0 0.85rem;
    }

    .home-page,
    .programa-wallpaper,
    .registro-page,
    .login-page,
    .legal-page,
    .admin-page,
    .verify-page {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .hero {
        padding: 1.75rem 1.15rem;
    }

    .registro-card {
        max-width: none;
    }

    .verify-back-btn {
        width: 100%;
        min-width: 0;
    }

    .form-group input,
    .form-group select,
    .login-field input {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        padding: 0.25rem 0.5rem;
    }

    .logo-img {
        height: 36px;
        max-width: min(220px, 58vw);
    }

    .site-footer {
        font-size: 0.8rem;
        padding: 1.15rem 0;
    }

    .hero-verify h1 {
        font-size: 1.45rem;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .login-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .login-submit,
    .login-alt-btn {
        font-size: 0.9rem;
    }

    .captcha-group .captcha-input {
        max-width: none;
        width: 100%;
    }

    .verify-legitimo-img {
        width: min(200px, 70vw);
    }
}

/* Página legal / términos */

.page-legal .site-header {
    margin-bottom: 0;
}

.page-legal .site-footer {
    position: relative;
    z-index: 1;
}

body.page-legal {
    position: relative;
}

body.page-legal::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #eef3f7;
    background-image: url('/assets/tos.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

body.page-legal::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

body.page-legal main,
body.page-legal .site-footer {
    position: relative;
    z-index: 1;
}

.legal-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1rem 2.5rem;
    min-height: calc(100vh - 8rem);
}

.legal-page-card {
    padding: 1.5rem 1.75rem 2rem;
    background: rgba(255, 255, 255, 0.93);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}

.legal-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8dfd0;
}

.legal-document h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    color: #0f3344;
}

.legal-document h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #1e3a5f;
}

.legal-document p,
.legal-document li {
    line-height: 1.65;
    color: #334155;
}

.legal-document ol,
.legal-document ul {
    padding-left: 1.35rem;
    margin: 0.75rem 0 1rem;
}

.legal-document li + li {
    margin-top: 0.35rem;
}

.legal-meta {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.legal-notice {
    margin-bottom: 1.5rem;
}

.legal-refs {
    font-size: 0.95rem;
}

.legal-back {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8dfd0;
}

.legal-accept-group {
    margin-top: 0.5rem;
}

.legal-accept-label {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.5;
    cursor: pointer;
}

.legal-accept-label input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.legal-accept-label a {
    font-weight: 600;
}

/* Banner cookies — Ley 21.719 */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem;
    background: rgba(15, 51, 68, 0.97);
    color: #f8fafc;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.cookie-consent-banner[hidden] {
    display: none !important;
}

.cookie-consent-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.cookie-consent-text {
    flex: 1 1 280px;
    min-width: 0;
}

.cookie-consent-text p {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.cookie-consent-text a {
    color: #93c5fd;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-derechos .derechos-form {
    max-width: 640px;
}

.site-footer-nav {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

@media (max-width: 640px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent-actions .btn {
        width: 100%;
    }
}

.release-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 51, 68, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.release-upload-overlay[hidden] {
    display: none !important;
}

.release-upload-overlay-card {
    width: min(420px, calc(100vw - 2rem));
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.release-upload-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: release-spin 0.85s linear infinite;
}

@keyframes release-spin {
    to { transform: rotate(360deg); }
}

.release-upload-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f3344;
}

.release-upload-file {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #64748b;
    word-break: break-all;
}

.release-upload-progress-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.release-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    border-radius: 999px;
    transition: width 0.15s ease;
}

.release-upload-percent {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #1e3a5f;
}

.release-upload-hint {
    margin: 0;
    font-size: 0.85rem;
}

.release-actions-cell {
    white-space: nowrap;
}

.release-actions-cell .btn + .btn {
    margin-left: 0.25rem;
}
