/*
 * Login - Portal Técnicos
 * Refined Corporate Split Screen (Navy Identity)
 * Typography: Outfit + DM Sans
 */

body,
html {
    height: 100%;
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

.login-page {
    display: flex;
    height: 100vh;
    width: 100%;
    background: #f8fafc;
    align-items: stretch;
}

/* Panel Izquierdo - Branding (Dark Navy) */
.login-left {
    flex: 6;
    background: linear-gradient(160deg, #070d14 0%, #0c1929 45%, #1e3a5f 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative glows */
.login-left::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 139, 194, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 58, 95, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Subtle grid overlay */
.login-left .brand-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    width: 100%;
}

.brand-logo {
    margin-bottom: 2rem;
}

.brand-logo-img {
    width: 180px;
    height: auto;
    border-radius: 16px;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

/* Logo en el formulario (panel derecho) */
.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.25rem;
    border-radius: 12px;
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.03em;
}

.brand-title b {
    font-weight: 700;
    display: block;
    background: linear-gradient(135deg, #ffffff 30%, #7cb9e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    line-height: 1.7;
    max-width: 85%;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Accent line */
.login-left .brand-content::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -200px;
    width: 400px;
    height: 1px;
    background: linear-gradient(90deg, rgba(124, 185, 232, 0.3), transparent);
    z-index: 0;
}

/* Panel Derecho - Formulario */
.login-right {
    flex: 4;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

/* Top accent gradient line */
.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f, #2d5a8e, #4a8bc2);
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.login-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-control {
    height: 48px;
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    color: #0f172a;
    font-family: 'DM Sans', sans-serif;
}

.form-control:focus {
    background-color: #fff;
    border-color: #4a8bc2;
    box-shadow: 0 0 0 4px rgba(74, 139, 194, 0.12);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.input-group-text {
    background: transparent;
    border: none;
    display: none;
}

.input-group {
    position: relative;
}

/* Primary Button */
.btn-primary {
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
    border: none;
    width: 100%;
    margin-top: 0.75rem;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.3);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.4);
    background: linear-gradient(135deg, #2d5a8e 0%, #4a8bc2 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

.btn-primary.btn-loading {
    pointer-events: none;
    opacity: 0.85;
    background: linear-gradient(135deg, #2d5a8e 0%, #4a8bc2 100%);
    position: relative;
    overflow: hidden;
}

.btn-primary.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: btnShimmer 1.5s infinite;
}

@keyframes btnShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Checkbox & Links */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
}

.checkbox-wrap input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1e3a5f;
}

.forgot-link {
    color: #2d5a8e;
    text-decoration: none;
    font-weight: 600;
    transition: color 150ms;
}

.forgot-link:hover {
    color: #1e3a5f;
    text-decoration: none;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    margin: 2rem 0 1.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider::before { margin-right: 1rem; }
.divider::after { margin-left: 1rem; }

.switch-portal {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

.switch-portal a {
    color: #1e3a5f;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: color 150ms;
}

.switch-portal a:hover { color: #2d5a8e; }

/* Alert */
.alert-danger {
    border-radius: 10px;
    background-color: #fef2f2;
    color: #b91c1c;
    border: none;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .login-left { display: none; }
    .login-right { flex: 1; padding: 2rem; }
    .login-right::before { height: 4px; }
    .login-form-container { max-width: 100%; }
}

/* Animations */
.login-form-container {
    animation: loginFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-content {
    animation: loginSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
