/* Formularios publicos: login, cadastro, recuperacao — tokens light/dark */

.app-auth-shell {
    width: 100%;
    max-width: 32rem;
    margin: 1.5rem auto 0;
}

.app-auth-card {
    border: 1px solid var(--cs-border);
    border-radius: 0.75rem;
    background: var(--cs-surface);
    color: var(--cs-text);
    box-shadow:
        0 10px 15px -3px color-mix(in srgb, var(--cs-text) 8%, transparent),
        0 4px 6px -4px color-mix(in srgb, var(--cs-text) 8%, transparent);
}

.app-auth-card-inner {
    padding: 1rem 1.25rem;
}

@media (min-width: 640px) {
    .app-auth-card-inner {
        padding: 1.75rem;
    }
}

.app-auth-head {
    text-align: center;
}

.app-auth-title {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--cs-text);
}

.app-auth-sub {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--cs-text-muted);
}

.app-auth-link {
    color: var(--cs-btn-primary-bg);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.app-auth-link:hover {
    color: var(--cs-btn-primary-hover);
}

.app-auth-body {
    margin-top: 1.25rem;
}

.app-auth-google {
    display: inline-flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid var(--cs-border);
    background: var(--cs-btn-secondary-bg);
    color: var(--cs-btn-secondary-text);
    text-decoration: none;
    cursor: not-allowed;
    opacity: 0.88;
    pointer-events: none;
}

.app-auth-google svg {
    flex-shrink: 0;
    width: 1.15rem;
    height: auto;
}

.app-auth-divider {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cs-text-muted);
    gap: 1.5rem;
}

.app-auth-divider::before,
.app-auth-divider::after {
    content: '';
    flex: 1 1 0;
    border-top: 1px solid var(--cs-border);
}

.app-auth-form {
    display: grid;
    gap: 1rem;
}

/* Alertas globais (cs-alert) dentro do cadastro/login publico: largura total do grid */
.app-auth-form .cs-alert {
    width: 100%;
    max-width: 100%;
    display: flex;
    box-sizing: border-box;
}

.app-auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--cs-text);
}

.app-auth-input-wrap {
    position: relative;
}

.app-auth-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 0.5rem;
    border: 1px solid var(--cs-border);
    background: var(--cs-input-bg);
    color: var(--cs-text);
}

.app-auth-input--toggle {
    padding-right: 2.5rem;
}

@media (min-width: 640px) {
    .app-auth-input {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

.app-auth-input::placeholder {
    color: var(--cs-text-muted);
}

.app-auth-input:focus {
    outline: 2px solid color-mix(in srgb, var(--cs-btn-primary-bg) 45%, transparent);
    outline-offset: 1px;
    border-color: var(--cs-btn-primary-bg);
}

.app-auth-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--cs-text-muted);
    cursor: pointer;
}

.app-auth-toggle:hover {
    background: var(--cs-btn-secondary-hover);
    color: var(--cs-text);
}

.app-auth-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.app-auth-check {
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--cs-btn-primary-bg);
    cursor: pointer;
}

.app-auth-check-label {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--cs-text);
}

.app-auth-submit {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
}

.app-auth-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

.app-auth-footer-link {
    color: var(--cs-btn-primary-bg);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.app-auth-footer-link:hover {
    color: var(--cs-btn-primary-hover);
}

.app-auth-hint {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Paginas legais publicas (mesmo shell que formularios auth) */
.app-legal-shell {
    max-width: 42rem;
}

.app-legal-doc .app-legal-meta {
    margin-top: 0.35rem;
}

.app-legal-body {
    margin-top: 1.25rem;
    text-align: left;
}

.app-legal-lead {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--cs-text-muted);
    margin: 0 0 1rem;
}

.app-legal-paragraph {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--cs-text);
    margin: 0.75rem 0 0;
}
