.customer-auth-modal {
    --ca-primary: #16a34a;
    --ca-primary-dark: #15803d;
    --ca-text: #111827;
    --ca-muted: #6b7280;
    --ca-border: #e5e7eb;
    --ca-soft: #f8fafc;
    --ca-danger: #dc2626;
}

.customer-auth-modal .modal-dialog {
    max-width: 400px;
    margin: 1rem auto;
    padding: 0 12px;
}

.customer-auth-modal .ca-card {
    position: relative;
    padding: 28px 24px 18px;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    color: var(--ca-text);
    text-align: center;
    overflow: hidden;
}

.customer-auth-modal .ca-card.is-busy,
.customer-auth-modal .ca-card.is-done {
    pointer-events: none;
}

.customer-auth-modal .ca-card.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
}

.customer-auth-modal .ca-icon-btn {
    position: absolute;
    top: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ca-muted);
    font-size: 22px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.customer-auth-modal .ca-icon-btn:hover {
    background: #f3f4f6;
    color: var(--ca-text);
}

.customer-auth-modal .ca-close {
    right: 16px;
}

.customer-auth-modal .ca-back {
    left: 16px;
}

.customer-auth-modal [hidden] {
    display: none !important;
}

.customer-auth-modal .ca-logo {
    display: flex;
    justify-content: center;
    margin: 0 48px 16px;
}

.customer-auth-modal .ca-logo img {
    max-width: 140px;
    max-height: 52px;
    object-fit: contain;
}

.customer-auth-modal .ca-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ca-text);
}

.customer-auth-modal .ca-subtitle {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ca-muted);
}

.customer-auth-modal .ca-subtitle strong {
    color: var(--ca-text);
}

.customer-auth-modal .ca-nowrap {
    white-space: nowrap;
}

/* auth tabs */
.customer-auth-modal .ca-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ca-border);
    margin-bottom: 20px;
}

.customer-auth-modal .ca-tab {
    flex: 1;
    padding: 10px 16px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    color: var(--ca-muted);
    cursor: pointer;
    text-align: center;
    transition: color .15s ease, border-color .15s ease;
}

.customer-auth-modal .ca-tab:hover {
    color: var(--ca-text);
}

.customer-auth-modal .ca-tab.is-active {
    color: var(--ca-primary);
    border-bottom-color: var(--ca-primary);
}

/* single text / password inputs */
.customer-auth-modal .ca-input-group {
    margin-bottom: 14px;
}

.customer-auth-modal .ca-single-input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
    color: var(--ca-text);
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.customer-auth-modal .ca-single-input:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.customer-auth-modal .ca-single-input::placeholder {
    color: #9ca3af;
}

.customer-auth-modal .ca-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.customer-auth-modal .ca-single-input--password {
    padding-right: 46px;
}

.customer-auth-modal .ca-password-toggle {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    transition: color .15s ease;
}

.customer-auth-modal .ca-password-toggle:hover {
    color: var(--ca-text);
}

/* switch prompt under button */
.customer-auth-modal .ca-switch-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 14px;
    font-size: 13.5px;
}

.customer-auth-modal .ca-switch-prompt__text {
    color: var(--ca-muted);
}

.customer-auth-modal .ca-switch-btn {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ca-primary);
    cursor: pointer;
    transition: color .15s ease;
}

.customer-auth-modal .ca-switch-btn:hover {
    color: var(--ca-primary-dark);
    text-decoration: underline;
}

/* phone input */
.customer-auth-modal .ca-phone {
    display: flex;
    align-items: stretch;
    height: 54px;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.customer-auth-modal .ca-phone:focus-within {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.customer-auth-modal .ca-phone__prefix {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-right: 1px solid var(--ca-border);
    background: var(--ca-soft);
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.customer-auth-modal .ca-phone__input {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
    letter-spacing: .5px;
    color: var(--ca-text);
}

.customer-auth-modal .ca-phone__input::placeholder {
    color: #9ca3af;
}

/* text inputs */
.customer-auth-modal .ca-field {
    margin-bottom: 14px;
    text-align: left;
}

.customer-auth-modal .ca-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.customer-auth-modal .ca-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    font-size: 15px;
    color: var(--ca-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.customer-auth-modal .ca-input:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.customer-auth-modal .ca-input.is-invalid {
    border-color: var(--ca-danger);
}

.customer-auth-modal .ca-field__error,
.customer-auth-modal .ca-error {
    font-size: 13px;
    line-height: 1.4;
    color: var(--ca-danger);
}

.customer-auth-modal .ca-field__error:not(:empty) {
    margin-top: 4px;
}

.customer-auth-modal .ca-error {
    min-height: 18px;
    margin: 8px 2px 0;
    text-align: left;
}

/* buttons */
.customer-auth-modal .ca-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    margin-top: 10px;
    border: 0;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.customer-auth-modal .ca-btn--primary {
    background: var(--ca-primary);
    color: #fff;
}

.customer-auth-modal .ca-btn--primary:hover:not(:disabled) {
    background: var(--ca-primary-dark);
}

.customer-auth-modal .ca-btn:disabled {
    background: #d1d5db;
    color: #fff;
    cursor: not-allowed;
}

.customer-auth-modal .ca-btn.is-loading:disabled {
    background: var(--ca-primary);
    cursor: progress;
}

.customer-auth-modal .ca-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ca-spin .7s linear infinite;
}

.customer-auth-modal .ca-link .ca-spinner {
    width: 14px;
    height: 14px;
    border-color: rgba(22, 163, 74, 0.3);
    border-top-color: var(--ca-primary);
}

@keyframes ca-spin {
    to {
        transform: rotate(360deg);
    }
}

.customer-auth-modal .ca-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ca-primary);
    cursor: pointer;
}

.customer-auth-modal .ca-link:hover {
    color: var(--ca-primary-dark);
    text-decoration: underline;
}

.customer-auth-modal .ca-link--inline {
    display: inline;
    margin-left: 4px;
}

.customer-auth-modal .ca-link--muted {
    display: block;
    margin: 18px auto 2px;
    font-weight: 500;
    color: #9ca3af;
}

.customer-auth-modal .ca-link--muted:hover {
    color: var(--ca-muted);
    text-decoration: none;
}

/* divider + google */
.customer-auth-modal .ca-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ca-primary);
}

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

.customer-auth-modal .ca-google {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

/* otp */
.customer-auth-modal .ca-otp {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.customer-auth-modal .ca-otp__box {
    width: 48px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--ca-text);
    caret-color: var(--ca-primary);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.customer-auth-modal .ca-otp__box:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.customer-auth-modal .ca-otp__box.is-filled {
    border-color: #86efac;
    background: #f0fdf4;
}

.customer-auth-modal .ca-resend {
    margin: 16px 0 6px;
    font-size: 14px;
    color: var(--ca-muted);
}

.customer-auth-modal .ca-hint {
    margin: 14px 0 4px;
    font-size: 13px;
    color: #9ca3af;
}

@media (max-width: 400px) {
    .customer-auth-modal .ca-card {
        padding: 24px 18px 14px;
    }

    .customer-auth-modal .ca-title {
        font-size: 21px;
    }

    .customer-auth-modal .ca-tab {
        font-size: 14px;
        padding: 8px 12px 10px;
    }

    .customer-auth-modal .ca-single-input,
    .customer-auth-modal .ca-phone,
    .customer-auth-modal .ca-btn {
        height: 50px;
    }

    .customer-auth-modal .ca-otp {
        gap: 6px;
    }

    .customer-auth-modal .ca-otp__box {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }
}
