﻿:root {
    --azul: #3b82f6;
    --azul-2: #2563eb;
    --azul-3: #1d4ed8;
    --celeste: #dbeafe;
    --celeste-2: #eff6ff;
    --amarillo: #fef3c7;
    --amarillo-2: #fff7d6;
    --verde: #dcfce7;
    --verde-2: #f0fdf4;
    --lila: #ede9fe;
    --lila-2: #f5f3ff;
    --rosa: #ffe4e6;
    --rosa-2: #fff1f2;
    --fondo: #f8fbff;
    --texto: #1e293b;
    --texto-suave: #64748b;
    --blanco: #ffffff;
    --borde: #dbeafe;
    --error-bg: #fff1f2;
    --error-borde: #fecdd3;
    --error-texto: #be123c;
    --ok-bg: #ecfdf5;
    --ok-borde: #a7f3d0;
    --ok-texto: #047857;
    --warning-bg: #fff7ed;
    --warning-borde: #fdba74;
    --warning-texto: #9a3412;
    --sombra: 0 14px 34px rgba(59, 130, 246, 0.12);
    --sombra-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
    --contenedor-max: 1180px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background:
        radial-gradient(circle at top left, #dbeafe 0%, transparent 28%),
        radial-gradient(circle at top right, #fef3c7 0%, transparent 24%),
        radial-gradient(circle at bottom left, #ede9fe 0%, transparent 22%),
        radial-gradient(circle at bottom right, #dcfce7 0%, transparent 22%),
        var(--fondo);
}

/* ============================= */
/* ESTRUCTURA GENERAL */
/* ============================= */

.page-bg {
    min-height: 100vh;
    padding: 26px 16px 42px;
}

.app-container {
    max-width: var(--contenedor-max);
    margin: 0 auto;
}

.app-wrap {
    padding: 0;
}

/* ============================= */
/* TOPBAR CENTENARIO */
/* ============================= */

.topbar {
    position: relative;
    overflow: hidden;
    min-height: 130px;
    padding: 24px 44px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--borde);
    border-radius: 28px;
    box-shadow: var(--sombra);
    justify-content: center; /* 👈 centra TODO horizontal */
    backdrop-filter: blur(8px);
}

.topbar::before,
.topbar::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.topbar::before {
    width: 190px;
    height: 190px;
    background: #dbeafe;
    top: -85px;
    left: -70px;
    opacity: .45;
}

.topbar::after {
    width: 170px;
    height: 170px;
    background: #fef3c7;
    bottom: -85px;
    right: -65px;
    opacity: .45;
}

.topbar-left {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* LOGOS ARRIBA */
.logos-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.logo {
    display: block;
    height: 54px;
    max-width: 185px;
    width: auto;
    object-fit: contain;
}

/* TEXTO ABAJO */
.topbar-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.centenario-title {
    display: block;
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #1f3f75;
    line-height: 1.35;
    letter-spacing: .2px;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.centenario-title span {
    color: var(--azul);
}

.centenario-title:hover {
    color: var(--azul-2);
    transform: translateX(2px);
}

.linea {
    width: 90px;
    height: 3px;
    background: linear-gradient(90deg, var(--azul), #60a5fa);
    border-radius: 999px;
    margin: 6px 0;
}

.centenario-hand {
    font-size: 12px;
    font-weight: 800;
    color: var(--texto-suave);
}

/* ============================= */
/* INTRO TEXTO SUPERIOR */
/* ============================= */

.app-intro {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 22px 32px;
    margin-bottom: 18px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.app-intro p {
    margin: 0 auto;
    max-width: 900px;
    font-size: 16px;
    line-height: 1.65;
    color: #334155;
    font-weight: 500;
}

/* ============================= */
/* ENCABEZADO PRINCIPAL */
/* ============================= */

.app-head {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 55%, #fff6cc 100%);
    border: 1px solid var(--borde);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.10);
    padding: 34px 28px;
    margin-bottom: 24px;
    text-align: center;
}

.app-head::before,
.app-head::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: .45;
    pointer-events: none;
}

.app-head::before {
    width: 155px;
    height: 155px;
    background: #dbeafe;
    left: -55px;
    top: -65px;
}

.app-head::after {
    width: 145px;
    height: 145px;
    background: #fef3c7;
    right: -45px;
    bottom: -65px;
}

.section-tag,
.app-title,
.app-subtitle,
.welcome-badges {
    position: relative;
    z-index: 1;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: var(--azul-2);
    border: 1px solid #cfe1ff;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .25px;
    margin-bottom: 14px;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.app-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 42px;
    line-height: 1.08;
    color: #1e3a8a;
    font-weight: 900;
}

.app-subtitle {
    max-width: 820px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
}

.welcome-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

/* ============================= */
/* MENSAJES Y VALIDACIÓN */
/* ============================= */

.validation-summary {
    background: var(--warning-bg);
    border: 1px solid var(--warning-borde);
    color: var(--warning-texto);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.65;
    box-shadow: var(--sombra-soft);
}

.validation-summary ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

#mensajeFormulario {
    display: none;
    margin-bottom: 18px;
}

.alerta-exito,
.alerta-error {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: var(--sombra-soft);
}

.alerta-exito {
    background: var(--ok-bg);
    border-color: var(--ok-borde);
    color: var(--ok-texto);
}

.alerta-error {
    background: var(--error-bg);
    border-color: var(--error-borde);
    color: var(--error-texto);
}

.validator {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--error-texto);
    background: var(--error-bg);
    border: 1px solid var(--error-borde);
    border-radius: 12px;
    padding: 8px 10px;
}

/* ============================= */
/* CARDS */
/* ============================= */

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    box-shadow: var(--sombra);
    overflow: hidden;
    margin-bottom: 18px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(59, 130, 246, 0.13);
}

.form-card-head {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.card-primary .form-card-head {
    background: linear-gradient(90deg, var(--celeste), var(--celeste-2));
}

.card-success .form-card-head {
    background: linear-gradient(90deg, var(--verde), var(--verde-2));
}

.card-warning .form-card-head {
    background: linear-gradient(90deg, var(--amarillo), var(--amarillo-2));
}

.card-purple .form-card-head {
    background: linear-gradient(90deg, var(--lila), var(--lila-2));
}

.card-pink .form-card-head {
    background: linear-gradient(90deg, var(--rosa), var(--rosa-2));
}

.form-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--azul-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.card-title,
.form-card-head h3 {
    margin: 0;
    color: #1e293b;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.2;
}

.card-subtitle {
    margin: 4px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.form-card-body {
    padding: 22px;
}

.section-helper {
    background: #f8fbff;
    border: 1px solid #e3efff;
    color: #475569;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.55;
}

/* ============================= */
/* GRID Y CAMPOS */
/* ============================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.field label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    line-height: 1.4;
}

.input,
.select,
.textarea,
.file-upload {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 2px solid #dbeafe;
    border-radius: 18px;
    padding: 13px 15px;
    font-size: 14px;
    color: var(--texto);
    outline: none;
    transition: .2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.input:focus,
.select:focus,
.textarea:focus,
.file-upload:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.18);
}

.input::placeholder,
.textarea::placeholder {
    color: #94a3b8;
}

.textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.6;
}

.file-upload {
    background: #f8fbff;
    border: 2px dashed #93c5fd;
    padding: 12px;
    cursor: pointer;
}

.field-help {
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

/* ============================= */
/* DECLARACIÓN */
/* ============================= */

.check-area {
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff, #eff6ff);
    border: 1px solid #dbeafe;
    color: var(--texto);
    font-size: 14px;
    line-height: 1.7;
}

.check-area input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.08);
    vertical-align: middle;
}

/* ============================= */
/* ACCIONES */
/* ============================= */

.action-card {
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid #dbeafe;
    border-radius: 30px;
    box-shadow: var(--sombra);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.action-note {
    color: #475569;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
}

.action-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-main,
.btn-light {
    border: none;
    cursor: pointer;
    transition: .2s ease;
    font-size: 14px;
    font-weight: 900;
    border-radius: 18px;
    padding: 13px 24px;
}

.btn-main {
    background: linear-gradient(135deg, var(--azul), var(--azul-2));
    color: #fff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.btn-main:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.btn-light {
    background: #ffffff;
    color: var(--azul-2);
    border: 2px solid #bfdbfe;
}

.btn-light:hover {
    background: #eff6ff;
}

/* ============================= */
/* PANTALLAS GRANDES */
/* ============================= */

@media (min-width: 1600px) {
    :root {
        --contenedor-max: 1320px;
    }

    .page-bg {
        padding-top: 34px;
        padding-bottom: 60px;
    }

    .topbar {
        min-height: 140px;
        padding: 32px 52px;
    }

    .logo {
        height: 72px;
    }

    .centenario-title {
        font-size: 20px;
    }

    .app-title {
        font-size: 44px;
    }

    .app-subtitle {
        font-size: 17px;
        max-width: 900px;
    }

    .form-card-body {
        padding: 26px;
    }

    .input,
    .select,
    .textarea,
    .file-upload {
        font-size: 15px;
        padding: 14px 16px;
    }
}

/* ============================= */
/* TABLET */
/* ============================= */

@media (max-width: 991px) {
    .page-bg {
        padding: 18px 12px 28px;
    }

    .app-container {
        max-width: 100%;
    }

    .topbar {
        min-height: 118px;
        padding: 22px 34px;
    }

    .logo {
        height: 50px;
    }

    .centenario-title {
        font-size: 15px;
    }

    .app-title {
        font-size: 34px;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-3 {
        grid-column: span 2;
    }
}

/* ============================= */
/* MÓVIL */
/* ============================= */

@media (max-width: 768px) {
    .page-bg {
        padding: 10px 8px 18px;
    }

    .topbar {
        min-height: auto;
        padding: 20px 16px;
        margin-bottom: 14px;
        border-radius: 22px;
        text-align: center;
    }

    .topbar::before {
        width: 140px;
        height: 140px;
        top: -70px;
        left: -55px;
    }

    .topbar::after {
        width: 130px;
        height: 130px;
        bottom: -70px;
        right: -55px;
    }

    .topbar-left {
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .logos-top {
        justify-content: center;
        gap: 12px;
    }

    .logo {
        height: 40px;
        max-width: 145px;
    }

    .topbar-text {
        align-items: center;
    }

    .centenario-title {
        font-size: 14px;
    }

    .linea {
        margin-left: auto;
        margin-right: auto;
        height: 3px;
    }

    .centenario-hand {
        font-size: 11px;
    }

    .app-intro {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: 18px;
    }

    .app-intro p {
        font-size: 13px;
        line-height: 1.5;
    }

    .app-head {
        padding: 22px 14px;
        margin-bottom: 14px;
        border-radius: 24px;
    }

    .section-tag {
        font-size: 10px;
        padding: 8px 12px;
        margin-bottom: 10px;
    }

    .app-title {
        font-size: 24px;
        line-height: 1.15;
    }

    .app-subtitle {
        font-size: 13px;
        line-height: 1.5;
    }

    .welcome-badges {
        gap: 8px;
        margin-top: 14px;
    }

    .welcome-badge {
        font-size: 10px;
        padding: 8px 10px;
    }

    .validation-summary {
        font-size: 12px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .form-card {
        margin-bottom: 14px;
        border-radius: 22px;
    }

    .form-card-head {
        padding: 14px;
        gap: 10px;
        align-items: flex-start;
    }

    .form-card-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .card-title,
    .form-card-head h3 {
        font-size: 17px;
    }

    .card-subtitle {
        font-size: 12px;
    }

    .form-card-body {
        padding: 14px;
    }

    .section-helper {
        font-size: 12px;
        padding: 10px 12px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .span-2,
    .span-3 {
        grid-column: span 1 !important;
    }

    .field {
        gap: 6px;
    }

    .field label {
        font-size: 12px;
    }

    .input,
    .select,
    .textarea,
    .file-upload {
        min-height: 48px;
        font-size: 16px;
        border-radius: 16px;
        padding: 12px 14px;
    }

    .textarea {
        min-height: 125px;
    }

    .field-help {
        font-size: 11px;
    }

    .validator {
        font-size: 11px;
        padding: 7px 9px;
        border-radius: 10px;
    }

    .check-area {
        padding: 14px;
        font-size: 13px;
        border-radius: 16px;
    }

    .check-area input[type="checkbox"] {
        transform: scale(1.15);
    }

    .action-card {
        padding: 14px;
        gap: 12px;
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .action-left,
    .action-right {
        width: 100%;
    }

    .action-note {
        display: block;
        font-size: 12px;
        line-height: 1.5;
    }

    .action-right {
        flex-direction: column;
        gap: 10px;
    }

    .btn-main,
    .btn-light {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
        border-radius: 16px;
    }

    #mensajeFormulario {
        margin-bottom: 12px;
    }

    .alerta-exito,
    .alerta-error {
        font-size: 12px;
        padding: 12px 14px;
        border-radius: 14px;
    }
}

/* ===== FIX CENTRADO TOPBAR ===== */

.topbar {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
}

.topbar-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100%;
}

.logos-top {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}

.topbar-text {
    display: flex;
    flex-direction: column;
    align-items: center !important;
}

.centenario-title {
    text-align: center !important;
}