/* ==========================================================================
   vm-mobile-auth.css — the phone layer for sign-in and sign-up
   --------------------------------------------------------------------------
   Load AFTER vm-auth.css on login.php, register.php and the pages drawn by
   _email_auth.php. Every token comes from vm-auth.css, which carries the
   customer dashboard's palette (vm-brand.css).

   Every rule sits inside the same phone-width media query the dashboard's
   phone layer uses, so the desktop split layout (form + framed panel) is
   untouched. On a phone the form is the screen: the brand panel steps
   aside, and the page takes the dashboard's phone voice — cream ground
   under grain, the wordmark, an Unbounded heading like the greeting, 52px
   fields, a 56px sky button, ink chips, square corners — so signing in
   looks like the app it opens.
   ========================================================================== */

@media (max-width: 767px) {

body { font-size: 15px; }

/* The form is the screen. */
.split { display: block; min-height: 100vh; min-height: 100dvh; }
.col-brand { display: none; }
.col-form {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
    background: transparent;
}
.form-wrap { max-width: none; }

/* Wordmark on top, then the sky marker and eyebrow over the heading. */
.brand { margin: 0 0 28px; }
.brand .mark { min-height: 48px; }
.brand .mark img { height: 18px; }
.brand .division {
    margin-top: 20px;
    font-size: 11px;
    letter-spacing: 0.14em;
}
.brand .division::before { margin-bottom: 10px; }
.form-wrap h2 {
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.045em;
    margin: 0 0 10px;
}
.form-wrap .subtitle {
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 24px;
}

/* Sign in with: a row of square chips, scrolled sideways. The one you
   are on is ink with cream text, like the dashboard's chips. */
.id-tabs {
    gap: 6px;
    margin: 0 -20px 22px;
    padding: 0 20px;
    border-bottom: 0;
}
.id-tab {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--vm-ink);
    background: var(--vm-raised);
    border: 1px solid var(--vm-line-strong);
}
.id-tab:hover { color: var(--vm-ink); border-color: var(--vm-ink); }
.id-tab.active { color: var(--vm-ground); background: var(--vm-ink); border-color: var(--vm-ink); }
.id-tab.active::after { display: none; }
.id-tab.locked { color: var(--vm-faint); background: transparent; border-color: var(--vm-fill); }

/* Fields: 52px box, 16px text (no zoom on focus). */
.field { margin-bottom: 18px; }
.field label {
    font-weight: 600;
    font-size: 13px;
    line-height: 18px;
    margin-bottom: 8px;
}
.field input { min-height: 52px; font-size: 16px; font-weight: 500; }
.field-input:not(.invalid) input:hover:not(:focus) { border-color: var(--vm-line-strong); }
.field-error { font-size: 13px; }
.phone-prefix { font-size: 16px; padding: 0 14px; }
.pin-input { letter-spacing: 0.4em; }
.pin-toggle { width: 44px; height: 44px; right: 4px; }
.help-text { font-size: 13px; }

/* One button: 56px of sky, label left, arrow right. */
.btn {
    min-height: 56px;
    padding: 0 20px;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    margin-top: 6px;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover svg { transform: none; }
.btn-secondary { justify-content: center; }

.consent {
    gap: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--vm-ink);
}
.consent input { width: 22px; height: 22px; margin-top: 0; }
.consent a, .consent-note a { font-weight: 600; }
.consent-note { font-size: 13px; text-align: left; margin-top: 14px; }

.error,
.dev-notice,
.message {
    font-size: 13px;
    line-height: 1.45;
}

.trust-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 26px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
}
.foot-links {
    justify-content: flex-start;
    gap: 4px 22px;
    margin-top: 14px;
}
.foot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}

/* Sign-up extras */
.link-toggle { min-height: 44px; font-weight: 600; }
.contact-channel-choice { min-height: 44px; align-items: center; }

/* ------------------------------------------------------------------ motion */
/* Subtle, as on the dashboard: the form rises in on arrival, the code step
   slides in from the right, fields that appear settle, a press gives a
   little. Nothing here runs when the device asks for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    /* Page to page (sign in, sign up, the dashboard): a short crossfade
       where the browser supports it. Both sides opt in on a phone only. */
    @view-transition { navigation: auto; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: 0.22s; }

    .form-wrap > * { animation: vmARise 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    .form-wrap > :nth-child(2) { animation-delay: 0.03s; }
    .form-wrap > :nth-child(3) { animation-delay: 0.06s; }
    .form-wrap > :nth-child(4) { animation-delay: 0.09s; }
    .form-wrap > :nth-child(5) { animation-delay: 0.12s; }
    .form-wrap > :nth-child(n+6) { animation-delay: 0.15s; }
    /* These come and go inside the page, so they never wait. */
    #register-step,
    .form-wrap > .message { animation-delay: 0s; }
    #otp-section { animation: vmAFromRight 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: 0s; }
    #fullname-group,
    #dob-group,
    #otp-display,
    .additional-phones.show,
    .contact-channel-group.show { animation: vmARise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    @keyframes vmARise { from { opacity: 0; transform: translateY(8px); } }
    @keyframes vmAFromRight { from { opacity: 0; transform: translateX(24px); } }

    .btn,
    .id-tab,
    .consent input {
        -webkit-tap-highlight-color: transparent;
    }
    .id-tab { transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
    .btn { transition: background-size 1.1s var(--ease), color .55s var(--ease), transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .btn:not(:disabled):active { transform: scale(0.985); }
    .id-tab:not(.locked):active { transform: scale(0.97); }
}

} /* end @media (max-width: 767px) */
