/* ============================================================
   PROJÁ MARCENARIA — TELA DE LOGIN
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ─── Layout principal ─────────────────────────────────── */
.login-bg {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ─── Painel esquerdo (marca) ──────────────────────────── */
.login-brand {
    width: 400px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1e3a8a 0%, #1e2330 60%, #111827 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px 32px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(37,99,235,0.15);
    pointer-events: none;
}

.brand-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 4px;
}

.brand-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 32px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #cbd5e1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 16px;
}

.brand-feat span {
    font-size: 18px;
}

.brand-footer {
    font-size: 12px;
    color: #475569;
    text-align: center;
}

/* ─── Painel direito (formulário) ─────────────────────── */
.login-panel {
    flex: 1;
    background: #f1f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(15,23,42,0.10);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
}

/* ─── Header do card ───────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.login-logo-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: #64748b;
}

/* ─── Formulário ───────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 12px;
    font-size: 15px;
    pointer-events: none;
    line-height: 1;
}

.field-wrap input {
    width: 100%;
    padding: 11px 42px 11px 38px;
    border: 1.5px solid #dde3ee;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.field-wrap input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: #fff;
}

.field-group.has-error .field-wrap input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
}

.field-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 16px;
}

.btn-toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    color: #64748b;
    line-height: 1;
    transition: opacity 0.15s;
}

.btn-toggle-pw:hover { opacity: 0.7; }

/* ─── Erro geral ───────────────────────────────────────── */
.login-erro-geral {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #b91c1c;
    text-align: center;
}

/* ─── Botão entrar ─────────────────────────────────────── */
.btn-entrar {
    width: 100%;
    padding: 13px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.btn-entrar:hover { background: #1d4ed8; }
.btn-entrar:active { transform: scale(0.98); }
.btn-entrar:disabled { opacity: 0.6; cursor: not-allowed; }

.login-form-links {
    text-align: center;
    margin-top: -4px;
}

.login-form-links a {
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.login-form-links a:hover { text-decoration: underline; }

/* Loader spinner */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Nota de rodapé ───────────────────────────────────── */
.login-footer-note {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.login-card-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}

.btn-criar-conta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 16px;
    background: #16a34a;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.btn-criar-conta:hover { background: #15803d; }

.login-support {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.login-support-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-support-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.support-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.support-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,23,42,0.12);
}

.support-btn-icon {
    font-size: 15px;
    line-height: 1;
}

.support-btn-whatsapp {
    background: #22c55e;
    color: #fff;
}

.support-btn-whatsapp:hover { background: #16a34a; }

.support-btn-email {
    background: #fff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.support-btn-email:hover { background: #eff6ff; }

/* ─── Responsivo ───────────────────────────────────────── */
@media (max-width: 700px) {
    .login-brand { display: none; }
    .login-card { padding: 32px 24px; }
}
