/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.login-content {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    border-radius: 30px;
    overflow: hidden;
    border: 3px solid transparent;
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), var(--primary-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 20px rgba(240, 116, 0, 0.6), 0 0 40px rgba(240, 116, 0, 0.4), 0 0 60px rgba(0, 180, 255, 0.3), 0 0 80px rgba(0, 180, 255, 0.2);
}

/* Columna Izquierda - Bienvenida */
.login-welcome {
    flex: 1;
    background: var(--primary-gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.welcome-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 400px;
    text-align: center;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Formas Decorativas */
.decorative-shape {
    position: absolute;
    border-radius: 50px;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.6), rgba(255, 94, 77, 0.6));
    top: -50px;
    left: -50px;
    transform: rotate(-45deg);
    animation-delay: 0s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.5), rgba(255, 94, 77, 0.5));
    bottom: 20%;
    left: 10%;
    transform: rotate(-30deg);
    animation-delay: 1s;
}

.shape-3 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(255, 160, 60, 0.5), rgba(255, 120, 100, 0.5));
    top: 30%;
    right: -30px;
    transform: rotate(-60deg);
    animation-delay: 2s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.4), rgba(255, 94, 77, 0.4));
    bottom: -40px;
    right: 20%;
    transform: rotate(-20deg);
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotation, -45deg));
    }
    50% {
        transform: translateY(-20px) rotate(var(--rotation, -45deg));
    }
}

.shape-1 { --rotation: -45deg; }
.shape-2 { --rotation: -30deg; }
.shape-3 { --rotation: -60deg; }
.shape-4 { --rotation: -20deg; }

/* Columna Derecha - Formulario */
.login-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    padding: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transform: translateY(-0.5rem);
}

.login-logo img {
    width: 220px;
    height: auto;
    aspect-ratio: 1011 / 680;
    display: block;
}

:root.light-mode .login-logo img,
.light-mode .login-logo img {
    filter: invert(1) hue-rotate(180deg);
}

.login-form {
    background: transparent;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--border-color);
    border-radius: 10px !important;
    -webkit-border-radius: 10px !important;
    -moz-border-radius: 10px !important;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(240, 116, 0, 0.2);
}

.login-input::placeholder {
    color: var(--text-secondary);
}

/* Prevenir cambio de fondo en autocomplete de Chrome */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
    border: 2px solid var(--border-color) !important;
    border-radius: 10px !important;
}

/* Asegurar que el autofill mantenga el color de borde en focus */
.login-input:-webkit-autofill:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(240, 116, 0, 0.2), 0 0 0 30px var(--input-bg) inset !important;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 3px 10px rgba(240, 116, 0, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #d86800, #0096d9);
    box-shadow: 0 5px 15px rgba(240, 116, 0, 0.45);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(240, 116, 0, 0.3);
}

.login-footer {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Footer en modo oscuro - animación a blanco */
[data-theme="dark"] .login-footer {
    animation: fadeToWhite 1.5s ease-out forwards;
}

/* Footer en modo claro - animación a negro */
[data-theme="light"] .login-footer {
    animation: fadeToBlack 1.5s ease-out forwards;
}

@keyframes fadeToWhite {
    0% {
        opacity: 0;
        color: #666666;
        font-weight: 400;
    }
    100% {
        opacity: 0.7;
        color: #ffffff;
        font-weight: 700;
    }
}

@keyframes fadeToBlack {
    0% {
        opacity: 0;
        color: #999999;
        font-weight: 400;
    }
    100% {
        opacity: 0.7;
        color: #000000;
        font-weight: 700;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .login-content {
        max-width: 900px;
        height: 550px;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .login-content {
        flex-direction: column;
        height: auto;
        max-width: 500px;
        margin: 1rem;
    }

    .login-welcome {
        min-height: 250px;
        padding: 2rem;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .welcome-subtitle {
        font-size: 0.95rem;
    }

    .decorative-shape {
        opacity: 0.4;
    }

    .shape-1 {
        width: 150px;
        height: 150px;
    }

    .shape-2 {
        width: 180px;
        height: 180px;
    }

    .shape-3 {
        width: 130px;
        height: 130px;
    }

    .shape-4 {
        width: 120px;
        height: 120px;
    }

    .login-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .login-form {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .login-form h2 {
        font-size: 1.5rem;
    }

    .login-input {
        font-size: 0.95rem;
        padding: 13px 13px 13px 45px;
    }

    .input-icon {
        left: 12px;
    }

    .btn-login {
        padding: 13px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-content {
        margin: 0.5rem;
        border-radius: 20px;
    }

    .login-welcome {
        min-height: 200px;
        padding: 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .login-form-wrapper {
        padding: 1.5rem 1rem;
    }

    .login-form {
        padding: 1.5rem 1.25rem;
        border-radius: 15px;
        border-width: 2px;
    }

    .login-logo img {
        width: 180px;
    }

    .login-form h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .input-group {
        margin-bottom: 1.25rem;
    }

    .login-input {
        font-size: 0.9rem;
        padding: 12px 12px 12px 42px;
    }

    .input-icon svg {
        width: 18px;
        height: 18px;
    }

    .btn-login {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* ============================================================================
   MODAL DE CAMBIO DE CONTRASEÑA - PRIMER INGRESO
   (Diseño idéntico a Plat_MonsterMain)
   ============================================================================ */

.chgpwd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: chgpwdFadeIn 0.2s ease;
}

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

.chgpwd-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 460px;
    width: 90%;
    overflow: hidden;
    animation: chgpwdSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 80px rgba(0, 0, 0, 0.2);
}

@keyframes chgpwdSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chgpwd-header {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.9), rgba(0, 180, 255, 0.9));
    padding: 30px 32px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.chgpwd-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 80% 20%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(ellipse 60% 50% at 10% 80%, rgba(255, 255, 255, 0.05), transparent);
}

.chgpwd-header-decoration {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.chgpwd-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
}

.chgpwd-header p {
    font-size: 13px;
    opacity: 0.85;
    position: relative;
}

.chgpwd-body {
    padding: 28px 32px;
}

.chgpwd-field {
    margin-bottom: 18px;
}

.chgpwd-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.chgpwd-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.chgpwd-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(240, 116, 0, 0.12);
    background: rgba(240, 116, 0, 0.03);
}

.chgpwd-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Gradient Divider */
.chgpwd-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #F07400, #00b4ff, transparent);
    margin-bottom: 18px;
}

/* Strength Bar */
.strength-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.strength-bar {
    flex: 1;
    height: 5px;
    background: var(--input-bg);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 11px;
    font-weight: 700;
    min-width: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Requirements List */
.pwd-requirements {
    list-style: none;
    margin-bottom: 24px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}

.pwd-requirements li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.pwd-requirements li.met {
    color: #28a745;
}

.pwd-requirements .req-icon {
    font-size: 13px;
    width: 16px;
    text-align: center;
    transition: transform 0.3s;
}

.pwd-requirements li.met .req-icon {
    transform: scale(1.2);
}

.chgpwd-error {
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    padding: 10px;
    background: rgba(255, 61, 113, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 61, 113, 0.15);
}

.chgpwd-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.chgpwd-btn-primary,
.chgpwd-btn-secondary {
    padding: 12px 28px;
    font-size: 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.chgpwd-btn-secondary {
    background: var(--input-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.chgpwd-btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.chgpwd-btn-primary {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(240, 116, 0, 0.3);
}

.chgpwd-btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(240, 116, 0, 0.45);
    transform: translateY(-1px);
}

.chgpwd-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 540px) {
    .chgpwd-container {
        width: 95%;
        border-radius: 16px;
    }

    .chgpwd-header {
        padding: 24px 20px;
    }

    .chgpwd-header h2 {
        font-size: 18px;
    }

    .chgpwd-body {
        padding: 20px;
    }

    .pwd-requirements {
        grid-template-columns: 1fr;
    }

    .chgpwd-buttons {
        flex-direction: column;
    }

    .chgpwd-btn-primary,
    .chgpwd-btn-secondary {
        width: 100%;
        text-align: center;
    }
}
