﻿/**
 * Swift Funds вЂ” shared styles (landing, cab, admin, install)
 */
:root {
    --sf-primary: #2563eb;
    --sf-primary-dark: #1d4ed8;
    --sf-dark: #0b0f19;
    --sf-surface: #f8fafc;
    --sf-radius: 1rem;
    --sf-radius-lg: 1.5rem;
    --sf-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
    --sf-ring: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.admin-dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
.admin-dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

/* --- Landing: range + animations --- */
.sf-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 44px;
    background: transparent;
}
.sf-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--sf-primary);
    cursor: pointer;
    margin-top: -12px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease;
}
.sf-range::-webkit-slider-thumb:hover {
    transform: scale(1.08);
}
.sf-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}
.sf-range::-moz-range-thumb {
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--sf-primary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}
.sf-range::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}

/* Same track/thumb as landing; wins over Tailwind preflight when loaded after CDN */
.cab-page .sf-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}
.cab-page .sf-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #334155;
    cursor: pointer;
    margin-top: -12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.cab-page .sf-range::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}
.cab-page .sf-range::-moz-range-thumb {
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #334155;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.fade-in-up {
    animation: sfFadeInUp 0.85s ease-out forwards;
}
.delay-100 {
    animation-delay: 0.1s;
}
.delay-200 {
    animation-delay: 0.2s;
}
@keyframes sfFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-up.delay-100,
    .fade-in-up.delay-200 {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.sf-hero-grid {
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

#navbar.sf-nav-scrolled {
    box-shadow: 0 1px 0 0 #e2e8f0;
    background: rgba(255, 255, 255, 0.97) !important;
    border-color: #e2e8f0;
}

/* --- Cabinet / app shell --- */
html.cab-html {
    min-height: 100dvh;
}

body.cab-page {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #0f172a;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    background: #ffffff;
}

body.cab-page.cab-page--wizard {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.cab-main--wizard {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cab-wizard-stack {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.cab-sms-enter {
    animation: cabSmsIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cabSmsIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.cab-step-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.cab-step-stage {
    position: relative;
    min-height: 100%;
    padding-bottom: 0.5rem;
}

.cab-glass {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border-radius: 1.25rem;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.sf-cab-trust-strip {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    padding: 0.65rem 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sf-cab-pill-ok {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.04em;
}

.sf-cab-pill-wait {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
    letter-spacing: 0.04em;
}

.sf-cab-pill-muted {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.04em;
}

.cab-wizard-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.04);
}

.cab-step-header {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cab-loader {
    background: #ffffff;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.cab-app-header {
    padding-top: env(safe-area-inset-top, 0);
    flex-shrink: 0;
}

.sf-cab-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.sf-cab-modal .relative {
    transform: translateY(8px);
    transition: transform 0.25s ease;
}
.sf-cab-modal.is-open .relative {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .cab-sms-enter,
    .cab-step-wrap-flash {
        animation: none !important;
    }
}

/* Refined surfaces (cab) */
.sf-cab-panel {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.98);
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px -12px rgba(15, 23, 42, 0.1);
}

.sf-cab-panel--tint-red {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #fca5a5;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px -12px rgba(15, 23, 42, 0.08);
}

.sf-cab-panel--tint-amber {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #fcd34d;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px -12px rgba(15, 23, 42, 0.08);
}

.sf-cab-panel.sf-cab-note-amber {
    background: #ffffff;
    border-color: #e2e8f0;
}

.sf-cab-panel.sf-cab-note-blue {
    background: #ffffff;
    border-color: #e2e8f0;
}

.sf-cab-panel.sf-cab-note-muted {
    background: #fafafa;
    border-color: #e2e8f0;
}

.sf-cab-dropzone {
    min-height: 14rem;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #fafafa;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.sf-cab-dropzone:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.sf-cab-review-total {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sf-cab-footer-bar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.06);
}

@media (min-width: 768px) {
    body.cab-page .sf-cab-footer-bar.cab-footer-md-reset {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border-top: none;
    }
}

.sf-cab-hero-approved {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.cab-page .step-enter {
    animation: sfCabStepIn 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes sfCabStepIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.cab-page .step-exit {
    animation: sfCabStepOut 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes sfCabStepOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-14px) scale(0.99);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.cab-page .step-enter,
    body.cab-page .step-exit {
        animation: none !important;
    }
    body.cab-page .step-enter {
        opacity: 1;
        transform: none;
    }
}

.progress-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.45),
        transparent
    );
    animation: sfShimmer 1.8s ease-in-out infinite;
}
@keyframes sfShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.cab-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.45s ease,
        box-shadow 0.45s ease;
}
.cab-step-dot.active {
    background: #2563eb;
    transform: scale(1.25);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.cab-step-dot.done {
    background: #10b981;
}

body.cab-page .cab-step-dot.active {
    background: #334155;
    box-shadow: 0 2px 8px rgba(51, 65, 85, 0.2);
}
body.cab-page .cab-step-dot.done {
    background: #64748b;
    box-shadow: none;
}

@keyframes cabStepFlash {
    0% {
        opacity: 1;
    }
    40% {
        opacity: 0.92;
    }
    100% {
        opacity: 1;
    }
}
.cab-step-wrap-flash {
    animation: cabStepFlash 0.5s ease-in-out;
}

#mobile-nav-panel:not(.hidden) {
    pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
    .progress-shimmer {
        animation: none;
    }
}

.step-section {
    display: none;
    width: 100%;
}
/* Active wizard step: overrides .step-section { display: none } */
body.cab-page .step-section.step-enter {
    display: block;
}
.step-enter {
    display: block;
    animation: sfSpringUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.step-exit {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: sfScaleFadeOut 0.4s ease forwards;
    pointer-events: none;
}
@keyframes sfSpringUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes sfScaleFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.shake {
    animation: sfShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes sfShake {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }
    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.input-float {
    width: 100%;
    padding: 1.5rem 1rem 0.5rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: var(--sf-radius);
    outline: none;
    font-weight: 700;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.input-float:focus {
    border-color: var(--sf-primary);
    box-shadow: var(--sf-ring);
}
.input-float:focus-visible {
    outline: 2px solid var(--sf-primary);
    outline-offset: 2px;
}
.label-float {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s;
}
.input-float:focus + .label-float,
.input-float:not(:placeholder-shown) + .label-float {
    top: 0.35rem;
    font-size: 0.65rem;
    color: var(--sf-primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.cab-page .input-float {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    font-weight: 600;
}
body.cab-page .input-float:focus {
    border-color: #334155;
    box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.1);
}
body.cab-page .input-float:focus + .label-float,
body.cab-page .input-float:not(:placeholder-shown) + .label-float {
    color: #334155;
}

.glass-card {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--sf-shadow);
}

.sf-loader-ring {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    animation: sfLoaderSpin 0.7s linear infinite;
}
body.cab-page .sf-loader-ring {
    border-top-color: #334155;
}
@keyframes sfLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}
.pay-tab-content {
    display: none;
}
.pay-tab-content.active {
    display: block;
    animation: sfFadeIn 0.4s ease;
}
@keyframes sfFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#loader {
    display: none;
}

/* --- Admin --- */
body.admin-page {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #0f172a;
    -webkit-tap-highlight-color: transparent;
}

/* --- Install --- */
.install-page {
    font-family: 'Manrope', system-ui, sans-serif;
}
.install-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(37, 99, 235, 0.18), transparent 50%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(99, 102, 241, 0.15), transparent 50%),
        linear-gradient(165deg, #f8fafc 0%, #e0e7ff 45%, #f1f5f9 100%);
    z-index: 0;
}
.install-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.install-input:focus {
    box-shadow: var(--sf-ring);
}

/* --- Landing body polish --- */
body.landing-page {
    scroll-behavior: smooth;
}

/* Landing: calm nav and cards without flashy effects */
.sf-nav-link:hover {
    color: #1e293b;
}
.sf-card-quiet {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sf-card-quiet:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 40px -15px rgba(15, 23, 42, 0.08);
}

.sf-footer-rule::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: #334155;
}

@media (prefers-reduced-motion: reduce) {
    .sf-loader-ring {
        animation: none;
        border-top-color: #2563eb;
    }
    html.sf-nav-loading::before {
        animation: none;
    }
}

/* AJAX navigation (sf-nav.js) */
html.sf-nav-loading {
    cursor: wait;
}
html.sf-nav-loading #sf-root {
    opacity: 0.88;
    pointer-events: none;
    transition: opacity 0.12s ease;
}
html.sf-nav-loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2147483646;
    background: linear-gradient(90deg, #2563eb, #6366f1, #2563eb);
    background-size: 200% 100%;
    animation: sf-nav-bar 0.9s ease-in-out infinite;
}
@keyframes sf-nav-bar {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Admin: collapsed settings block */
.admin-page details summary {
    list-style: none;
}
.admin-page details summary::-webkit-details-marker {
    display: none;
}

.sf-admin-details > summary {
    list-style: none;
}
.sf-admin-details > summary::-webkit-details-marker {
    display: none;
}
.sf-admin-details[open] > summary .sf-admin-details-chevron {
    transform: rotate(90deg);
}
/* prevent inner text selection on summary click */
.sf-admin-details > summary { user-select: none; -webkit-user-select: none; }

/* ===================================================================
   GLOBAL ENHANCEMENTS вЂ” Effects, Responsiveness, Visual Polish
   =================================================================== */

/* Smooth scroll everywhere */
html { scroll-behavior: smooth; }

/* Better tap highlight on mobile */
* { -webkit-tap-highlight-color: transparent; }

/* в”Ђв”Ђв”Ђ Button Effects в”Ђв”Ђв”Ђ */
button, [role="button"], a.btn {
    -webkit-user-select: none;
    user-select: none;
}

/* Ripple effect base */
.sf-ripple {
    position: relative;
    overflow: hidden;
}
.sf-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.sf-ripple:active::after {
    opacity: 1;
    transition: opacity 0s;
}

/* в”Ђв”Ђв”Ђ Card Glow on Hover в”Ђв”Ђв”Ђ */
.sf-card-glow {
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.sf-card-glow:hover {
    box-shadow: 0 8px 40px -8px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
}

/* в”Ђв”Ђв”Ђ Gradient Border Cards в”Ђв”Ђв”Ђ */
.sf-gradient-border {
    position: relative;
    background: #fff;
    border-radius: 1rem;
}
.sf-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(1rem + 1px);
    background: linear-gradient(135deg, #e0e7ff, #dbeafe, #e0f2fe, #f0fdf4);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sf-gradient-border:hover::before {
    opacity: 1;
}

/* в”Ђв”Ђв”Ђ Pulse Badge в”Ђв”Ђв”Ђ */
@keyframes sfPulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}
.sf-pulse-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sf-pulse-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: currentColor;
    animation: sfPulseRing 2s cubic-bezier(0.2, 0, 0.8, 1) infinite;
}

/* в”Ђв”Ђв”Ђ Floating animation в”Ђв”Ђв”Ђ */
@keyframes sfFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.sf-float {
    animation: sfFloat 3s ease-in-out infinite;
}

/* в”Ђв”Ђв”Ђ Entrance animations в”Ђв”Ђв”Ђ */
@keyframes sfSlideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes sfSlideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes sfZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.sf-slide-left  { animation: sfSlideInLeft  0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.sf-slide-right { animation: sfSlideInRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.sf-zoom-in     { animation: sfZoomIn       0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* в”Ђв”Ђв”Ђ Skeleton shimmer в”Ђв”Ђв”Ђ */
@keyframes sfSkeleton {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.sf-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: sfSkeleton 1.4s ease infinite;
    border-radius: 0.5rem;
}

/* в”Ђв”Ђв”Ђ Number counter pop в”Ђв”Ђв”Ђ */
@keyframes sfCountPop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.sf-count-pop {
    animation: sfCountPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* в”Ђв”Ђв”Ђ Admin panel enhancements в”Ђв”Ђв”Ђ */
.admin-page {
    background: #f8fafc;
    color: #0f172a;
}

/* Admin tab active indicator */
.sf-tab-btn.active {
    position: relative;
}
.sf-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: #2563eb;
    border-radius: 2px 2px 0 0;
}

/* Admin cards hover */
.admin-page .rounded-2xl,
.admin-page .rounded-xl {
    transition: box-shadow 0.2s ease;
}

/* Copy button feedback */
.sf-copy-code.copied {
    background: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
    color: #065f46 !important;
}
.sf-copy-code .copy-icon {
    transition: transform 0.2s ease;
}
.sf-copy-code:active .copy-icon {
    transform: scale(0.8);
}

/* Request item hover */
.request-item {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.request-item:hover {
    box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

/* в”Ђв”Ђв”Ђ Cab page improvements в”Ђв”Ђв”Ђ */
.cab-page {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
}

/* Cab glass card improved */
.cab-glass {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.8) inset,
        0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Dashboard compact grid */
.cab-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .cab-dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Stat card */
.cab-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cab-stat-card:hover {
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

/* Status badge glow */
.status-approved {
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border: 1px solid #6ee7b7;
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.status-pending {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid #fcd34d;
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.status-rejected {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    border: 1px solid #fca5a5;
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

/* в”Ђв”Ђв”Ђ Portal login page в”Ђв”Ђв”Ђ */
.portal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.05),
        0 25px 50px -12px rgba(15, 23, 42, 0.12);
    border-radius: 1.5rem;
}

/* в”Ђв”Ђв”Ђ Mobile-first enhancements в”Ђв”Ђв”Ђ */
@media (max-width: 640px) {
    /* Bigger tap targets on mobile */
    button:not([class*="w-"]):not([class*="min-h-"]),
    a:not([class*="min-h-"]) {
        min-height: 44px;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Compact admin cards */
    .admin-page .px-4 { padding-left: 1rem; padding-right: 1rem; }
    .admin-page .px-6 { padding-left: 1rem; padding-right: 1rem; }

    /* Better font sizes on small screens */
    .font-display { font-size: clamp(1rem, 4vw, 1.5rem); }
}

/* в”Ђв”Ђв”Ђ Touch device improvements в”Ђв”Ђв”Ђ */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work on touch */
    .sf-card-glow:hover { transform: none; }
    .request-item:hover { transform: none; }
    .cab-stat-card:hover { transform: none; }
}

/* в”Ђв”Ђв”Ђ High-DPI / Retina в”Ђв”Ђв”Ђ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cab-glass {
        border-width: 0.5px;
    }
}

/* в”Ђв”Ђв”Ђ Dark mode media query (basic) в”Ђв”Ђв”Ђ */
@media (prefers-color-scheme: dark) {
    :root {
        --sf-surface: #0f172a;
    }
    .cab-loader {
        background: #0f172a;
    }
}

/* в”Ђв”Ђв”Ђ Print styles в”Ђв”Ђв”Ђ */
@media print {
    .cab-wizard-footer,
    .cab-app-header,
    header,
    #loader {
        display: none !important;
    }
}

/* в”Ђв”Ђв”Ђ Focus visible improvements в”Ђв”Ђв”Ђ */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* в”Ђв”Ђв”Ђ Landing page subtle bg pattern в”Ђв”Ђв”Ђ */
.sf-bg-dots {
    background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
}

/* в”Ђв”Ђв”Ђ Hero section gradient в”Ђв”Ђв”Ђ */
.sf-hero-gradient {
    background: linear-gradient(
        135deg,
        #f0f9ff 0%,
        #e0f2fe 25%,
        #f0f4ff 50%,
        #fafafa 100%
    );
}

/* в”Ђв”Ђв”Ђ Canadian maple accent в”Ђв”Ђв”Ђ */
.sf-maple-accent {
    color: #dc2626;
}
.sf-maple-bg {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid #fecaca;
}

/* в”Ђв”Ђв”Ђ Glass button в”Ђв”Ђв”Ђ */
.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* в”Ђв”Ђв”Ђ Notification dot в”Ђв”Ђв”Ђ */
.sf-notif-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    position: absolute;
    top: -2px;
    right: -2px;
    animation: sfPulseRing 2s ease infinite;
}

/* в”Ђв”Ђв”Ђ Progress bar animated в”Ђв”Ђв”Ђ */
.sf-progress-bar-animated {
    position: relative;
    overflow: hidden;
}
.sf-progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: sfShimmer 1.5s ease-in-out infinite;
}

/* в”Ђв”Ђв”Ђ Stagger animation helper в”Ђв”Ђв”Ђ */
.sf-stagger > * {
    animation: sfFadeInUp 0.5s ease-out both;
}
.sf-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.sf-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.sf-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.sf-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.sf-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.sf-stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* Admin stat numbers */
.sf-admin-stat {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

/* Better scrollable tables */
.sf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* в”Ђв”Ђв”Ђ Telegram badge в”Ђв”Ђв”Ђ */
.telegram-connected {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    color: #0369a1;
    font-size: 0.7rem;
    font-weight: 700;
}

/* в”Ђв”Ђв”Ђ Cab dashboard card compact в”Ђв”Ђв”Ђ */
.cab-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 0.5rem;
}
.cab-info-row:last-child { border-bottom: none; }
.cab-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    white-space: nowrap;
}
.cab-info-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* в”Ђв”Ђв”Ђ Loading skeleton for admin в”Ђв”Ђв”Ђ */
.sf-admin-skeleton-row {
    height: 56px;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
}

/* в”Ђв”Ђв”Ђ Safe area support for iPhone notch / Dynamic Island в”Ђв”Ђв”Ђ */
.cab-wizard-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
}
header.sticky {
    padding-top: env(safe-area-inset-top, 0);
}

/* в”Ђв”Ђв”Ђ Transition utilities в”Ђв”Ђв”Ђ */
.sf-transition { transition: all 0.2s ease; }
.sf-transition-slow { transition: all 0.4s ease; }
.sf-transition-fast { transition: all 0.1s ease; }


/* ===================================================================
   ENHANCED STEP TRANSITIONS вЂ” Spring + slide direction
   =================================================================== */

/* Forward: slide up from below */
body.cab-page .step-enter {
    animation: sfCabStepIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}
@keyframes sfCabStepIn {
    from { opacity: 0; transform: translateY(22px) scale(0.982); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.cab-page .step-exit {
    animation: sfCabStepOut 0.35s cubic-bezier(0.4, 0, 0.8, 0) forwards !important;
}
@keyframes sfCabStepOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-18px) scale(0.99); }
}

/* Amount counter spin effect */
@keyframes sfAmtPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.06); }
    70%  { transform: scale(0.98); }
    100% { transform: scale(1); }
}
.sf-amt-pop { animation: sfAmtPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Range slider active track glow */
.sf-range::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.12), 0 2px 8px rgba(51, 65, 85, 0.25) !important;
    transition: box-shadow 0.2s, transform 0.2s !important;
}
.sf-range:active::-webkit-slider-thumb {
    transform: scale(1.2) !important;
    box-shadow: 0 0 0 5px rgba(51, 65, 85, 0.15), 0 4px 12px rgba(51, 65, 85, 0.3) !important;
}

/* ===================================================================
   ADMIN PANEL вЂ” Visual separation & structure
   =================================================================== */

/* Tab nav underline indicator */
.sf-tab-btn { position: relative; }
.sf-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px 2px 0 0;
}

/* Users table: alternating row backgrounds */
.divide-y > div:nth-child(even) {
    background-color: #fafafa;
}
.divide-y > div:nth-child(even):hover {
    background-color: #f1f5f9 !important;
}

/* Queue cards: left accent */
.request-item[class*="border-l-4"] {
    box-shadow: inset 4px 0 0 #f59e0b;
}

/* Admin section headers */
.rounded-2xl.border.border-slate-200.bg-white.shadow-card {
    border-top: 3px solid transparent;
}

/* Settings card accent tops */
.sf-settings-card { border-top: 3px solid #e2e8f0; }
.sf-settings-card-telegram { border-top-color: #38bdf8; }
.sf-settings-card-branding { border-top-color: #818cf8; }
.sf-settings-card-admin    { border-top-color: #10b981; }

/* ===================================================================
   LATEST MESSAGES вЂ” Newest item glow
   =================================================================== */

@keyframes sfNewestPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.22), 0 2px 16px rgba(37, 99, 235, 0.1); }
    50%  { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.07), 0 4px 24px rgba(37, 99, 235, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.22), 0 2px 16px rgba(37, 99, 235, 0.1); }
}
.sf-item-newest {
    position: relative;
    animation: sfNewestPulse 2.4s ease-in-out infinite;
    border-left: 3px solid #2563eb !important;
    background: linear-gradient(to right, #eff6ff 0%, #ffffff 60%) !important;
}
.sf-item-newest::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #6366f1, transparent);
    border-radius: 0;
}

/* ===================================================================
   MAIN SITE вЂ” Visual polish
   =================================================================== */

/* Hero gradient background */
.landing-page .sf-hero-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Animated gradient for hero headline accent */
@keyframes sfGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.sf-gradient-text {
    background: linear-gradient(135deg, #2563eb, #6366f1, #0ea5e9, #2563eb);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sfGradientShift 5s ease infinite;
}

/* Stats counter number animation */
@keyframes sfCountUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sf-stat-num { animation: sfCountUp 0.6s ease forwards; }

/* Card hover lift */
.sf-card-quiet {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.sf-card-quiet:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px -8px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

/* Feature list icons */
.sf-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.25);
}

/* Button gradient hover */
.sf-btn-gradient {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transition: all 0.2s ease;
}
.sf-btn-gradient:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
}

/* Cab page: TLS/KYC badges removed, cleaner header */
.cab-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===================================================================
   CAB WIZARD вЂ” Compact progress header (no ring)
   =================================================================== */

/* New compact progress card */
.cab-progress-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06);
    padding: 0.75rem 1rem 0.625rem;
}

/* Progress fill вЂ” gradient blueв†’indigo */
.cab-progress-fill {
    background: linear-gradient(90deg, #2563eb 0%, #6366f1 60%, #0ea5e9 100%);
    background-size: 200% 100%;
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Shimmer overlay on progress bar */
.cab-progress-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: cabProgressShimmer 2.2s ease-in-out infinite;
}
@keyframes cabProgressShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Step dots redesigned: pill-shaped */
.cab-step-dot2 {
    flex: 1;
    max-width: 2rem;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.4s ease, transform 0.3s ease, flex 0.4s ease;
}
.cab-step-dot2.active {
    background: #2563eb;
    flex: 2;
    transform: scaleY(1.25);
    box-shadow: 0 1px 6px rgba(37,99,235,0.45);
}
.cab-step-dot2.done {
    background: #6366f1;
}

/* % badge */
.cab-pct-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 0.04em;
    transition: all 0.5s ease;
}

/* ===================================================================
   MOBILE вЂ” Prevent iOS Safari zoom on input focus
   (font-size < 16px triggers auto-zoom)
   =================================================================== */
.cab-page input,
.cab-page select,
.cab-page textarea {
    font-size: 16px !important;
}
.cab-page .input-float {
    font-size: 16px !important;
}

/* Keep the label small even though input is 16px */
.cab-page label.label-float {
    font-size: 13px;
}

/* ===================================================================
   STEP 1 вЂ” Compact layout, no-scroll on normal phones
   =================================================================== */

/* Remove scroll from cab-step-scroll on wizard page */
.cab-page .cab-step-scroll {
    overflow-y: hidden !important;
    overflow-x: hidden;
}
/* Re-enable for steps that need it (steps 3-8 may need scroll) */
.cab-page .cab-step-scroll.needs-scroll {
    overflow-y: auto !important;
}

/* Compact glass card for step 1 */
.cab-page #step1 .cab-glass {
    padding: 1.125rem 1.125rem 1rem !important;
}

/* Amount display compact */
.cab-page #step1 .text-5xl { font-size: 2.75rem !important; }
@media (min-width: 640px) {
    .cab-page #step1 .text-5xl { font-size: 3.5rem !important; }
}

/* Compress divider section spacing */
.cab-page #step1 .border-t.border-slate-100.pt-5 {
    padding-top: 0.75rem !important;
    margin-bottom: 0.625rem !important;
}
.cab-page #step1 .mb-6 { margin-bottom: 0.875rem !important; }

/* Compact stat cards */
.cab-page #step1 .grid.grid-cols-2 > div {
    padding: 0.625rem 0.75rem !important;
}
.cab-page #step1 .text-xl { font-size: 1.125rem !important; }

/* ===================================================================
   BEAUTIFUL ANIMATED COUNTERS (fees / total repay)
   =================================================================== */

@keyframes sfNumPop {
    0%   { opacity: 0.3; transform: translateY(6px) scale(0.92); }
    60%  { transform: translateY(-2px) scale(1.04); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sf-num-anim {
    animation: sfNumPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stat card glow on update */
@keyframes sfCardPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.22); }
    50%  { box-shadow: 0 0 0 5px rgba(37,99,235,0.08); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}
.sf-card-pulse {
    animation: sfCardPulse 0.55s ease forwards;
}

/* Admin live-update flash on refresh button */
@keyframes sfRefreshFlash {
    0%   { color: #2563eb; transform: rotate(0deg) scale(1.25); }
    60%  { color: #16a34a; transform: rotate(360deg) scale(1); }
    100% { color: inherit; transform: rotate(360deg) scale(1); }
}
#refresh-btn.animate-spin i {
    animation: sfRefreshFlash 0.7s ease forwards;
}
#sf-last-upd {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

/* Big amount counter: color shift based on value */
.sf-amt-low  { color: #0f172a; }
.sf-amt-mid  { color: #1e3a8a; }
.sf-amt-high { color: #1d4ed8; }

/* ===================================================================
   CUSTOM INLINE VALIDATION ERRORS (replaces native browser bubbles)
   =================================================================== */

@keyframes sfErrIn {
    from { opacity: 0; transform: translateY(-4px); max-height: 0; }
    to   { opacity: 1; transform: translateY(0);    max-height: 3rem; }
}
@keyframes sfErrOut {
    from { opacity: 1; transform: translateY(0);    max-height: 3rem; }
    to   { opacity: 0; transform: translateY(-4px); max-height: 0; }
}

.sf-field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 6px 10px 6px 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff1f2 0%, #fff5f5 100%);
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    animation: sfErrIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
}
.sf-field-error::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23dc2626'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 3.5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4.5zm0 7a.875.875 0 1 1 0-1.75.875.875 0 0 1 0 1.75z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.sf-field-error--hide {
    animation: sfErrOut 0.25s ease forwards;
}

/* Red ring on invalid input */
.cab-page .sf-input-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}
/* Also highlight floating-label inputs */
.cab-page .sf-input-error ~ label,
.cab-page .sf-input-error + label {
    color: #dc2626 !important;
}

/* ===================================================================
   AMOUNT TAP-TO-EDIT (CAD)
   =================================================================== */

/* Display mode вЂ” subtle "tap to edit" feel */
.cab-amt-display {
    display: inline-block;
    position: relative;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1.5px dashed transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.cab-amt-display:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.cab-amt-display:active {
    background: #f1f5f9;
}
.cab-amt-edit-hint {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.cab-amt-display:hover .cab-amt-edit-hint {
    opacity: 1;
}

/* Edit mode row */
.cab-amt-edit-wrap {
    text-align: center;
    padding: 0.25rem 0;
    animation: sfErrIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.cab-amt-input-row {
    background: #f8fafc;
    border: 2px solid #2563eb;
    border-radius: 14px;
    padding: 0.3rem 0.75rem;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}
.cab-amt-typed-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 2rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 800;
    color: #0f172a;
    width: 5.5ch;
    text-align: center;
    tabular-nums: true;
    -moz-appearance: textfield;
}
.cab-amt-typed-input::-webkit-outer-spin-button,
.cab-amt-typed-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===================================================================
   AMOUNT INPUT FIELD вЂ” always visible, always editable
   =================================================================== */

.cab-amt-field-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 0.6rem 0.9rem 0.6rem 1rem;
    gap: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cab-amt-field-wrap:focus-within {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.cab-amt-field-prefix {
    font-size: 1.6rem;
    font-weight: 800;
    color: #94a3b8;
    line-height: 1;
    flex-shrink: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
    user-select: none;
}

.cab-amt-field-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 2.4rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cab-amt-field-input::-webkit-outer-spin-button,
.cab-amt-field-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cab-amt-field-input::placeholder { color: #cbd5e1; }

/* Right side: CAD label */
.cab-amt-field-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.cab-amt-field-cad {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
}

/* ===================================================================
   AMOUNT HERO вЂ” clean fintech input (Wealthsimple / Borrowell style)
   =================================================================== */

.cab-amt-hero {
    text-align: center;
    padding: 0.5rem 0 1rem;
}

.cab-amt-hero-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

/* The editable row: $ [number] CAD */
.cab-amt-hero-row {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    position: relative;
    border-bottom: 2.5px solid #e2e8f0;
    padding-bottom: 4px;
    transition: border-color 0.25s ease;
}
.cab-amt-hero-row:focus-within {
    border-color: #2563eb;
}
.cab-amt-hero-row:focus-within::after {
    content: '';
    position: absolute;
    bottom: -2.5px;
    left: 0; right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #2563eb, #6366f1);
    border-radius: 2px;
    animation: sfLineIn 0.3s ease forwards;
}
@keyframes sfLineIn {
    from { transform: scaleX(0); opacity: 0; }
    to   { transform: scaleX(1); opacity: 1; }
}

.cab-amt-hero-dollar {
    font-size: 2rem;
    font-weight: 800;
    color: #cbd5e1;
    line-height: 1;
    align-self: center;
    margin-right: 2px;
    font-family: 'DM Sans', system-ui, sans-serif;
    user-select: none;
    transition: color 0.2s ease;
}
.cab-amt-hero-row:focus-within .cab-amt-hero-dollar {
    color: #2563eb;
}

.cab-amt-hero-input {
    font-size: 3.25rem;
    font-weight: 900;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
    width: 5ch;
    min-width: 3ch;
    max-width: 7ch;
    text-align: right;
    font-family: 'DM Sans', system-ui, sans-serif;
    line-height: 1;
    -moz-appearance: textfield;
    appearance: textfield;
    transition: color 0.2s ease;
    caret-color: #2563eb;
}
.cab-amt-hero-input::-webkit-outer-spin-button,
.cab-amt-hero-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cab-amt-hero-input::placeholder { color: #e2e8f0; }

.cab-amt-hero-cad {
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #94a3b8;
    align-self: flex-end;
    margin-bottom: 6px;
    margin-left: 6px;
    font-family: 'DM Sans', system-ui, sans-serif;
    transition: color 0.2s ease;
}
.cab-amt-hero-row:focus-within .cab-amt-hero-cad {
    color: #6366f1;
}

/* ===================================================================
   AMOUNT HERO v3 вЂ” card style with pencil icon
   =================================================================== */

.cab-amt-hero {
    text-align: center;
    padding: 0.25rem 0 0.75rem;
}
.cab-amt-hero-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.6rem;
}

/* Card wrapper вЂ” gives the whole block a clickable feel */
.cab-amt-hero-card {
    display: inline-block;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.75rem 1.25rem 0.6rem;
    cursor: text;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    min-width: 220px;
}
.cab-amt-hero-card:focus-within {
    border-color: #2563eb;
    background: linear-gradient(145deg, #eff6ff 0%, #eef2ff 100%);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1), 0 4px 20px rgba(37,99,235,0.08);
}

/* Input row */
.cab-amt-hero-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
}

.cab-amt-hero-dollar {
    font-size: 1.6rem;
    font-weight: 800;
    color: #94a3b8;
    line-height: 1;
    margin-right: 3px;
    align-self: center;
    font-family: 'DM Sans', system-ui, sans-serif;
    user-select: none;
    transition: color 0.2s ease;
}
.cab-amt-hero-card:focus-within .cab-amt-hero-dollar { color: #2563eb; }

.cab-amt-hero-input {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
    width: 5ch;
    min-width: 3ch;
    max-width: 7ch;
    text-align: center;
    font-family: 'DM Sans', system-ui, sans-serif;
    line-height: 1;
    caret-color: #2563eb;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cab-amt-hero-input::-webkit-outer-spin-button,
.cab-amt-hero-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.cab-amt-hero-cad {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: #64748b;
    align-self: flex-end;
    margin-bottom: 5px;
    margin-left: 5px;
    font-family: 'DM Sans', system-ui, sans-serif;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease;
}
.cab-amt-hero-card:focus-within .cab-amt-hero-cad {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Pencil icon */
.cab-amt-hero-pencil {
    align-self: center;
    margin-left: 6px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}
.cab-amt-hero-card:focus-within .cab-amt-hero-pencil {
    background: #2563eb;
    color: #fff;
    transform: scale(0.9) rotate(-8deg);
}

/* ===================================================================
   PROVINCE VISUAL PICKER (Canada)
   =================================================================== */

.sf-province-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
@media (max-width: 360px) {
    .sf-province-grid { grid-template-columns: repeat(4, 1fr); }
}

.sf-prov-btn {
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-family: 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.sf-prov-btn:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.sf-prov-btn.selected {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(37,99,235,0.35);
    transform: translateY(-1px) scale(1.05);
}
.sf-prov-btn:active {
    transform: scale(0.95) !important;
}

.sf-prov-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===================================================================
   FORM PERSISTENCE вЂ” "Restored" banner
   =================================================================== */

@keyframes sfBannerIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sfBannerOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

.sf-restore-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
    border: 1px solid #c4b5fd;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #4338ca;
    animation: sfBannerIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.sf-restore-banner strong { font-weight: 800; }
.sf-restore-banner--hide {
    animation: sfBannerOut 0.35s ease forwards;
}
.sf-restore-clear {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    background: rgba(124,58,237,0.1);
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.sf-restore-clear:hover { background: rgba(124,58,237,0.18); }

/* ===================================================================
   LANDING CALCULATOR вЂ” CAD display
   =================================================================== */

@keyframes lndNumPop {
    0%   { opacity: 0.5; transform: scale(0.92) translateY(3px); }
    60%  { transform: scale(1.05) translateY(-1px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.lnd-num-pop {
    animation: lndNumPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
