/* ============================================
   Login.css - Split-screen Login Design
   ============================================ */

/* --- Login Body --- */
body.login-body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    background-color: #f1f5f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* --- Split-Screen Wrapper --- */
body.login-body .login-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

/* --- Left Brand Panel --- */
body.login-body .login-brand-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

body.login-body .login-brand-panel::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    pointer-events: none;
}

body.login-body .login-brand-content {
    text-align: center;
    z-index: 1;
}

body.login-body .login-brand-logo {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 32px;
    margin: 0 auto 24px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

body.login-body .login-brand-title {
    color: #fff !important;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

body.login-body .login-brand-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.125rem;
    margin: 0 0 24px;
    font-weight: 400;
}

body.login-body .login-brand-desc {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    max-width: 360px;
    line-height: 1.6;
    margin: 0 auto;
}

body.login-body .login-brand-footer {
    position: absolute;
    bottom: 24px;
    color: rgba(255,255,255,0.3);
    font-size: 0.8125rem;
}

/* --- Right Form Panel --- */
body.login-body .login-form-panel {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 24px;
    background: #ffffff;
    position: relative;
}

body.login-body .login-form-container {
    width: 100%;
    max-width: 420px;
}

/* --- Login Card --- */
.login-card {
    width: 100%;
}

.login-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* --- Login Typography --- */
.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.login-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* --- Form Fields --- */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
}

.login-field .form-control {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 14px !important;
    font-size: 0.875rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    transition: border-color 150ms ease, box-shadow 150ms ease !important;
}

.login-field .form-control:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

.login-field .form-control::placeholder {
    color: #94a3b8;
}

/* --- Login Links --- */
.login-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.login-link {
    color: #2563eb !important;
    font-size: 0.8125rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: color 150ms ease;
    position: static !important;
    margin: 0 !important;
    top: auto !important;
}

.login-link:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* --- Login Actions --- */
.login-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.login-actions .btn {
    min-width: 120px;
    height: 44px;
    font-size: 0.875rem;
    font-weight: 500;
    float: none !important;
    margin: 0 !important;
    width: auto !important;
    border-radius: 8px !important;
}

.login-actions .btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

.login-actions .btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.login-actions .btn-default {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.login-actions .btn-default:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.login-btn {
    width: 100% !important;
    height: 44px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    float: none !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

.login-btn:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* --- Login Footer --- */
body.login-body .login-footer {
    position: absolute;
    bottom: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8125rem;
}

/* --- Legacy Classes Preserved --- */
.ClaveOculto {
    display: none;
}

.ClaveMostrar {
    display: block;
}

.UsuarioOculto {
    display: none;
}

.form01 {
    margin-top: 0;
}

.identity {
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    width: 100%;
    font-size: 0.8125rem;
    color: #64748b;
    margin-left: 0;
}

.identity-01 {
    margin-bottom: 10px;
    font-size: 0.8125rem;
    color: #64748b;
    margin-left: 0;
}

.estiliIcon, .estiliIcon2 {
    color: #2563eb;
    position: static;
    margin: 0;
    display: none;
}

.contUsuario {
    height: auto;
}

.pagination-view2 {
    position: relative;
    min-height: auto;
}

.pagination-viewu {
    position: relative;
}

.form-group {
    margin-bottom: 20px;
}

.form-group-01 {
    margin-bottom: 16px;
    max-width: 100%;
}

/* Override Bootstrap col-md-6 inside login */
body.login-body .col-md-6 {
    width: 100% !important;
    padding: 0 !important;
    flex: none !important;
    max-width: 100% !important;
}

.btn1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #1e293b;
    cursor: pointer;
    transition: all 150ms ease;
    float: none !important;
    width: auto;
    min-width: 120px;
    height: 44px;
    margin: 0;
}

.btn1:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.InforChangePassword {
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 24px;
    margin-top: 8px;
    color: #64748b;
    line-height: 1.5;
}

.text-title, .text-title3, .text-title5 {
    display: none;
}

a:not([href]):not([tabindex]) {
    color: #2563eb;
    text-decoration: none;
}

.linkOlvidoContraseña,
.linkTengoContraseña {
    position: static !important;
    top: auto !important;
    margin-left: 0 !important;
}

.fade-in-lightbox {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Old classes neutralized --- */
body.login-body .content_login {
    width: 100%;
    margin: 0;
    padding: 0;
}

body.login-body .inner {
    margin: 0;
    max-width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    min-height: auto;
}

.contenedorlogo {
    display: flex;
    margin: 0;
    justify-content: center;
}

.imagenax {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
}

.footer_login {
    display: none;
}

body.login-body .login_custon {
    background: none;
}

/* btn override in login context */
body.login-body .btn {
    width: auto;
    float: none;
    margin-right: 0;
}

body.login-body .btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

body.login-body .btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* --- Responsive: Stack on small screens --- */
@media (max-width: 768px) {
    body.login-body .login-wrapper {
        grid-template-columns: 1fr !important;
    }

    body.login-body .login-brand-panel {
        display: none !important;
    }

    body.login-body .login-form-panel {
        padding: 24px 16px;
        min-height: 100vh;
    }

    .login-form-container {
        max-width: 100%;
    }

    body.login-body .login-footer {
        position: relative;
        bottom: auto;
        margin-top: 32px;
    }
}

@media (min-width: 768px) {
    body.login-body .col-md-6 {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
