/* ================================================================
   css_login.css — Tela de autenticação OX Automação
   Layout split: branding escuro à esquerda + formulário à direita.
   ================================================================ */

/* ----------------------------------------------------------------
   RAIZ — SPLIT LAYOUT
   ---------------------------------------------------------------- */
.login-root {
    display: flex;
    min-height: 100vh;
    background: #0a0a0a;
}

/* ----------------------------------------------------------------
   PAINEL ESQUERDO — BRANDING OX
   ---------------------------------------------------------------- */
.login-branding {
    flex: 0 0 480px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

/* Linha vermelha decorativa à direita do painel */
.login-branding::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(192, 57, 43, 0.6) 30%,
        rgba(192, 57, 43, 0.8) 50%,
        rgba(192, 57, 43, 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;
}

/* Logo OX — imagem */
.login-ox-logo {
    width: 380px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 40px rgba(192, 57, 43, 0.5));
}

.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;
}

/* Features */
.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(192, 57, 43, 0.15);
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #e74c3c;
    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;
}

/* Reflexo sutil de luz vermelha no canto superior */
.login-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-deco-1 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(192,57,43,0.06) 0%, transparent 70%);
}

.login-deco-2 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    background: radial-gradient(circle, rgba(192,57,43,0.05) 0%, transparent 70%);
}

/* ----------------------------------------------------------------
   MARCA D'ÁGUA — ícones financeiros no painel direito
   ---------------------------------------------------------------- */
.login-watermark {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.login-watermark-icon {
    position: absolute;
    color: rgba(192, 57, 43, 0.07);
    line-height: 1;
    user-select: none;
}

[data-theme="dark"] .login-watermark-icon {
    color: rgba(192, 57, 43, 0.09);
}

/* Posições e tamanhos individuais de cada ícone */
.login-watermark-icon:nth-child(1)  { font-size: 120px; top:  -20px; left:  -30px; transform: rotate(-15deg); }
.login-watermark-icon:nth-child(2)  { font-size:  80px; top:   40px; right:  20px; transform: rotate(10deg); }
.login-watermark-icon:nth-child(3)  { font-size: 100px; top:  160px; left:   60px; transform: rotate(5deg); }
.login-watermark-icon:nth-child(4)  { font-size:  70px; top:  200px; right:  60px; transform: rotate(-20deg); }
.login-watermark-icon:nth-child(5)  { font-size:  90px; top:  360px; left:  -20px; transform: rotate(12deg); }
.login-watermark-icon:nth-child(6)  { font-size: 110px; top:  380px; right: -20px; transform: rotate(-8deg); }
.login-watermark-icon:nth-child(7)  { font-size:  75px; top:  540px; left:   80px; transform: rotate(-5deg); }
.login-watermark-icon:nth-child(8)  { font-size:  85px; top:  560px; right:  80px; transform: rotate(18deg); }
.login-watermark-icon:nth-child(9)  { font-size:  95px; bottom: 80px; left:  10px; transform: rotate(-10deg); }
.login-watermark-icon:nth-child(10) { font-size:  65px; bottom: 40px; right:  30px; transform: rotate(8deg); }

/* ----------------------------------------------------------------
   PAINEL DIREITO — FORMULÁRIO
   ---------------------------------------------------------------- */
.login-form-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f5f6f8;
}

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

.login-form-wrap {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

/* Logo mobile (visível apenas em telas pequenas) */
.login-mobile-logo {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.login-mobile-logo img {
    width: 200px;
    height: auto;
}

/* Cabeçalho do form */
.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);
}

/* Divisor com logo da marca no form */
.login-brand-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand-divider::before,
.login-brand-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

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

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

[data-theme="dark"] .login-brand-badge {
    border-color: rgba(192,57,43,0.3);
    background: rgba(192,57,43,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-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: #c0392b;
    width: 14px;
    text-align: center;
}

.login-input {
    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);
}

[data-theme="dark"] .login-input {
    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 {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

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

.login-input:hover:not(:focus) {
    border-color: #c0392b;
    border-color: rgba(192,57,43,0.4);
}

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

/* Grupo de input com ícone à direita (senha) */
.login-input-group {
    position: relative;
}

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

.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;
}

/* ----------------------------------------------------------------
   MENSAGEM DE ERRO
   ---------------------------------------------------------------- */
.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;
}

/* ----------------------------------------------------------------
   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: #c0392b;
    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: #a93226;
    box-shadow: 0 4px 20px rgba(192, 57, 43, 0.4);
    transform: translateY(-1px);
}

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

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

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
.login-footer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 32px;
}

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

/* ----------------------------------------------------------------
   RESPONSIVO — mobile: painel esquerdo some
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
    .login-branding {
        display: none;
    }
    .login-mobile-logo {
        display: flex;
    }
    .login-form-panel {
        background: #f5f6f8;
    }
    .login-form-wrap {
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 24px 16px;
        align-items: flex-start;
        padding-top: 48px;
    }
}
