/* ==========================================================================
   VIP Parking - auth split shell.  public/assets/css/auth-split.css

   Emitted once, from resources/views/components/auth-shell.blade.php ONLY, so
   it is never present on driver-scan / supervisor-scan / booking / invoice
   views, which ship their own .page-body and .card-header-banner rules.
   Do NOT move this <link> into a layout - that guarantee is the whole reason
   every rule below is also scoped under .vsp / .vsp-body.

   Palette: ink #2B2B28 #1e1e1b, accent grey #6b7280 #4b5563 #374151 (replaced the old gold)
   ========================================================================== */
.vsp {
    --vsp-ink:#2B2B28; --vsp-ink-deep:#1e1e1b;
    --vsp-gold:#6b7280; --vsp-gold-2:#4b5563; --vsp-gold-3:#374151;   /* accent: neutral grey (was gold, then indigo) */
    --vsp-line:#e5e7eb; --vsp-border:#d1d5db;
    --vsp-muted:#6b7280; --vsp-faint:#9ca3af;
    position: relative; width: 100%;
}
.vsp, .vsp *, .vsp *::before, .vsp *::after { box-sizing: border-box; }
.vsp .af { font-family: 'DINNextLTArabic', 'Tajawal', sans-serif !important; }

/* ── Mobile first (<1024px): one column under the site chrome ───────────── */

.vsp-lang        { display: none; }   /* desktop only, see the ≥1024px block */
.vsp-form        { display: flex; flex-direction: column; padding-inline: 16px; }
.vsp-form__inner {
    flex: 1; width: 100%; max-width: 420px; margin-inline: auto;
    display: flex; flex-direction: column; justify-content: center;
    /* Deliberately no min-height / calc(100vh - 110px): under ?app=1 the site
       header is display:none and any reserved offset becomes dead space.
       Padding alone behaves correctly in both modes. */
    padding-block: 36px 88px;
}

.vsp-wordmark     { text-align: center; margin-bottom: 34px; }
.vsp-wordmark img { height: 96px; width: auto; }

.vsp-head    { text-align: center; margin-bottom: 26px; }
.vsp-head h1 { margin: 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; color: var(--vsp-ink); }
.vsp-head p  { margin: 10px 0 0; font-size: .9rem; line-height: 1.9; color: var(--vsp-muted); }
/* Some views open with the subtitle and no h1 above it — the 10px would be a
   stray offset there. Inert on login, where the heading comes first. */
.vsp-head p:first-child { margin-top: 0; }
/* main.css:87 sets h1..h6 to var(--heading-font) = Roboto, which carries no
   Arabic glyphs, so every Arabic heading in the shell drops to a generic system
   face. A rule naming the element beats the DINNextLTArabic on <body>, so state
   it here. RTL only: on the English pages Roboto is a Latin face on Latin copy.
   */
[dir="rtl"] .vsp-head h1 { font-family: 'DINNextLTArabic', 'Tajawal', sans-serif; }

.vsp-foot {
    width: 100%; max-width: 420px; margin-inline: auto;
    padding-inline: 16px; padding-bottom: 36px;
    text-align: center; font-size: 12px; line-height: 2; color: var(--vsp-faint);
}

/* Mobile: the site footer and the floating chat bubble are hidden on every
   auth page; .vsp-mfoot below takes the footer's place. Global selectors are
   safe here because this sheet only loads with the auth shell. */
.site-footer, #chat-widget { display: none !important; }

/* Mobile: the form column fills the screen under the fixed site header
   (body padding-top:110px in both public layouts) so the footer can be pushed
   to the bottom. Under ?app=1 there is no header, hence .vsp--app. */
.vsp-form       { min-height: calc(100vh - 84px); min-height: calc(100dvh - 84px); }
.vsp--app .vsp-form { min-height: 100vh; min-height: 100dvh; }

.vsp-mfoot {
    margin-top: auto;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px;
    width: 100%; max-width: 420px; margin-inline: auto;
    padding: 16px 0 24px; border-top: 1px solid var(--vsp-line);
    font-size: 12px; color: var(--vsp-faint);
}
/* Identical on both languages: LTR, and its own font/metrics so it does not
   inherit the layout body font (DINNextLTArabic on AR, Lato on EN). */
.vsp-mfoot {
    direction: ltr;
    font-family: 'Lato', 'Inter', 'Roboto', sans-serif;
    font-weight: 400; line-height: 1.5; letter-spacing: normal;
}
.vsp-credit     { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.vsp-credit:hover { color: var(--vsp-ink); }
.vsp-credit img { width: 30px; height: 30px; object-fit: contain; }

/* Page background, all sizes: lavender ground, blue/pink colour washes and a
   faint isometric grid that fades out toward the top. */
.vsp {
    isolation: isolate;
    background:
        radial-gradient(420px 320px at 0% 100%, rgba(165,180,252,.38), transparent 70%),
        radial-gradient(380px 300px at 100% 100%, rgba(240,171,252,.30), transparent 70%),
        radial-gradient(520px 400px at 50% 0%, rgba(199,210,254,.22), transparent 70%),
        #f8f8fc;
}
.vsp::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        repeating-linear-gradient(30deg,  rgba(40,40,80,.07) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(150deg, rgba(40,40,80,.07) 0 1px, transparent 1px 34px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 45%, transparent 90%);
            mask-image: linear-gradient(to top, #000 0%, #000 45%, transparent 90%);
}
.vsp-mfoot { border-top-color: #e4e4ee; }

@media (max-width: 1023.98px) {

    /* Slimmer site header on the auth pages: 14px + 56px logo + 14px = 84px,
       down from the layouts' 20px + 70px + 20px = 110px. body keeps its
       110px padding-top (the layouts own it, and ?app=1 zeroes it with
       !important), so the shell pulls itself up the 26px difference instead.
       Keep this, the margin-top and the .vsp-form min-height in step. */
    #header.header                  { padding-block: 14px; }
    #header.header .logo img        { height: 56px; }
    #header.header .mobile-nav-toggle { font-size: 36px; }
    .vsp:not(.vsp--app)             { margin-top: -26px; }

    /* More breathing room at the screen edges. */
    .vsp .vsp-form                  { padding-inline: 28px; }
    /* Full-width rule: pull out over the side padding, then pad the text back in. */
    .vsp-mfoot                      { max-width: none; width: auto; margin-inline: -28px; padding-inline: 28px; }
}

/* ── Desktop (≥1024px): one centred column, full-page background ────────── */
@media (min-width: 1024px) {
    /* Same technique as the layout's own ?app=1 block (public_ar:277-283).
       !important is NOT optional on #header: it carries Bootstrap's .d-flex,
       which is itself display:flex!important. */
    body { padding-top: 0 !important; }
    #header { display: none !important; }

    .vsp {
        min-height: 100vh; min-height: 100dvh;
        /* Bigger washes to suit the wider screen. */
        background:
            radial-gradient(620px 420px at 0% 100%, rgba(165,180,252,.38), transparent 70%),
            radial-gradient(520px 380px at 100% 100%, rgba(240,171,252,.30), transparent 70%),
            radial-gradient(700px 500px at 50% 0%, rgba(199,210,254,.22), transparent 70%),
            #f8f8fc;
    }
    .vsp .vsp-form   { position: relative; min-height: 100vh; min-height: 100dvh; padding-inline: 40px; }

    /* inset-inline-end = left in RTL (Arabic), right in LTR (English). */
    .vsp-lang {
        display: block; position: absolute; top: 24px; inset-inline-end: 32px; z-index: 20;
        padding: 4px 2px; font-family: 'DINNextLTArabic', 'Tajawal', sans-serif;
        font-size: .9rem; font-weight: 500; color: #1e1e1b; text-decoration: none;
        transition: color .2s;
    }
    .vsp-lang:hover { color: var(--vsp-gold-3); }

    /* The top switch replaces the footer one here. */
    /* Rule runs edge to edge: cancel the column's 40px side padding, then
       pad the credit and copyright back in from the screen edges. */
    .vsp-mfoot       { max-width: none; width: auto; margin-inline: -40px; padding-inline: 40px; }
    .vsp-form__inner { padding-block: 24px 88px; }
    .vsp-head h1     { font-size: 1.7rem; }
    .vsp-head p      { max-width: 26rem; margin-inline: auto; }
}

/* ── Segmented control (login only) ─────────────────────────────────────── */
.vsp-seg {
    display: flex; gap: 4px; width: 100%; max-width: 380px; margin: 0 auto 22px; padding: 4px;
    border: 0; border-radius: 12px; background: #efedea;
}
.vsp-seg__btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 12px; border: 0; border-radius: 9px; background: transparent;
    color: #6b6760; font-family: 'DINNextLTArabic', 'Tajawal', sans-serif;
    font-size: .9rem; font-weight: 600; cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.vsp-seg__btn:hover:not(.active) { color: #1e1e1b; }
/* Selected tab rests as a white card with a soft edge; the dark ring only
   appears while the tab is clicked/focused. Rings are inset shadows so the
   tab never grows and nudges its neighbour. */
.vsp-seg__btn.active {
    background: #fff; color: #1e1e1b;
    box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px #e2dfda;
}
.vsp-seg__btn:focus { outline: none; }
.vsp-seg__btn:focus,
.vsp-seg__btn:active {
    box-shadow: inset 0 0 0 2px #1e1e1b;
}
.vsp-seg__btn:focus:not(.active),
.vsp-seg__btn:active:not(.active) { background: #fff; color: #1e1e1b; }
.vsp-pane        { display: none; }
.vsp-pane.active { display: block; }

/* ==========================================================================
   Shared body chrome - every rule that used to be repeated, byte for byte,
   across two or more auth views. Values are unchanged; only the scope is new.
   .vsp-body is what makes the bare element selectors (label, input, h2, p)
   safe: they are no longer global.
   ========================================================================== */

/* Messages and field errors */
.vsp-body .message         { font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; text-align: start; }
.vsp-body .message.error   { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.vsp-body .message.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.vsp-body .err             { color: #ef4444; font-size: 12px; margin-top: 5px; text-align: start; }

/* Step indicator */
.vsp-body .steps   { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.vsp-body .step    { flex: 1; max-width: 60px; height: 5px; border-radius: 3px; background: #e5e7eb; }
.vsp-body .step.on { background: var(--vsp-ink); }

/* Labels and text inputs */
.vsp-body label,
.vsp-body .form-field-label { display: block; font-size: .85rem; font-weight: 400; color: #444; margin-bottom: 6px; text-align: start; }

.vsp-body input[type=email],
.vsp-body input[type=text],
.vsp-body input[type=password] {
    width: 100%; padding: 12px 16px; border-radius: 6px;
    border: 1.5px solid var(--vsp-border); background: #fff; color: var(--vsp-ink);
    font-size: 14px; font-family: 'DINNextLTArabic', 'Tajawal', sans-serif;
    direction: ltr; text-align: left; transition: border-color .2s, box-shadow .2s;
}
.vsp-body input[type=email]:focus,
.vsp-body input[type=text]:focus,
.vsp-body input[type=password]:focus {
    outline: none; border-color: var(--vsp-gold); box-shadow: 0 0 0 3px rgba(107,114,128,.15);
}
.vsp-body input::placeholder { color: var(--vsp-faint); }

/* Password field with the eye toggle. The input carries direction:ltr on
   itself, so a logical property here would resolve against LTR in BOTH
   languages - hence the physical pair, gated on [dir]. */
.vsp-body .pw-wrap        { position: relative; }
.vsp-body .pw-toggle {
    position: absolute; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--vsp-faint); background: none; border: none; padding: 0; font-size: 14px;
}
.vsp-body .pw-toggle:hover { color: var(--vsp-ink); }
[dir="ltr"] .vsp-body .pw-wrap input { padding-right: 44px; }
[dir="ltr"] .vsp-body .pw-toggle     { right: 12px; }
[dir="rtl"] .vsp-body .pw-wrap input { padding-left: 44px; }
[dir="rtl"] .vsp-body .pw-toggle     { left: 12px; }

/* Primary buttons (charcoal, gold on hover) */
.vsp-body .btn-submit,
.vsp-body .btn-fp {
    width: 100%; padding: 13px; border-radius: 8px; border: none;
    background: var(--vsp-ink); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: 'DINNextLTArabic', 'Tajawal', sans-serif;
    transition: background .25s, transform .2s;
}
/* Login button sits a little slimmer than the other auth buttons. */
.vsp-body .btn-submit { padding: 10px; font-size: 14.5px; }
.vsp-body .btn-submit:hover:not(:disabled),
.vsp-body .btn-fp:hover:not(:disabled) { background: var(--vsp-gold); color: #fff; transform: translateY(-1px); }
.vsp-body .btn-submit:disabled,
.vsp-body .btn-fp:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.vsp-body .btn-login {
    display: inline-block; width: 100%; padding: 13px; border-radius: 8px;
    background: var(--vsp-ink); color: #fff; font-size: 15px; font-weight: 600;
    text-align: center; text-decoration: none; transition: background .25s;
    font-family: 'DINNextLTArabic', 'Tajawal', sans-serif;
}
.vsp-body .btn-login:hover { background: var(--vsp-gold); color: #fff; }

/* Secondary / outline buttons */
.vsp-body .btn-resend,
.vsp-body .btn-secondary-outline {
    width: 100%; padding: 13px; border-radius: 8px;
    border: 1.5px solid var(--vsp-border); background: #fff; color: var(--vsp-ink);
    font-weight: 600; font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: border-color .2s, background .2s;
    font-family: 'DINNextLTArabic', 'Tajawal', sans-serif; text-decoration: none;
}
.vsp-body .btn-resend:hover:not(:disabled),
.vsp-body .btn-secondary-outline:hover { border-color: var(--vsp-gold); background: #f4f4f5; color: var(--vsp-ink); }
.vsp-body .btn-resend:disabled { opacity: .5; cursor: not-allowed; }

/* "or" rule */
.vsp-body .or-divider { display: flex; align-items: center; gap: 12px; color: var(--vsp-faint); font-size: 13px; }
.vsp-body .or-divider::before,
.vsp-body .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--vsp-line); }

/* OTP grid.
   `input.otp-box`, not `.otp-box`: the generic .vsp-body input[type=text] rule
   above (line 238) is 0-2-1 and would otherwise win on width/padding/font-size/
   text-align/radius, rendering the boxes full-width and left-aligned.
   Geometry mirrors VIP Tickets' OtpInput.vue; colours stay valet gold/ink. */
.vsp-body form.otp-form { display: flex; flex-direction: column; gap: 16px; }
.vsp-body .otp-inputs   { display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; direction: ltr; }
.vsp-body input.otp-box {
    width: 48px; height: 60px; padding: 0;
    text-align: center; font-size: 24px; font-weight: 900; line-height: 1;
    border-radius: 14px; border: 1.5px solid var(--vsp-border);
    background: #fff; color: var(--vsp-ink);
    transition: border-color .2s, box-shadow .2s; font-family: 'DINNextLTArabic', sans-serif;
}
.vsp-body input.otp-box:focus {
    outline: none; border-color: var(--vsp-gold); box-shadow: 0 0 0 3px rgba(107,114,128,.15);
}
@media (min-width: 640px) { .vsp-body input.otp-box { width: 56px; } }
.vsp-body #timer { text-align: center; font-size: 13px; color: var(--vsp-muted); margin-top: 6px; }

.vsp-body .phone-hint {
    text-align: center; font-size: 13px; color: var(--vsp-muted); margin-bottom: 20px;
    background: #f9fafb; border: 1px solid var(--vsp-line); border-radius: 8px; padding: 10px 14px;
}
.vsp-body .phone-hint strong { color: var(--vsp-ink); direction: ltr; display: inline-block; }

/* Success screen */
.vsp-body .success-stack {
    display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.vsp-body .success-stack h2 { font-size: 1.3rem; font-weight: 700; margin: 0; color: var(--vsp-ink); }
.vsp-body .success-stack p  { font-size: .9rem; color: var(--vsp-muted); margin: 0; line-height: 1.6; }
.vsp-body .icon-circle {
    width: 72px; height: 72px; border-radius: 50%;
    background: #f0fdf4; border: 2px solid #86efac;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #16a34a;
}
.vsp-body .redirect-bar-wrap { width: 100%; background: #e5e7eb; border-radius: 99px; height: 5px; overflow: hidden; margin-top: 4px; }
.vsp-body .redirect-bar      { height: 100%; border-radius: 99px; background: var(--vsp-gold); width: 100%; transition: width 1s linear; }
.vsp-body .redirect-note     { font-size: 12px; color: var(--vsp-faint); }

/* Fine print */
.vsp-body .privacy-note        { text-align: center; font-size: 12px; color: var(--vsp-muted); line-height: 2; margin-top: 4px; }
.vsp-body .privacy-note a      { color: var(--vsp-gold); text-decoration: underline; font-weight: 600; }
.vsp-body .privacy-note a:hover { color: var(--vsp-gold-3); }

/* Sign-up line under the submit button. A step larger than the privacy note
   below it, and not underlined until hover - it is an offer, not fine print. */
.vsp-body .signup-note         { text-align: center; font-size: 13px; color: var(--vsp-muted); margin: 0; }
.vsp-body .signup-note a       { color: var(--vsp-gold); text-decoration: none; font-weight: 700; }
.vsp-body .signup-note a:hover { color: var(--vsp-gold-3); text-decoration: underline; }

.vsp-foot .foot-link       { display: inline-block; font-size: 13px; color: var(--vsp-muted); text-decoration: none; }
.vsp-foot .foot-link:hover { color: var(--vsp-gold); }

/* ── Small phones ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .vsp-form__inner   { padding-block: 20px 64px; }
    .vsp-head h1       { font-size: 1.35rem; }
    .vsp-seg__btn      { font-size: .8rem; padding: 8px 6px; gap: 5px; }
}

/* Phone field on both login pages: one rounded box with a grey "+966" prefix
   and a hairline divider. The extra .vsp in each selector out-specifies the
   page-level rules in login(.en).blade.php, which load before this sheet.
   Saudi numbers only, so the flag, chevron and country list are all hidden. */
.vsp .vsp-body .phone-input-group {
    flex-direction: row; direction: ltr;
    border: 1px solid #e4e4e0; border-radius: 12px; background: #ffffff;
}
.vsp .vsp-body .phone-input-group:focus-within {
    border-color: #9ca3af; box-shadow: 0 0 0 3px rgba(107,114,128,0.15);
}
.vsp .vsp-body .country-trigger {
    min-width: 0; padding: 0 18px; justify-content: center; cursor: default;
    background: #f7f7f5; border: 0; border-right: 1px solid #e4e4e0;
    border-radius: 12px 0 0 12px;
    font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; color: #1e1e1b;
}
.vsp .vsp-body .country-trigger [id$="riggerFlag"],
.vsp .vsp-body .country-trigger .chevron { display: none; }
.vsp .vsp-body .country-dropdown { display: none !important; }   /* Saudi only: nothing to pick */
.vsp .vsp-body .phone-number-input {
    height: 46px; padding: 0 16px !important;   /* + 1px border top and bottom = 48px */
    border-radius: 0 12px 12px 0 !important;
    font-family: 'Inter', sans-serif; font-size: 16px; color: #1e1e1b;
    letter-spacing: .02em; text-align: left; direction: ltr;
}

/* Helper line under the phone field. */
.vsp .vsp-body .vsp-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: #8a8a9c; text-align: start; }

/* Login forms match the width of the Employee / Company tab switch above them. */
.vsp .vsp-body form.login-form { width: 100%; max-width: 380px; margin-inline: auto; }
.vsp .vsp-body form.login-form .btn-submit { height: 48px; padding: 0 16px; }   /* same height as the phone field */

/* Email / password on the login forms: drawn exactly like the phone field
   above - 48px tall, 12px radius, the same hairline border and gold ring. */
.vsp .vsp-body form.login-form input[type=email],
.vsp .vsp-body form.login-form input[type=text],
.vsp .vsp-body form.login-form input[type=password] {
    height: 48px; padding: 0 16px;
    border: 1px solid #e4e4e0; border-radius: 12px; background: #ffffff;
    font-family: 'Inter', sans-serif; font-size: 16px; color: #1e1e1b;
    direction: ltr; text-align: left;   /* typed left-to-right, like the number */
}
.vsp .vsp-body form.login-form input[type=email]:focus,
.vsp .vsp-body form.login-form input[type=text]:focus,
.vsp .vsp-body form.login-form input[type=password]:focus {
    border-color: #9ca3af; box-shadow: 0 0 0 3px rgba(107,114,128,0.15);
}
/* Browser autofill paints the box light blue; cover it with white. */
.vsp .vsp-body form.login-form input:-webkit-autofill,
.vsp .vsp-body form.login-form input:-webkit-autofill:hover,
.vsp .vsp-body form.login-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: #1e1e1b;
    caret-color: #1e1e1b;
}
.vsp .vsp-body form.login-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(107,114,128,0.15);
}
