/* ══════════════════════════════════════════════════════════
   LOGIN.CSS — Villa Natura Peru SAC
   ══════════════════════════════════════════════════════════ */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes ring-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 6px  rgba(249,115,22,0.22),
            0 0 0 13px rgba(249,115,22,0.10),
            0 0 0 20px rgba(82,183,136,0.08),
            0 18px 40px rgba(45,106,79,0.26);
    }
    50% {
        box-shadow:
            0 0 0 9px  rgba(249,115,22,0.28),
            0 0 0 18px rgba(249,115,22,0.12),
            0 0 0 26px rgba(82,183,136,0.10),
            0 18px 40px rgba(45,106,79,0.26);
    }
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0px);   }
    50%       { transform: translateY(-7px); }
}

@keyframes orb-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1);       opacity: 0.55; }
    33%       { transform: translate(12px, -18px) scale(1.08); opacity: 0.70; }
    66%       { transform: translate(-8px, 10px) scale(0.94);  opacity: 0.50; }
}
@keyframes orb-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1);       opacity: 0.40; }
    40%       { transform: translate(-14px, 12px) scale(1.10); opacity: 0.60; }
    70%       { transform: translate(10px, -8px) scale(0.92);  opacity: 0.35; }
}
@keyframes orb-drift-3 {
    0%, 100% { transform: translate(0, 0);        opacity: 0.30; }
    50%       { transform: translate(8px, 14px);  opacity: 0.48; }
}

@keyframes accent-slide {
    0%   { width: 0; opacity: 0; }
    100% { width: 44px; opacity: 1; }
}

@keyframes btn-shimmer {
    0%   { background-position: -300% center; }
    100% { background-position: 300% center;  }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Fondo de página ──────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(118deg, rgba(255,255,255,0.11) 0 1px, transparent 1px 100%),
        linear-gradient(28deg,  rgba(255,255,255,0.08) 0 1px, transparent 1px 100%),
        radial-gradient(ellipse at 12% 16%, rgba(82,183,136,0.36), transparent 26%),
        radial-gradient(ellipse at 78% 82%, rgba(249,115,22,0.20), transparent 28%),
        radial-gradient(ellipse at 88% 10%, rgba(45,106,79,0.18), transparent 22%),
        linear-gradient(138deg, #071810 0%, #0f2d1e 28%, #1b4332 44%, #dff0e3 44.4%, #f0f8f1 100%);
    background-size: 46px 46px, 60px 60px, auto, auto, auto, auto;
}

/* ── Tarjeta contenedor ───────────────────────────────────── */
.login-container {
    position: relative;
    display: flex;
    width: 980px;
    max-width: 100%;
    min-height: 580px;
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow:
        0 40px 100px rgba(2,15,8,0.30),
        0 16px 40px rgba(27,67,50,0.22),
        0 4px 12px rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.95);
}


/* ── Orbes decorativos panel izquierdo ────────────────────── */
.login-left-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(32px);
}
.login-left-orb--1 {
    width: 200px; height: 200px;
    top: -60px; left: -60px;
    background: radial-gradient(circle, rgba(82,183,136,0.45), transparent 70%);
    animation: orb-drift-1 9s ease-in-out infinite;
}
.login-left-orb--2 {
    width: 160px; height: 160px;
    bottom: -40px; right: -40px;
    background: radial-gradient(circle, rgba(249,115,22,0.30), transparent 70%);
    animation: orb-drift-2 11s ease-in-out infinite;
}
.login-left-orb--3 {
    width: 120px; height: 120px;
    bottom: 30%; left: 10%;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    animation: orb-drift-3 13s ease-in-out infinite;
}

/* ── Panel izquierdo ──────────────────────────────────────── */
.login-left {
    flex: 1;
    position: relative;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 100%),
        radial-gradient(circle at 26% 18%, rgba(255,255,255,0.14), transparent 32%),
        linear-gradient(158deg, #071810 0%, #0f2d1e 34%, #1b4332 62%, #2d6a4f 100%);
    background-size: 36px 36px, auto, auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 44px;
    overflow: hidden;
}

/* Borde interior decorativo */
.login-left::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    box-shadow:
        inset 0 0 50px rgba(255,255,255,0.05),
        inset 0 0 1px rgba(82,183,136,0.20);
    pointer-events: none;
    z-index: 0;
}

/* Logo Villa Natura */
.login-logo {
    position: relative;
    z-index: 1;
    max-width: 390px;
    width: 88%;
    height: auto;
    object-fit: contain;
    border-radius: 22px;
    filter: brightness(1.12) contrast(1.18) saturate(1.15) drop-shadow(0 22px 40px rgba(0,0,0,0.50));
    animation: logo-float 5s ease-in-out infinite;
}

/* ── Badge panel izquierdo ────────────────────────────────── */
.login-left-text {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-left-text p {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 900;
    color: #ffffff;
    padding: 10px 20px;
    border: 1.5px solid rgba(255,255,255,0.26);
    border-left: 3px solid #f97316;
    border-radius: 8px;
    background: rgba(7,24,16,0.34);
    letter-spacing: 0.4px;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 8px 22px rgba(2,15,8,0.28),
        0 0 0 1px rgba(249,115,22,0.08);
    text-shadow: 0 3px 10px rgba(2,15,8,0.40);
}

.badge-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 6px rgba(249,115,22,0.80);
    flex-shrink: 0;
}

.login-left-text span {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.3px;
}

/* ── Panel derecho ────────────────────────────────────────── */
.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 48px 40px;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(210,244,220,0.80), transparent 38%),
        radial-gradient(ellipse at 96% 96%, rgba(255,232,210,0.36), transparent 30%),
        #ffffff;
}

/* ── Avatar ───────────────────────────────────────────────── */
.login-avatar {
    width: 164px;
    height: 164px;
    border-radius: 50%;
    margin: 0 auto 20px;
    padding: 10px;
    background: linear-gradient(145deg, #d1fae5 0%, #f0fdf4 44%, #bbf7d0 100%);
    overflow: hidden;
    flex-shrink: 0;
    border: 2.5px solid #f97316;
    animation: ring-pulse 3.5s ease-in-out infinite;
}

.login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── Título ───────────────────────────────────────────────── */
.login-right h2 {
    font-size: 30px;
    font-weight: 800;
    color: #0a1f12;
    margin-bottom: 4px;
    text-align: center;
}

/* Barra acento naranja animada */
.login-right h2::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #fdba74);
    border-radius: 2px;
    margin: 0 auto 12px;
    animation: accent-slide 0.6s ease-out both;
}

.login-subtitulo {
    font-size: 13.5px;
    color: #607b6c;
    text-align: center;
    margin-bottom: 14px;
}

/* ── Divisor "acceso seguro" ──────────────────────────────── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 18px;
}

.login-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c8ddd2);
}

.login-divider span:last-child {
    background: linear-gradient(90deg, #c8ddd2, transparent);
}

.login-divider small {
    font-size: 10.5px;
    font-weight: 700;
    color: #8fb5a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ── Formulario ───────────────────────────────────────────── */
form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-grupo label {
    font-size: 13px;
    font-weight: 700;
    color: #2a4a38;
    letter-spacing: 0.2px;
}

/* ── Wrapper con icono ────────────────────────────────────── */
.input-icono-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icono {
    position: absolute;
    left: 14px;
    font-size: 0.88rem;
    color: #7aab90;
    pointer-events: none;
    z-index: 1;
}

.form-grupo input {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px 14px 42px;
    border: 1.5px solid #c4d9cc;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: #0a1f12;
    background: #f5faf6;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.form-grupo input::placeholder {
    color: #9ab8a8;
    font-size: 13px;
    font-weight: 500;
}

.form-grupo input:focus {
    border-color: #2d6a4f;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(45,106,79,0.12),
        inset 3px 0 0 #2d6a4f;
}

/* ── Campo contraseña ─────────────────────────────────────── */
.input-password input {
    padding-right: 90px;
}

.input-password button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    min-width: 62px;
    min-height: 34px;
    padding: 0 12px;
    border: 1.5px solid #a7d5bb;
    border-radius: 8px;
    background: #edf7f1;
    color: #2d6a4f;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

.input-password button:hover {
    border-color: #2d6a4f;
    background: #d1fae5;
    color: #1b4332;
}

/* ── Error ────────────────────────────────────────────────── */
.login-error {
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1.5px solid #fecaca;
}

/* ── Botón submit ─────────────────────────────────────────── */
.btn-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 52px;
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4px;
    box-shadow:
        0 10px 28px rgba(45,106,79,0.34),
        0 3px 8px rgba(45,106,79,0.20),
        inset 0 1px 0 rgba(255,255,255,0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Shimmer al hover */
.btn-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255,255,255,0.18) 50%,
        transparent 70%
    );
    background-size: 300% 100%;
    background-position: -300% center;
    transition: background-position 0s;
}

.btn-submit:hover::after {
    background-position: 300% center;
    transition: background-position 0.55s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
        0 18px 36px rgba(45,106,79,0.38),
        0 6px 14px rgba(45,106,79,0.24),
        inset 0 1px 0 rgba(255,255,255,0.16);
}

.btn-submit:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.36);
    border-top-color: #ffffff;
    border-radius: 9999px;
    animation: spin 700ms linear infinite;
    flex-shrink: 0;
}

/* ── Firma ────────────────────────────────────────────────── */
.login-footer-card {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e2ece6;
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.login-footer-card span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #f97316;
    letter-spacing: 0.3px;
}

.login-footer-card small {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 600;
    color: #7a9e8a;
    line-height: 1.4;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 760px) {
    .login-container {
        flex-direction: column;
        min-height: 0;
    }
    .login-left {
        min-height: 230px;
        padding: 36px;
    }
    .login-logo {
        max-width: 210px;
        animation: none;
    }
    .login-right {
        padding: 36px 24px 32px;
    }
    .login-avatar {
        width: 120px;
        height: 120px;
    }
}
