/* --- Loading General --- */
.loadable {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 40px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

.logo-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 107, 0.25), transparent 70%);
    z-index: 1;
    animation: glowPulse 2s ease-in-out infinite;
}

.logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    z-index: 2;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid #0ea56b;
    border-right: 2px solid #e5e7eb;
    animation: spin 1.2s linear infinite;
}

.ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border-top: 2px solid #0ea56b;
    filter: blur(6px);
    opacity: 0.6;
}

/* --- Barra de carga --- */
.line-loader {
    position: relative;
    width: 180px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.line-loader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            #0ea56b,
            #e5e7eb,
            #d43c3c,
            #0ea56b);
    background-size: 200% 100%;
    animation: flow 1.8s linear infinite;
}

/* --- Texto --- */
.loading-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-align: center;
}

.loading-text span {
    display: block;
    font-size: 0.75rem;
    color: #fbfbfb;
    margin-top: 4px;
}

/* --- Animaciones --- */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes flow {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Fin Loading General --- */


body {
    background:
        radial-gradient(circle at top left, #0f172a 0%, #111827 35%, #030712 100%);
}

/* Contenedor */
.registro-wrapper {
    padding: 20px;
}

/* Card */
.registro-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 40px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, .20);
    position: relative;
    overflow: hidden;
}

.registro-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg,
            #009245,
            #00b894,
            #d32f2f);
}

/* Logo */
.registro-logo {
    height: 120px;
    max-width: 100%;
    margin-bottom: 10px;
}

/* Badge */
.registro-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Títulos */
.registro-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.registro-subtitle {
    color: #0e0e0e;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Información del reporte */
.reporte-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 30px;
}

.reporte-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reporte-item:not(:last-child) {
    margin-bottom: 14px;
}

.reporte-item i {
    color: #009245;
    width: 18px;
}

/* Formulario */
.form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: .4rem;
}

.form-control-modern,
.form-select {
    border-radius: 12px;
    border: 1px solid #dbe2ea;
    background: #fafafa;
    padding: .65rem .9rem;
    transition: .25s;
}

.form-control-modern:focus,
.form-select:focus {
    background: #fff;
    border-color: #009245;
    box-shadow: 0 0 0 .15rem rgba(0, 146, 69, .15);
}

/* Mensaje descarga */
.descarga-alert {
    border-radius: 12px;
    font-size: .9rem;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Botón */
.btn-registro {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-weight: 600;
    transition: .25s;
}

.btn-registro:hover {
    background: #111827;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .20);
}

/* ===== MOBILE ===== */
@media (max-width: 575px) {
    .registro-card {
        padding: 25px 20px;
        border-radius: 20px;
    }
    .registro-logo {
        height: 85px;
    }
    .registro-title {
        font-size: 1.5rem;
    }
    .registro-subtitle {
        font-size: .92rem;
    }
    .registro-badge {
        font-size: .75rem;
        padding: 6px 14px;
    }
}

/* ===== TABLET ===== */
@media (min-width:576px) and (max-width:991px) {
    .registro-card {
        padding: 35px;
    }
    .registro-logo {
        height: 100px;
    }
    .registro-title {
        font-size: 1.8rem;
    }
}

/* ===== DESKTOP ===== */
@media (min-width:1200px) {
    .registro-card {
        padding: 50px;
    }
    .registro-logo {
        height: 140px;
    }
    .registro-title {
        font-size: 2.2rem;
    }
}

.invalid-feedback-custom {
    display: none;
    color: #dc3545;
    font-size: .875rem;
    margin-top: 4px;
    font-weight: 500;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545 !important;
}

.select2-container.is-invalid .select2-selection {
    border-color: #dc3545 !important;
}