/* 
 * RECAP.PRO - Módulo de Login
 * Estética Windows-style (Branco/Cinza) combinando com o Dashboard
 */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f3f3f3; /* Fundo cinza claro estilo Windows setup */
    z-index: 2147483647; /* acima de qualquer dropdown/overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    pointer-events: auto;
    cursor: default;
}

.login-card {
    width: 360px;
    text-align: center;
    color: #333;
    animation: fadeIn 0.8s ease;
}

.login-avatar {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #ff6b00;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.login-username {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #ff6b00;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    height: 44px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 0 80px 0 15px; /* Espaço para ícones à direita */
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    color: #333;
    cursor: text;
}

.login-input:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 2px rgba(255,107,0,0.2);
}

/* Ícone de Mostrar Senha */
.login-toggle-password {
    position: absolute;
    right: 44px; /* Antes do botão de login */
    height: 44px;
    width: 36px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-toggle-password:hover {
    color: #ff6b00;
}

.login-btn-submit {
    position: absolute;
    right: 0;
    height: 44px;
    width: 44px;
    background: #ff6b00;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.login-btn-submit:hover {
    background: #e65a00;
}

.login-footer {
    margin-top: 40px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.login-error {
    background: #fdf2f2;
    color: #d32f2f;
    padding: 10px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
    border: 1px solid #fecaca;
    border-radius: 2px;
    text-align: left;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.ph-spin {
    animation: spin 1s infinite linear;
    display: inline-block;
}

/* Esconder UI principal quando não logado */
body.not-logged-in {
    background: #f3f3f3;
}

/* Quando não logado, nada além do login pode capturar clique */
body.not-logged-in > :not(#login-overlay) {
    pointer-events: none !important;
}

body.not-logged-in #login-overlay,
body.not-logged-in #login-overlay * {
    pointer-events: auto !important;
}

body.not-logged-in .menu-bar,
body.not-logged-in .tool-bar,
body.not-logged-in .main-workspace,
body.not-logged-in .app-taskbar,
body.not-logged-in .status-bar {
    display: none;
}
