/* ==========================================================================
   ParkNow — Premium Auth / Login Experience
   Matches customer-shell & booking-flow design language
   ========================================================================== */

.auth-page {
    --auth-ink: #211834;
    --auth-muted: #625872;
    --auth-purple: #4b3f72;
    --auth-action: #59468f;
    --auth-lavender: #f0ecf8;
    --auth-line: #e8e1f1;
    --auth-surface: #ffffff;
    --auth-bg: #faf9fc;
    --auth-emerald: #168567;
    --auth-shadow: 0 12px 32px rgba(48, 32, 76, 0.08), 0 2px 6px rgba(48, 32, 76, 0.04);
    background: radial-gradient(ellipse 90% 420px at 50% 0%, #ede6fa 0%, transparent 70%), var(--auth-bg);
}

.auth-shell {
    width: min(100%, 440px);
    margin-inline: auto;
    padding: clamp(20px, 4vw, 36px) 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 992px) {
    .auth-shell {
        min-height: calc(100dvh - 130px);
        justify-content: center;
        padding-block: 32px;
    }
}

/* Main Auth Card */
.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 22px;
    padding: clamp(22px, 4vw, 30px);
    box-shadow: var(--auth-shadow);
}

/* Brand Hero Header */
.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3effa 0%, #e6dcf7 100%);
    border: 1px solid #dfd3f4;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(89, 70, 143, 0.12);
}

.auth-brand-mark img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.auth-title {
    margin: 0 0 4px;
    font-size: clamp(1.25rem, 3.2vw, 1.45rem);
    font-weight: 800;
    color: var(--auth-ink);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.auth-title:lang(bn) {
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.84rem;
    color: var(--auth-muted);
    line-height: 1.45;
}

/* Validation Alert */
.auth-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #fdf2f4;
    border: 1px solid #f5cfd6;
    color: #9f2738;
    font-size: 0.81rem;
    line-height: 1.4;
}

.auth-error-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Native Segmented Control (OTP / Password Tabs) */
.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: #f3effa;
    border: 1px solid #e9e2f4;
    border-radius: 14px;
    margin-bottom: 20px;
}

.auth-tab-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-tab-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.auth-tab-btn:hover:not(.active) {
    color: var(--auth-ink);
}

.auth-tab-btn.active {
    background: var(--auth-surface);
    color: var(--auth-purple);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(48, 32, 76, 0.09);
}

.auth-pane {
    display: none;
}

.auth-pane.active {
    display: block;
    animation: authFadeIn 0.18s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Fields */
.auth-field {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--auth-ink);
    margin-bottom: 6px;
}

.auth-input-group {
    display: flex;
    align-items: center;
    min-height: 46px;
    background: #fcfbfe;
    border: 1.5px solid var(--auth-line);
    border-radius: 12px;
    padding-inline: 12px;
    gap: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input-group:focus-within {
    background: #ffffff;
    border-color: var(--auth-action);
    box-shadow: 0 0 0 3.5px var(--auth-lavender);
}

.auth-input-prefix {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-muted);
    font-size: 0.88rem;
    font-weight: 700;
    padding-right: 10px;
    border-right: 1px solid var(--auth-line);
    flex-shrink: 0;
    user-select: none;
}

.auth-input-icon {
    display: inline-flex;
    align-items: center;
    color: var(--auth-muted);
    flex-shrink: 0;
}

.auth-input-icon svg {
    width: 17px;
    height: 17px;
}

.auth-input-group input {
    width: 100%;
    min-width: 0;
    min-height: 42px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.94rem !important;
    font-weight: 500;
    color: var(--auth-ink) !important;
    box-shadow: none !important;
    outline: none !important;
}

.auth-input-group input::placeholder {
    color: #9e96ad;
    font-weight: 400;
}

.auth-eye-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-eye-btn:hover {
    background: var(--auth-lavender);
    color: var(--auth-purple);
}

.auth-eye-btn svg {
    width: 17px;
    height: 17px;
}

.auth-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--auth-muted);
    line-height: 1.35;
}

.auth-hint svg {
    width: 13px;
    height: 13px;
    color: var(--auth-emerald);
    flex-shrink: 0;
}

/* Remember Row */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.78rem;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--auth-muted);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-action);
    border-radius: 4px;
    cursor: pointer;
}

.auth-demo-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--auth-lavender);
    color: var(--auth-purple);
    font-size: 0.72rem;
    font-weight: 600;
}

/* OTP Step 2 */
.auth-otp-target {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f7f4fc;
    border: 1px solid var(--auth-line);
    margin-bottom: 16px;
    font-size: 0.82rem;
}

.auth-otp-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-otp-phone svg {
    width: 15px;
    height: 15px;
    color: var(--auth-action);
}

.auth-otp-change {
    font-size: 0.77rem;
    font-weight: 700;
    color: var(--auth-action);
    text-decoration: none;
}

.auth-otp-change:hover {
    text-decoration: underline;
}

.auth-otp-boxes {
    display: grid;
    grid-template-columns: repeat(4, 52px);
    justify-content: center;
    gap: 10px;
    margin: 10px 0 8px;
}

.auth-otp-digit {
    width: 52px;
    height: 56px !important;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    color: var(--auth-ink) !important;
    background: #fcfbfe !important;
    border: 1.5px solid var(--auth-line) !important;
    border-radius: 14px !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-otp-digit:focus {
    background: #ffffff !important;
    border-color: var(--auth-action) !important;
    box-shadow: 0 0 0 3.5px var(--auth-lavender) !important;
    outline: none !important;
}

/* Primary Submit Button */
.auth-submit {
    width: 100%;
    min-height: 48px !important;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(110deg, #50309a 0%, #7046c1 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(88, 54, 163, 0.25);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.auth-submit:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(88, 54, 163, 0.32);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit svg {
    width: 17px;
    height: 17px;
}

/* Guest Browse Divider & Link */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    color: #9b92ab;
    font-size: 0.74rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-guest-link {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--auth-line);
    background: #faf8fd;
    color: var(--auth-purple);
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.auth-guest-link:hover {
    background: var(--auth-lavender);
    border-color: #d6c9ef;
    color: var(--auth-ink);
}

.auth-guest-link svg {
    width: 16px;
    height: 16px;
}

/* Compact Demo Role Switcher Card */
.auth-demo-card {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(8px);
    border: 1px solid var(--auth-line);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(48, 32, 76, 0.04);
}

.auth-demo-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-inline: 2px;
}

.auth-demo-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-muted);
    letter-spacing: 0.01em;
}

.auth-demo-title svg {
    width: 14px;
    height: 14px;
    color: var(--auth-action);
}

.auth-demo-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--auth-purple);
    background: var(--auth-lavender);
    padding: 2px 8px;
    border-radius: 999px;
}

.auth-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 390px) {
    .auth-demo-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.auth-role-tile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid var(--auth-line);
    background: var(--auth-surface);
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-role-tile:hover {
    border-color: #cfc1ea;
    background: #fcfaff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 63, 114, 0.08);
}

.auth-role-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-role-icon svg {
    width: 16px;
    height: 16px;
}

.auth-role-icon--customer {
    background: #f0ecf8;
    color: #59468f;
}

.auth-role-icon--staff {
    background: #e7f6f1;
    color: #168567;
}

.auth-role-icon--owner {
    background: #fdf4e6;
    color: #b57a1e;
}

.auth-role-icon--admin {
    background: #fbecee;
    color: #b83244;
}

.auth-role-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.auth-role-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--auth-ink);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-role-user {
    font-size: 0.69rem;
    color: var(--auth-muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {

    .auth-pane.active,
    .auth-submit,
    .auth-role-tile {
        animation: none;
        transition: none;
    }
}


/* ==========================================================================
   Sign Up, Owner Onboarding & Pending Approval Extensions
   ========================================================================== */

.auth-shell--wide {
    width: min(100%, 660px);
}

.auth-switch-bar {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--auth-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: var(--auth-muted);
}

.auth-switch-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--auth-action);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--auth-lavender);
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.auth-switch-link:hover {
    background: #e4dcf5;
    color: var(--auth-purple);
    transform: translateY(-1px);
}

/* Role Picker Cards */
.auth-role-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.auth-role-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1.5px solid var(--auth-line);
    background: #fcfbfe;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    text-align: left;
}

.auth-role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-role-option:hover {
    border-color: #c8bae8;
    background: #f8f5fd;
}

.auth-role-option.is-selected {
    border-color: var(--auth-action);
    background: #f5f1fc;
    box-shadow: 0 6px 18px rgba(89, 70, 143, 0.12);
}

.auth-role-option-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-role-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #ece5fa;
    color: var(--auth-action);
}

.auth-role-option.is-selected .auth-role-option-icon {
    background: var(--auth-action);
    color: #fff;
}

.auth-role-option-check {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1.5px solid #d1c7e4;
    display: grid;
    place-items: center;
    color: transparent;
    transition: all 0.16s ease;
}

.auth-role-option.is-selected .auth-role-option-check {
    border-color: var(--auth-emerald);
    background: var(--auth-emerald);
    color: #fff;
}

.auth-role-option-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--auth-ink);
    line-height: 1.25;
}

.auth-role-option-desc {
    font-size: 0.74rem;
    color: var(--auth-muted);
    line-height: 1.35;
}

.auth-owner-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f6f2fc 0%, #ede6fa 100%);
    border: 1px solid #d7c9f0;
    box-shadow: 0 4px 14px rgba(75, 63, 114, 0.06);
    color: var(--auth-ink);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.auth-owner-notice strong {
    color: var(--auth-purple);
}

.auth-owner-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--auth-action);
}

/* 3-Step Onboarding Progress */
.auth-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
}

.auth-step-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f5f2fa;
    border: 1px solid var(--auth-line);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--auth-muted);
}

.auth-step-pill.is-done {
    background: #eaf7f2;
    border-color: #bfe7d8;
    color: #126b53;
}

.auth-step-pill.is-current {
    background: #f0ecf8;
    border-color: #cbbbe9;
    color: var(--auth-purple);
    font-weight: 700;
}

.auth-step-num {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
    background: #e2daef;
    color: var(--auth-purple);
}

.auth-step-pill.is-done .auth-step-num {
    background: var(--auth-emerald);
    color: #fff;
}

.auth-step-pill.is-current .auth-step-num {
    background: var(--auth-action);
    color: #fff;
}

/* Onboarding Sections */
.auth-section-box {
    background: #faf8fd;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.auth-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--auth-ink);
    margin: 0 0 14px;
}

.auth-section-heading svg {
    width: 17px;
    height: 17px;
    color: var(--auth-action);
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 576px) {

    .auth-grid-2,
    .auth-steps {
        grid-template-columns: 1fr;
    }
}

.auth-input-simple {
    width: 100%;
    min-height: 44px;
    padding: 9px 13px;
    border: 1.5px solid #dfd8ec;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--auth-ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-input-simple:focus {
    outline: none;
    border-color: var(--auth-action);
    box-shadow: 0 0 0 3px rgba(89, 70, 143, 0.12);
}

.auth-facility-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-facility-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1.5px solid #dfd8ec;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-ink);
    cursor: pointer;
    user-select: none;
    transition: all 0.16s ease;
}

.auth-facility-chip input {
    accent-color: var(--auth-action);
}

.auth-facility-chip:has(input:checked) {
    border-color: var(--auth-action);
    background: var(--auth-lavender);
    color: var(--auth-purple);
}

/* Pending / Rejected Status Card */
.auth-status-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: grid;
    place-items: center;
}

.auth-status-icon--pending {
    background: #fff4dd;
    color: #c27d12;
    border: 1px solid #f5dca6;
}

.auth-status-icon--rejected {
    background: #fdf0f2;
    color: #b83244;
    border: 1px solid #f4cad0;
}

.auth-status-summary {
    background: #faf8fd;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 0.83rem;
}

.auth-status-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #ebe5f4;
}

.auth-status-row:last-child {
    border-bottom: 0;
}

.auth-status-key {
    color: var(--auth-muted);
}

.auth-status-val {
    font-weight: 700;
    color: var(--auth-ink);
    text-align: right;
}

/* Onboarding Map Location Pin Picker */
.auth-map-card {
    background: #ffffff;
    border: 1.5px solid #dfd8ec;
    border-radius: 14px;
    padding: 12px;
    margin-top: 14px;
}

.auth-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.auth-map-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-map-title svg {
    width: 16px;
    height: 16px;
    color: var(--auth-action);
}

.auth-geo-btn {
    appearance: none;
    border: 1px solid #d5c8ee;
    background: var(--auth-lavender);
    color: var(--auth-purple);
    font-family: inherit;
    font-size: 0.77rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.auth-geo-btn:hover {
    background: #e4dcf5;
    transform: translateY(-1px);
}

.auth-geo-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.auth-map-canvas {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    border: 1px solid var(--auth-line);
    overflow: hidden;
    z-index: 1;
}

.auth-coords-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.auth-coord-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #faf8fd;
    border: 1px solid var(--auth-line);
    font-size: 0.76rem;
    color: var(--auth-muted);
}

.auth-coord-pill input {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--auth-ink);
    outline: none;
}
