/* ============================================
   LOGIN - DisiTech ERP Industrial
   Split-screen layout
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background: #f5f5f5;
}

/* === WRAPPER === */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* === PANEL IZQUIERDO - BRAND === */
.login-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 40%, #2d1a1a 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    overflow: hidden;
}

.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(185, 28, 28, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(205, 127, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(185, 28, 28, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Líneas decorativas industriales */
.login-brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b91c1c 0%, #cd7f32 50%, #b91c1c 100%);
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #cd7f32 0%, #b91c1c 50%, #cd7f32 100%);
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.brand-icon {
    font-size: 4rem;
    color: #cd7f32;
    margin-bottom: 1rem;
    animation: rotateGear 20s linear infinite;
    filter: drop-shadow(0 0 20px rgba(205, 127, 50, 0.3));
}

@keyframes rotateGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.brand-tagline {
    color: #cd7f32;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Features */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.5rem;
    border: 1px solid rgba(205, 127, 50, 0.15);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(205, 127, 50, 0.35);
    transform: translateX(5px);
}

.feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

.feature-text span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    margin-top: 2px;
}

.brand-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1;
}

.brand-footer small {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === PANEL DERECHO - FORMULARIO === */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #ffffff;
    position: relative;
}

.login-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #b91c1c 0%, #cd7f32 50%, #b91c1c 100%);
}

.form-panel-inner {
    width: 100%;
    max-width: 400px;
    animation: fadeSlideIn 0.6s ease;
}

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

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

.logo-fallback {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cd7f32;
    font-weight: 800;
    border: 2px solid #b91c1c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Títulos */
.login-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 0.4rem;
}

.login-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1rem;
    transition: color 0.2s;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    border: 2px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fafafa;
    color: #1a1a1a;
}

.form-control::placeholder {
    color: #bbb;
}

.form-control:focus {
    outline: none;
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
    background: #fff;
}

.form-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #b91c1c;
}

/* Botón */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

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

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(185, 28, 28, 0.35);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.25);
}

.btn-login i {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.btn-login:hover i {
    transform: translateX(3px);
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.78rem;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #b91c1c;
}

.error-messages .error {
    color: #c23a50;
}

/* === GOOGLE AUTH === */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.75rem 0;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.auth-divider span {
    color: #999;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    font-weight: 500;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    color: #3c4043;
    border: 2px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-google::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.06), transparent);
    transition: left 0.5s;
}

.btn-google:hover::before {
    left: 100%;
}

.btn-google:hover {
    border-color: #4285F4;
    background: #f8f9ff;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.15);
    transform: translateY(-1px);
    color: #1a73e8;
    text-decoration: none;
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
}

.btn-google .google-icon {
    flex-shrink: 0;
}

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

/* Tablets */
@media (max-width: 1024px) {
    .login-brand-panel {
        padding: 2rem;
    }

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

    .brand-features {
        gap: 1rem;
    }

    .feature-item {
        padding: 0.75rem 1rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand-panel {
        padding: 2.5rem 2rem;
        min-height: auto;
    }

    .brand-icon {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .brand-title {
        font-size: 1.75rem;
    }

    .brand-tagline {
        margin-bottom: 1.5rem;
    }

    .brand-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .feature-text span {
        display: none;
    }

    .brand-footer {
        display: none;
    }

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

    .login-form-panel::before {
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 4px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .brand-features {
        grid-template-columns: 1fr;
    }

    .feature-item {
        flex-direction: row;
        text-align: left;
    }

    .login-form-panel {
        padding: 1.5rem 1.25rem;
    }

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