/* =========================================================================
   Kontrolo MZ — Entrar / Criar conta em modo "app nativa" (v4, 12/10/2026)
   No telemóvel: ecrã inteiro limpo (sem faixa verde nem cartão de site),
   logótipo pequeno, título grande, campos preenchidos e botão em baixo.
   O desktop mantém o desenho anterior.
   ========================================================================= */
@media (max-width: 899px) {
    html body.km-auth-v2.n-auth:not(#n4a):not(#n4b) {
        --n-fill: #eef1ef;
        --n-text: #121614;
        --n-text-2: #5f6763;
        --n-text-3: #8d9590;
        --n-primary: #0f8f3d;
        min-height: 100dvh;
        background: #ffffff;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        -webkit-tap-highlight-color: transparent;
        -webkit-font-smoothing: antialiased;
    }
    html body.n-auth:not(#n4a):not(#n4b) :is(input, button, select) {
        font-family: inherit;
    }
    html body.n-auth:not(#n4a):not(#n4b)::before,
    html body.n-auth:not(#n4a):not(#n4b) .auth-shell::before,
    html body.n-auth:not(#n4a):not(#n4b) .auth-shell::after {
        display: none;
        content: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-shell {
        display: block;
        min-height: 100dvh;
        padding: 0;
        background: #ffffff;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-brand {
        display: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-card {
        width: 100%;
        max-width: 480px;
        min-height: 100dvh;
        margin: 0 auto;
        padding: calc(env(safe-area-inset-top, 0px) + 28px) 22px calc(env(safe-area-inset-bottom, 0px) + 24px);
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        animation: n-auth-in 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-card-logo {
        display: inline-block;
        margin: 8px 0 30px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-card-logo img {
        width: auto;
        height: 30px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form-header {
        margin: 0 0 22px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form-header h2 {
        margin: 0;
        color: var(--n-text);
        font-size: 34px;
        font-weight: 750;
        letter-spacing: -0.03em;
        line-height: 1.1;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form-header :is(p, .eyebrow) {
        display: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form {
        display: grid;
        gap: 14px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form label {
        display: grid;
        gap: 6px;
        color: var(--n-text-2);
        font-size: 13px;
        font-weight: 600;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select) {
        width: 100%;
        min-height: 52px;
        padding: 12px 16px;
        border: 0;
        border-radius: 14px;
        background: var(--n-fill);
        color: var(--n-text);
        font-size: 17px;
        font-weight: 450;
        box-shadow: inset 0 0 0 1px transparent;
        outline: none;
        transition: box-shadow 140ms ease, background-color 140ms ease;
        -webkit-appearance: none;
        appearance: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form :is(input, select):focus {
        background: #ffffff;
        box-shadow: inset 0 0 0 2px var(--n-primary);
    }
    html body.n-auth:not(#n4a):not(#n4b) .form input::placeholder {
        color: var(--n-text-3);
    }
    html body.n-auth:not(#n4a):not(#n4b) :is(.auth-submit, .button-primary) {
        width: 100%;
        min-height: 54px;
        margin-top: 8px;
        border: 0;
        border-radius: 16px;
        background: var(--n-primary);
        color: #ffffff;
        font-size: 17px;
        font-weight: 650;
        box-shadow: none;
        transition: transform 120ms ease, opacity 120ms ease;
    }
    html body.n-auth:not(#n4a):not(#n4b) :is(.auth-submit, .button-primary, .auth-google-button):active {
        transform: scale(0.975);
        opacity: 0.9;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-google-button {
        width: 100%;
        min-height: 54px;
        border: 0;
        border-radius: 16px;
        background: var(--n-fill);
        color: var(--n-text);
        font-size: 16.5px;
        font-weight: 600;
        box-shadow: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-divider {
        margin: 16px 0;
        color: var(--n-text-3);
        font-size: 13px;
    }
    /* Secções numeradas -> títulos de grupo simples */
    html body.n-auth:not(#n4a):not(#n4b) .auth-form-section {
        display: block;
        margin: 14px 0 -4px;
        padding: 0;
        border: 0;
        background: transparent;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-form-section > span {
        display: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-form-section strong {
        color: var(--n-text);
        font-size: 20px;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-form-section small:empty {
        display: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .form label small:empty {
        display: none;
    }
    /* Escolha Pessoal / Negócio: dois cartões lado a lado */
    html body.n-auth:not(#n4a):not(#n4b) .auth-use-choice {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-grid.compact {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card {
        position: relative;
        display: grid;
        align-content: start;
        gap: 4px;
        min-height: 0;
        padding: 14px;
        border: 0;
        border-radius: 16px;
        background: var(--n-fill);
        box-shadow: none;
        cursor: pointer;
        transition: transform 120ms ease, box-shadow 140ms ease, background-color 140ms ease;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card:active {
        transform: scale(0.97);
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card span {
        color: var(--n-text);
        font-size: 16px;
        font-weight: 650;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card small {
        color: var(--n-text-3);
        font-size: 12.5px;
        font-weight: 450;
        line-height: 1.3;
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-card:has(input:checked) {
        background: #e6f4eb;
        box-shadow: inset 0 0 0 2px var(--n-primary);
    }
    html body.n-auth:not(#n4a):not(#n4b) .choice-grid.compact .choice-card small {
        display: none;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-switch {
        margin: 22px 0 0;
        color: var(--n-text-2);
        font-size: 15px;
        text-align: center;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-switch a {
        color: var(--n-primary);
        font-weight: 650;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-legal-note {
        margin: 16px 0 0;
        color: var(--n-text-3);
        font-size: 12px;
        line-height: 1.45;
        text-align: center;
    }
    html body.n-auth:not(#n4a):not(#n4b) .auth-legal-note a {
        color: var(--n-text-2);
    }
    html body.n-auth:not(#n4a):not(#n4b) .alert {
        margin: 0 0 16px;
        padding: 12px 14px;
        border: 0;
        border-radius: 14px;
        font-size: 14.5px;
    }
}

@keyframes n-auth-in {
    from { opacity: 0; transform: translateY(12px); }
}

/* Mostrar/Ocultar palavra-passe */
.n-pass-wrap { position: relative; display: block; }
.n-pass-wrap input { width: 100%; padding-right: 86px !important; }
.n-pass-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f8f3d;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    transform: translateY(-50%);
    cursor: pointer;
}

/* v4.39 — Botão "Baixar a app" no ecrã de entrada */
.auth-install-app[hidden] { display: none !important; }
.auth-install-app {
    display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 12px 14px;
    border: 1px solid #d7eadf; border-radius: 14px; background: #f1faf4; color: #0b5f2a; font: inherit; text-align: left; cursor: pointer;
}
.auth-install-app img { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.auth-install-app span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-install-app strong { font-size: 15px; font-weight: 800; }
.auth-install-app small { font-size: 12.5px; color: #4b6b57; }
.auth-install-app:hover { background: #e6f5eb; }
