.nfb-cab-auth-wrapper {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f3f3f3;
    --gray-200: #eeeeee;
    --gray-300: #e5e5e5;
    --gray-400: #cccccc;
    --gray-500: #999999;
    --gray-600: #888888;
    --gray-700: #666666;
    --gray-800: #333333;
    --blue: #276ef1;
    --error: #d32f2f;
    --success: #1e8e3e;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    background: var(--white) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--black) !important;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

.nfb-cab-auth-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.nfb-container {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    position: relative;
    min-height: 640px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.nfb-step {
    display: none;
    animation: slideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nfb-step.nfb-active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.nfb-shake {
    animation: shake 0.4s ease-in-out;
}

.nfb-cab-auth-wrapper h1 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    line-height: 1.25 !important;
    color: var(--black) !important;
    letter-spacing: -0.3px !important;
    clear: none;
}

.nfb-subtitle {
    font-size: 13px !important;
    color: var(--gray-700) !important;
    margin-bottom: 32px !important;
    line-height: 1.5 !important;
}

.nfb-input-group {
    margin-bottom: 20px;
    position: relative;
}

.nfb-cab-auth-wrapper label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    color: var(--black) !important;
}

/* Inputs */
.nfb-cab-auth-wrapper .nfb-input {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 2px solid var(--gray-100) !important;
    border-radius: 8px !important;
    background: var(--gray-100) !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    color: var(--black) !important;
    font-family: inherit !important;
    height: auto !important;
    line-height: normal !important;
}

.nfb-cab-auth-wrapper .nfb-input::placeholder { color: var(--gray-500) !important; opacity: 1; }
.nfb-cab-auth-wrapper .nfb-input:focus { 
    background: var(--white) !important; 
    border-color: var(--black) !important; 
    box-shadow: none !important;
    outline: none !important;
}
.nfb-cab-auth-wrapper .nfb-input.nfb-error { border-color: var(--error) !important; background: #fff5f5 !important; }
.nfb-cab-auth-wrapper .nfb-input.nfb-success { border-color: var(--success) !important; }

.nfb-error-text {
    font-size: 13px !important;
    color: var(--error) !important;
    margin-top: 6px !important;
    display: none;
}

.nfb-error-text.nfb-visible { display: block; }

/* Buttons */
.nfb-cab-auth-wrapper .nfb-btn {
    width: 100% !important;
    padding: 14px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
    font-family: inherit !important;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    outline: none !important;
    height: auto !important;
    line-height: normal !important;
}

.nfb-cab-auth-wrapper .nfb-btn:active { transform: scale(0.98); }

.nfb-cab-auth-wrapper .nfb-btn-primary { background: var(--black) !important; color: var(--white) !important; }
.nfb-cab-auth-wrapper .nfb-btn-primary:hover:not(:disabled) { background: var(--gray-800) !important; }
.nfb-cab-auth-wrapper .nfb-btn-primary:disabled { background: var(--gray-400) !important; cursor: not-allowed !important; opacity: 0.7 !important; }

.nfb-cab-auth-wrapper .nfb-btn-secondary { background: var(--gray-300) !important; color: var(--black) !important; gap: 12px; }
.nfb-cab-auth-wrapper .nfb-btn-secondary:hover { background: var(--gray-400) !important; }

.nfb-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 !important;
    color: var(--gray-700) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.nfb-divider::before, .nfb-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-400); }
.nfb-divider span { padding: 0 16px; }

.nfb-social-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* OTP */
.nfb-otp-container {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    justify-content: flex-start;
    width: 100%;
}
.nfb-cab-auth-wrapper .nfb-otp-input {
    flex: 1 1 0px !important;
    width: 100% !important;
    max-width: 50px !important;
    min-width: 35px !important;
    height: 50px !important;
    border: 2px solid var(--gray-300) !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    background: var(--white) !important;
    color: var(--black) !important;
    font-family: inherit !important;
    caret-color: var(--black) !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.nfb-cab-auth-wrapper .nfb-otp-input:focus { 
    border-color: var(--black) !important; 
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08) !important; 
    outline: none !important;
}
.nfb-cab-auth-wrapper .nfb-otp-input.nfb-filled { background: var(--gray-100) !important; border-color: var(--gray-400) !important; }
.nfb-cab-auth-wrapper .nfb-otp-input.nfb-error { border-color: var(--error) !important; animation: shake 0.4s ease-in-out; }

.nfb-tip { font-size: 13px !important; color: var(--gray-600) !important; margin-top: 16px !important; line-height: 1.5 !important; }
.nfb-cab-auth-wrapper .nfb-resend-btn {
    background: var(--gray-100) !important; border: 2px solid transparent !important; padding: 10px 20px !important;
    border-radius: 20px !important; font-size: 14px !important; cursor: pointer !important; margin-top: 20px !important; color: var(--black) !important;
    font-weight: 500 !important; transition: all 0.2s !important; font-family: inherit !important;
    box-shadow: none !important; outline: none !important;
}
.nfb-cab-auth-wrapper .nfb-resend-btn:hover:not(:disabled) { background: var(--gray-200) !important; border-color: var(--gray-300) !important; }
.nfb-cab-auth-wrapper .nfb-resend-btn:disabled { color: var(--gray-500) !important; cursor: not-allowed !important; }
.nfb-countdown { font-size: 13px !important; color: var(--gray-600) !important; margin-top: 8px !important; }

/* Navigation Buttons */
.nfb-nav-buttons { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; }
.nfb-cab-auth-wrapper .nfb-nav-btn {
    width: 48px !important; height: 48px !important; border-radius: 50% !important; border: none !important; background: var(--gray-100) !important;
    cursor: pointer !important; display: flex !important; align-items: center !important; justify-content: center !important;
    transition: all 0.2s !important; color: var(--black) !important; padding: 0 !important; box-shadow: none !important; outline: none !important;
}
.nfb-cab-auth-wrapper .nfb-nav-btn:hover { background: var(--gray-200) !important; }
.nfb-cab-auth-wrapper .nfb-nav-btn svg { width: 20px !important; height: 20px !important; }
.nfb-cab-auth-wrapper .nfb-nav-btn.nfb-next-btn {
    background: var(--black) !important; color: var(--white) !important; width: auto !important; padding: 0 24px !important;
    border-radius: 24px !important; font-size: 14px !important; font-weight: 500 !important; gap: 8px !important; height: 48px !important;
}
.nfb-cab-auth-wrapper .nfb-nav-btn.nfb-next-btn:hover:not(:disabled) { background: var(--gray-800) !important; }
.nfb-cab-auth-wrapper .nfb-nav-btn.nfb-next-btn:disabled { background: var(--gray-200) !important; color: var(--gray-500) !important; cursor: not-allowed !important; }

/* Terms */
.nfb-terms-text { font-size: 13px !important; line-height: 1.6 !important; color: var(--gray-800) !important; margin-bottom: 32px !important; }
.nfb-terms-text a { color: var(--blue) !important; text-decoration: none !important; font-weight: 500 !important; }
.nfb-checkbox-container {
    display: flex; align-items: center; justify-content: space-between; padding: 20px 0;
    border-top: 1px solid var(--gray-200); margin-bottom: 24px; cursor: pointer; user-select: none; transition: opacity 0.2s;
}
.nfb-checkbox-container:hover { opacity: 0.8; }
.nfb-checkbox-label { font-size: 14px !important; font-weight: 500 !important; color: var(--black) !important; }
.nfb-cab-auth-wrapper .nfb-custom-checkbox {
    width: 24px !important; height: 24px !important; border: 2px solid var(--black) !important; border-radius: 4px !important;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s ease !important; flex-shrink: 0;
    background: transparent !important;
}
.nfb-cab-auth-wrapper .nfb-custom-checkbox.nfb-checked { background: var(--black) !important; border-color: var(--black) !important; }
.nfb-custom-checkbox svg { width: 16px; height: 16px; color: var(--white); opacity: 0; transform: scale(0.5); transition: all 0.2s ease; }
.nfb-custom-checkbox.nfb-checked svg { opacity: 1; transform: scale(1); }

/* Custom Modern Minimalist Dropdown */
.nfb-cab-auth-wrapper .nfb-phone-input-group { display: flex; gap: 8px; position: relative; align-items: stretch; width: 100%; }
.nfb-cab-auth-wrapper .nfb-custom-country-dropdown { position: relative; display: inline-flex; }
.nfb-cab-auth-wrapper .nfb-country-selected {
    padding: 12px 14px !important; border: 2px solid var(--gray-100) !important; border-radius: 8px !important; background: var(--gray-100) !important;
    font-size: 14px !important; font-weight: 600 !important; cursor: pointer !important; outline: none !important; color: var(--black) !important;
    font-family: inherit !important; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important; display: flex; align-items: center; gap: 6px; min-width: 100px;
    height: auto !important; box-sizing: border-box; justify-content: center;
}
.nfb-cab-auth-wrapper .nfb-country-selected:hover { border-color: var(--gray-300) !important; background: var(--white) !important; }
.nfb-cab-auth-wrapper .nfb-country-selected:focus, .nfb-cab-auth-wrapper .nfb-country-selected.nfb-open { border-color: var(--black) !important; background: var(--white) !important; box-shadow: 0 0 0 2px rgba(0,0,0,0.05) !important; }

/* The Dropdown List */
.nfb-cab-auth-wrapper .nfb-country-list-wrap {
    position: absolute; top: calc(100% + 8px); left: 0; width: 280px; background: var(--white) !important; border: 1px solid var(--gray-200) !important;
    border-radius: 12px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; z-index: 100; display: none; overflow: hidden; opacity: 0; transform: translateY(-10px); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nfb-cab-auth-wrapper .nfb-country-list-wrap.nfb-show { display: block; opacity: 1; transform: translateY(0); }

/* The Search Input */
.nfb-cab-auth-wrapper .nfb-country-search { width: 100% !important; padding: 14px 16px !important; border: none !important; border-bottom: 1px solid var(--gray-100) !important; outline: none !important; font-size: 13px !important; background: var(--white) !important; font-family: inherit !important; color: var(--black) !important; }
.nfb-cab-auth-wrapper .nfb-country-search::placeholder { color: var(--gray-500) !important; }

/* The List Items */
.nfb-cab-auth-wrapper .nfb-country-list { list-style: none !important; margin: 0 !important; padding: 0 !important; max-height: 260px; overflow-y: auto; background: var(--white) !important; }
.nfb-cab-auth-wrapper .nfb-country-list li { padding: 12px 16px !important; display: flex !important; justify-content: space-between !important; align-items: center !important; cursor: pointer !important; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important; color: var(--black) !important; border-bottom: 1px solid var(--gray-100) !important; }
.nfb-cab-auth-wrapper .nfb-country-list li:last-child { border-bottom: none !important; }
.nfb-cab-auth-wrapper .nfb-country-list li:hover { background: var(--gray-100) !important; padding-left: 20px !important; }

/* Country selected trigger — flag + code */
.nfb-cab-auth-wrapper .nfb-country-flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.nfb-cab-auth-wrapper .nfb-country-selected-code { color: var(--black); font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }

/* Country list items — flag + code bold, name hint small */
.nfb-cab-auth-wrapper .nfb-country-flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.nfb-cab-auth-wrapper .nfb-country-code-main { color: var(--black); font-size: 13px; font-weight: 700; min-width: 46px; }
.nfb-cab-auth-wrapper .nfb-country-name-hint { color: var(--gray-500); font-size: 11.5px; font-weight: 400; text-align: right; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }

/* Legacy — keep for any remaining references */
.nfb-cab-auth-wrapper .nfb-country-name { color: var(--gray-600); font-size: 12px; font-weight: 500; text-transform: capitalize; }
.nfb-cab-auth-wrapper .nfb-country-code { color: var(--black); font-size: 13px; font-weight: 600; }

.nfb-cab-auth-wrapper .nfb-switch-mode-btn { background: transparent; border: none; color: var(--black); font-size: 13px; font-weight: 500; cursor: pointer; padding: 0; margin-top: 16px; outline: none; display: inline-block; font-family: inherit; text-decoration: underline; }
.nfb-cab-auth-wrapper .nfb-switch-mode-btn:hover { color: var(--gray-600); }

/* Loading Spinner */
.nfb-spinner {
    display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%; border-top-color: var(--white); animation: spin 0.8s linear infinite; margin-left: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.nfb-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--black); color: var(--white); padding: 12px 24px; border-radius: 8px;
    font-size: 14px; font-weight: 500; opacity: 0; transition: all 0.3s ease; z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: calc(100vw - 32px); width: max-content; text-align: center;
    box-sizing: border-box; word-break: break-word;
}
.nfb-toast.nfb-show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 480px) {
    .nfb-toast {
        bottom: 16px; left: 16px; right: 16px;
        transform: translateY(100px);
        max-width: 100%; width: auto;
        font-size: 13px; padding: 10px 16px;
        border-radius: 6px;
    }
    .nfb-toast.nfb-show { transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Step 6 — Authentication Success (Professional · Minimalist · Confetti)
   ══════════════════════════════════════════════════════════════════════════ */

/* Wrapper */
.nfb-success-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 52px 28px 48px;
    animation: nfbSuccessIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes nfbSuccessIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Burst Rings ─────────────────────────────────────────────────────────── */
.nfb-success-burst {
    position: relative;
    width: 104px;
    height: 104px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfb-burst-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid #22c55e;
    opacity: 0;
    animation: nfbBurstRing 1s cubic-bezier(.22,1,.36,1) forwards;
}
.nfb-burst-ring-1 { animation-delay: .45s; }
.nfb-burst-ring-2 { animation-delay: .6s;  transform: scale(.8); }
.nfb-burst-ring-3 { animation-delay: .75s; transform: scale(.6); border-color: #86efac; }

@keyframes nfbBurstRing {
    0%   { opacity: 0; transform: scale(.5); }
    40%  { opacity: .55; }
    100% { opacity: 0;  transform: scale(1.55); }
}

/* ── Check Circle ────────────────────────────────────────────────────────── */
.nfb-success-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px rgba(34,197,94,.15),
        0 8px 24px rgba(21,128,61,.30);
    animation: nfbCircleIn .55s .05s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes nfbCircleIn {
    from { opacity: 0; transform: scale(.5); }
    to   { opacity: 1; transform: scale(1); }
}

.nfb-check-svg {
    width: 54px;
    height: 54px;
}
.nfb-check-path {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: nfbCheckDraw .5s .42s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes nfbCheckDraw { to { stroke-dashoffset: 0; } }

/* ── Text ────────────────────────────────────────────────────────────────── */
.nfb-success-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--black);
    margin: 0 0 6px;
    animation: nfbFadeUp .42s .22s both;
}
.nfb-success-name {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
    margin: 0 0 4px;
    animation: nfbFadeUp .42s .27s both;
    min-height: 1em;
}
.nfb-success-sub {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    max-width: 220px;
    margin: 0 0 28px;
    animation: nfbFadeUp .42s .30s both;
}
@keyframes nfbFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Redirect Progress Bar ───────────────────────────────────────────────── */
.nfb-success-bar-wrap {
    width: 100%;
    max-width: 200px;
    height: 3px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 28px;
    animation: nfbFadeUp .42s .34s both;
}
.nfb-success-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 99px;
    animation: nfbBarFill 3s .6s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes nfbBarFill { from { width: 0% } to { width: 100% } }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.nfb-success-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    animation: nfbFadeUp .42s .38s both;
}
.nfb-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px 5px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    border: 1px solid transparent;
}
.nfb-badge-verified {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.nfb-badge-secure {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.nfb-badge-ready {
    background: #fafaf9;
    border-color: #e2e8f0;
    color: #475569;
}

/* ── Confetti pieces ────────────────────────────────────────────────────── */
.nfb-confetti-piece {
    border-radius: 2px;
}

/* Info note (step 4 phone pre-fill message) */
.nfb-cab-auth-wrapper .nfb-info-note {
    display: flex; align-items: flex-start; gap: 8px;
    background: #f0f4ff; border: 1px solid #c7d2fe;
    border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #374151;
}
.nfb-cab-auth-wrapper .nfb-info-note svg { flex-shrink: 0; margin-top: 1px; color: #6366f1; }

/* ── Responsive: Tablet (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .nfb-cab-auth-wrapper {
        align-items: flex-start;
        min-height: 100dvh;
    }

    .nfb-container {
        max-width: 100% !important;
        padding: 32px 20px !important;
        min-height: 0;
    }

    .nfb-cab-auth-wrapper h1 {
        font-size: 20px !important;
    }

    .nfb-otp-container {
        gap: 8px !important;
    }

    .nfb-cab-auth-wrapper .nfb-otp-input {
        max-width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }

    .nfb-nav-buttons {
        margin-top: 32px !important;
    }

    .nfb-country-list-wrap {
        width: 260px !important;
    }
}

/* ── Responsive: Mobile (≤480px) ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .nfb-container {
        padding: 24px 16px !important;
    }

    .nfb-cab-auth-wrapper h1 {
        font-size: 18px !important;
    }

    .nfb-otp-container {
        gap: 6px !important;
        justify-content: flex-start !important;
    }

    .nfb-cab-auth-wrapper .nfb-otp-input {
        max-width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    .nfb-phone-input-group {
        flex-direction: row !important;
        gap: 6px !important;
    }

    .nfb-country-selected {
        min-width: 76px !important;
        padding: 10px !important;
        font-size: 12px !important;
    }

    .nfb-country-list-wrap {
        width: 240px !important;
    }

    .nfb-btn {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .nfb-nav-btn.nfb-next-btn {
        padding: 0 18px !important;
        font-size: 13px !important;
        height: 44px !important;
    }

    .nfb-nav-btn.nfb-back-btn {
        width: 44px !important;
        height: 44px !important;
    }

    .nfb-checkbox-container {
        padding: 14px 0 !important;
    }
}

/* ── Responsive: Very small (≤360px) ─────────────────────────────────────── */
@media (max-width: 360px) {
    .nfb-container {
        padding: 20px 14px !important;
    }

    .nfb-otp-container {
        gap: 4px !important;
    }

    .nfb-cab-auth-wrapper .nfb-otp-input {
        max-width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
}

/* ── Elementor widget responsive overrides ───────────────────────────────── */
@media (max-width: 767px) {
    .elementor-widget-nfb_cab_auth .nfb-cab-auth-wrapper {
        min-height: 0;
    }
    .elementor-widget-nfb_cab_auth .nfb-container {
        padding: 24px 16px !important;
    }
}
