/* ===== SetuFlow — Professional mobile-first design system =====
 * Token palette aligned to Velzon admin (Pixelforest) reference per
 * docs/GALLABOX_FEATURE_PARITY_SPEC.md §1.2. The --sf-* names are kept stable
 * for back-compat; downstream pages continue to work without edits. New
 * Velzon-specific tokens (sidebar, semantic, surface-elevated) are added below.
 */

:root {
    /* Neutrals — Velzon $body-bg / $card-bg */
    --sf-bg: #f3f6f9;
    --sf-bg-gradient: linear-gradient(180deg, #eef2f7 0%, #f3f6f9 60%, #f8fafc 100%);
    --sf-surface: #ffffff;
    --sf-surface-elevated: #ffffff;
    --sf-surface-hover: #f3f6f9;
    --sf-border: #e9ebec;
    --sf-border-light: #f3f6f9;
    --sf-text: #212529;
    --sf-text-muted: #878a99;
    --sf-text-subtle: #adb5bd;
    /* Accent — Velzon $primary #405189 */
    --sf-primary: #405189;
    --sf-primary-hover: #364574;
    --sf-primary-light: rgba(64, 81, 137, 0.10);
    --sf-primary-border: #5566a0;
    --sf-primary-contrast: #ffffff;
    /* Secondary accent — used for highlights / link-style affordances */
    --sf-secondary: #3577f1;
    --sf-secondary-hover: #2c63c8;
    /* Semantic */
    --sf-success: #0ab39c;
    --sf-success-light: rgba(10, 179, 156, 0.10);
    --sf-info: #299cdb;
    --sf-info-light: rgba(41, 156, 219, 0.10);
    --sf-warning: #f7b84b;
    --sf-warning-light: rgba(247, 184, 75, 0.12);
    --sf-danger: #f06548;
    --sf-danger-light: rgba(240, 101, 72, 0.10);
    /* Sidebar (dark Velzon variant) */
    --sf-sidebar-bg: #405189;
    --sf-sidebar-bg-elevated: #364574;
    --sf-sidebar-text: rgba(255, 255, 255, 0.78);
    --sf-sidebar-text-active: #ffffff;
    --sf-sidebar-divider: rgba(255, 255, 255, 0.08);
    /* Focus & a11y */
    --sf-focus-ring: 0 0 0 3px rgba(64, 81, 137, 0.30);
    /* Cards */
    --sf-card-bg: #ffffff;
    --sf-card-border: #e9ebec;
    --sf-card-shadow: 0 1px 2px rgba(56, 65, 74, 0.075);
    --sf-card-shadow-hover: 0 1px 2px rgba(56, 65, 74, 0.15);
    --sf-card-shadow-lg: 0 10px 20px rgba(56, 65, 74, 0.20);
    --sf-card-radius: 10px;
    --sf-card-radius-lg: 16px;
    /* Motion */
    --sf-transition: 200ms ease;
    --sf-transition-fast: 120ms ease;
    --sf-transition-slow: 320ms cubic-bezier(.4, 0, .2, 1);
    /* Mobile-first spacing */
    --sf-touch-min: 44px;
    --sf-space-xs: 0.375rem;
    --sf-space-sm: 0.5rem;
    --sf-space-md: 0.75rem;
    --sf-space-lg: 1rem;
    --sf-space-xl: 1.25rem;
    --sf-space-2xl: 1.5rem;
    --sf-space-3xl: 2rem;
    --sf-content-px: 1rem;
    --sf-content-py: 1rem;
    /* Radius scale */
    --sf-radius-sm: 4px;
    --sf-radius: 6px;
    --sf-radius-lg: 10px;
    --sf-radius-xl: 16px;
    --sf-radius-pill: 999px;
    /* Z layers */
    --sf-z-topbar: 1020;
    --sf-z-sidebar: 1025;
    --sf-z-bottomnav: 1030;
    --sf-z-drawer: 1040;
    --sf-z-sheet: 1045;
    --sf-z-modal: 1050;
    --sf-z-toast: 1080;
}

/* ----- Base (mobile first) ----- */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--sf-text);
    background: var(--sf-bg);
    -webkit-font-smoothing: antialiased;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ----- Page shell ----- */
.page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    background: var(--sf-bg-gradient);
}

.sf-topbar + main {
    padding-top: var(--sf-space-sm);
}

.content {
    padding-top: var(--sf-space-md);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ----- Top bar ----- */
.sf-topbar {
    background: var(--sf-surface);
    border-bottom: 1px solid var(--sf-border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 52px;
    padding-top: env(safe-area-inset-top);
}

/* SetuFlow Parking marketing pages */
.sf-parking-hero {
    background: linear-gradient(160deg, #f5f7fb 0%, #eef3ff 55%, #e9f7ef 100%);
}

.sf-parking-kicker {
    display: inline-block;
    background: rgba(11, 31, 58, 0.08);
    color: #0b1f3a;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.sf-parking-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 8px 22px rgba(11, 31, 58, 0.07);
}

.sf-parking-btn-primary {
    background-color: #0b1f3a;
    border-color: #0b1f3a;
    color: #fff;
}

.sf-parking-btn-primary:hover,
.sf-parking-btn-primary:focus {
    background-color: #08172c;
    border-color: #08172c;
    color: #fff;
}

.sf-step-badge {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    background: #00c853;
    color: #fff;
}

/* Premium SetuFlow Parking landing */
.sfp-page {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1000px 500px at 10% -10%, rgba(0, 200, 83, 0.18), transparent 60%),
        radial-gradient(900px 500px at 90% -20%, rgba(0, 161, 255, 0.2), transparent 60%),
        linear-gradient(180deg, #070f1f 0%, #0b1630 45%, #0a1328 100%);
    color: #e8efff;
}

.sfp-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.sfp-radial {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
}

.sfp-radial-left { background: rgba(0, 200, 83, 0.32); top: 120px; left: -110px; }
.sfp-radial-right { background: rgba(0, 161, 255, 0.33); top: 180px; right: -90px; }

.sfp-hero { min-height: 90vh; display: flex; align-items: center; padding: 4rem 0 3rem; }
.sfp-title { font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.12; font-weight: 800; }
.sfp-subtitle { color: #b6c2e0; max-width: 40rem; margin-top: 1rem; }
.sfp-chip { display: inline-block; padding: 0.4rem 0.85rem; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; }

.sfp-btn-primary, .sfp-btn-secondary, .sfp-btn-ghost {
    border-radius: 14px; padding: 0.7rem 1.15rem; border: 1px solid transparent; font-weight: 600;
    transition: all 220ms ease;
}
.sfp-btn-primary { background: linear-gradient(135deg, #00c853, #00a1ff); color: #041025; box-shadow: 0 10px 22px rgba(0, 200, 83, 0.35); }
.sfp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 161, 255, 0.35); }
.sfp-btn-secondary { background: rgba(255,255,255,0.08); color: #e8efff; border-color: rgba(255,255,255,0.2); }
.sfp-btn-secondary:hover { border-color: rgba(0, 200, 83, 0.7); box-shadow: 0 0 0 1px rgba(0, 200, 83, 0.5) inset; color: #fff; }
.sfp-btn-ghost { background: transparent; color: #9fe4bd; border-color: rgba(0,200,83,0.45); }
.sfp-btn-ghost:hover { background: rgba(0, 200, 83, 0.08); color: #ccffe2; }

.sfp-scene {
    position: relative;
    min-height: 390px;
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(4, 8, 24, 0.6);
}
.sfp-windshield {
    position: absolute; inset: 18% 10% 18% 10%;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(145deg, rgba(0, 161, 255, 0.12), rgba(0, 200, 83, 0.08));
}
.sfp-tag, .sfp-phone, .sfp-success {
    position: absolute; border-radius: 20px; border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px); background: rgba(12, 20, 40, 0.65);
}
.sfp-tag { top: 30%; left: 24%; padding: 0.65rem 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.sfp-phone { top: 44%; right: 20%; width: 150px; height: 220px; padding: 0.65rem; }
.sfp-phone-notch { width: 56px; height: 7px; border-radius: 10px; margin: 0 auto; background: rgba(255,255,255,0.25); }
.sfp-scan-wave { margin-top: 2.3rem; height: 120px; border-radius: 16px; background: radial-gradient(circle at 50% 50%, rgba(0,200,83,0.45), rgba(0,161,255,0.12) 45%, transparent 70%); animation: sfpPulse 2s ease-in-out infinite; }
.sfp-tag-dot { width: 12px; height: 12px; border-radius: 50%; background: #00c853; }
.sfp-connection {
    position: absolute; top: 43%; left: 38%; width: 30%; height: 2px;
    background: linear-gradient(90deg, rgba(0,200,83,0.2), #00c853, #00a1ff, rgba(0,161,255,0.2));
    box-shadow: 0 0 14px rgba(0, 200, 83, 0.8);
    animation: sfpFlow 2.6s linear infinite;
}
.sfp-success { bottom: 10%; right: 8%; padding: 0.7rem 0.85rem; color: #9ff6cc; font-size: 0.9rem; }

.float-y { animation: sfpFloat 4s ease-in-out infinite; }
.pulse { animation: sfpPulseDot 1.8s ease-in-out infinite; }

.sfp-section { padding: 2.8rem 0; position: relative; }
.sfp-heading { font-size: clamp(1.45rem, 3vw, 2.15rem); margin-bottom: 0.4rem; font-weight: 760; }
.sfp-glass {
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.17);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
    padding: 1.05rem;
    color: #e8efff;
    transition: transform 220ms ease, box-shadow 220ms ease;
}
.sfp-glass span { display: block; color: #b4c0de; margin-top: 0.35rem; font-size: 0.93rem; }

.sfp-bridge-wrap { display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; gap: 0.7rem; align-items: center; }
.sfp-bridge-node, .sfp-bridge-core { text-align: center; padding: 0.8rem; border-radius: 18px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); }
.sfp-bridge-core { color: #c6ffdd; font-weight: 700; }
.sfp-bridge-line { position: relative; height: 2px; background: rgba(255,255,255,0.22); overflow: hidden; }
.sfp-particle { position: absolute; top: -1px; left: -30px; width: 30px; height: 4px; border-radius: 20px; background: linear-gradient(90deg, #00c853, #00a1ff); animation: sfpParticle 2s linear infinite; }

.sfp-step b { display: block; margin-bottom: 0.35rem; color: #d9f8ff; }
.sfp-step span { color: #b5c4e4; }

.sfp-dashboard { display: grid; gap: 0.8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sfp-dashboard-col { border-radius: 16px; padding: 0.8rem; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); }
.sfp-dashboard-col h6 { margin-bottom: 0.55rem; color: #d0ffec; }
.sfp-dashboard-col p { margin-bottom: 0.35rem; color: #c6d2ee; font-size: 0.92rem; }
.sfp-asset-placeholder { border-radius: 16px; border: 1px dashed rgba(255,255,255,0.25); padding: 0.8rem; text-align: center; color: #9eb0d6; font-size: 0.92rem; }

.sfp-pricing { min-height: 150px; }
.sfp-pricing h5 { color: #e6fffb; }
.sfp-pricing p { color: #b8c6e3; margin-bottom: 0; }
.sfp-featured { border-color: rgba(0, 200, 83, 0.7); box-shadow: 0 0 0 1px rgba(0,200,83,0.35) inset, 0 20px 34px rgba(0, 200, 83, 0.18); }

.sfp-faq .accordion-item { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); color: #dce8ff; border-radius: 14px; overflow: hidden; margin-bottom: 0.6rem; }
.sfp-faq .accordion-button { background: rgba(255,255,255,0.02); color: #e7efff; }
.sfp-faq .accordion-button:not(.collapsed) { background: rgba(0,200,83,0.1); color: #d4ffe9; box-shadow: none; }
.sfp-faq .accordion-body { color: #bfd0ef; }

.sfp-final-cta h3 { margin-bottom: 0.45rem; }
.sfp-final-cta p { color: #b6c7e5; margin-bottom: 0.8rem; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 500ms ease var(--reveal-delay, 0ms), transform 500ms ease var(--reveal-delay, 0ms); }
.reveal.revealed { opacity: 1; transform: translateY(0); }

@keyframes sfpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes sfpPulse {
    0%, 100% { transform: scale(0.98); opacity: 0.75; }
    50% { transform: scale(1.04); opacity: 1; }
}
@keyframes sfpPulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,200,83,0.55); }
    70% { box-shadow: 0 0 0 10px rgba(0,200,83,0); }
}
@keyframes sfpFlow {
    0% { opacity: 0.6; filter: hue-rotate(0deg); }
    50% { opacity: 1; filter: hue-rotate(30deg); }
    100% { opacity: 0.6; filter: hue-rotate(0deg); }
}
@keyframes sfpParticle {
    0% { left: -30px; }
    100% { left: 100%; }
}

@media (max-width: 991.98px) {
    .sfp-hero { min-height: auto; padding-top: 2.5rem; }
    .sfp-scene { min-height: 330px; }
    .sfp-dashboard { grid-template-columns: 1fr; }
    .sfp-bridge-wrap { grid-template-columns: 1fr; }
    .sfp-bridge-line { height: 30px; width: 2px; justify-self: center; }
    .sfp-particle { width: 4px; height: 30px; animation: none; }
}

@media (min-width: 768px) {
    .sf-topbar {
        min-height: 56px;
    }
}

/* ----- Bottom nav (mobile-first, responsive rail) ----- */
.sf-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: calc(64px + env(safe-area-inset-bottom));
    min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--sf-surface) 92%, transparent) 0%,
        var(--sf-surface) 100%
    );
    border-top: 1px solid color-mix(in srgb, var(--sf-primary) 18%, var(--sf-border-light));
    box-shadow:
        0 -4px 24px rgba(15, 23, 42, 0.08),
        0 -1px 0 rgba(255, 255, 255, 0.6) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sf-bottom-nav__rail {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 4px 4px 0;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sf-bottom-nav__rail::-webkit-scrollbar {
    display: none;
    height: 0;
}

.sf-bottom-nav__cell {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: stretch;
}

.sf-bottom-nav .sf-bottom-nav__btn.mud-button-root {
    width: 100%;
    min-width: 0 !important;
    min-height: 48px;
    padding: 4px 2px !important;
    border-radius: 12px !important;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.sf-bottom-nav .sf-bottom-nav__btn.mud-button-root:active {
    transform: scale(0.97);
}

.sf-bottom-nav__icon {
    flex-shrink: 0;
}

.sf-bottom-nav__label {
    line-height: 1.1;
    margin-top: 2px !important;
    font-size: clamp(0.5625rem, 2.4vw, 0.6875rem) !important;
    font-weight: 500;
    max-width: 100%;
    padding: 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 380px) {
    .sf-bottom-nav__label {
        display: none !important;
    }

    .sf-bottom-nav {
        height: calc(56px + env(safe-area-inset-bottom));
        min-height: 56px;
    }

    .sf-bottom-nav .sf-bottom-nav__btn.mud-button-root {
        min-height: 44px;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

@media (min-width: 768px) {
    .sf-bottom-nav {
        height: calc(68px + env(safe-area-inset-bottom));
        min-height: 68px;
        border-radius: 20px 20px 0 0;
    }

    .sf-bottom-nav__rail {
        padding: 6px 12px 0;
        gap: 4px;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .sf-bottom-nav__label {
        font-size: 0.75rem !important;
    }

    .sf-bottom-nav .sf-bottom-nav__btn.mud-button-root {
        min-height: 52px;
        border-radius: 14px !important;
    }
}

@media (min-width: 1200px) {
    .sf-bottom-nav__rail {
        max-width: 960px;
    }
}

/* ----- Digital business card landing ----- */
.dbc-hero {
    background: radial-gradient(circle at 20% 0%, #eef2ff 0%, #f8fafc 48%, #ffffff 100%);
    border-bottom: 1px solid var(--sf-border);
}

.dbc-title {
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--sf-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 18ch;
}

.dbc-sub {
    color: var(--sf-text-muted);
    font-size: 1.05rem;
    max-width: 58ch;
}

.dbc-info-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.dbc-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sf-primary);
    background: var(--sf-primary-light);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.6rem;
}

.dbc-preview-wrap {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--sf-border);
    background: #fff;
}

.dbc-preview-head {
    padding: 1.1rem;
    color: #fff;
}

.dbc-pill {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.5rem;
}

.dbc-preview-body {
    padding: 1rem 1.1rem 1.2rem;
}

.dbc-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--sf-text-muted);
    background: #f8fafc;
    border: 1px solid var(--sf-border);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.dbc-saved-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 0.9rem;
    padding: 1rem;
}

.dbc-layout-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    color: var(--sf-text-muted);
}

.dbc-layout-minimal {
    background: #ffffff;
}

.dbc-layout-minimal .dbc-title,
.dbc-layout-minimal .dbc-sub {
    max-width: 100%;
}

.dbc-layout-bold {
    background: linear-gradient(120deg, #0f172a 0%, #1e293b 48%, #334155 100%);
}

.dbc-layout-bold .landing-section-label,
.dbc-layout-bold .dbc-title,
.dbc-layout-bold .dbc-sub {
    color: #f8fafc;
}

.dbc-layout-agency {
    background: linear-gradient(140deg, #fdf2f8 0%, #f5f3ff 55%, #eef2ff 100%);
}

.dbc-layout-professional {
    background: radial-gradient(circle at 20% 0%, #eef2ff 0%, #f8fafc 48%, #ffffff 100%);
}

.sf-bottom-nav .nav-link {
    padding: var(--sf-space-sm) var(--sf-space-xs);
    color: var(--sf-text-muted);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 10px;
    transition: color var(--sf-transition), background-color var(--sf-transition);
    min-height: var(--sf-touch-min);
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.sf-bottom-nav .nav-link:hover {
    color: var(--sf-primary);
    background-color: var(--sf-primary-light);
}

.sf-bottom-nav .nav-link.active {
    color: var(--sf-primary);
    background-color: var(--sf-primary-light);
    font-weight: 600;
}

.sf-bottom-nav .nav-link i {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .sf-bottom-nav .nav-link {
        font-size: 0.75rem;
    }
}

/* ----- Typography ----- */
.sf-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--sf-text);
    margin-bottom: 0.15rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.sf-page-subtitle {
    font-size: 0.875rem;
    color: var(--sf-text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .sf-page-title {
        font-size: 1.5rem;
    }
    .sf-page-subtitle {
        font-size: 0.9375rem;
    }
}

/* ----- Page header (reusable) ----- */
.sf-page-header {
    padding: var(--sf-space-lg) var(--sf-content-px) var(--sf-space-md);
}

.sf-page-header .sf-page-title {
    margin-bottom: 0.15rem;
}

.sf-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sf-space-sm);
    align-items: center;
}

/* ----- Cards ----- */
.card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-card-border);
    border-radius: 12px;
    box-shadow: var(--sf-card-shadow);
    transition: box-shadow var(--sf-transition), border-color var(--sf-transition);
}

.card:hover {
    box-shadow: var(--sf-card-shadow-hover);
}

.card-body {
    padding: var(--sf-space-xl);
}

@media (max-width: 575.98px) {
    .card-body {
        padding: var(--sf-space-lg);
    }
}

.card-header {
    background: var(--sf-surface);
    border-bottom: 1px solid var(--sf-border-light);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--sf-text);
    border-radius: 12px 12px 0 0;
    padding: var(--sf-space-md) var(--sf-space-xl);
}

@media (max-width: 575.98px) {
    .card-header {
        padding: var(--sf-space-md) var(--sf-space-lg);
    }
}

.list-group-item {
    padding: var(--sf-space-lg) var(--sf-space-xl);
    min-height: var(--sf-touch-min);
}

@media (max-width: 575.98px) {
    .list-group-item {
        padding: var(--sf-space-md) var(--sf-space-lg);
    }
}

.sf-surface-card {
    background: var(--sf-card-bg);
    border: 1px solid var(--sf-card-border);
    border-radius: 12px;
    box-shadow: var(--sf-card-shadow);
}

/* ----- Option cards (Others, menus) ----- */
.sf-option-card {
    transition: box-shadow var(--sf-transition), border-color var(--sf-transition), transform var(--sf-transition);
    border: 1px solid var(--sf-card-border);
    border-radius: 12px;
    cursor: pointer;
    background: var(--sf-card-bg);
    box-shadow: var(--sf-card-shadow);
}

.sf-option-card:hover {
    box-shadow: var(--sf-card-shadow-hover);
    border-color: var(--sf-primary-border);
}

.sf-option-card:active {
    transform: scale(0.99);
}

.sf-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.sf-section-header {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--sf-text-muted);
    margin-bottom: var(--sf-space-lg);
    padding-bottom: var(--sf-space-sm);
    border-bottom: 2px solid var(--sf-border-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ----- Buttons (Bootstrap overrides) ----- */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: background-color var(--sf-transition), border-color var(--sf-transition), box-shadow var(--sf-transition), transform var(--sf-transition);
}

.btn:active {
    transform: scale(0.98);
}

@media (max-width: 575.98px) {
    .btn {
        min-height: var(--sf-touch-min);
    }
    .btn-sm {
        min-height: 40px;
        padding: 0.4rem 0.75rem;
    }
}

.btn-primary {
    color: #fff;
    background-color: var(--sf-primary);
    border-color: var(--sf-primary);
}

.btn-primary:hover {
    background-color: var(--sf-primary-hover);
    border-color: var(--sf-primary-hover);
    color: #fff;
}

.btn-primary:focus-visible {
    box-shadow: var(--sf-focus-ring);
}

.btn-outline-primary {
    color: var(--sf-primary);
    border-color: var(--sf-primary);
}

.btn-outline-primary:hover {
    background-color: var(--sf-primary-light);
    color: var(--sf-primary-hover);
    border-color: var(--sf-primary-hover);
}

.btn-outline-primary:focus-visible {
    box-shadow: var(--sf-focus-ring);
}

/* ----- Forms (mobile-first) ----- */
.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--sf-border);
    transition: border-color var(--sf-transition), box-shadow var(--sf-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sf-primary-border);
    box-shadow: var(--sf-focus-ring);
}

@media (max-width: 575.98px) {
    .form-control,
    .form-select {
        min-height: var(--sf-touch-min);
        font-size: 16px; /* avoids zoom on iOS */
    }
}

/* ----- Links ----- */
a,
.btn-link {
    color: var(--sf-primary);
}

/* ----- Inbox filters bar ----- */
.inbox-filters-bar {
    z-index: 1020;
    background: var(--sf-surface);
    border-bottom: 1px solid var(--sf-border-light);
}

@media (max-width: 767.98px) {
    .form-control-md-touch {
        min-height: var(--sf-touch-min);
        font-size: 16px;
    }
    .inbox-filters-toggle,
    .inbox-filter-action {
        min-height: var(--sf-touch-min);
    }
    .inbox-filters-chips {
        display: flex;
        flex-wrap: wrap;
        gap: var(--sf-space-sm);
    }
    .inbox-filter-chip {
        min-height: var(--sf-touch-min);
        padding: var(--sf-space-sm) var(--sf-space-md);
    }
}

@media (min-width: 768px) {
    .form-control-md-touch {
        font-size: 1rem;
    }
}

/* ----- Content containers ----- */
.sf-content-wrap {
    padding: 0 var(--sf-content-px) var(--sf-space-3xl);
}

@media (min-width: 768px) {
    .sf-content-wrap {
        padding-left: var(--sf-space-2xl);
        padding-right: var(--sf-space-2xl);
    }
}

/* ----- Tables (mobile: horizontal scroll) ----- */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ----- Message bubble ----- */
.message-bubble {
    word-wrap: break-word;
}

/* ----- Validation ----- */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #22c55e;
}

.invalid {
    outline: 2px solid #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
}

/* ----- Blazor error UI ----- */
#blazor-error-ui {
    background: #fef3c7;
    border-top: 1px solid #f59e0b;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    width: 100%;
    z-index: 1040;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    min-height: var(--sf-touch-min);
    min-width: var(--sf-touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHZpZXdCb3g9IjAgMCA1NiA0OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjQ1IDkuMDRMMTguMzggNS40MkwxMC4yNyA1LjQyTDIuMTYgNS40MkwwLjA5IDkuMDRMMCA5LjI3TDAgMTMuNTJMMC4wOSAxMy43NUw4LjE4IDI3LjQ2TDEwLjI3IDMxLjA4TDEyLjM2IDI3LjQ2TDIwLjQ1IDEzLjc1TDIwLjU0IDEzLjUyTDIwLjU0IDkuMjdMMjAuNDUgOS4wNFoiIGZpbGw9IiNGRjU1NTUiLz4KPHBhdGggZD0iTTI4LjM2IDkuMDRMMjYuMjkgNS40MkwyOC4zNiA5LjA0TDI4LjQ1IDkuMjdMMjguNDUgMTMuNTJMMjguMzYgMTMuNzVMMjAuMjcgMjcuNDZMMTguMTggMzEuMDhMMjAuMjcgMjcuNDZMMjguMzYgMTMuNzVMMjguNDUgMTMuNTJMMjguNDUgOS4yN0wyOC4zNiA5LjA0WiIgZmlsbD0iI0ZGNUE1NSIvPgo8cGF0aCBkPSJNMzYuMjcgOS4wNEwzNC4yIDUuNDJMMzYuMjcgOS4wNEwzNi4zNiA5LjI3TDM2LjM2IDEzLjUyTDM2LjI3IDEzLjc1TDI4LjE4IDI3LjQ2TDI2LjA5IDMxLjA4TDI4LjE4IDI3LjQ2TDM2LjI3IDEzLjc1TDM2LjM2IDEzLjUyTDM2LjM2IDkuMjdMMzYuMjcgOS4wNFoiIGZpbGw9IiNGRjY2NjYiLz4KPHBhdGggZD0iTTQ0LjE4IDkuMDRMNDIuMTEgNS40Mk00NC4xOCA5LjA0TDQ0LjI3IDkuMjdMNDQuMjcgMTMuNTJMNDQuMTggMTMuNzVMMzYuMDkgMjcuNDZMMzQuMDAgMzEuMDhMMzYuMDkgMjcuNDZMNDQuMTggMTMuNzVMNDQuMjcgMTMuNTJMNDQuMjcgOS4yN0w0NC4xOCA5LjA0WiIgZmlsbD0iI0ZGN0E3QSIvPgo8cGF0aCBkPSJNNTIuMDkgOS4wNEw1MC4wMiA1LjQyTDUyLjA5IDkuMDRMNTIuMTggOS4yN0w1Mi4xOCAxMy41Mkw1Mi4wOSAxMy43NUw0NC4wMCAyNy40Nkw0MS45MSAzMS4wOEw0NC4wMCAyNy40Nkw1Mi4wOSAxMy43NUw1Mi4xOCAxMy41Mkw1Mi4xOCA5LjI3TDUyLjA5IDkuMDRaIiBmaWxsPSIjRkY4QThBIi8+Cjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b91c1c;
    padding: 1rem 1rem 1rem 3.7rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ----- Modals (mobile-friendly) ----- */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: var(--sf-space-md);
        max-width: calc(100% - var(--sf-space-2xl));
    }
    .modal-content {
        border-radius: 16px;
    }
    .modal-footer .btn {
        min-height: var(--sf-touch-min);
    }
}

/* ----- Utility: ensure touch targets on icon buttons ----- */
.sf-touch-target {
    min-height: var(--sf-touch-min);
    min-width: var(--sf-touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Icon-only buttons in topbar (mobile) */
.btn-icon-only {
    padding: 0;
    width: var(--sf-touch-min);
}

/* ----- Login page ----- */
.login-page {
    background: var(--sf-bg-gradient);
    padding: var(--sf-space-lg) env(safe-area-inset-left) var(--sf-space-lg) env(safe-area-inset-right);
}

.login-card {
    max-width: 400px;
}

@media (min-width: 576px) {
    .login-card {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* ===== SetuFlow Landing fallback (full styles in landing.css; Salesforce-inspired) ===== */
.landing-page { min-height: 100vh; background: #fff; }
.landing-section-label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; margin-bottom: 0.5rem; }
.landing-stats { background: #fff; padding: 2rem 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.landing-stat-item { text-align: center; padding: 0.75rem; }
.landing-stat-value { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; color: #0176d3; line-height: 1.2; display: block; }
.landing-stat-label { font-size: 0.8125rem; color: #64748b; font-weight: 500; margin-top: 0.25rem; }
.landing-hero-media { margin-top: 2.5rem; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.08); background: #f8fafc; min-height: 200px; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 0.875rem; }
.landing-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.landing-nav.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }
.landing-logo-text { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--landing-primary, #0ea5e9); }
.landing-tagline { font-size: 0.8125rem; color: var(--landing-text-muted, #64748b); font-weight: 500; }
.landing-nav-link { color: var(--landing-text, #0f172a); font-weight: 500; font-size: 0.9375rem; transition: color 0.2s ease; }
.landing-nav-link:hover { color: var(--landing-primary, #0ea5e9); }
.landing-cta-nav { font-weight: 600; }
.landing-main { flex: 1; }
.landing-section { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .landing-section { padding-top: 5rem; padding-bottom: 5rem; } }
.landing-section-alt { background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%); }
.landing-hero {
    padding-top: 3rem; padding-bottom: 4rem; text-align: center; position: relative; overflow: hidden;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.88) 50%, rgba(255,255,255,0.94) 100%), url('/images/hero-bridge.png');
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
@media (min-width: 768px) { .landing-hero { padding-top: 4rem; padding-bottom: 5rem; } }
.landing-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--landing-text, #0f172a);
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}
.landing-hero-sub {
    font-size: 1.0625rem;
    color: var(--landing-text-muted, #64748b);
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.landing-hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.landing-trust-bar {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--sf-border, #e2e8f0);
    font-size: 0.875rem;
    color: var(--landing-text-muted, #64748b);
}
.landing-logo-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 2rem; margin-top: 1rem; opacity: 0.7; }
.landing-flow-visual {
    height: 120px;
    margin: 2rem auto;
    max-width: 400px;
    background: linear-gradient(90deg, var(--landing-primary, #0ea5e9) 0%, rgba(14, 165, 233, 0.3) 50%, var(--landing-accent, #06b6d4) 100%);
    border-radius: 60px;
    opacity: 0.4;
    mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
    animation: landing-flow-pulse 4s ease-in-out infinite;
}
@keyframes landing-flow-pulse { 0%, 100% { opacity: 0.35; transform: scaleX(1); } 50% { opacity: 0.55; transform: scaleX(1.02); } }
.landing-pillar {
    border-radius: 16px;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--sf-border, #e2e8f0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}
.landing-pillar:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); }
.landing-pillar-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--landing-primary-light, rgba(14, 165, 233, 0.12));
    color: var(--landing-primary, #0ea5e9);
    margin-bottom: 1rem;
}
.landing-pillar-title { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.5rem; color: var(--landing-text, #0f172a); }
.landing-pillar-desc { font-size: 0.9375rem; color: var(--landing-text-muted, #64748b); line-height: 1.5; }
.landing-step { text-align: center; padding: 1rem; }
.landing-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--landing-primary, #0ea5e9);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.landing-step-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.35rem; }
.landing-step-desc { font-size: 0.875rem; color: var(--landing-text-muted, #64748b); }
.landing-accordion .accordion-button { font-weight: 600; color: var(--landing-text, #0f172a); background: #fff; border: 1px solid var(--sf-border, #e2e8f0); }
.landing-accordion .accordion-button:not(.collapsed) {
    background: var(--landing-primary-light, rgba(14, 165, 233, 0.08));
    border-color: var(--landing-primary, #0ea5e9);
    color: var(--landing-primary, #0ea5e9);
}
.landing-accordion .accordion-body { font-size: 0.9375rem; color: var(--landing-text-muted, #64748b); line-height: 1.6; }
.landing-testimonial { background: #fff; border-radius: 16px; padding: 1.5rem; border: 1px solid var(--sf-border, #e2e8f0); height: 100%; }
.landing-testimonial-quote { font-size: 0.9375rem; font-style: italic; color: var(--landing-text, #0f172a); line-height: 1.6; margin-bottom: 1rem; }
.landing-testimonial-author { font-weight: 600; font-size: 0.9375rem; color: var(--landing-text, #0f172a); }
.landing-testimonial-role { font-size: 0.8125rem; color: var(--landing-text-muted, #64748b); }
.landing-faq .accordion-button { font-size: 1rem; font-weight: 500; }
.landing-final-cta {
    background: linear-gradient(135deg, var(--landing-primary, #0ea5e9) 0%, var(--landing-accent, #06b6d4) 100%);
    color: #fff;
    padding: 4rem 1.5rem;
    border-radius: 24px;
    text-align: center;
}
.landing-final-cta .form-control { max-width: 320px; margin: 0 auto; border-radius: 12px; }
.landing-final-cta .btn-light { border-radius: 12px; font-weight: 600; }
.landing-footer { background: var(--landing-text, #0f172a); color: #94a3b8; }
.landing-footer .landing-logo-text { color: #fff; }
.landing-footer a:hover { color: #fff; }
.landing-feature-card {
    border-radius: 16px;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--sf-border, #e2e8f0);
    height: 100%;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.landing-feature-card:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06); border-color: var(--landing-primary, #0ea5e9); }
.landing-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--landing-primary-light, rgba(14, 165, 233, 0.12));
    color: var(--landing-primary, #0ea5e9);
    margin-bottom: 1rem;
}
.landing-feature-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; color: var(--landing-text, #0f172a); }
.landing-feature-desc { font-size: 0.875rem; color: var(--landing-text-muted, #64748b); line-height: 1.5; }
.landing-sticky-nav {
    position: sticky;
    top: 60px;
    background: #fff;
    border-bottom: 1px solid var(--sf-border, #e2e8f0);
    z-index: 10;
    padding: 0.5rem 0;
}
.landing-sticky-nav .nav-link { color: var(--landing-text-muted, #64748b); font-weight: 500; font-size: 0.875rem; padding: 0.5rem 0.75rem; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.landing-sticky-nav .nav-link:hover,
.landing-sticky-nav .nav-link.active { color: var(--landing-primary, #0ea5e9); background: var(--landing-primary-light, rgba(14, 165, 233, 0.1)); }

/* ============================================================
   SF V2 — Unified design refresh (applied to every authenticated
   page automatically via Bootstrap + MudBlazor overrides).
   The home/marketing site uses sfh-/sfn-/sff- which already match.
   This brings the post-login app to the same visual language.
   ============================================================ */

:root {
    /* Refreshed tokens — coral primary, paper background, modern shadows */
    --sf-bg: #faf7f4;
    --sf-bg-gradient: linear-gradient(180deg, #faf7f4 0%, #f3eee8 100%);
    --sf-surface: #ffffff;
    --sf-surface-hover: #faf7f4;
    --sf-border: #ececec;
    --sf-border-light: #f3f0eb;
    --sf-text: #181818;
    --sf-text-muted: #6b6b6b;
    --sf-text-subtle: #94a0ad;
    --sf-primary: #ff6f8e;
    --sf-primary-hover: #e85567;
    --sf-primary-light: rgba(255, 111, 142, 0.10);
    --sf-primary-border: #ff8fa3;
    --sf-ink: #181818;
    --sf-ink-soft: #2c2c2c;
    --sf-mint: #4fd1a8;
    --sf-lavender: #a593ff;
    --sf-yellow: #ffc54e;
    --sf-coral: #ff8fa3;
    --sf-coral-deep: #ff6f8e;
    --sf-focus-ring: 0 0 0 3px rgba(255, 111, 142, 0.22);
    --sf-card-bg: #ffffff;
    --sf-card-border: #ececec;
    --sf-card-shadow: 0 4px 14px rgba(20, 16, 60, 0.05);
    --sf-card-shadow-hover: 0 14px 40px rgba(20, 16, 60, 0.08);
    --sf-radius: 16px;
    --sf-radius-sm: 10px;
    --sf-radius-lg: 22px;
}

/* ===== Page shell / scrollbar / focus ===== */
body {
    background: var(--sf-bg-gradient);
    color: var(--sf-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

::selection { background: rgba(255, 143, 163, 0.28); color: var(--sf-ink); }

*:focus-visible {
    outline: 2px solid var(--sf-coral-deep);
    outline-offset: 2px;
    border-radius: 6px;
}

/* WebKit scrollbars (Chrome/Safari) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d2cc; border-radius: 999px; border: 2px solid var(--sf-bg); }
::-webkit-scrollbar-thumb:hover { background: #b8b4ad; }

/* Page background gradient + bottom-nav clearance */
.page {
    background: var(--sf-bg-gradient);
}

/* ===== Top bar — modern translucent ===== */
.sf-topbar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    box-shadow: 0 1px 0 rgba(20,16,60,0.04);
}

.sf-topbar .navbar-brand {
    font-weight: 800 !important;
    font-size: 1.15rem !important;
    letter-spacing: -0.02em;
    color: var(--sf-ink) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
}

.sf-topbar .navbar-brand::before {
    content: 'SF';
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff8fa3 0%, #a593ff 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255,143,163,0.3);
}

/* Topbar centre nav (desktop) */
.sf-topbar-link {
    color: var(--sf-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.sf-topbar-link i { font-size: 0.95rem; }

.sf-topbar-link:hover {
    background: var(--sf-bg);
    color: var(--sf-ink);
}

.sf-topbar-link.is-active {
    background: var(--sf-ink);
    color: #fff;
}

.sf-topbar-link.is-active:hover { background: #2a2a2a; color: #fff; }

/* ===== Bottom nav — pill style, floating ===== */
.sf-bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--sf-border);
    box-shadow: 0 -8px 24px rgba(20,16,60,0.06);
}

.sf-bottom-nav .nav-link {
    color: var(--sf-text-muted) !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: color 0.15s ease, background 0.15s ease;
}

.sf-bottom-nav .nav-link i {
    font-size: 1.25rem;
    line-height: 1;
}

.sf-bottom-nav .nav-link:hover {
    color: var(--sf-ink) !important;
    background: var(--sf-bg);
}

.sf-bottom-nav .nav-link.active {
    color: var(--sf-coral-deep) !important;
    background: rgba(255, 111, 142, 0.10);
}

/* ===== Bootstrap button refresh ===== */
.btn {
    border-radius: var(--sf-radius-sm);
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:focus, .btn.focus { box-shadow: var(--sf-focus-ring); }

.btn-primary {
    background: linear-gradient(135deg, var(--sf-coral) 0%, var(--sf-coral-deep) 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(255, 111, 142, 0.28);
}

.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(255, 111, 142, 0.36);
    color: #fff !important;
}

.btn-primary:disabled, .btn-primary.disabled {
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.btn-outline-primary {
    color: var(--sf-coral-deep) !important;
    border-color: var(--sf-coral-deep) !important;
    background: #fff !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus,
.btn-outline-primary.active, .btn-outline-primary:not(:disabled):not(.disabled).active {
    background: linear-gradient(135deg, var(--sf-coral) 0%, var(--sf-coral-deep) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.btn-secondary {
    background: var(--sf-ink) !important;
    border-color: var(--sf-ink) !important;
    color: #fff !important;
}

.btn-secondary:hover { background: #2a2a2a !important; }

.btn-outline-secondary {
    color: var(--sf-ink) !important;
    border-color: var(--sf-border) !important;
    background: #fff !important;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus,
.btn-outline-secondary.active {
    background: var(--sf-bg) !important;
    color: var(--sf-ink) !important;
    border-color: var(--sf-text-muted) !important;
}

.btn-success {
    background: linear-gradient(135deg, #7ee3c0 0%, #4fd1a8 100%) !important;
    border-color: transparent !important;
    color: #0e2d24 !important;
    box-shadow: 0 8px 22px rgba(79, 209, 168, 0.25);
}

.btn-success:hover { color: #0e2d24 !important; transform: translateY(-1px); }

.btn-outline-success {
    color: #1f7d59 !important;
    border-color: #4fd1a8 !important;
    background: #fff !important;
}

.btn-outline-success:hover { background: #d6f4e8 !important; color: #1f7d59 !important; }

.btn-danger {
    background: linear-gradient(135deg, #ff8fa3 0%, #e85567 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffe08a 0%, #ffc54e 100%) !important;
    border-color: transparent !important;
    color: #4d3700 !important;
}

.btn-info {
    background: linear-gradient(135deg, #d2dffc 0%, #7e9bf2 100%) !important;
    border-color: transparent !important;
    color: #1d3a92 !important;
}

.btn-link {
    color: var(--sf-coral-deep) !important;
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover { color: var(--sf-coral) !important; text-decoration: underline; }

/* Button group */
.btn-group .btn { box-shadow: none; }
.btn-group > .btn-primary { box-shadow: none; }

/* Icon-only buttons */
.btn-icon-only {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
}

/* ===== Bootstrap card refresh ===== */
.card {
    border: 1px solid var(--sf-card-border) !important;
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-card-shadow);
    background: var(--sf-card-bg);
    overflow: hidden;
}

.card.shadow-sm { box-shadow: var(--sf-card-shadow) !important; }

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--sf-border-light) !important;
    padding: 0.95rem 1.1rem;
    font-weight: 700;
    color: var(--sf-ink);
}

.card-title { font-weight: 700; color: var(--sf-ink); letter-spacing: -0.01em; }
.card-body { padding: 1.1rem; }
.card-footer { background: #fff !important; border-top: 1px solid var(--sf-border-light) !important; }

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: var(--sf-radius-sm);
    border: 1px solid var(--sf-border);
    background: #fff;
    color: var(--sf-ink);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--sf-coral) !important;
    box-shadow: var(--sf-focus-ring) !important;
    outline: 0;
}

.form-control::placeholder { color: #b9c1ca; }

.form-label { font-weight: 600; color: var(--sf-ink-soft); font-size: 0.88rem; }

.form-check-input {
    border-radius: 4px;
    border-color: var(--sf-border);
}

.form-check-input:checked {
    background-color: var(--sf-coral-deep) !important;
    border-color: var(--sf-coral-deep) !important;
}

.form-check-input:focus { box-shadow: var(--sf-focus-ring); border-color: var(--sf-coral) !important; }

.input-group .form-control { border-right: 0; }
.input-group .input-group-text {
    background: #fff;
    border: 1px solid var(--sf-border);
    color: var(--sf-text-muted);
    border-radius: var(--sf-radius-sm);
}

/* ===== Tables ===== */
.table {
    --bs-table-bg: #fff;
    --bs-table-color: var(--sf-ink);
    border-color: var(--sf-border-light);
}

.table > thead {
    background: var(--sf-bg);
    color: var(--sf-text-muted);
}

.table > thead th {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sf-text-muted);
    border-bottom: 1px solid var(--sf-border) !important;
    padding: 0.85rem 1rem;
    background: var(--sf-bg);
}

.table > tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--sf-border-light);
}

.table-hover > tbody > tr:hover {
    --bs-table-hover-bg: var(--sf-bg);
}

.table-responsive {
    border-radius: var(--sf-radius);
    border: 1px solid var(--sf-border-light);
    background: #fff;
    box-shadow: var(--sf-card-shadow);
}

/* ===== List groups ===== */
.list-group {
    border-radius: var(--sf-radius);
    overflow: hidden;
    background: #fff;
}

.list-group-item {
    border-color: var(--sf-border-light);
    color: var(--sf-ink);
    padding: 0.95rem 1.1rem;
}

.list-group-item-action:hover { background: var(--sf-bg); }

.list-group-flush .list-group-item { border-radius: 0; }

/* ===== Badges (consistent pill style) ===== */
.badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 0.28rem 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge.bg-primary { background: rgba(255, 111, 142, 0.14) !important; color: var(--sf-coral-deep) !important; }
.badge.bg-secondary { background: var(--sf-bg) !important; color: var(--sf-ink-soft) !important; }
.badge.bg-success { background: #d6f4e8 !important; color: #1f7d59 !important; }
.badge.bg-danger { background: #ffe1e0 !important; color: #c44060 !important; }
.badge.bg-warning { background: #fff1c0 !important; color: #7d5d00 !important; }
.badge.bg-info { background: #dfe6fb !important; color: #1d3a92 !important; }
.badge.bg-light { background: var(--sf-bg) !important; color: var(--sf-ink-soft) !important; border: 1px solid var(--sf-border-light); }
.badge.bg-dark { background: var(--sf-ink) !important; color: #fff !important; }

/* ===== Alerts ===== */
.alert {
    border-radius: var(--sf-radius);
    border: 0;
    padding: 0.95rem 1.1rem;
    font-size: 0.92rem;
}

.alert-primary { background: rgba(255, 111, 142, 0.1); color: var(--sf-coral-deep); }
.alert-success { background: #d6f4e8; color: #1f7d59; }
.alert-danger { background: #ffe1e0; color: #c44060; }
.alert-warning { background: #fff1c0; color: #7d5d00; }
.alert-info { background: #dfe6fb; color: #1d3a92; }

/* ===== Modals ===== */
.modal-content {
    border: 0 !important;
    border-radius: var(--sf-radius-lg);
    box-shadow: 0 30px 80px rgba(20,16,60,0.18);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--sf-border-light);
    padding: 1.1rem 1.4rem;
}

.modal-title { font-weight: 800; color: var(--sf-ink); }
.modal-body { padding: 1.4rem; }
.modal-footer { border-top: 1px solid var(--sf-border-light); padding: 1.1rem 1.4rem; }
.modal-backdrop.show { opacity: 0.5; background: #1a1a1a; }

/* ===== Dropdowns ===== */
.dropdown-menu {
    border: 1px solid var(--sf-border-light);
    border-radius: var(--sf-radius);
    box-shadow: 0 14px 40px rgba(20,16,60,0.1);
    padding: 0.4rem;
}

.dropdown-item {
    border-radius: var(--sf-radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: var(--sf-ink);
    font-weight: 500;
}

.dropdown-item:hover, .dropdown-item:focus {
    background: var(--sf-bg);
    color: var(--sf-ink);
}

.dropdown-item.active { background: var(--sf-primary-light); color: var(--sf-coral-deep); }

/* ===== Page header (used by many pages) ===== */
.sf-page-header {
    background: #fff;
    border: 1px solid var(--sf-border) !important;
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-card-shadow);
}

.sf-page-title {
    font-weight: 800 !important;
    color: var(--sf-ink) !important;
    letter-spacing: -0.015em;
}

.sf-page-subtitle {
    color: var(--sf-text-muted) !important;
    font-weight: 500;
}

.sf-surface-card {
    background: #fff !important;
    border: 1px solid var(--sf-border) !important;
    border-radius: var(--sf-radius) !important;
    box-shadow: var(--sf-card-shadow);
}

/* ===== Spinner / progress ===== */
.spinner-border {
    border-color: var(--sf-coral);
    border-right-color: transparent;
}

.text-primary { color: var(--sf-coral-deep) !important; }
.bg-primary { background: var(--sf-coral-deep) !important; }
.border-primary { border-color: var(--sf-coral-deep) !important; }
.text-success { color: #1f7d59 !important; }
.text-warning { color: #7d5d00 !important; }
.text-danger { color: #c44060 !important; }
.text-info { color: #1d3a92 !important; }
.bg-light { background: var(--sf-bg) !important; }

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--sf-ink);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-sm) !important;
    margin: 0 2px;
    font-weight: 600;
}

.pagination .page-link:hover { background: var(--sf-bg); color: var(--sf-ink); }

.pagination .page-item.active .page-link {
    background: var(--sf-ink);
    border-color: var(--sf-ink);
    color: #fff;
}

/* ===== Nav tabs / pills ===== */
.nav-tabs {
    border-bottom: 1px solid var(--sf-border);
}

.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--sf-text-muted);
    font-weight: 600;
    padding: 0.65rem 1rem;
}

.nav-tabs .nav-link:hover { color: var(--sf-ink); border-bottom-color: var(--sf-border); }

.nav-tabs .nav-link.active {
    color: var(--sf-ink);
    background: transparent;
    border-bottom-color: var(--sf-coral-deep);
}

.nav-pills .nav-link {
    color: var(--sf-text-muted);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 1rem;
}

.nav-pills .nav-link.active {
    background: var(--sf-ink);
    color: #fff;
}

/* ===== Accordion ===== */
.accordion-item {
    border: 1px solid var(--sf-border) !important;
    border-radius: var(--sf-radius) !important;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.accordion-button {
    background: #fff;
    color: var(--sf-ink);
    font-weight: 700;
    border: 0;
}

.accordion-button:not(.collapsed) {
    background: var(--sf-primary-light);
    color: var(--sf-coral-deep);
    box-shadow: none;
}

.accordion-button:focus { box-shadow: var(--sf-focus-ring); border-color: var(--sf-coral); }

/* ===== MudBlazor overrides — common primitives only ===== */
.mud-paper {
    border-radius: var(--sf-radius) !important;
    border-color: var(--sf-border) !important;
    background: #fff;
}

.mud-paper.mud-elevation-0[outlined], .mud-paper[outlined] {
    border: 1px solid var(--sf-border) !important;
    box-shadow: var(--sf-card-shadow) !important;
}

.mud-button-root {
    border-radius: var(--sf-radius-sm) !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--sf-coral) 0%, var(--sf-coral-deep) 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(255, 111, 142, 0.28) !important;
}

.mud-button-outlined.mud-button-outlined-primary {
    color: var(--sf-coral-deep) !important;
    border-color: var(--sf-coral-deep) !important;
    background: #fff !important;
}

.mud-button-text.mud-button-text-primary { color: var(--sf-coral-deep) !important; }

.mud-input-outlined .mud-input-outlined-border { border-color: var(--sf-border) !important; }
.mud-input-outlined.mud-input-focused .mud-input-outlined-border { border-color: var(--sf-coral) !important; border-width: 2px !important; }

.mud-text-secondary { color: var(--sf-text-muted) !important; }

.mud-progress-circular-circle.mud-progress-circular-color-primary { color: var(--sf-coral-deep) !important; }

.mud-table {
    border-radius: var(--sf-radius) !important;
    overflow: hidden;
}

.mud-table-head .mud-table-cell {
    background: var(--sf-bg);
    color: var(--sf-text-muted) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.74rem !important;
    letter-spacing: 0.05em;
}

/* ===== Empty state helper ===== */
.sf-empty {
    background: #fff;
    border: 1px dashed var(--sf-border);
    border-radius: var(--sf-radius);
    padding: 3rem 1.5rem;
    text-align: center;
}

.sf-empty-art {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #fff1ec 0%, #f3eefe 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--sf-coral-deep);
}

/* ===== Tightened typography hierarchy ===== */
h1, .h1 { font-weight: 800; letter-spacing: -0.02em; color: var(--sf-ink); }
h2, .h2 { font-weight: 800; letter-spacing: -0.015em; color: var(--sf-ink); }
h3, .h3 { font-weight: 700; letter-spacing: -0.01em; color: var(--sf-ink); }
h4, h5, h6, .h4, .h5, .h6 { font-weight: 700; color: var(--sf-ink); }
.text-muted { color: var(--sf-text-muted) !important; }

/* ===== Page-level container helpers ===== */
.sf-page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .sf-page-shell { padding: 1.25rem 1.5rem; }
}

/* Ensure forms/cards inside pages don't overflow on tiny screens */
@media (max-width: 575.98px) {
    .card-body { padding: 0.95rem; }
    .modal-body { padding: 1.1rem; }
    .table > thead th,
    .table > tbody td { padding: 0.65rem 0.75rem; font-size: 0.85rem; }
}

/* ===== Hide ugly browser-default tap highlight ===== */
a, button { -webkit-tap-highlight-color: transparent; }

/* ===== Dismissible "payment pending" popup ===== */
.sf-pay-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 60, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: sf-fade-in 0.2s ease-out;
}

.sf-pay-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 22px;
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: 0 30px 80px rgba(20, 16, 60, 0.34);
    text-align: center;
    animation: sf-slide-up 0.25s ease-out;
}

.sf-pay-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px; height: 34px;
    border: 0;
    background: #faf7f4;
    border-radius: 999px;
    color: #2c2c2c;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.sf-pay-close:hover { background: #181818; color: #fff; }

.sf-pay-icon {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff1c0 0%, #ffd96a 100%);
    color: #7d5d00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 0.85rem;
    box-shadow: 0 12px 28px rgba(255, 197, 78, 0.32);
}

.sf-pay-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #b45309;
    background: #fff1c0;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.sf-pay-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #181818;
    margin: 0 0 0.5rem;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.sf-pay-sub {
    font-size: 0.95rem;
    color: #6b6b6b;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

.sf-pay-meta {
    display: inline-flex;
    align-items: center;
    background: #faf7f4;
    border: 1px solid #ececec;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0 0 1.2rem;
}

.sf-pay-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.sf-pay-actions .btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-weight: 700;
    border-radius: 12px;
}

.sf-pay-later {
    color: #6b6b6b;
    font-weight: 600;
}
.sf-pay-later:hover { color: #181818; text-decoration: none; }

.sf-pay-fineprint {
    font-size: 0.74rem;
    color: #94a0ad;
    margin: 0.85rem 0 0;
    line-height: 1.5;
}

/* On phones: bottom-sheet pattern */
@media (max-width: 575.98px) {
    .sf-pay-overlay { align-items: flex-end; padding: 0; }
    .sf-pay-modal {
        max-width: 100%;
        border-radius: 22px 22px 0 0;
    }
}

/* ===== Shared floating-action-button stack tokens =====
   All three public-card FABs (Enquiry, Download PDF, Chat) live on the bottom-right and
   used to manage their own stacking math independently — which made them collide on
   every screen size. They now share these tokens so a single 64-px stride keeps them
   apart with no overlap, and adjusting the base gap is one variable change.
       slot 0 → Enquiry FAB (primary CTA, bottom of stack)
       slot 1 → Download PDF
       slot 2 → Chat FAB
*/
:root {
    --sf-fab-base:  clamp(0.85rem, 3vw, 1.5rem);
    --sf-fab-side:  clamp(0.85rem, 3vw, 1.5rem);
    --sf-fab-stack: 64px;
}

/* ===== SetuBot chat widget (Pro-gated, owner-toggled) ===== */
.sf-chat-fab {
    position: fixed;
    right: var(--sf-fab-side);
    bottom: calc(var(--sf-fab-base) + (var(--sf-fab-stack) * 2)); /* slot 2 — top of stack */
    z-index: 52;
    background: linear-gradient(135deg, #181818 0%, #2c2c2c 100%);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(20, 16, 60, 0.32);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    max-width: calc(100vw - var(--sf-fab-side) - var(--sf-fab-side));
}
.sf-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(20, 16, 60, 0.42); }
.sf-chat-fab i { font-size: 1.05rem; color: #ffd96a; }

.sf-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 60, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 110;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: clamp(0.85rem, 3vw, 1.5rem);
}

.sf-chat-panel {
    width: 100%;
    max-width: 380px;
    height: min(560px, calc(100vh - 2rem));
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(20, 16, 60, 0.34);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: sf-slide-up 0.25s ease-out;
}

.sf-chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    color: #fff;
}
.sf-chat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #ffe08a, #ffc54e);
    color: #4d3700;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.sf-chat-titles { flex: 1; min-width: 0; }
.sf-chat-titles strong { display: block; font-weight: 800; font-size: 0.95rem; }
.sf-chat-titles span   { font-size: 0.75rem; color: rgba(255,255,255,0.7); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-chat-close {
    width: 32px; height: 32px; border-radius: 999px;
    border: 0; background: rgba(255,255,255,0.12); color: #fff;
    cursor: pointer;
}
.sf-chat-close:hover { background: rgba(255,255,255,0.22); }

.sf-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #faf7f4;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sf-chat-bubble {
    max-width: 88%;
    padding: 0.7rem 0.95rem;
    border-radius: 16px;
    font-size: 0.93rem;
    line-height: 1.45;
    color: #1a1a1a;
}
.sf-chat-bubble p { margin: 0; }
.sf-chat-bubble.bot {
    background: #fff;
    border: 1px solid #ececec;
    border-top-left-radius: 4px;
    align-self: flex-start;
}
.sf-chat-bubble.user {
    background: linear-gradient(135deg, #ff8fa3, #ff6f8e);
    color: #fff;
    border-top-right-radius: 4px;
    align-self: flex-end;
}
.sf-chat-bubble.is-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.6rem 0.95rem;
}
.sf-chat-bubble.is-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: #b8b4ad;
    display: inline-block;
    animation: sf-typing 1.2s infinite ease-in-out;
}
.sf-chat-bubble.is-typing span:nth-child(2) { animation-delay: 0.15s; }
.sf-chat-bubble.is-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sf-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-3px); opacity: 1; }
}

.sf-chat-escalated {
    align-self: stretch;
    background: #fff5d4;
    color: #7d5d00;
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.sf-chat-input {
    display: flex;
    gap: 0.4rem;
    padding: 0.65rem;
    border-top: 1px solid #ececec;
    background: #fff;
}
.sf-chat-input input {
    flex: 1;
    border: 1px solid #ececec;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-size: 0.92rem;
    color: #181818;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sf-chat-input input:focus { border-color: #ff8fa3; box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.18); }
.sf-chat-input input:disabled { background: #faf7f4; color: #94a0ad; cursor: not-allowed; }

.sf-chat-send {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, #ff8fa3, #ff6f8e);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.sf-chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.sf-chat-send:not(:disabled):hover { transform: scale(1.04); }

/* ===== Image attachment (paperclip + pending preview + bubble image) ===== */
.sf-chat-attach {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid #efe6df;
    background: #fff;
    color: #6b6b6b;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}
.sf-chat-attach:not(:disabled):hover { background: #fff0f3; color: #ff6f8e; }
.sf-chat-attach:disabled { opacity: 0.4; cursor: not-allowed; }
.sf-chat-attach .spinner-border { width: 16px; height: 16px; border-width: 2px; }

/* Pending preview = fixed-height card that sits cleanly above the input.
   No flex-wrap, no overflow into the input row. */
.sf-chat-pending {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0.85rem;
    margin: 0 0.75rem 0.4rem;
    background: #fff7f3;
    border: 1px solid #ffe1e7;
    border-radius: 12px;
    min-height: 96px;          /* fixed-feel container so layout doesn't jump */
    max-width: calc(100% - 1.5rem);
    box-sizing: border-box;
    overflow: hidden;
}
.sf-chat-pending-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 80px;            /* never grow / never shrink — stays exactly 80×80 */
    box-shadow: 0 2px 6px rgba(20, 16, 60, 0.12);
    background: #fff;
}
.sf-chat-pending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* always fills the thumb, never overflows */
    display: block;
}
.sf-chat-pending-remove {
    position: absolute;
    top: -6px; right: -6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 0;
    background: #1f1f1f;
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}
.sf-chat-pending-remove:hover { background: #000; }
.sf-chat-pending-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;              /* lets the ellipsis kick in inside flex */
    flex: 1 1 auto;
}
.sf-chat-pending-meta small { display: block; line-height: 1.25; }
.sf-chat-pending-meta small:first-child {
    font-weight: 600;
    color: #181818;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-chat-attach-error {
    margin: 0 0.75rem 0.4rem;
    padding: 0.5rem 0.75rem;
    background: #fff0f0;
    border: 1px solid #ffd2d2;
    border-radius: 10px;
    color: #b00020;
    font-size: 0.85rem;
}

/* Sent-bubble image = fixed-size thumbnail (180×180, square-cropped) so it
   never overflows the chat panel or overlaps the next message. Click to view
   full-size in a new tab. Keeps the chat compact regardless of upload aspect ratio. */
.sf-chat-bubble-image {
    display: block;
    width: 180px;
    height: 180px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 0 0.35rem 0;
    cursor: zoom-in;
    box-shadow: 0 4px 12px rgba(20, 16, 60, 0.12);
    background: #f3f0fa;
}
@media (max-width: 480px) {
    .sf-chat-bubble-image { width: 160px; height: 160px; }
}

.sf-chat-fineprint {
    margin: 0;
    padding: 0.45rem 1rem 0.7rem;
    background: #fff;
    border-top: 1px solid #f3f0eb;
    color: #94a0ad;
    font-size: 0.7rem;
    text-align: center;
}

.sf-chat-id-form {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #f3f0eb;
    border-radius: 14px;
    padding: 14px;
    margin: 4px 0 2px;
    max-width: 90%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.sf-chat-id-title { font-weight: 600; font-size: 0.95rem; margin: 0 0 0.6rem; color: #1f2937; }
.sf-chat-id-group { display: flex; flex-direction: column; margin-bottom: 0.6rem; }
.sf-chat-id-group label { font-size: 0.75rem; font-weight: 500; color: #475569; margin-bottom: 0.25rem; }
.sf-chat-id-group input {
    padding: 0.55rem 0.7rem;
    border: 1px solid #e7e0d6;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    color: #1f2937;
}
.sf-chat-id-group input:focus { border-color: #ff8fa3; box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.18); }
.sf-chat-id-group input:disabled { background: #faf7f4; color: #94a0ad; cursor: not-allowed; }
.sf-chat-id-error { color: #b91c1c; font-size: 0.8rem; margin: -0.3rem 0 0.5rem; }
.sf-chat-id-submit {
    background: #ff8fa3;
    color: #fff;
    border: none;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}
.sf-chat-id-submit:hover:not(:disabled) { background: #ff7390; }
.sf-chat-id-submit:disabled { opacity: 0.65; cursor: not-allowed; }

@media (max-width: 575.98px) {
    .sf-chat-overlay { padding: 0; }
    .sf-chat-panel {
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }
    .sf-chat-fab {
        padding: 0.6rem 0.95rem;
        font-size: 0.85rem;
    }
}

/* Ultra-narrow: drop the label so the FABs don't truncate ugly. Icons stay. */
@media (max-width: 359.98px) {
    .sf-chat-fab span { display: none; }
    .sf-chat-fab { padding: 0.65rem 0.75rem; }
}

/* ===== Floating Enquiry button + modal (digital-card public slug) =====
   Slot 0 — bottom of the right-anchored FAB stack. Used to center itself on mobile
   which collided with the right-anchored Download / Chat FABs on screens < 360px.
   Now right-aligned on every breakpoint and shares the --sf-fab-* tokens. */
.sf-card-enquiry-fab {
    position: fixed;
    right: var(--sf-fab-side);
    bottom: var(--sf-fab-base);
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.35rem;
    background: linear-gradient(135deg, #ff8fa3 0%, #ff6f8e 100%);
    color: #fff !important;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 40px rgba(255, 111, 142, 0.38);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
    animation: sf-fade-in 0.4s ease-out;
    max-width: calc(100vw - var(--sf-fab-side) - var(--sf-fab-side));
}

.sf-card-enquiry-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(255, 111, 142, 0.46);
}

.sf-card-enquiry-fab i { font-size: 1.05rem; }

@media (max-width: 575.98px) {
    .sf-card-enquiry-fab {
        padding: 0.75rem 1.1rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 359.98px) {
    .sf-card-enquiry-fab span { display: none; }
    .sf-card-enquiry-fab { padding: 0.8rem 0.85rem; }
}

.sf-card-enquiry-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 60, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: sf-fade-in 0.2s ease-out;
}

.sf-card-enquiry-modal {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(20, 16, 60, 0.32);
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    padding: clamp(1.25rem, 4vw, 2rem);
    position: relative;
}

.sf-card-enquiry-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px; height: 34px;
    border: 0;
    background: #faf7f4;
    border-radius: 999px;
    color: #2c2c2c;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.sf-card-enquiry-close:hover { background: #181818; color: #fff; }

.sf-card-enquiry-head { text-align: center; margin-bottom: 1.25rem; }
.sf-card-enquiry-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b6b6b;
}
.sf-card-enquiry-title {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 800;
    color: #181818;
    margin: 0.3rem 0;
    letter-spacing: -0.015em;
}
.sf-card-enquiry-sub {
    font-size: 0.92rem;
    color: #6b6b6b;
    margin: 0;
}

.sf-card-enquiry-form { display: flex; flex-direction: column; gap: 0.85rem; }

.sf-card-enquiry-field { display: flex; flex-direction: column; gap: 4px; }

.sf-card-enquiry-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2c2c2c;
}
.sf-card-enquiry-label .req { color: #ff6f8e; margin-left: 2px; }
.sf-card-enquiry-label .opt { color: #94a0ad; font-weight: 500; margin-left: 2px; }

.sf-card-enquiry-field input,
.sf-card-enquiry-field textarea {
    width: 100%;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    color: #181818;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.sf-card-enquiry-field input:focus,
.sf-card-enquiry-field textarea:focus {
    border-color: #ff8fa3;
    box-shadow: 0 0 0 4px rgba(255, 143, 163, 0.18);
}

.sf-card-enquiry-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px; height: 1px;
    opacity: 0;
}

.sf-card-enquiry-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.sf-card-enquiry-fineprint {
    font-size: 0.72rem;
    color: #94a0ad;
    margin: 0.6rem 0 0;
    line-height: 1.5;
    text-align: center;
}
.sf-card-enquiry-fineprint a { color: #ff6f8e; text-decoration: none; }
.sf-card-enquiry-fineprint a:hover { text-decoration: underline; }

.sf-card-enquiry-success { text-align: center; padding: 0.6rem 0.4rem; }
.sf-card-enquiry-success-icon {
    width: 76px; height: 76px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #d6f4e8 0%, #7ee3c0 100%);
    color: #1f7d59;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}
.sf-card-enquiry-success h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
    color: #181818;
}
.sf-card-enquiry-success p {
    font-size: 0.95rem;
    color: #6b6b6b;
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

/* Bottom-sheet style on phones */
@media (max-width: 575.98px) {
    .sf-card-enquiry-overlay { align-items: flex-end; padding: 0; }
    .sf-card-enquiry-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 22px 22px 0 0;
        padding: 1.25rem 1.1rem 1.4rem;
        animation: sf-slide-up 0.25s ease-out;
    }
}

@keyframes sf-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== Floating PDF download (digital-card public slug) =====
   Slot 1 — sits one slot above the Enquiry FAB using the shared --sf-fab-stack stride. */
.sf-card-download-fab {
    position: fixed;
    right: var(--sf-fab-side);
    bottom: calc(var(--sf-fab-base) + var(--sf-fab-stack));
    z-index: 51;
    max-width: min(320px, calc(100vw - var(--sf-fab-side) - var(--sf-fab-side)));
    animation: sf-fade-in 0.35s ease-out;
}

.sf-card-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1.15rem;
    background: linear-gradient(135deg, var(--sf-coral) 0%, var(--sf-coral-deep) 100%);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 14px 36px rgba(255, 111, 142, 0.36);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    max-width: 100%;
}

.sf-card-download-btn:hover {
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 20px 44px rgba(255, 111, 142, 0.45);
}

.sf-card-download-btn i { font-size: 1.05rem; }

.sf-card-download-locked {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 1rem 1.1rem 1rem 0.95rem;
    box-shadow: 0 18px 50px rgba(20, 16, 60, 0.18);
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    border: 1px solid var(--sf-border-light);
}

.sf-card-download-locked-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px; height: 26px;
    border: 0;
    background: transparent;
    color: var(--sf-text-muted);
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
}

.sf-card-download-locked-close:hover { background: var(--sf-bg); color: var(--sf-ink); }

.sf-card-download-locked-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff1ec, #ffe1e0);
    color: var(--sf-coral-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.sf-card-download-locked-body strong {
    display: block;
    font-size: 0.88rem;
    color: var(--sf-ink);
    margin-bottom: 0.2rem;
}

.sf-card-download-locked-body p {
    margin: 0 0 0.6rem;
    color: var(--sf-text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    .sf-card-download-locked { max-width: 88vw; }
    .sf-card-download-btn {
        padding: 0.65rem 0.95rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 359.98px) {
    .sf-card-download-btn span { display: none; }
    .sf-card-download-btn { padding: 0.7rem 0.75rem; }
}

/* ===== Animations ===== */
.sf-fade-in {
    /* Tighter than the previous 0.25s — fast nav transitions should feel
       instant; the body slides into place in ~150ms and is below
       conscious-perception threshold for "loading". */
    animation: sf-fade-in 0.15s ease-out;
}

@keyframes sf-fade-in {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Global navigation progress bar =====
   Painted by Shared/NavProgressBar.razor only when a route transition
   exceeds the threshold (default 300ms). The component manages its own
   show/hide timing; this CSS just supplies the visual.

   Two visual layers:
     .sf-nav-progress       — fixed-position track at the very top of the
                              viewport; fades in/out with opacity so we never
                              get a hard pop.
     .sf-nav-progress-bar   — the moving fill; slides 0→100% in a loop while
                              the route transition is in flight. */
.sf-nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 2000;
    pointer-events: none;
    background: transparent;
    overflow: hidden;
    opacity: 0;
    transition: opacity 120ms ease-out;
}

.sf-nav-progress.is-visible {
    opacity: 1;
}

.sf-nav-progress-bar {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(13, 110, 253, 0) 0%,
        rgba(13, 110, 253, 0.85) 50%,
        rgba(13, 110, 253, 0) 100%);
    animation: sf-nav-progress-slide 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sf-nav-progress-slide {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* Respect users who've asked the OS to cut animations. They get a static
   bar instead of a moving one — still gives a visible "something is
   happening" hint without the motion. */
@media (prefers-reduced-motion: reduce) {
    .sf-nav-progress { transition: none; }
    .sf-nav-progress-bar {
        animation: none;
        left: 0;
        width: 100%;
        background: rgba(13, 110, 253, 0.6);
    }
    .sf-fade-in { animation: none; }
}

/* Follow-up reminder: escalated overdue pill in the topbar pulses to draw the eye. */
.sf-overdue-escalated {
    animation: sf-pulse-danger 1.6s ease-in-out infinite;
}

@keyframes sf-pulse-danger {
    0%   { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* ===== Chat-bubble linkifier (Test bot tab + Conversations tab) ===== */
/* Used by ChatTextLinkifier.Linkify() — keeps anchors readable on both
   accent-coloured (user) and white (bot) bubbles. */
.cw-bubble-host .cw-link { text-decoration: underline; word-break: break-all; }
.cw-bubble-host.bg-primary .cw-link,
.bg-primary .cw-bubble-host .cw-link { color: #fff; }
.cw-bubble-host:not(.bg-primary) .cw-link { color: #4f46e5; }
.cw-bubble-host .cw-image-card {
    display: block;
    margin-top: 6px;
    width: 260px;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: zoom-in;
    text-decoration: none;
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cw-bubble-host .cw-image-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.cw-bubble-host .cw-link-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 480px) {
    .cw-bubble-host .cw-image-card { width: 220px; height: 170px; }
}

/* WhatsApp-style file card — for PDF / DOC / XLS / ZIP / audio / video links */
.cw-bubble-host .cw-file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 10px 12px;
    width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cw-bubble-host .cw-file-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}
.cw-bubble-host .cw-file-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}
.cw-bubble-host .cw-file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.cw-bubble-host .cw-file-name {
    font-weight: 500;
    font-size: 13px;
    color: #111;
    word-break: break-all;
    line-height: 1.3;
}
.cw-bubble-host .cw-file-ext {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
/* On primary (user) bubbles, lift the card so it stays readable on the accent background.
   Also applies to the public ChatWidget where the user bubble is `.sf-chat-bubble.user`. */
.cw-bubble-host.bg-primary .cw-file-card,
.cw-bubble-host.sf-chat-bubble.user .cw-file-card {
    background: rgba(255, 255, 255, 0.95);
}
.cw-bubble-host.sf-chat-bubble.user .cw-link {
    color: #fff;
    text-decoration: underline;
}
@media (max-width: 480px) {
    .cw-bubble-host .cw-file-card { width: 220px; }
}

/* Markdown rendered inside chat bubbles — bullet/numbered lists, bold, italic, code. */
.cw-bubble-host .cw-md-ul,
.cw-bubble-host .cw-md-ol {
    margin: 4px 0 4px 18px;
    padding: 0;
}
.cw-bubble-host .cw-md-ul li,
.cw-bubble-host .cw-md-ol li {
    margin: 2px 0;
    line-height: 1.45;
}
.cw-bubble-host strong { font-weight: 600; }
.cw-bubble-host em { font-style: italic; }
.cw-bubble-host .cw-md-code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    font-size: 90%;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
}
.cw-bubble-host.bg-primary .cw-md-code,
.cw-bubble-host.sf-chat-bubble.user .cw-md-code {
    background: rgba(255, 255, 255, 0.20);
    color: #fff;
}

/* ===== Public card loading skeleton (replaces "Loading card…" text) =====
   Shown while the first /api/cards/public/{slug} call is in flight. Shaped
   like the eventual classic card so the layout doesn't jump on hydration. */
.sf-card-skeleton-page {
    min-height: 100vh;
    background: #f5f3ff;
    padding: clamp(1rem, 4vw, 2.25rem) clamp(0.85rem, 3vw, 1.5rem);
    display: flex;
    justify-content: center;
}
.sf-card-skeleton {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(20, 16, 60, 0.10);
    overflow: hidden;
    position: relative;
}
.sf-card-skeleton-cover {
    height: 140px;
    background: linear-gradient(110deg, #e9e7f6 30%, #f2f1fb 50%, #e9e7f6 70%);
    background-size: 200% 100%;
    animation: sf-skeleton-shimmer 1.4s ease-in-out infinite;
}
.sf-card-skeleton-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #e1ddf3;
    margin: -43px auto 0;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(20, 16, 60, 0.08);
}
.sf-card-skeleton-body {
    padding: 1rem clamp(1rem, 4vw, 1.5rem) 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}
.sf-card-skeleton-line {
    width: 90%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(110deg, #ece9f6 30%, #f6f4fc 50%, #ece9f6 70%);
    background-size: 200% 100%;
    animation: sf-skeleton-shimmer 1.4s ease-in-out infinite;
}
.sf-card-skeleton-line--title { width: 60%; height: 18px; }
.sf-card-skeleton-line--sub   { width: 45%; height: 14px; }
.sf-card-skeleton-line--short { width: 40%; }
.sf-card-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    width: 95%;
    margin: 0.35rem 0;
}
.sf-card-skeleton-pill {
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(110deg, #ece9f6 30%, #f6f4fc 50%, #ece9f6 70%);
    background-size: 200% 100%;
    animation: sf-skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes sf-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .sf-card-skeleton-cover,
    .sf-card-skeleton-line,
    .sf-card-skeleton-pill { animation: none; }
}
