/* ================================================================
   WisersApp — Login Page CSS
   ================================================================ */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    overflow: hidden;
    background: var(--bg-body);
}

@media (max-width: 1199.98px) and (min-width: 992px) {
    .login-left { padding: 40px 32px; }
    .login-illustration img { width: 300px; }
    .login-right { width: 400px; padding: 48px 32px; }
    .login-tagline { font-size: 18px; }
}

/* ---- Left Panel ---- */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #005a9e 40%, #003d6b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 48px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='80' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='30'/%3E%3C/svg%3E") center/400px repeat;
}

.login-left-content { 
    position: relative; 
    z-index: 1; 
    text-align: center; 
    max-width: 450px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.login-brand-name {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

.login-illustration {
    margin-bottom: 30px;
}

.login-illustration img {
    width: 450px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

.login-tagline {
    color: rgba(255,255,255,0.9);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.login-description {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    line-height: 1.6;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    text-align: left;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.login-feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ---- Right Panel ---- */
.login-right {
    width: 480px;
    min-width: 0;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.login-form-container { width: 100%; max-width: 360px; }

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.login-logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 5px;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-input-wrap { position: relative; }

.login-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.login-input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    background: none;
    border: none;
    padding: 0;
}

.login-btn {
    width: 100%;
    height: 48.5px;
    padding: 13px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.login-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.35);
}

.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.login-remember label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.login-error {
    position: absolute;
    top: 15px;
    right: 15px;
    max-width: 350px;
    min-width: 320px;
    min-height: 55px;
    z-index: 999;
    background: #f44336;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px #999;
    transition: opacity 0.3s ease;
}

.login-error-text {
    flex: 1;
    font-size: 1em;
    line-height: 1.3;
    display: block;
}

.login-error-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
    opacity: 0.85;
    flex-shrink: 0;
}

.login-error-close:hover {
    opacity: 1;
}

.login-error--closing {
    opacity: 0;
}

.login-footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 40px;
}

a.login-btn {
    text-decoration: none;
}

.login-btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.login-btn-secondary:hover:not(:disabled) {
    background: var(--primary-light);
    color: var(--primary-color);
    box-shadow: none;
    transform: none;
}

.login-aviso {
    text-align: center;
}

.login-aviso-icone {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.login-aviso-icone--atraso,
.login-aviso-icone--bloqueado {
    background: #fff4e5;
    color: #b45309;
}

.login-aviso-icone--desativado,
.login-aviso-icone--indisponivel {
    background: #fdecec;
    color: #b91c1c;
}

[data-theme="dark"] .login-aviso-icone--atraso,
[data-theme="dark"] .login-aviso-icone--bloqueado {
    background: rgba(180, 83, 9, 0.22);
    color: #fdba74;
}

[data-theme="dark"] .login-aviso-icone--desativado,
[data-theme="dark"] .login-aviso-icone--indisponivel {
    background: rgba(185, 28, 28, 0.22);
    color: #fca5a5;
}

.login-aviso-titulo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.login-aviso-titulo--atraso {
    color: orange;
}

.login-aviso-titulo--bloqueado,
.login-aviso-titulo--desativado,
.login-aviso-titulo--indisponivel {
    color: red;
}

.login-aviso-empresa {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.login-aviso-texto {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Responsive - Tablet / Mobile */
@media (max-width: 991.98px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 48px 32px;
        box-shadow: none;
        justify-content: center;
        overflow-y: auto;
    }

    .login-form-container {
        max-width: 400px;
    }

    .login-error {
        max-width: calc(100vw - 30px);
        min-width: 0;
        width: auto;
    }
}

@media (max-width: 767.98px) {
    body:has(.login-page) {
        height: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .login-page {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-right {
        padding: 40px 24px;
        padding-top: 60px;
    }

    .login-form-container {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .login-right { padding: 32px 20px; }

    .login-logo-text {
        font-size: 28px;
    }

    .login-error {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}
