/* ============================================
   LOGIN MODERNO - COLLEXA BI
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

/* === FONDO ANIMADO === */
.login-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a4f7a 0%, #1e6496 40%, #0090C8 100%);
    z-index: -1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: #ffffff;
    top: -200px;
    left: -100px;
    animation: floatShape 9s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #0090C8;
    bottom: -100px;
    right: 35%;
    animation: floatShape 11s ease-in-out infinite reverse;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: #1a4f7a;
    top: 40%;
    right: 8%;
    animation: floatShape 8s ease-in-out infinite;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.06); }
}

/* === LAYOUT PRINCIPAL === */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* === PANEL IZQUIERDO === */
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    color: white;
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.login-left-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    max-width: 480px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.brand-title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.brand-title span {
    color: #60c3ff;
}

.brand-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin-bottom: 3rem;
    max-width: 360px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.875rem;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60c3ff;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.brand-copyright {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 1rem;
}

/* === PANEL DERECHO === */
.login-right {
    width: 460px;
    min-height: 100vh;
    background: linear-gradient(160deg, #ffffff 0%, #f4f8fb 55%, #f8f8f8 100%);
    display: flex;
    align-items: stretch;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.login-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.login-form-wrapper {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.form-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1a4f7a;
    margin-bottom: 0.375rem;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

/* === INPUTS CON FLOATING LABEL === */
.input-group-modern {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    background: #f8faff;
    height: 58px;
}

.input-group-modern:focus-within {
    border-color: #0090C8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 144, 200, 0.12);
}

.input-icon {
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0bec5;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.22s;
}

.input-group-modern:focus-within .input-icon {
    color: #0090C8;
}

.input-field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-field input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 1.1rem 0.5rem 0.3rem 0;
    font-size: 0.9rem;
    color: #1a202c;
    font-family: inherit;
}

.input-field label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: #b0bec5;
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 400;
    white-space: nowrap;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 30%;
    transform: translateY(-100%);
    font-size: 0.68rem;
    color: #0090C8;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.toggle-password {
    background: none;
    border: none;
    padding: 0 0.875rem;
    color: #b0bec5;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.toggle-password:hover {
    color: #0090C8;
}

/* === BOTÓN LOGIN === */
.btn-login {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #1a4f7a 0%, #0090C8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    box-shadow: 0 4px 16px rgba(0, 144, 200, 0.4);
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(0, 144, 200, 0.5);
    background: linear-gradient(135deg, #1e6496 0%, #00aae0 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 144, 200, 0.35);
}

.btn-login.loading .btn-text { display: none; }
.btn-login.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-icon {
    font-size: 0.78rem;
    transition: transform 0.22s;
}

.btn-login:hover .btn-icon {
    transform: translateX(3px);
}

/* === TOASTS === */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    min-width: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    animation: toastIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast-info    { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: white; }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.toast-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

.toast .toast-body {
    background: transparent;
    color: white;
    flex-grow: 1;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
}

.toast .d-flex {
    align-items: center;
}

.toast .btn-close {
    filter: invert(1);
    opacity: 0.75;
    padding: 0.75rem;
    flex-shrink: 0;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .login-left {
        padding: 2rem;
    }
    .brand-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-left {
        display: none;
    }
    .login-right {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
    }
    .login-form-wrapper {
        padding: 2rem 1.75rem;
    }
    body {
        overflow: auto;
    }
}
