/* Login Page Styles - Aligned with Register/Reset */

:root {
    --primary-color: #2ac8c8;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #ffffff;
    --surface: #f8f9fa;
}

body {
    font-family: 'Airbnb Cereal', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Container to center the form on the page - matching register */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Unique heartbeat bar class - matching register */
.buggy-heartbeat-bar {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: var(--text-light);
    opacity: 0.3;
    animation: pulse 2s infinite;
    z-index: 1;
}

/* Mobile responsive heartbeat bar */
@media (max-width: 768px) {
    .login-container {
        padding-bottom: 20px;
    }
    
    .buggy-heartbeat-bar {
        display: none; /* Hide on mobile for now */
    }
}

/* Floating Labels - adapted from quote page */
.buggy-quote-floating-field {
    position: relative;
    margin-bottom: 24px;
    border: 1.5px solid rgba(26, 26, 26, 0.18);
    border-radius: 16px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.buggy-quote-floating-field:focus-within {
    outline: none;
}

.buggy-quote-floating-field.is-focused {
    outline: none;
    z-index: 1;
}

.buggy-quote-floating-field:focus-within::after,
.buggy-quote-floating-field.is-focused::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #111111;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
}

.buggy-quote-input {
    width: 100%;
    padding: 16px 14px;
    border: none;
    background: transparent;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none !important;
}

/* When label floats up, push input text down to make room */
.buggy-quote-floating-field.has-value .buggy-quote-input,
.buggy-quote-input:focus {
    padding-top: 26px;
    padding-bottom: 8px;
}

.buggy-quote-input:focus {
    box-shadow: none !important;
    border-color: transparent !important;
    outline: none !important;
}

/* Override Bootstrap .form-control:focus inside driver auth shell */
.buggy-driver-auth-shell .form-control:focus {
    box-shadow: none !important;
    border-color: transparent !important;
    outline: none !important;
    background-color: transparent;
}

.buggy-driver-auth-shell .form-select:focus,
.buggy-driver-auth-shell input[type="text"]:focus,
.buggy-driver-auth-shell input[type="password"]:focus,
.buggy-driver-auth-shell input[type="email"]:focus,
.buggy-driver-auth-shell input[type="tel"]:focus,
.buggy-driver-auth-shell input[type="date"]:focus,
.buggy-driver-auth-shell select:focus,
.buggy-driver-auth-shell textarea:focus {
    box-shadow: none !important;
    border-color: transparent !important;
    outline: none !important;
}

.buggy-quote-label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    padding: 0;
    pointer-events: none;
    font-size: 16px;
    color: var(--text-light);
    transition: all 0.2s ease;
    transform-origin: top left;
    font-weight: 400;
}

/* Float label when input has focus or value - JavaScript controlled */
.buggy-quote-floating-field .buggy-quote-input:focus ~ .buggy-quote-label,
.buggy-quote-floating-field.has-value .buggy-quote-label {
    opacity: 0.65;
    top: 8px;
    transform: translateY(0) scale(0.75);
    color: rgba(26, 26, 26, 0.62);
}

/* Fallback for browsers that support :placeholder-shown */
.buggy-quote-floating-field .buggy-quote-input:not(:placeholder-shown) ~ .buggy-quote-label {
    opacity: 0.65;
    top: 8px;
    transform: translateY(0) scale(0.75);
    color: rgba(26, 26, 26, 0.62);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

/* Login form border - matching register form */
#login_border {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 40px;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

#login_border:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

/* Clock specific styles for login */
.buggy-logo-section {
    margin-bottom: 40px;
}

/* Clock container with glassmorphism background */
.buggy-logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* SVG Clock - 120x120 size */
.buggy-clock-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* Clock circle - with glassmorphism transparency (50-60% opacity) */
.buggy-clock-circle {
    fill: rgba(248, 249, 250, 0.6);
    stroke: rgba(222, 226, 230, 0.5);
    stroke-width: 1.5;
    opacity: 0.6;
}

/* Clock hands */
.buggy-hour-hand,
.buggy-minute-hand,
.buggy-second-hand {
    stroke-linecap: round;
    transform-origin: 60px 60px;
}

/* Hour hand - black */
.buggy-hour-hand {
    stroke: #333;
    stroke-width: 4;
    opacity: 1;
    animation: rotate-hour-backwards 3600s linear infinite;
}

/* Minute hand - black */
.buggy-minute-hand {
    stroke: #333;
    stroke-width: 3;
    opacity: 1;
    animation: rotate-minute-backwards 360s linear infinite;
}

/* Second hand - teal, much faster */
.buggy-second-hand {
    stroke: #2ac8c8;
    stroke-width: 2;
    opacity: 1;
    animation: rotate-second-backwards 6s linear infinite;
}

/* Center dot */
.buggy-clock-center {
    fill: #333;
    opacity: 1;
}

/* Driver login steering wheel variant */
.buggy-driver-wheel-svg {
    width: 120px;
    height: 120px;
    overflow: visible;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.buggy-driver-wheel-spin-layer,
.buggy-driver-wheel-motion {
    transform-origin: 60px 60px;
}

.buggy-driver-wheel-motion {
    animation: driver-wheel-steer 4.2s ease-in-out infinite;
}

.buggy-driver-wheel-scale {
    transform-origin: 60px 60px;
    transform: scale(1.62);
}

.buggy-driver-logo-icon:hover .buggy-driver-wheel-spin-layer {
    animation: driver-wheel-hover-spin 0.8s ease-in-out 1;
}

.buggy-driver-wheel-rim {
    fill: none;
    stroke: #2ac8c8;
    stroke-width: 9;
    stroke-linecap: round;
}

.buggy-driver-wheel-eye {
    fill: #2ac8c8;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 1.5;
}

.buggy-driver-wheel-accent {
    fill: none;
    stroke: #2ac8c8;
    stroke-width: 5.5;
    stroke-linecap: round;
}

.buggy-driver-wheel-star-blade {
    fill: #ffffff;
}

.buggy-driver-wheel-hub-disc {
    fill: rgba(255, 255, 255, 0.98);
    stroke: rgba(37, 37, 37, 0.12);
    stroke-width: 1.2;
}

.buggy-driver-wheel-hub-core,
.buggy-driver-wheel-hub-dot {
    fill: #2ac8c8;
}

/* Backwards rotation animations starting from 11:11:00 */
@keyframes rotate-hour-backwards {
    from {
        transform: rotate(335.5deg); /* 11:11 position */
    }
    to {
        transform: rotate(-24.5deg);
    }
}

@keyframes rotate-minute-backwards {
    from {
        transform: rotate(66deg); /* 11 minutes position */
    }
    to {
        transform: rotate(-294deg);
    }
}

@keyframes rotate-second-backwards {
    from {
        transform: rotate(0deg); /* 00 seconds */
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes driver-wheel-steer {
    0%, 100% {
        transform: rotate(-26deg);
    }
    50% {
        transform: rotate(26deg);
    }
}

@keyframes driver-wheel-hover-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Form input styling - matching register */
#login_border input[type=text],
#login_border input[type=password],
#login_border input[type=email] {
    width: 100%;
    margin-bottom: 10px;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#login_border input[type=text]:focus,
#login_border input[type=password]:focus,
#login_border input[type=email]:focus {
    border-color: transparent;
    box-shadow: none;
    background-color: transparent;
    outline: none;
}

.buggy-driver-auth-shell input[type=text]:focus,
.buggy-driver-auth-shell input[type=password]:focus,
.buggy-driver-auth-shell input[type=email]:focus,
.buggy-driver-auth-shell input[type=tel]:focus,
.buggy-driver-auth-shell input[type=date]:focus,
.buggy-driver-auth-shell select:focus {
    border-color: transparent;
    box-shadow: none !important;
    background-color: transparent;
    outline: none;
}

/* Reset login.css #login_border base input styles inside driver auth shell.
   login.css applies border, background, margin, padding, border-radius via
   ID selector which overrides class-based styles. This reset neutralizes those. */
#login_border.buggy-driver-auth-shell input[type=text],
#login_border.buggy-driver-auth-shell input[type=password],
#login_border.buggy-driver-auth-shell input[type=email],
#login_border.buggy-driver-auth-shell input[type=tel],
#login_border.buggy-driver-auth-shell input[type=date] {
    border: 0;
    border-radius: 0;
    background-color: transparent;
    margin-bottom: 0;
    box-shadow: none;
}

/* Re-apply correct padding per input type (overriding login.css ID selector) */
#login_border.buggy-driver-auth-shell .buggy-quote-input {
    padding: 28px 14px 10px 14px;
}

#login_border.buggy-driver-auth-shell .buggy-auth-stacked-input {
    padding: 0 16px 10px;
}

#login_border.buggy-driver-auth-shell .buggy-auth-phone-input {
    padding: 17px 16px 18px;
}

#login_border.buggy-driver-auth-shell .buggy-auth-otp-code-field .buggy-quote-input {
    padding: 26px 14px 8px 14px;
}

#login_border.buggy-driver-auth-shell .buggy-auth-date-field .buggy-quote-input {
    padding: 24px 14px 6px 14px;
}

/* Form labels */
#login_border .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Submit button - matching register */
#login_border button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: #2ac8c8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 32px;
}

#login_border button[type="submit"]:hover {
    background: #1ea8a8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 200, 200, 0.3);
}

#login_border button[type="submit"]:active {
    transform: translateY(0);
}

/* Remember and forgot section */
.buggy-form-extras {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
}

.buggy-remember-wrapper {
    display: none; /* Hidden but functional */
}

.buggy-forgot-link {
    font-size: 14px;
    color: #2ac8c8;
    text-decoration: none;
}

.buggy-forgot-link:hover {
    text-decoration: underline;
}

/* Sign up section - matching register */
.buggy-signup-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.buggy-signup-text {
    font-size: 14px;
    color: #666;
}

.buggy-signup-text--standalone {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.buggy-signup-link {
    color: #2ac8c8;
    text-decoration: none;
    font-weight: 600;
}

.buggy-signup-link:hover {
    text-decoration: underline;
}

/* Hide footer on login page */
footer,
.footer,
#footer {
    display: none !important;
}

/* Heart Branding */
.buggy-heart-branding {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.heart-container {
    margin-bottom: 8px;
}

.heart-icon {
    font-size: 24px;
    color: var(--primary-color);
    animation: heartBeat 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(42, 200, 200, 0.2));
}

.heart-text {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes heartBeat {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

/* Hide PWA install prompt */
.pwa-install-prompt {
    display: none !important;
}

.buggy-driver-auth-shell {
    position: relative;
}

.buggy-driver-auth-shell .buggy-logo-section {
    margin-bottom: 8px;
    display: grid;
    justify-items: center;
}

.buggy-driver-auth-shell .buggy-logo-icon {
    width: 104px;
    height: 104px;
    margin: 24px auto 40px;
}

.buggy-driver-auth-shell .buggy-signup-section {
    margin-top: 18px;
    padding-top: 0;
    border-top: none;
}

.buggy-auth-utility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.buggy-auth-utility-link {
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.buggy-auth-utility-link:hover {
    color: var(--primary-color);
}

.buggy-auth-state-header {
    margin-bottom: 28px;
}

.buggy-auth-header {
    text-align: center;
    max-width: 255px;
}

.buggy-auth-title {
    margin: 0;
    font-size: clamp(52px, 9vw, 64px);
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-weight: 400;
    color: var(--text-dark);
}

.buggy-auth-subtitle {
    margin: 14px auto 0;
    font-size: 15px;
    line-height: 1.35;
    color: rgba(26, 26, 26, 0.62);
    max-width: 220px;
    position: relative;
    padding-bottom: 18px;
}

.buggy-auth-subtitle::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 160px;
    height: 2px;
    transform: translateX(-50%);
    background: rgba(42, 200, 200, 0.95);
}

.buggy-driver-auth-shell .buggy-auth-subtitle {
    padding-bottom: 4px;
}

.buggy-auth-state-header.is-hidden {
    display: none;
}

.buggy-auth-state-eyebrow {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.55);
}

.buggy-auth-state-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.buggy-auth-state-copy {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-light);
}

.buggy-auth-step {
    display: none;
    padding-top: 0;
}

.buggy-auth-step.is-active {
    display: block;
}

.buggy-driver-auth-shell[data-current-step="lookup-email"] .buggy-auth-divider,
.buggy-driver-auth-shell[data-current-step="lookup-phone"] .buggy-auth-divider {
    margin: 14px 0 12px;
}

.buggy-driver-auth-shell[data-current-step="lookup-email"] .buggy-auth-step.is-active,
.buggy-driver-auth-shell[data-current-step="lookup-phone"] .buggy-auth-step.is-active {
    padding-bottom: 25px;
}

.buggy-driver-auth-shell[data-current-step="lookup-email"] .buggy-signup-section,
.buggy-driver-auth-shell[data-current-step="lookup-phone"] .buggy-signup-section {
    margin-top: 16px;
    padding-top: 0;
}

.buggy-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: rgba(26, 26, 26, 0.45);
    font-size: 14px;
}

.buggy-auth-divider::before,
.buggy-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(26, 26, 26, 0.12);
}

.buggy-auth-option-button {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid rgba(26, 26, 26, 0.15);
    border-radius: 16px;
    background: #fff;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.buggy-auth-option-button:hover {
    border-color: rgba(42, 200, 200, 0.45);
    box-shadow: 0 10px 30px rgba(42, 200, 200, 0.1);
    transform: translateY(-1px);
}

.buggy-driver-auth-primary-button {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 32px;
    border: 0;
    border-radius: 8px;
    background: #2ac8c8;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.buggy-driver-auth-primary-button:hover:not(:disabled) {
    background: #1ea8a8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 200, 200, 0.3);
}

.buggy-driver-auth-primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.buggy-driver-auth-primary-button:disabled {
    background: rgba(42, 200, 200, 0.2);
    color: rgba(26, 26, 26, 0.45);
    box-shadow: none;
    cursor: default;
}

.buggy-auth-phone-stack {
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(26, 26, 26, 0.28);
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.buggy-auth-phone-field {
    position: relative;
}

.buggy-auth-phone-field.is-focused {
    z-index: 1;
}

.buggy-auth-phone-field.is-focused::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #111111;
    pointer-events: none;
}

.buggy-auth-phone-field--country.is-focused::after {
    border-radius: 14px 14px 0 0;
}

.buggy-auth-phone-field--input.is-focused::after {
    border-radius: 0 0 14px 14px;
}

.buggy-auth-phone-country {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 16px 9px;
    cursor: pointer;
}

.buggy-auth-phone-country-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.buggy-auth-phone-kicker {
    font-size: 12px;
    line-height: 1.2;
    color: rgba(26, 26, 26, 0.58);
}

.buggy-auth-phone-country-value {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 500;
    color: var(--text-dark);
}

.buggy-auth-phone-country-value-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.buggy-auth-phone-country-select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 500;
    padding: 0 28px 0 0;
    margin: 0;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.buggy-auth-phone-chevron {
    width: 20px;
    height: 20px;
    color: rgba(26, 26, 26, 0.86);
    flex-shrink: 0;
}

.buggy-auth-phone-input-row {
    border-top: 1px solid rgba(26, 26, 26, 0.24);
}

.buggy-auth-phone-input {
    width: 100%;
    padding: 17px 16px 18px;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
}

.buggy-auth-phone-input::placeholder {
    color: rgba(26, 26, 26, 0.62);
}

.buggy-auth-phone-input:focus {
    box-shadow: none;
}

.buggy-auth-phone-copy {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(26, 26, 26, 0.78);
}

.buggy-auth-phone-policy-line {
    display: inline;
}

.buggy-auth-phone-policy-line a {
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.buggy-auth-location-panel {
    padding: 18px 18px 6px;
    border-radius: 18px;
    background: #1f1f1f;
    color: #f5f5f5;
    text-align: center;
}

.buggy-auth-location-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    display: grid;
    place-items: center;
    color: #4fd6d6;
}

.buggy-auth-location-icon svg {
    width: 24px;
    height: 24px;
}

.buggy-auth-location-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.buggy-auth-location-helper {
    margin: -4px 0 12px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(245, 245, 245, 0.6);
}

.buggy-auth-location-helper:empty {
    display: none;
}

.buggy-auth-location-actions {
    margin: 12px -18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.buggy-auth-location-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    justify-content: center;
    margin-bottom: 14px;
}

.buggy-auth-location-choice {
    display: grid;
    gap: 6px;
    justify-items: center;
    font-size: 12px;
    color: rgba(245, 245, 245, 0.75);
}

.buggy-auth-location-map {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #2c2c2c;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.buggy-auth-location-map--precise::before,
.buggy-auth-location-map--approx::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 2px solid rgba(79, 214, 214, 0.85);
}

.buggy-auth-location-map--precise::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4fd6d6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.buggy-auth-location-map--approx::after {
    content: '';
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    border: 1.5px dashed rgba(79, 214, 214, 0.65);
}

.buggy-auth-location-action {
    width: 100%;
    padding: 11px 16px;
    border: 0;
    background: transparent;
    color: #f5f5f5;
    font-size: 13px;
    font-weight: 600;
}

.buggy-auth-location-action + .buggy-auth-location-action {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.buggy-driver-auth-shell[data-current-step="location"] .buggy-auth-header {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="location"] [data-driver-auth-step="location"] {
    padding-bottom: 0;
}

.buggy-driver-auth-shell[data-current-step="location"] .buggy-logo-section {
    margin-bottom: 2px;
}

.buggy-driver-auth-shell[data-current-step="location"] .buggy-logo-icon {
    width: 92px;
    height: 92px;
    margin: 10px auto 40px;
}

.buggy-driver-auth-shell[data-current-step="location"] .buggy-auth-location-panel {
    margin-bottom: 40px;
}

.buggy-driver-auth-shell[data-current-step="location"] .buggy-heart-branding {
    margin-top: 18px;
    padding-top: 22px;
}

.buggy-auth-step-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    text-align: center;
    white-space: nowrap;
    position: relative;
    text-decoration-line: underline;
    text-decoration-color: var(--primary-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
}

.buggy-driver-auth-shell[data-page-mode="signup"][data-current-step="lookup-phone"] .buggy-auth-header {
    display: none;
}

.buggy-driver-auth-shell[data-page-mode="signup"][data-current-step="lookup-phone"] .buggy-auth-divider,
.buggy-driver-auth-shell[data-page-mode="signup"][data-current-step="lookup-phone"] [data-driver-auth-switch="lookup-email"] {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-auth-divider,
.buggy-auth-phone-step-header[hidden] {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] [data-driver-auth-switch="lookup-email"] {
    display: none;
}

.buggy-auth-phone-step-header {
    display: flex;
    justify-content: flex-start;
    margin: -14px 0 24px -14px;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-logo-section,
.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-signup-section,
.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-heart-branding {
    display: none !important;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] {
    max-width: 568px;
    padding: 28px 28px 32px;
    border-radius: 32px;
}

.buggy-auth-phone-step-header {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] #driverLookupPhoneForm {
    margin: 0 auto;
    max-width: 456px;
    position: relative;
    padding-top: 6px;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-auth-phone-step-header {
    display: flex;
    justify-content: flex-start;
    left: -20px;
    margin: 0;
    position: absolute;
    top: -18px;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-auth-step-title {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-auth-phone-copy {
    margin-top: 18px;
}

.buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] .buggy-driver-auth-primary-button {
    margin-top: 69px;
}

.buggy-auth-helper {
    margin: -8px 0 18px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-light);
}

.buggy-auth-back-button,
.buggy-auth-inline-link {
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    padding: 0;
}

.buggy-auth-back-button {
    margin-bottom: 18px;
}

.buggy-auth-password-shell {
    display: grid;
    gap: 0;
}

.buggy-auth-password-intro {
    margin-bottom: 16px;
}

.buggy-auth-password-eyebrow {
    margin-bottom: 8px;
}

.buggy-auth-password-intro p:last-child {
    margin-top: 10px;
}

.buggy-auth-identifier-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 0;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(42, 200, 200, 0.12);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
}

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

.buggy-auth-panel-intro {
    margin-bottom: 18px;
}

.buggy-auth-panel-topline {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.buggy-auth-help-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 999px;
    color: var(--text-dark);
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    min-height: 36px;
    padding: 0 14px;
}

.buggy-auth-help-chip:hover {
    border-color: rgba(42, 200, 200, 0.5);
    color: var(--primary-color);
}

.buggy-auth-panel-intro h3 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text-dark);
}

.buggy-auth-panel-intro p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
}

.buggy-auth-panel-intro-secondary {
    margin-top: 24px;
}

.buggy-auth-date-input {
    color-scheme: light;
}

.buggy-auth-step[data-driver-auth-step="signup-name"] #driverSignupNameForm {
    margin: 0 auto;
    max-width: none;
    position: relative;
    padding-top: 14px;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] .buggy-logo-section,
.buggy-driver-auth-shell[data-current-step="signup-name"] .buggy-auth-state-header {
    display: none;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] .buggy-signup-section,
.buggy-driver-auth-shell[data-current-step="signup-name"] .buggy-heart-branding {
    display: none !important;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] {
    max-width: 568px;
    padding: 16px 20px 18px;
    border-radius: 32px;
}

.buggy-auth-name-card-shell {
    display: grid;
    gap: 0;
    position: relative;
}

.buggy-auth-name-card-header {
    display: flex;
    justify-content: flex-start;
    margin: -17px 0 14px -17px;
}

.buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-name-card-header {
    position: absolute;
    top: -18px;
    left: -20px;
    margin: 0;
}

.buggy-auth-step[data-driver-auth-step="password"] #driverPasswordForm {
    margin: 0 auto;
    max-width: 456px;
    position: relative;
    padding-top: 6px;
}

.buggy-auth-step[data-driver-auth-step="password"] .buggy-auth-name-card-header {
    position: absolute;
    top: -18px;
    left: -20px;
    margin: 0;
}

.buggy-auth-step[data-driver-auth-step="password"] .buggy-auth-identifier-chip {
    margin-bottom: 12px;
}

.buggy-auth-name-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    border-radius: 50%;
    cursor: pointer;
}

.buggy-auth-name-back-button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.buggy-auth-name-back-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro {
    margin-bottom: 10px;
    text-align: center;
}

.buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro h3 {
    margin-bottom: 3px;
    font-size: 19px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    font-size: 9px;
    line-height: 1.15;
    white-space: nowrap;
    color: #6a6a6a;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] #driverAuthStatus {
    display: none !important;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] #driverSignupNameSubmit {
    background: #222222;
    color: #ffffff;
    border-radius: 10px;
    margin-top: 0;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] #driverSignupNameSubmit:hover:not(:disabled),
.buggy-driver-auth-shell[data-current-step="signup-name"] #driverSignupNameSubmit:active:not(:disabled) {
    background: #111111;
    transform: none;
    box-shadow: none;
}

.buggy-auth-name-section {
    margin-bottom: 8px;
}

.buggy-auth-name-section > .buggy-auth-section-label {
    display: block;
    margin-bottom: 4px;
}

.buggy-auth-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.buggy-auth-section-label {
    margin: 0;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-dark);
}

.buggy-auth-legal-name-card {
    overflow: hidden;
    border: 1px solid rgba(113, 113, 113, 0.45);
    border-radius: 11px;
    background: #fff;
}

.buggy-auth-stacked-field {
    position: relative;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.buggy-auth-stacked-field:focus-within {
    z-index: 1;
    outline: none;
}

.buggy-auth-stacked-field.is-focused {
    z-index: 1;
    outline: none;
}

/* Pseudo-element border for focused stacked field - Airbnb pattern */
.buggy-auth-stacked-field:focus-within::after,
.buggy-auth-stacked-field.is-focused::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #111111;
    pointer-events: none;
    z-index: 2;
}

/* First stacked field gets top rounding */
.buggy-auth-stacked-field:first-child:focus-within::after,
.buggy-auth-stacked-field:first-child.is-focused::after {
    border-radius: 11px 11px 0 0;
}

/* Last stacked field gets bottom rounding */
.buggy-auth-stacked-field:last-child:focus-within::after,
.buggy-auth-stacked-field:last-child.is-focused::after {
    border-radius: 0 0 11px 11px;
}

.buggy-auth-stacked-divider {
    height: 1px;
    background: rgba(26, 26, 26, 0.16);
}

.buggy-auth-stacked-field .buggy-auth-stacked-input.buggy-quote-input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.25;
    padding: 16px 14px !important;
    outline: none;
    box-shadow: none;
}

.buggy-auth-stacked-field .buggy-auth-stacked-input.buggy-quote-input:focus,
.buggy-auth-stacked-field.has-value .buggy-auth-stacked-input.buggy-quote-input {
    padding-top: 26px !important;
    padding-bottom: 8px !important;
}

.buggy-auth-stacked-field .buggy-quote-label {
    font-size: 16px;
    top: 50% !important;
    left: 14px !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
}

.buggy-auth-stacked-field .buggy-quote-input:focus ~ .buggy-quote-label,
.buggy-auth-stacked-field .buggy-quote-input:not(:placeholder-shown) ~ .buggy-quote-label,
.buggy-auth-stacked-field.has-value .buggy-quote-label {
    opacity: 0.65 !important;
    top: 8px !important;
    transform: translateY(0) scale(0.75) !important;
    color: rgba(26, 26, 26, 0.62);
}

.buggy-auth-name-helper {
    margin-top: 2px;
    margin-bottom: 0;
    max-width: none;
    font-size: 5.8px;
    line-height: 1.18;
    color: #6a6a6a;
    text-align: left;
}

.buggy-auth-preferred-link {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: normal;
    vertical-align: baseline;
}

.buggy-auth-name-section--dob {
    margin-bottom: 7px;
}

.buggy-auth-date-field {
    margin-bottom: 2px;
    cursor: text;
    min-height: 56px;
}

.buggy-auth-date-field:focus-within {
    outline: none;
    z-index: 1;
}

.buggy-auth-date-field.is-focused {
    outline: none;
    z-index: 1;
}

.buggy-auth-date-field .buggy-quote-label {
    font-size: 16px;
    line-height: 1.1;
}

.buggy-auth-date-field.is-focused .buggy-quote-label,
.buggy-auth-date-field.has-value .buggy-quote-label {
    opacity: 0.65 !important;
    top: 8px !important;
    left: 14px !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    transform: translateY(0) scale(1) !important;
    color: rgba(26, 26, 26, 0.62) !important;
}

.buggy-auth-date-segments {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    display: none;
    align-items: center;
    gap: 0;
    padding: 26px 0 8px;
    z-index: 2;
}

.buggy-auth-date-field.is-focused .buggy-auth-date-segments,
.buggy-auth-date-field.has-value .buggy-auth-date-segments {
    display: flex;
}

.buggy-auth-date-segment {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none;
    flex: 0 0 auto !important;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.2;
    color: #1a1a1a;
    outline: none !important;
    box-shadow: none !important;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    height: auto;
}

.buggy-auth-date-segment::selection {
    background-color: rgba(0, 103, 244, 0.25);
}

.buggy-auth-date-segment::placeholder {
    color: rgba(26, 26, 26, 0.62);
}

.buggy-auth-date-segment--month,
.buggy-auth-date-segment--day {
    width: 30px !important;
    max-width: 30px !important;
}

.buggy-auth-date-segment--year {
    width: 42px !important;
    max-width: 42px !important;
}

.buggy-auth-date-separator {
    font-size: 16px;
    line-height: 1;
    color: #1a1a1a;
    user-select: none;
    flex: 0 0 12px;
    width: 12px;
    text-align: center;
    margin: 0;
    padding: 0;
}

.buggy-auth-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #717171;
    pointer-events: none;
    z-index: 3;
}


.buggy-auth-dob-helper {
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.33;
    color: #6a6a6a;
}

.buggy-auth-password-field {
    position: relative;
}

.buggy-auth-password-field .buggy-quote-input {
    padding-right: 46px;
    padding-top: 14px;
    padding-bottom: 4px;
    font-size: 10px;
    line-height: 1.2;
}

#driverSignupInlinePassword,
#driverSignupInlinePassword.form-control,
#driverSignupInlinePassword:focus,
#driverSignupInlinePassword.form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
    background-image: none !important;
}

.buggy-auth-password-toggle {
    position: absolute;
    right: 13px;
    top: 16px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 8px;
    font-weight: 600;
    color: #484848;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    width: fit-content !important;
    min-width: 0;
    max-width: fit-content;
    inline-size: fit-content !important;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
    line-height: 1;
    white-space: nowrap;
}

.buggy-auth-password-toggle-text {
    display: inline;
}

.buggy-auth-password-toggle-icon {
    display: none;
    font-size: 11px;
    line-height: 1;
    color: #484848;
}

.buggy-auth-password-field.has-value .buggy-auth-password-toggle {
    text-decoration: none;
    top: 16px;
    right: 12px;
}

.buggy-auth-password-field.has-value .buggy-auth-password-toggle-text {
    display: none;
}

.buggy-auth-password-field.has-value .buggy-auth-password-toggle-icon {
    display: inline-block;
    font-size: 11px;
}

.buggy-auth-password-field.is-invalid::after {
    border-color: #d93025 !important;
}

.buggy-auth-password-checklist {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.buggy-auth-password-strength {
    margin: 5px 0 3px;
    font-size: 7px;
    line-height: 1.2;
    color: #6a6a6a;
}

.buggy-auth-password-strength.is-weak {
    color: #d93025;
}

.buggy-auth-password-strength.is-medium {
    color: #8a6200;
}

.buggy-auth-password-strength.is-strong {
    color: #18864b;
}

.buggy-auth-password-checklist[hidden] {
    display: none !important;
}

.buggy-auth-password-strength[hidden] {
    display: none !important;
}

.buggy-auth-password-checklist li {
    position: relative;
    padding-left: 10px;
    margin: 0 0 2px;
    font-size: 7px;
    line-height: 1.2;
    color: #d93025;
}

.buggy-auth-password-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #d93025;
}

.buggy-auth-password-checklist li.is-valid {
    color: #18864b;
}

.buggy-auth-password-checklist li.is-valid::before {
    background: #18864b;
}

.buggy-auth-signup-name-legal {
    margin: 0 0 7px;
    font-size: 6.5px;
    line-height: 1.18;
    color: #6a6a6a;
}

.buggy-auth-signup-dob-shell {
    display: none;
}

.buggy-auth-legal-copy {
    margin: 8px 0 22px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-light);
}

.buggy-auth-legal-copy a {
    color: var(--primary-color);
}

.buggy-auth-inline-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.buggy-auth-helper-inline {
    margin: 8px 0 18px;
    font-size: 13px;
}

.buggy-auth-helper-inline.is-success {
    color: #117a7a;
}

/* Terms step - Uber-style spaced layout */
.buggy-auth-terms-heading {
    margin-bottom: 18px;
    padding-top: 58px;
}

.buggy-auth-terms-heading h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -0.03em;
    margin: 0;
    text-align: left;
}

.buggy-auth-terms-body {
    margin-bottom: 0;
    flex-grow: 1;
}

.buggy-auth-terms-body p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #222222;
    text-align: left;
}

.buggy-auth-terms-body p:last-child {
    margin-bottom: 0;
}

.buggy-auth-terms-body a {
    color: #0066cc;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Terms step - full-height flex layout with I Agree pinned to bottom */
.buggy-auth-step[data-driver-auth-step="signup-terms"] .buggy-auth-name-card-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 40px);
}

.buggy-terms-agree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(26, 26, 26, 0.12);
    padding: 18px 0 0;
    margin-top: auto;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
}

.buggy-terms-agree-row input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #222;
    cursor: pointer;
}

.buggy-terms-submit-button {
    display: block;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: #111111;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 22px;
    cursor: pointer;
}

.buggy-terms-submit-button:disabled {
    background: #f1f1f1;
    color: #a7a7a7;
    cursor: default;
}

.buggy-auth-terms-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

.buggy-auth-terms-back-button {
    align-items: center;
    background: #f5f5f5;
    border: 0;
    border-radius: 999px;
    color: #111111;
    cursor: pointer;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    padding: 0;
    width: 52px;
}

.buggy-auth-terms-back-button:hover {
    background: #efefef;
}

.buggy-auth-terms-card {
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(26, 26, 26, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.buggy-auth-terms-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

.buggy-auth-terms-card a {
    color: var(--primary-color);
}

.buggy-auth-topsheet[hidden] {
    display: none;
}

.buggy-auth-topsheet {
    inset: 0;
    position: fixed;
    z-index: 1200;
}

.buggy-auth-topsheet-backdrop {
    background: rgba(15, 23, 42, 0.42);
    border: 0;
    inset: 0;
    position: absolute;
    width: 100%;
}

.buggy-auth-topsheet-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 28px 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    display: grid;
    gap: 14px;
    left: 0;
    margin: 0 auto;
    max-width: 420px;
    padding: 18px 20px 26px;
    position: absolute;
    right: 0;
    top: 0;
}

.buggy-auth-topsheet-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.buggy-auth-topsheet-header h4 {
    font-size: 20px;
    margin: 0;
}

.buggy-auth-topsheet-close {
    background: transparent;
    border: 0;
    color: var(--text-light);
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

.buggy-auth-topsheet-copy {
    display: grid;
    gap: 10px;
}

.buggy-auth-topsheet-copy p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.buggy-auth-topsheet-copy a {
    color: var(--primary-color);
    font-weight: 600;
}

.buggy-auth-preferred-dialog[hidden] {
    display: none;
}

.buggy-auth-preferred-dialog {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.buggy-auth-preferred-dialog.is-open {
    pointer-events: auto;
}

body.buggy-auth-sheet-open,
html:has(body.buggy-auth-sheet-open) {
    overflow: hidden;
}

.buggy-auth-preferred-dialog__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.buggy-auth-preferred-dialog.is-open .buggy-auth-preferred-dialog__backdrop {
    opacity: 1;
}

.buggy-auth-preferred-dialog__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    min-height: calc(100dvh - 8px);
    margin: 0;
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.16);
    padding: 18px 24px calc(22px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.24s ease;
}

.buggy-auth-preferred-dialog__footer {
    margin-top: auto;
    padding-top: 24px;
}

.buggy-auth-preferred-dialog.is-open .buggy-auth-preferred-dialog__panel {
    transform: translateY(0);
}

.buggy-auth-preferred-dialog__header {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    padding: 0 0 18px;
}

.buggy-auth-preferred-dialog__header h4 {
    margin: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.buggy-auth-preferred-dialog__spacer {
    width: 32px;
    height: 32px;
}

.buggy-auth-preferred-dialog__close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: #222;
    font-size: 28px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buggy-auth-preferred-dialog__body {
    display: grid;
    gap: 12px;
}

.buggy-auth-preferred-dialog__field {
    margin-bottom: 0;
}

.buggy-auth-preferred-dialog__copy {
    margin: 0;
    color: var(--text-light);
}

.buggy-auth-preferred-dialog__save {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: #222;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    padding: 16px 18px;
}

.buggy-auth-legalviewer[hidden] {
    display: none;
}

.buggy-auth-legalviewer {
    background: #ffffff;
    inset: 0;
    position: fixed;
    z-index: 1400;
}

.buggy-auth-legalviewer__chrome {
    align-items: center;
    background: #ffffff;
    display: grid;
    gap: 10px;
    grid-template-columns: 44px 1fr 44px;
    left: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.buggy-auth-legalviewer__close,
.buggy-auth-legalviewer__menu {
    align-items: center;
    background: #f5f5f5;
    border: 0;
    border-radius: 999px;
    color: #111111;
    display: inline-flex;
    font-size: 1.5rem;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.buggy-auth-legalviewer__menu {
    font-size: 1rem;
    font-weight: 700;
}

.buggy-auth-legalviewer__host {
    color: #111111;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

.buggy-auth-legalviewer__frame {
    border: 0;
    display: block;
    height: calc(100dvh - (env(safe-area-inset-top, 0px) + 70px));
    width: 100%;
}

.buggy-auth-checkcard {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(42, 200, 200, 0.08);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

.buggy-auth-checkcard input {
    margin-top: 3px;
    accent-color: var(--primary-color);
}

.buggy-auth-choice-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.buggy-auth-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 18px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.buggy-auth-choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(42, 200, 200, 0.35);
    box-shadow: 0 12px 28px rgba(42, 200, 200, 0.08);
}

.buggy-auth-choice-card input {
    margin-top: 4px;
    accent-color: var(--primary-color);
}

.buggy-auth-choice-list-compact .buggy-auth-choice-card {
    padding: 16px 18px;
}

.buggy-auth-choice-copy {
    display: grid;
    gap: 4px;
}

.buggy-auth-choice-copy strong {
    font-size: 16px;
    color: var(--text-dark);
}

.buggy-auth-choice-copy span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light);
}

.buggy-auth-choice-requirement {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(42, 200, 200, 0.12);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.buggy-driver-auth-shell[data-current-step="signup-name"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="signup-terms"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="signup-earn"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="signup-path"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="signup-vehicle"] .buggy-auth-state-header,
.buggy-driver-auth-shell[data-current-step="signup-credentials"] .buggy-auth-state-header {
    display: none;
}

.buggy-auth-message {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.buggy-auth-message-error {
    background: rgba(220, 53, 69, 0.08);
    color: #b42318;
}

/* Airbnb-style OTP confirmation */
.buggy-auth-otp-view {
    display: none;
}

.buggy-auth-otp-view.is-active {
    display: block;
}

.buggy-auth-otp-validate {
    text-align: center;
}

.lock-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.digital-lock {
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 20px;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(42, 200, 200, 0.15);
    border: 2px solid rgba(42, 200, 200, 0.2);
}

.lock-screen {
    background: #1a202c;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.lock-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(42, 200, 200, 0.12) 50%, transparent 70%);
    animation: screenScan 3s ease-in-out infinite;
}

.lock-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.lock-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #374151;
    border: 2px solid #4b5563;
    transition: all 0.3s ease;
}

.lock-dots .dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(42, 200, 200, 0.7);
}

.lock-icon {
    font-size: 24px;
    color: #6b7280;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.lock-container.ready .lock-icon {
    color: var(--primary-color);
}

.buggy-auth-otp-heading {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.buggy-auth-otp-copy {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
}

.code-input-section {
    margin-bottom: 20px;
}

.buggy-auth-otp-code-field {
    margin-bottom: 0;
    overflow: hidden;
}

.buggy-auth-otp-code-field:focus-within,
.buggy-auth-otp-code-field.is-focused {
    outline: none;
    z-index: 1;
}

.buggy-auth-otp-code-field .buggy-quote-input {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.35rem;
    font-family: 'Courier New', monospace;
    padding: 26px 14px 8px 14px;
}

.buggy-auth-otp-code-field .buggy-quote-label {
    padding: 28px 14px 10px 14px;
    width: auto;
    text-align: left;
}

.code-input-section .input-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(42, 200, 200, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.code-input-section .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #24b3b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
    position: relative;
}

.code-input-section .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
    animation: progressShine 1.5s ease-in-out infinite;
}

#driverOtpCodeSection.has-error .buggy-quote-input {
    border-bottom-color: #e24c4c;
    box-shadow: 0 0 0 0.25rem rgba(226, 76, 76, 0.2);
}

#driverOtpCodeSection.has-error .input-progress {
    background: rgba(226, 76, 76, 0.15);
}

#driverOtpCodeSection.has-error .progress-bar {
    background: #e24c4c;
}

.buggy-auth-otp-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
    margin-bottom: 18px;
}

.buggy-auth-otp-back {
    position: absolute;
    left: 0;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 18px;
    padding: 0;
}

.buggy-auth-step[data-driver-auth-step="otp"] .buggy-auth-otp-validate {
    position: relative;
    padding-top: 6px;
}

.buggy-auth-step[data-driver-auth-step="otp"] .buggy-auth-name-card-header {
    position: absolute;
    top: -18px;
    left: -20px;
    margin: 0;
}

.buggy-auth-otp-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.buggy-auth-otp-subcopy {
    margin: -10px 0 18px;
    font-size: 12px;
    color: var(--text-light);
}

.buggy-auth-otp-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #e24c4c;
    border-radius: 10px;
    background: rgba(226, 76, 76, 0.08);
    color: #c0392b;
    font-size: 12px;
}

.buggy-auth-otp-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.buggy-auth-otp-link {
    border: none;
    background: transparent;
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 13px;
    padding: 0;
    order: 2;
}

.buggy-auth-otp-footer .buggy-driver-auth-primary-button {
    order: 1;
    min-width: 180px;
    margin-top: 0;
}

.buggy-auth-otp-options {
    display: grid;
    gap: 14px;
    margin: 12px 0 16px;
}

.buggy-auth-otp-option {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    font-size: 13px;
    color: var(--text-dark);
    align-items: center;
}

.buggy-auth-otp-option input {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    width: 18px;
    height: 18px;
    margin: 0;
    border-radius: 50%;
    border: 2px solid #b0b0b0;
    background: #ffffff;
    appearance: none;
    position: relative;
    cursor: pointer;
}

.buggy-auth-otp-option input:checked {
    border-color: #1a1a1a;
    background: radial-gradient(circle, #1a1a1a 0 4px, #ffffff 4px 5px, transparent 5px);
}

.buggy-auth-otp-option input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.15);
}

.buggy-auth-otp-option-main {
    grid-column: 1;
    font-weight: 600;
    justify-self: start;
}

.buggy-auth-otp-option-sub {
    display: block;
    grid-column: 1;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 2px;
    justify-self: start;
}

.buggy-auth-otp-resend {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    background: #1f1f1f;
    color: #fff;
}

.buggy-auth-otp-resend:disabled {
    background: rgba(26, 26, 26, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

@keyframes screenScan {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progressShine {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(20px);
    }
}

.buggy-driver-auth-shell[data-current-step="otp"] .buggy-logo-section {
    display: none;
}

.buggy-auth-message-status {
    background: rgba(42, 200, 200, 0.12);
    color: #117a7a;
}

.buggy-auth-debug {
    margin: 18px 0 0;
    border-radius: 18px;
    background: #edf0f5;
    color: #122033;
    padding: 14px;
}

.buggy-auth-debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.buggy-auth-debug-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.buggy-auth-debug-button {
    border: none;
    border-radius: 999px;
    background: rgba(18, 32, 51, 0.08);
    color: #122033;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.buggy-auth-debug-log {
    margin: 0;
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
}

@media (min-width: 768px) {
    .buggy-auth-preferred-dialog {
        align-items: center;
        padding: 24px;
    }

    .buggy-auth-preferred-dialog__panel {
        max-width: 480px;
        min-height: auto;
        border-radius: 24px;
        box-shadow: 0 24px 72px rgba(15, 23, 42, 0.18);
        padding: 18px 24px 24px;
        transform: scale(0.96);
    }

    .buggy-auth-preferred-dialog.is-open .buggy-auth-preferred-dialog__panel {
        transform: scale(1);
    }

    .buggy-auth-preferred-dialog__header {
        padding-bottom: 24px;
    }

    .buggy-auth-preferred-dialog__header h4 {
        font-size: 24px;
        line-height: 1.2;
    }

    .buggy-auth-preferred-dialog__copy {
        font-size: 14px;
        line-height: 1.5;
    }

    .buggy-driver-auth-shell[data-current-step="signup-name"] {
        max-width: 568px;
        padding: 26px 28px 32px;
    }
}

@media (max-width: 480px) {
    .buggy-auth-preferred-dialog {
        align-items: flex-end;
    }

    .buggy-auth-preferred-dialog__panel {
        min-height: 0;
        height: calc(100dvh - 8px);
        padding: 18px 24px calc(22px + env(safe-area-inset-bottom));
    }

    .buggy-auth-step[data-driver-auth-step="signup-name"] #driverSignupNameForm {
        max-width: none;
        padding-top: 14px;
    }

    .buggy-driver-auth-shell[data-current-step="signup-name"] {
        max-width: 100%;
        padding: 14px 22px 22px;
        border-radius: 28px;
    }

    .buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-name-card-header {
        position: absolute;
        top: -14px;
        left: -24px;
        margin: 0;
    }

    .buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro {
        margin-bottom: 22px;
    }

    .buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro h3 {
        font-size: 23px;
        line-height: 1.12;
    }

    .buggy-auth-step[data-driver-auth-step="signup-name"] .buggy-auth-panel-intro p {
        font-size: 12px;
        line-height: 1.3;
    }

    #login_border {
        padding: 30px 22px 32px;
        border-radius: 28px;
    }

    .buggy-logo-section {
        margin-bottom: 40px;
    }

    .buggy-logo-icon {
        width: 120px;
        height: 120px;
        margin-bottom: 40px;
    }

    .buggy-driver-auth-shell .buggy-logo-section {
        margin-bottom: 8px;
    }

    .buggy-driver-auth-shell .buggy-logo-icon {
        width: 90px;
        height: 90px;
        margin: 24px auto 40px;
    }

    .buggy-driver-wheel-svg {
        width: 120px;
        height: 120px;
    }

    .buggy-auth-title {
        font-size: 46px;
    }

    .buggy-auth-subtitle {
        margin-top: 10px;
        padding-bottom: 14px;
    }

    .buggy-auth-subtitle::after {
        width: 136px;
    }

    .buggy-driver-auth-shell .buggy-auth-subtitle {
        padding-bottom: 4px;
    }

    .buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] {
        max-width: 100%;
        padding: 18px 24px 28px;
        border-radius: 28px;
    }

    .buggy-driver-auth-shell[data-current-step="lookup-phone"][data-signup-source="email_lookup"] #driverLookupPhoneForm {
        max-width: none;
    }

    .buggy-auth-inline-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .buggy-auth-inline-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .buggy-auth-choice-card {
        padding: 15px 16px;
    }

    .buggy-auth-preferred-dialog__panel {
        max-width: none;
    }
}
