/* ================================================================
   css_login.css — Telas de autenticação do Portal do Contador
   Layout split: branding escuro à esquerda + formulário à direita.
   Mesma estrutura de classes do login do backoffice (css_login.css),
   com acento azul petróleo em vez do vermelho OX — diferencia
   visualmente os dois logins mesmo reaproveitando o mesmo esqueleto.
   ================================================================ */

.login-root {
    display: flex;
    min-height: 100vh;
    background: #0a0a0a;
}

/* ----------------------------------------------------------------
   PAINEL ESQUERDO — BRANDING
   ---------------------------------------------------------------- */
.login-branding {
    flex: 0 0 480px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #071a2e url('../img/login-bg-textura.png') center / cover no-repeat;
}

.login-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, rgba(4,10,20,0.35) 0%, rgba(4,10,20,0.62) 100%);
    z-index: 0;
}

.login-branding::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(20, 129, 143, 0.6) 30%,
        rgba(20, 129, 143, 0.8) 50%,
        rgba(20, 129, 143, 0.6) 70%,
        transparent 100%
    );
}

.login-branding-inner {
    position: relative;
    z-index: 1;
    padding: 48px;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-ox-logo {
    width: 220px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 40px rgba(20, 129, 143, 0.5));
}

.login-portal-badge {
    font-size: 15px;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.login-brand-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 48px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    text-align: left;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
}

.login-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(20, 129, 143, 0.15);
    border: 1px solid rgba(20, 129, 143, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #2fb8ca;
    flex-shrink: 0;
}

.login-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}

.login-feature-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.40);
    margin-top: 2px;
}

/* ----------------------------------------------------------------
   PAINEL DIREITO — FORMULÁRIO
   ---------------------------------------------------------------- */
.login-form-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #eef0f2 url('../img/login-bg-mesa.png') center / cover no-repeat;
    overflow-y: auto;
}

[data-theme="dark"] .login-form-panel {
    background-color: #111316;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 70px -15px rgba(20, 40, 60, 0.35), 0 10px 25px -10px rgba(20, 40, 60, 0.2);
    padding: 40px 44px 32px;
}

[data-theme="dark"] .login-form-wrap {
    background: #1a1d21;
    box-shadow: 0 30px 70px -15px rgba(0,0,0,0.6), 0 10px 25px -10px rgba(0,0,0,0.5);
}

.login-form-header {
    margin-bottom: 32px;
}

.login-form-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
}

[data-theme="dark"] .login-form-title {
    color: #f0f0f0;
}

.login-form-sub {
    font-size: 14px;
    color: #6b7280;
}

[data-theme="dark"] .login-form-sub {
    color: rgba(255,255,255,0.45);
}

.login-brand-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.login-brand-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #14818f;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

[data-theme="dark"] .login-brand-badge {
    border-color: rgba(20,129,143,0.35);
    background: rgba(20,129,143,0.08);
}

/* ----------------------------------------------------------------
   CAMPOS DO FORMULÁRIO
   ---------------------------------------------------------------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field-row {
    display: flex;
    gap: 14px;
}
.login-field-row .login-field { flex: 1; min-width: 0; }

.login-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

[data-theme="dark"] .login-label {
    color: rgba(255,255,255,0.7);
}

.login-label .fas {
    font-size: 12px;
    color: #14818f;
    width: 14px;
    text-align: center;
}

.login-input, .login-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    color: #1a1a2e;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    font-family: var(--font-family, inherit);
}

.login-input--lg {
    height: 50px;
    font-size: 15px;
}

[data-theme="dark"] .login-input,
[data-theme="dark"] .login-select {
    color: #f0f0f0;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.login-input::placeholder {
    color: #9ca3af;
}

[data-theme="dark"] .login-input::placeholder {
    color: rgba(255,255,255,0.25);
}

.login-input:focus, .login-select:focus {
    border-color: #14818f;
    box-shadow: 0 0 0 3px rgba(20, 129, 143, 0.14);
}

[data-theme="dark"] .login-input:focus,
[data-theme="dark"] .login-select:focus {
    background: rgba(255,255,255,0.09);
}

.login-input:hover:not(:focus) {
    border-color: rgba(20,129,143,0.4);
}

.login-input-error {
    border-color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.04) !important;
}

.login-input-group {
    position: relative;
}

.login-input-icon-right {
    padding-right: 44px;
}

.login-input-icon-left {
    padding-left: 42px;
}

.login-input-icon-left-el {
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.login-input-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    transition: color 0.15s;
}

.login-input-toggle:hover {
    color: #374151;
}

/* ----------------------------------------------------------------
   MENSAGENS
   ---------------------------------------------------------------- */
.login-erro {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

.login-sucesso {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(20, 129, 143, 0.08);
    border: 1px solid rgba(20, 129, 143, 0.3);
    border-radius: 10px;
    color: #0f6b77;
    font-size: 13px;
    font-weight: 500;
}

[data-theme="dark"] .login-sucesso {
    color: #4dd4e3;
}

/* ----------------------------------------------------------------
   BOTÃO DE SUBMIT
   ---------------------------------------------------------------- */
.login-btn {
    height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #14818f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.login-btn:hover:not(:disabled) {
    background: #0f6b77;
    box-shadow: 0 4px 20px rgba(20, 129, 143, 0.4);
    transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
    background: #0c5760;
    transform: translateY(0);
    box-shadow: none;
}

.login-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.login-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #14818f;
    font-weight: 600;
    padding: 0;
}
.login-link:hover { text-decoration: underline; }

.login-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -6px;
}

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
.login-footer-divider {
    height: 1px;
    background: #e5e7eb;
    margin-top: 24px;
}

[data-theme="dark"] .login-footer-divider {
    background: rgba(255,255,255,0.1);
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
}

.login-footer .fas {
    font-size: 11px;
    color: #14818f;
}

[data-theme="dark"] .login-footer {
    color: rgba(255,255,255,0.25);
}

/* ----------------------------------------------------------------
   RESPONSIVO — mobile: painel esquerdo some, card ocupa a tela toda
   com a foto de mesa como fundo (mesmo tratamento do desktop)
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
    .login-branding { display: none; }
    .login-form-wrap { max-width: 420px; }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 20px 12px;
        align-items: flex-start;
        padding-top: 32px;
    }
    .login-form-wrap {
        padding: 32px 24px 24px;
        border-radius: 18px;
    }
    .login-field-row { flex-direction: column; gap: 18px; }
}
