:root {
    --dark-bg: #1a1a2e;
    --dark-secondary: #16213e;
    --accent: #ff2e63;
    --accent-hover: #ff0f52;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --purple: #7f5af0;
    --teal: #2cb67d;
    --cyan: #4ea8de;
    --error: #ff495c;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
}


/*
.wave-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient( ellipse at 70% 40%, var(--purple) 0%, transparent 70%);
    opacity: 0.3;
    z-index: 0;
}
*/

.wave-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 100%;
    height: 140%;
    background: radial-gradient( ellipse at 30% 50%, var(--cyan) 0%, transparent 70%);
    opacity: 0.2;
}

.wave-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 80%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient( ellipse, var(--teal) 0%, transparent 70%);
    opacity: 0.15;
}

.login-panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 940px;
    min-height: 500px;
    background-color: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-card {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-panel {
    flex: 1.5;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.8) 0%, rgba(26, 26, 46, 0.9) 100%);
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-panel h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.welcome-panel p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 80%;
    font-weight: 500;
}

.welcome-panel .subtitle {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.admin-badge {
    display: inline-block;
    background-color: rgba(255, 46, 99, 0.2);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 46, 99, 0.3);
}

.welcome-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.1;
    z-index: 1;
}

.shield-icon {
    font-size: 12rem;
    color: var(--accent);
}

form {
    margin-bottom: 2rem;
}

.error-message {
    background-color: rgba(255, 73, 92, 0.15);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--error);
}

.warning-message {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #ffc107;
}

.success-message {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #28a745;
}

.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.07);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-light);
}

.remember-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-check {
    display: flex;
    align-items: center;
}

.remember-check input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--accent);
}

.remember-check label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forgot-link:hover {
    color: var(--text-light);
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.login-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    gap: 0.75rem;
    text-align: center;
}

.option-btn i {
    font-size: 1rem;
}

.option-btn span {
    flex: 1;
    text-align: center;
}

.vendor-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vendor-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.whatsapp-btn {
    background-color: rgba(37, 211, 102, 0.2);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: rgba(37, 211, 102, 0.3);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.welcome-content {
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 900px) {
    .login-panel {
        flex-direction: column-reverse;
        max-width: 450px;
    }
    .login-card {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .welcome-panel {
        padding: 2rem 2.5rem;
        min-height: 180px;
    }
    .welcome-panel h1 {
        font-size: 2.5rem;
    }
    .welcome-panel p {
        max-width: 100%;
    }
    .shield-icon {
        font-size: 8rem;
    }
}

@media (max-width: 480px) {
    .login-card,
    .welcome-panel {
        padding: 1.5rem;
    }
    .welcome-panel h1 {
        font-size: 2rem;
    }
    .remember-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.recover-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.recover-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.recover-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.success-message {
    background-color: rgba(44, 182, 125, 0.15);
    color: var(--teal);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--teal);
}

.back-to-login {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-light);
}

.password-requirements {
    margin: -0.5rem 0 1rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toggle-password-confirm {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-password-confirm:hover {
    color: var(--text-light);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s !important;
    -webkit-text-fill-color: var(--text-light) !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

input.autofill,
input.autofill:hover,
input.autofill:focus,
input.autofill:active {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-light) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}


/*nuevo css*/

.error-message.fade-out {
    opacity: 0 !important;
    transition: opacity 0.8s ease-out;
}

.wave-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: transparent;

    opacity: 0.3;
    z-index: 0;
    background-image: url('../img/fondoimagen.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: fixed;
    opacity: 0.2;
    animation: gentleFloat 18s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%,
    100% {
        transform: translateY(0);
        background-position: center 10%;
    }
    25% {
        transform: translateY(-10px);
        background-position: center 12%;
    }
    50% {
        transform: translateY(-5px);
        background-position: center 15%;
    }
    75% {
        transform: translateY(-15px);
        background-position: center 8%;
    }
}

.wave-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #fff0 0%, rgb(8 15 40) 100%);
    opacity: 0.3;
    z-index: 2;
    mix-blend-mode: overlay;
}