/*
 * Shared auth - landing-page theme.
 *
 * Every screen built on the auth split-screen (signup, login, forgot/reset
 * password, verification, visitor auth, and the check-in form pages) keeps the
 * auth layout's markup and behaviour (intlTelInput, server-side validation,
 * theme toggle) but adopts the public landing page's look:
 *   - white + warm brand surfaces instead of the navy brand panel
 *   - the same 56px grid and top glow as `.landing-grid` / `.landing-glow`
 *   - Outfit throughout (the landing page's `--client-font`)
 *   - slate-200 hairlines and the brand-600 button treatment
 *
 * Every rule is scoped to `.qp-auth` (the class the screens add to `.az-page`),
 * so unrelated frontend pages that happen to load auth.css are untouched.
 *
 * Wide forms (signup and check-in step-one) get a 540px column through
 * `.az-form--wide`; everyone else uses 460px.
 */

/* ---------- brand panel (left) ---------- */

.qp-auth .az-brand {
    font-family: var(--font-outfit, Outfit, sans-serif);
    background:
        radial-gradient(70% 60% at 20% 0%, rgb(var(--brand-500) / 0.12) 0%, transparent 65%),
        linear-gradient(160deg, #ffffff 0%, rgb(var(--brand-50)) 58%, #fbf7f1 100%);
    border-right: 1px solid #e2e8f0;
}

.qp-auth .az-grid {
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

.qp-auth .az-blob--1 {
    background: rgba(210, 98, 114, 0.16);
}

.qp-auth .az-blob--2 {
    background: rgba(158, 125, 87, 0.16);
}

.qp-auth .az-blob--3 {
    background: rgba(210, 98, 114, 0.10);
}

/* The bundled and uploaded marks are colour logos with transparent grounds;
   the old panel inverted them to white for the navy gradient. */
.qp-auth .az-brand__logo {
    margin-bottom: 40px;
}

.qp-auth .az-brand__logo img {
    filter: none;
    opacity: 1;
}

.qp-auth .az-brand__headline {
    font-family: var(--font-outfit, Outfit, sans-serif);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.2px;
    color: rgb(var(--brand-600));
}

.qp-auth .az-brand__desc {
    max-width: 340px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--third_text_color, #888);
}

.qp-auth .az-features {
    align-items: stretch;
    gap: 10px;
    margin-bottom: 34px;
}

.qp-auth .az-feat {
    flex: 1;
    /* .az-page--security (forgot/reset/verify) caps these at 110px; the shared
       theme lets them fill the panel rather than shrink into a narrow column. */
    max-width: none;
    justify-content: flex-start;
    padding: 18px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qp-auth .az-feat:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 18px 36px -24px rgba(15, 23, 42, 0.30);
}

.qp-auth .az-feat__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgb(var(--brand-500) / 0.10);
    border: 1px solid rgb(var(--brand-500) / 0.22);
}

.qp-auth .az-feat__icon svg {
    color: rgb(var(--brand-600));
}

.qp-auth .az-feat__title {
    color: #0f172a;
}

.qp-auth .az-feat__desc {
    color: var(--third_text_color, #888);
}

.qp-auth .az-brand__trust {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.qp-auth .az-trust__dot {
    background: rgb(var(--brand-500));
    box-shadow: 0 0 0 4px rgb(var(--brand-500) / 0.12);
}

.qp-auth .az-trust__text {
    color: #475569;
}

/* ---------- form panel (right) ---------- */

/* The form column carries the landing hero's grid + warm top glow; the
   TailAdmin corner motif it used to draw is redundant on top of that. */
.qp-auth .az-form {
    overflow-x: hidden;
    padding: 72px 32px 40px;
    background-color: #ffffff;
    background-image:
        radial-gradient(60% 55% at 50% 0%, rgb(var(--brand-500) / 0.10) 0%, transparent 70%),
        linear-gradient(to right, rgb(15 23 42 / 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(15 23 42 / 0.04) 1px, transparent 1px);
    background-size: auto, 56px 56px, 56px 56px;
    background-position: 0 0, -1px -1px, -1px -1px;
    /* auth.css centres the column with align-items:center. Once a form grows
       taller than the viewport, a centred flex item that overflows is clipped
       at the top with no way to scroll back to it. Align to the start and let
       the auto block margins on the inner column do the centring only when
       there is spare height. */
    align-items: flex-start;
}

.qp-auth .az-form::before,
.qp-auth .az-form::after {
    display: none;
}

/* The form content sits directly on the landing grid - no card surface, border
   or shadow in either theme. `margin-block: auto` keeps it vertically centred
   on tall screens and, unlike the layout's align-items:center, lets a form
   taller than the viewport start at the top where it can be scrolled to. */
.qp-auth .az-form__inner {
    max-width: 460px;
    margin-block: auto;
    padding: 36px 34px 30px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* The register/check-in forms pair fields two-up and need the extra width. */
.qp-auth .az-form--wide .az-form__inner {
    max-width: 768px;
    width: 100%;
}

.qp-auth .az-header {
    align-items: flex-start;
    text-align: left;
}

.qp-auth .az-header.az-header--start,
.qp-auth .az-header[style*='start'],
.qp-auth .az-header {
    align-items: flex-start;
    text-align: left;
}

.qp-auth .az-title {
    color: #0f172a;
    font-size: 27px;
    letter-spacing: -0.6px;
    text-align: left;
}

.qp-auth .az-subtitle {
    color: var(--third_text_color, #888);
    font-size: 13.5px;
    text-align: left;
}

.qp-auth .az-form-favicon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.25);
}

.qp-auth .az-field-label {
    color: var(--third_text_color, #888);
    letter-spacing: 1.3px;
}

.qp-auth .az-input-box {
    /* Off-white rather than pure white: the card surface is gone, so the field
       needs its own tint against the page instead of blending into it. */
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.qp-auth .az-input-box:focus-within {
    border-color: rgb(var(--brand-500));
    box-shadow: 0 0 0 3px rgb(var(--brand-500) / 0.14);
}

/* intlTelInput's input keeps its intrinsic width (about 20 characters) unless
   it is constrained, which overflows the box now that the phone field shares a
   two-column row with the email. Pin it to the wrapper and let the plugin's
   own padding-left reserve room for the flag + dial code. */
.qp-auth .az-input-box .iti input {
    width: 100%;
    min-width: 0;
}

/* intlTelInput hard-codes a near-black placeholder and pulls the dial-code
   colour from TailAdmin's `--secondary`, so the phone field's in-field text
   did not follow the same muted palette as every other field. Pin both to the
   shared tokens; the visible COMPANY PHONE label above the box already uses
   .az-field-label, and this keeps the text inside it consistent too. */
.qp-auth .az-input-box .iti input::placeholder {
    color: var(--az-faint);
}

.qp-auth .az-input-box .iti__selected-dial-code {
    color: var(--az-ink);
}

.qp-auth .az-btn {
    height: 50px;
    border-radius: 12px;
    background: rgb(var(--brand-600));
    box-shadow: 0 10px 24px -10px rgb(var(--brand-600) / 0.60);
    letter-spacing: 0;
}

.qp-auth .az-btn:hover:not([disabled]) {
    background: rgb(var(--brand-700));
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgb(var(--brand-600) / 0.55);
}

/* Check-in steps pair a Continue button with a Cancel secondary. The primary
   rule above is more specific than auth.css's .az-btn--secondary, so restate
   the secondary variant here rather than letting Cancel turn brand-red. */
.qp-auth .az-btn--secondary {
    background: var(--az-card);
    color: var(--az-ink);
    border: 1.5px solid var(--az-line);
    box-shadow: none;
}

.qp-auth .az-btn--secondary:hover:not([disabled]) {
    background: rgb(var(--brand-500) / 0.08);
    border-color: rgb(var(--brand-500));
    color: rgb(var(--brand-700));
    transform: none;
    box-shadow: none;
}

/* Demo login tiles on the login screen read as fields, so give them the same
   off-white/dark surface as the inputs rather than pure white on the grid. */
.qp-auth .az-demo__btn {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.qp-auth .az-footer-note {
    color: var(--third_text_color, #888);
}

.qp-auth .az-footer-link.is-accent {
    color: rgb(var(--brand-700));
    background: rgb(var(--brand-500) / 0.10);
}

.qp-auth .az-footer-link.is-accent:hover {
    color: rgb(var(--brand-700));
    background: rgb(var(--brand-500) / 0.16);
}

/* ---------- dark mode ---------- */

html.dark .qp-auth .az-brand {
    background:
        radial-gradient(70% 60% at 20% 0%, rgb(var(--brand-500) / 0.22) 0%, transparent 65%),
        linear-gradient(160deg, #0b111c 0%, #151d2b 60%, #111827 100%);
    border-right-color: rgba(255, 255, 255, 0.08);
}

html.dark .qp-auth .az-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

html.dark .qp-auth .az-brand__logo img,
html.dark .qp-auth .az-form__mobile-logo img {
    filter: brightness(0) invert(1);
}

html.dark .qp-auth .az-brand__headline {
    color: #f8fafc;
}

html.dark .qp-auth .az-brand__desc {
    color: #94a3b8;
}

html.dark .qp-auth .az-feat {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: none;
}

html.dark .qp-auth .az-feat:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.80);
}

html.dark .qp-auth .az-feat__title {
    color: #f1f5f9;
}

html.dark .qp-auth .az-feat__desc {
    color: #94a3b8;
}

html.dark .qp-auth .az-feat__icon {
    background: rgb(var(--brand-500) / 0.16);
    border-color: rgb(var(--brand-500) / 0.30);
}

html.dark .qp-auth .az-brand__trust {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: none;
}

html.dark .qp-auth .az-trust__text {
    color: #cbd5e1;
}

html.dark .qp-auth .az-form {
    background-color: #0b111c;
    background-image:
        radial-gradient(60% 55% at 50% 0%, rgb(var(--brand-500) / 0.18) 0%, transparent 70%),
        linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
}

/* The card stays transparent in dark mode too; only the fields carry a
   surface. Removing the old #151d2b panel also removes the need for its
   border and drop shadow. */
html.dark .qp-auth .az-form__inner,
html.dark .qp-auth .az-form--wide .az-form__inner {
    background: transparent;
    border: 0;
    box-shadow: none;
}

html.dark .qp-auth .az-title {
    color: #f8fafc;
}

html.dark .qp-auth .az-subtitle {
    color: #94a3b8;
}

html.dark .qp-auth .az-form-favicon {
    background: #151d2b;
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.80);
}

html.dark .qp-auth .az-field-label {
    color: #94a3b8;
}

html.dark .qp-auth .az-input-box {
    background: #0e1621;
    border-color: #263043;
}

html.dark .qp-auth .az-input-box:focus-within {
    border-color: rgb(var(--brand-500));
    box-shadow: 0 0 0 3px rgb(var(--brand-500) / 0.20);
}

html.dark .qp-auth .az-btn--secondary {
    background: #0e1621;
    border-color: #263043;
}

html.dark .qp-auth .az-btn--secondary:hover:not([disabled]) {
    background: rgb(var(--brand-500) / 0.14);
    border-color: rgb(var(--brand-500));
    color: #ffffff;
}

html.dark .qp-auth .az-demo__btn {
    background: #0e1621;
    border-color: #263043;
}

html.dark .qp-auth .az-footer-note {
    color: #94a3b8;
}

html.dark .qp-auth .az-footer-link.is-accent {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
}

html.dark .qp-auth .az-footer-link.is-accent:hover {
    color: #ffffff;
    background: rgb(var(--brand-500) / 0.18);
}

/* ---------- small screens ---------- */

/* The split screen only has room for the paired fields, the 540px card and the
   brand panel once the viewport is genuinely wide. Below 1200px the form column
   would shrink the phone field until the flag + dial code left no room for the
   number, so drop the brand panel and give the form the full width. The pairs
   themselves stay side by side all the way down to the mobile breakpoint. */
@media (min-width: 701px) and (max-width: 1199px) {
    .qp-auth .az-brand {
        display: none;
    }

    .qp-auth .az-form {
        width: 100%;
    }
}

/* Below 700px auth.css drops the brand panel and turns the form column into
   the whole page. Keep that full-bleed, but leave the top padding that clears
   the pinned theme toggle. */
@media (max-width: 700px) {
    .qp-auth .az-form {
        padding: 0;
    }

    .qp-auth .az-form__inner,
    .qp-auth .az-form--wide .az-form__inner {
        max-width: 100%;
        padding: 56px 24px 64px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    html.dark .qp-auth .az-form__inner,
    html.dark .qp-auth .az-form--wide .az-form__inner {
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    /* On a phone the form column is the whole page, so the header goes back
       to centred - matching the landing page's centred mobile hero. */
    .qp-auth .az-header {
        align-items: center;
        text-align: center;
    }

    .qp-auth .az-title,
    .qp-auth .az-subtitle {
        text-align: center;
    }
}
