.login-page {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 64px;
    /* Sem imagens externas (plano 8.3): gradiente da marca. */
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 60%, #1D4ED8 140%);
    color: #fff;
    position: relative;
}

.login-left-content {
    max-width: 520px;
}

.login-left h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.login-left p {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.login-carousel {
    position: absolute;
    bottom: 40px;
    left: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
}

.login-carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: #fff;
}

.login-carousel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.login-brand-mark { display: inline-block; margin-bottom: 16px; }

.login-brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.login-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.login-brand span {
    font-size: 0.9rem;
    color: #64748b;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #f8fafc;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

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

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.login-input-action {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 24px;
    font-size: 0.85rem;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
}

.login-options a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
}

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

.login-btn-primary {
    background-color: #0f172a;
    color: #fff;
    margin-bottom: 14px;
}

.login-btn-primary:hover:not(:disabled) {
    background-color: #1e293b;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.login-btn-secondary {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    text-decoration: none;
}

.login-btn-test {
    width: 100%;
    height: 44px;
    border: 1px solid #1d4ed8;
    border-radius: 8px;
    background-color: #fff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}


/* ---- Estados e utilidades das telas de autenticação ---- */
.login-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.login-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #047857;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.login-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: #64748b;
}

.login-policy {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.75rem;
    color: #1E3A8A;
    margin-bottom: 18px;
}

.login-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #475569;
    text-decoration: none;
    margin-bottom: 20px;
}

.login-back:hover { color: #0f172a; }

.login-steps {
    margin-bottom: 20px;
}

.login-steps .labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 6px;
}

.login-steps .bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.login-steps .bar > span {
    display: block;
    height: 100%;
    background: #1E293B;
}

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

@media (max-width: 960px) {
    .login-left { display: none; }
    .login-right { padding: 24px; }
}

/* ---------- Verificação em duas etapas ---------- */
.mfa-steps { margin: 0 0 12px; padding-inline-start: 20px; font-size: 0.875rem; color: #334155; }
.mfa-steps li { margin-bottom: 4px; }
.mfa-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 16px; }
.mfa-qr img { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 4px; }
.mfa-secret { font-size: 0.75rem; color: #64748b; text-align: center; }
.mfa-secret code { display: block; margin-top: 4px; font-size: 0.875rem; letter-spacing: 1px; color: #0f172a; word-break: break-all; }
.mfa-codes { margin: 12px 0 16px; }
.mfa-codes-warning { font-size: 0.8125rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.mfa-codes-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mfa-codes-grid code { display: block; text-align: center; font-size: 0.9375rem; letter-spacing: 1px; background: #f3f3f5; border-radius: 6px; padding: 6px; }

/* ---------- Portal do trabalhador (/t/{token}) ---------- */
.wt-page { min-height: 100vh; background: #F9FAFB; display: flex; justify-content: center; padding: 24px 16px; }
.wt-card { width: 100%; max-width: 760px; background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); height: fit-content; }
.wt-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wt-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; flex-shrink: 0; background: #fff; }
.wt-title { font-size: 1.25rem; font-weight: 600; color: #0f172a; }
.wt-subtitle { font-size: .75rem; color: #64748b; }
.wt-text { font-size: .9375rem; color: #334155; margin: 0 0 12px; }
.wt-hint { font-size: .8125rem; color: #64748b; }
.wt-section { font-size: 1rem; font-weight: 600; margin: 20px 0 10px; color: #0f172a; }
.wt-video { position: relative; padding-top: 56.25%; border-radius: 8px; overflow: hidden; background: #000; margin-bottom: 8px; }
.wt-video iframe, .wt-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wt-question { border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px 16px; margin: 0 0 14px; }
.wt-question legend { font-weight: 500; padding: 0 6px; color: #0f172a; }
.wt-qnum { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #1E293B; color: #fff; font-size: .75rem; margin-right: 4px; }
.wt-option { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 6px; cursor: pointer; font-size: .9375rem; }
.wt-option:hover { background: #F3F4F6; }
.wt-option input { margin-top: 3px; }

/* ---------- Editor do teste de integração ---------- */
.dc-question { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.dc-question-num { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--color-brand); color: #fff; font-size: var(--text-xs); font-weight: 600; }

/* Seletor de idioma das telas de autenticação */
.login-lang {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin: -16px -16px 8px 0;
}

.login-lang a {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 6px;
}

.login-lang a:hover { color: #0f172a; background-color: #f1f5f9; }
.login-lang a.active { color: #0f172a; background-color: #e2e8f0; }
