/* ===== VARIABLES GLOBALES ===== */
:root {
    --color-dark: #1a1a1a;
    --color-gold: #ec971f;
    --color-light: #f8f9fa;
    --color-danger: #e74c3c;
    --color-success: #27ae60;
    --color-border: #333333;
    --color-text: #ffffff;
    --color-text-dark: #1a1a1a;
    --color-text-muted: #999999;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.3s ease-in-out;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

/* ===== RESET GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-dark);
    color: var(--color-text);
    overflow: hidden;
}

/* ===== CONTENEDOR PRINCIPAL DE LOGIN ===== */
.container-login {
    display: flex;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
}

/* ===== PANEL IZQUIERDO - BRANDING ===== */
.panel-left {
    flex: 1;
    background: linear-gradient(135deg, var(--color-dark) 0%, #0f0f0f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Efecto de fondo decorativo */
.panel-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 151, 31, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0px, 0px); }
    50% { transform: translate(30px, 30px); }
}

.branding-section {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1400px; /* ampliar para el logo más grande */
}

/* ===== LOGO ===== */
.logo-container {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.logo-placeholder {
    width: 90%;
    max-width: 1082px; /* 832 * 1.3 ≈ 1082 */
    height: 304px; /* 234 * 1.3 ≈ 304 */
    background: #ffffff; /* fondo blanco limpio para que el nombre sea legible */
    border-radius: 12px; /* rectángulo con esquinas suaves */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 29px 36px; /* aumentado ~30% */
    border: 2px solid rgba(236,151,31,0.12); /* borde vistoso pero sutil */
    box-shadow: 0 26px 78px rgba(0, 0, 0, 0.12);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.logo-placeholder:hover {
    transform: translateY(-6px);
    box-shadow: 0 60px 130px rgba(236, 151, 31, 0.16);
}

/* Imagen del logo: ajusta tamaño y mantiene proporciones; no recortar texto */
.logo-image {
    display: block;
    max-width: 99%;
    max-height: 99%;
    object-fit: contain;
    background: transparent;
    border-radius: 0; /* mantener esquinas del logo tal cual */
}

/* Override: asegurar que el logo no se muestre en círculo
   (algunas reglas globales podrían aplicar border-radius) */
.branding-section .logo-placeholder {
    border-radius: 12px !important;
}
.branding-section .logo-placeholder .logo-image {
    border-radius: 0 !important;
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.logo-placeholder p {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BRANDING TEXT ===== */
.brand-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 50px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ===== FEATURES LIST ===== */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* reducir espacio para dar más lugar al logo */
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px; /* más compacto */
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    background-color: rgba(236, 151, 31, 0.08);
    padding-left: 12px;
}

.feature-item i {
    color: var(--color-gold);
    font-size: 20px;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ===== PANEL DERECHO - FORMULARIO ===== */
.panel-right {
    flex: 1;
    background: linear-gradient(135deg, #242424 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-container {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    padding: 36px;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(6px);
}

/* ===== HEADER DEL FORMULARIO ===== */
.form-header {
    margin-bottom: 40px;
    text-align: center;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ===== INPUTS Y BOTONES MODERNOS ===== */
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}

.input-wrapper i {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: var(--color-text);
    width: 100%;
    font-size: 14px;
    padding: 8px 0;
}

.toggle-password {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(90deg, var(--color-gold), #d8860f);
    color: var(--color-dark);
    box-shadow: 0 8px 30px rgba(216,134,15,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(216,134,15,0.22);
}

.error-message {
    color: var(--color-danger);
    font-size: 12px;
    min-height: 16px;
}

.form-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .container-login {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .panel-left {
        padding: 28px 24px;
        min-height: 38vh;
    }

    .panel-right {
        padding: 24px;
    }

    .branding-section {
        max-width: 320px;
    }

    .logo-placeholder {
        width: 541px; /* 416 * 1.3 ≈ 541 */
        height: 203px; /* 156 * 1.3 ≈ 203 */
        padding: 23px 29px;
    }

    .brand-title {
        font-size: 36px;
    }
}

/* ===== FORMULARIO ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== INPUT WRAPPER ===== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #333333;
    border: 2px solid #444444;
    border-radius: var(--border-radius-lg);
    padding: 12px 16px;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    background-color: #3a3a3a;
    border-color: var(--color-gold);
    box-shadow: 0 0 20px rgba(236, 151, 31, 0.2);
}

.input-wrapper i {
    color: var(--color-text-muted);
    margin-right: 12px;
    font-size: 16px;
    transition: var(--transition);
}

.input-wrapper:focus-within i {
    color: var(--color-gold);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    padding: 0;
}

.input-wrapper input::placeholder {
    color: var(--color-text-muted);
}

.input-wrapper input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #333333 inset !important;
    -webkit-text-fill-color: var(--color-text) !important;
}

/* ===== BOTÓN MOSTRAR/OCULTAR CONTRASEÑA ===== */
.toggle-password {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: var(--transition);
    margin-left: 8px;
}

.toggle-password:hover {
    color: var(--color-gold);
}

/* ===== MENSAJE DE ERROR ===== */
.error-message {
    font-size: 12px;
    color: var(--color-danger);
    padding-left: 4px;
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

.error-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== OPCIONES DEL FORMULARIO ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition);
    font-weight: 500;
}

.remember-me:hover {
    color: var(--color-gold);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-gold);
    border-radius: 4px;
}

.forgot-password {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: #ffa42d;
    text-decoration: underline;
}

/* ===== BOTÓN LOGIN ===== */
.btn-login {
    background: linear-gradient(135deg, var(--color-gold) 0%, #d8860f 100%);
    color: var(--color-dark);
    border: none;
    padding: 14px 24px;
    border-radius: var(--border-radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(236, 151, 31, 0.3);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(236, 151, 31, 0.4);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login i {
    font-size: 16px;
    transition: var(--transition);
}

.btn-login:hover i {
    transform: translateX(4px);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== ALERT ERROR ===== */
.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    animation: slideIn 0.3s ease-in-out;
}

/* ===== FOOTER FORMULARIO ===== */
.form-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

.form-footer p {
    margin-bottom: 8px;
}

.link-primary {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-primary:hover {
    text-decoration: underline;
    color: #ffa42d;
}

.copyright {
    font-size: 11px;
    color: #666666;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333333;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .container-login {
        flex-direction: column;
    }

    .panel-left {
        padding: 30px;
        min-height: auto;
        max-height: 250px;
    }

    .panel-right {
        padding: 30px;
        flex-grow: 1;
    }

    .branding-section {
        max-width: 100%;
    }

    .brand-title {
        font-size: 32px;
    }

    .features-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .feature-item {
        flex: 0 1 calc(50% - 10px);
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .panel-left {
        max-height: auto;
        padding: 20px;
    }

    .panel-right {
        padding: 20px;
    }

    .form-container {
        max-width: 100%;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-subtitle {
        font-size: 13px;
    }

    .features-list {
        gap: 12px;
        margin-bottom: 20px;
    }

    .feature-item {
        flex: 1;
        gap: 10px;
        padding: 8px;
    }

    .feature-item span {
        font-size: 12px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .logo-placeholder {
        width: 473px; /* 364 * 1.3 ≈ 473 */
        height: 186px; /* 143 * 1.3 ≈ 186 */
        padding: 18px 23px;
    }

    .logo-placeholder i {
        font-size: 36px;
    }

    .logo-placeholder p {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .container-login {
        height: auto;
        min-height: 100vh;
    }

    .panel-left {
        display: none;
    }

    .panel-right {
        width: 100%;
        padding: 20px;
        min-height: 100vh;
    }

    .form-container {
        padding: 20px;
        background: rgba(36, 36, 36, 0.5);
        border-radius: var(--border-radius-lg);
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 12px;
    }

    .input-wrapper {
        padding: 10px 12px;
    }

    .input-wrapper i {
        margin-right: 10px;
        font-size: 14px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
    }

    .remember-me {
        width: 100%;
        justify-content: flex-start;
    }

    .forgot-password {
        width: 100%;
        text-align: right;
    }
}
