/* =======================
   BASE
======================= */
:root {
    --bg-1: #6aa9ff;
    --bg-2: #8b7dff;
    --bg-3: #42c7d6;
    --text: #5b5b5b;
    --title: #6d6d6d;
    --white: #ffffff;
    --primary-100: #ede7ff;
    --primary-200: #d9c9ff;
    --primary-300: #bda5ff;
    --primary: #7a4dff;
    --primary-strong: #5b2fff;
    --accent: #a684ff;
    --shadow: 0 12px 40px rgba(63, 26, 171, .18);
    --radius-lg: 18px;
    --radius-pill: 999px;
    --fit-scale: 1;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
    color: var(--text);
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

/* =======================
   LAYOUT
======================= */
.layout {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 0.8fr 1fr;
}

/* =======================
   HERO IZQUIERDO
======================= */
.hero {
    position: relative;
    overflow: hidden;
    background: url("images/bg-hero.jpg") no-repeat center center;
    background-size: cover;
}

.hero__inner {
    height: 100%;
    padding: 32px 40px;
    display: grid;
    grid-template-rows: auto 1fr;
}

.logo-netsa {
    width: 120px;
    height: auto;
    display: block;
    opacity: 0.6;
}

.hero__logo {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-left: 0;
    text-align: center;
}

.logo-ordenform {
    width: clamp(180px, 26vw, 260px);
    height: auto;
    display: block;
    margin: 0 auto;
}

.of-sub {
    margin: 0;
    color: #ffffff;
    font-weight: 500;
    font-size: clamp(14px, 1.4vw, 18px);
    text-align: center;
}

/* =======================
   PANEL DERECHO
======================= */
.panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #fff;
}

.panel__inner {
    width: 340px;
    max-width: 90%;
    padding: 24px;
    border-radius: 16px;
}

.panel__title {
    margin: 0 0 10px 0;
    color: var(--title);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
}

.panel__lead {
    margin: 0 0 20px 0;
    color: #8c8c8c;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
}

/* =======================
   DROPZONE
======================= */
.dropzone {
    position: relative;
    width: 100%;
    border: 2px dashed var(--accent);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    color: #7e69ff;
    background: #f6f1ff;
    box-shadow: var(--shadow);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

    .dropzone:hover {
        transform: translateY(-1px);
    }

    .dropzone.dragover {
        border-color: #7a4dff;
        background: #efe8ff;
    }

/* input "invisible" que cubre toda la zona */
.dropzone__input {
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Contenido inicial */
#dropInitial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none; /* para que el click pase al input */
}

.dropzone__icon {
    display: block;
    margin: 10px auto;
    width: 30px;
    height: auto;
    opacity: 0.85;
}

.dropzone__title {
    font-weight: 600;
    margin: 4px 0;
    font-size: 14px;
}

.dropzone__hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #9a8fff;
}

/* Preview dentro del dropzone */
.dropzone__preview {
    display: none; /* se muestra cuando haya archivos */
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* =======================
   PREVIEW ITEMS
======================= */
@keyframes previewFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    60% {
        opacity: 1;
        transform: scale(1.03);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.preview-item {
    position: relative;
    width: 110px;
    height: 80px;
    animation: previewFadeIn 0.35s ease-out forwards;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.preview-remove {
    all: unset;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #ff3b3b;
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, background 0.2s ease;
}

    .preview-remove:hover {
        transform: scale(1.1);
        background: #dc0303;
    }

/* =======================
   BOTÓN SUBIR
======================= */
.btn-primary {
    width: 60%;
    padding: 10px 20px;
    border: 0;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(90, 50, 255, 0.3);
    cursor: pointer;
    transition: transform 0.06s ease, filter 0.2s ease;
    display: block;
    margin: 16px auto 0;
    text-align: center;
}

    .btn-primary:hover {
        filter: brightness(1.05);
    }

    .btn-primary:active {
        transform: translateY(1px);
    }

/* =======================
   LOADER OVERLAY (ÚNICA VERSIÓN)
======================= */
#loaderOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: none; /* se activa con JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}

.loader-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 260px;
}

/* círculo + anillo */
.loader-visual {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 4px;
}

.loader-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #7a4dff;
    animation: pulse 1.4s ease-out infinite;
}

.loader-ring {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px dashed #c5b5ff;
    animation: spin 1.2s linear infinite;
}

/* puntos animados */
.loader-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

    .loader-dots span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #7a4dff;
        animation: bounceDots 1s infinite alternate;
    }

        .loader-dots span:nth-child(2) {
            animation-delay: .15s;
        }

        .loader-dots span:nth-child(3) {
            animation-delay: .30s;
        }

#loaderRotatingText {
    font-size: 14px;
    color: #555;
    text-align: center;
    max-width: 240px;
}

/* Animaciones loader */
@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounceDots {
    from {
        transform: translateY(0);
        opacity: 0.5;
    }

    to {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* =======================
   SPLASH INICIAL
======================= */
#splash {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeOut 0.8s ease forwards;
    animation-delay: 2.2s;
}

    #splash img {
        width: 180px;
        height: auto;
        opacity: 0;
        transform: scale(0.7) rotate(0deg);
        animation: logoIn 1.2s ease forwards;
    }

@keyframes logoIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-10deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.05) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* =======================
   SELECTOR DE RESULTADO
======================= */
.resultado-selector {
    margin-top: 20px;
    text-align: center;
}

.resultado-label {
    font-size: 14px;
    font-weight: 600;
    color: #6d6d6d;
    margin-bottom: 10px;
}

.resultado-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.resultado-option {
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid #bda5ff;
    background: #f2ecff;
    color: #6a47e9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

    .resultado-option:hover {
        background: #e8dfff;
        transform: translateY(-1px);
    }

    .resultado-option.active {
        background: #7a4dff;
        color: #fff;
        border-color: #5b2fff;
        box-shadow: 0 4px 12px rgba(122, 77, 255, .35);
    }

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 992px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 40vh;
        border-bottom-left-radius: 28px;
        border-bottom-right-radius: 28px;
    }

    .hero__inner {
        padding: 20px;
    }

    .hero__logo {
        text-align: center;
        padding-left: 0;
    }

    .logo-ordenform {
        width: 200px;
    }

    .panel {
        padding: 20px;
    }

    .panel__inner {
        width: 90%;
        max-width: 360px;
    }

    .btn-primary {
        width: 70%;
    }

    .loader-box {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    #loaderOverlay {
        background: rgba(255,255,255,0.96);
    }
}


