/* login.css - Versión con fondo animado y card más transparente */

:root {
    --primary-color: #BF52C8;
    --primary-soft: #f7ecfb;
    --accent-green: #00DD1C;
    --bg-dark: #1D1A45; /* Color azul oscuro original */
    --text-color: #111827;
    --muted-text: #6b7280;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #1D1A45 url('/tienda-online/images/background.gif') center center fixed;
    background-size: cover;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Opcional: overlay oscuro para que el card se vea mejor */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 26, 69, 0.3); /* Overlay semi-transparente */
    z-index: 0;
    pointer-events: none;
}

/* CONTENEDOR PRINCIPAL */
.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* CARD DE LOGIN - Más transparente */
.login-card {
    background: transparent;
    /*background: rgba(255, 255, 255, 0.04); /* Más transparente (antes 0.08) */
    /*backdrop-filter: blur(25px); /* Más blur */
    /*-webkit-backdrop-filter: blur(25px);*/
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde más sutil */
    position: relative;
    overflow: hidden;
}

/* Borde degradado superior */
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-green) 100%);
}

/* LOGO */
.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo a {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.login-logo a:hover {
    transform: scale(1.02);
}

.tienda-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

/* TÍTULO */
.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(191, 82, 200, 0.3);
}

/* FORMULARIO */
form {
    width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* INPUTS - Blancos para resaltar */
.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.98);
    font-size: 0.875rem;
    color: #1D1A45;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-input:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 
        0 0 0 3px rgba(191, 82, 200, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(29, 26, 69, 0.5);
}

/* PASSWORD GROUP */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(29, 26, 69, 0.6);
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: rgba(191, 82, 200, 0.15);
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 0.95rem;
}

/* CHECKBOX */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 20px;
}

.form-check-input {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    accent-color: var(--primary-color);
    transition: all 0.2s ease;
}

.form-check-input:hover {
    border-color: var(--primary-color);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* BOTÓN PRINCIPAL - Gradiente verde y morado */
.login-btn {
    width: 100%;
    padding: 13px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-green) 100%);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(191, 82, 200, 0.4),
        0 2px 8px rgba(0, 221, 28, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover:not(:disabled)::before {
    left: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(191, 82, 200, 0.5),
        0 3px 12px rgba(0, 221, 28, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ENLACES */
.forgot-password,
.back-home {
    text-align: center;
    margin-top: 14px;
    font-size: 0.8125rem;
}

.forgot-password a,
.back-home a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.forgot-password a::after,
.back-home a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-green));
    transition: width 0.3s ease;
}

.forgot-password a:hover::after,
.back-home a:hover::after {
    width: 100%;
}

.forgot-password a:hover,
.back-home a:hover {
    color: #ffffff;
}

.back-home a {
    color: rgba(255, 255, 255, 0.75);
}

/* MODAL DE ALERTA */
.alert-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-modal-backdrop.is-visible {
    display: flex;
}

.alert-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: slideUp 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-modal-header {
    font-weight: 700;
    font-size: 1.0625rem;
    margin-bottom: 8px;
    color: #1D1A45;
}

.alert-modal-body {
    margin-bottom: 18px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.875rem;
}

.alert-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.alert-modal-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-green));
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(191, 82, 200, 0.3);
}

/* ESTILOS DE ALERTA */
.alert-modal.success {
    border-left-color: var(--accent-green);
}

.alert-modal.success .alert-modal-header {
    color: var(--accent-green);
}

.alert-modal.danger {
    border-left-color: #ef4444;
}

.alert-modal.danger .alert-modal-header {
    color: #ef4444;
}

.alert-modal.warning {
    border-left-color: #f59e0b;
}

.alert-modal.warning .alert-modal-header {
    color: #f59e0b;
}

/* ===== RESPONSIVE ===== */

/* Tablets */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 28px;
    }
    
    .tienda-logo {
        height: 55px;
    }
    
    .login-title {
        font-size: 1.375rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .login-container {
        max-width: 100%;
    }
    
    .login-card {
        padding: 28px 24px;
        border-radius: 16px;
    }
    
    .tienda-logo {
        height: 50px;
    }
    
    .login-title {
        font-size: 1.25rem;
        margin-bottom: 18px;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
    
    .password-input-group .form-input {
        padding-right: 42px;
    }
    
    .password-toggle {
        width: 34px;
        height: 34px;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
    
    .form-check {
        margin: 12px 0 18px;
    }
    
    .forgot-password,
    .back-home {
        margin-top: 12px;
        font-size: 0.75rem;
    }
}

/* Móviles pequeños */
@media (max-width: 360px) {
    .login-card {
        padding: 24px 20px;
    }
    
    .tienda-logo {
        height: 45px;
    }
    
    .login-title {
        font-size: 1.125rem;
    }
    
    .form-input {
        font-size: 0.8125rem;
    }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    .login-container {
        max-width: 440px;
    }
    
    .login-card {
        padding: 40px 36px;
    }
}

/* Fondo GIF */
.gif-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/tienda-online/images/background.gif') center center;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

/* Overlay opcional para mejor contraste */
.gif-background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 26, 69, 0.4);
}

.login-container {
    position: relative;
    z-index: 1;
}