/* MajidFood — shared styles for all four apps. */

.mf-login-bg {
    min-height: 100vh;
    background: linear-gradient(160deg, #FF5A00 0%, #FF7A33 45%, #FFB27D 100%);
}

.mf-login-logo {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: #FFF1E8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 8px 24px rgba(255, 90, 0, 0.25);
}

/* Restaurant browse card */
.mf-rest-card {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    overflow: hidden;
    height: 100%;
}

.mf-rest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(36, 31, 27, 0.12) !important;
}

.mf-rest-banner {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}

.mf-rest-closed {
    filter: grayscale(1);
    opacity: .75;
}

.mf-closed-ribbon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(36, 31, 27, .82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

/* Menu item row */
.mf-menu-item {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: border-color .15s ease, background .15s ease;
    height: 100%;
}

.mf-menu-item:hover {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover);
}

.mf-menu-emoji {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--mud-palette-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

/* Sticky cart summary on the restaurant page */
.mf-cart-panel {
    position: sticky;
    top: 84px;
}

/* Big tracking status banner */
.mf-track-hero {
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(135deg, #FF5A00, #FF8A4D);
    color: #fff;
}

.mf-track-hero .mud-typography {
    color: #fff;
}

/* ---------- Motion ---------- */

@keyframes mfFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mfSlideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mfPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

@keyframes mfSpin {
    to { transform: rotate(360deg); }
}

@keyframes mfDots {
    0%, 80%, 100% { transform: scale(.55); opacity: .35; }
    40% { transform: scale(1); opacity: 1; }
}

/* Entrance animation for cards and rows, with a gentle stagger. */
.mf-rest-card, .mf-promo-card, .mf-again-card, .mf-menu-item, .mf-track-hero,
.mf-cuisine-item, .mud-paper.pa-4, .mud-paper.pa-5 {
    animation: mfFadeUp .38s cubic-bezier(.21, .8, .35, 1) both;
}

.mud-grid > .mud-grid-item:nth-child(1) > * { animation-delay: .02s; }
.mud-grid > .mud-grid-item:nth-child(2) > * { animation-delay: .06s; }
.mud-grid > .mud-grid-item:nth-child(3) > * { animation-delay: .10s; }
.mud-grid > .mud-grid-item:nth-child(4) > * { animation-delay: .14s; }
.mud-grid > .mud-grid-item:nth-child(5) > * { animation-delay: .18s; }
.mud-grid > .mud-grid-item:nth-child(6) > * { animation-delay: .22s; }
.mud-grid > .mud-grid-item:nth-child(7) > * { animation-delay: .26s; }
.mud-grid > .mud-grid-item:nth-child(8) > * { animation-delay: .30s; }
.mud-grid > .mud-grid-item:nth-child(9) > * { animation-delay: .34s; }

.mf-hscroll > *:nth-child(1) { animation-delay: .02s; }
.mf-hscroll > *:nth-child(2) { animation-delay: .05s; }
.mf-hscroll > *:nth-child(3) { animation-delay: .08s; }
.mf-hscroll > *:nth-child(4) { animation-delay: .11s; }
.mf-hscroll > *:nth-child(5) { animation-delay: .14s; }
.mf-hscroll > *:nth-child(6) { animation-delay: .17s; }
.mf-hscroll > *:nth-child(7) { animation-delay: .20s; }
.mf-hscroll > *:nth-child(8) { animation-delay: .23s; }

.mf-basket-bar {
    animation: mfSlideUp .35s cubic-bezier(.21, .8, .35, 1) both;
}

.mf-fav-btn:active .mud-icon-root,
.mf-nav-item:active .mud-icon-root {
    animation: mfPop .3s ease;
}

.mf-cuisine-item.selected .mf-cuisine-circle {
    animation: mfPop .3s ease;
}

/* ---------- Branded page loader ---------- */

@keyframes mfGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes mfBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(28px, -22px) scale(1.12); }
    66% { transform: translate(-20px, 18px) scale(.92); }
}

@keyframes mfShimmer {
    to { background-position: 200% center; }
}

/* Fullscreen splash — covers everything, including the app bar and bottom nav.
   Light, appetizing gradient that gently breathes. */
.mf-loader-page {
    position: fixed;
    inset: 0;
    z-index: 1450;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(140deg, #FFF9F4 0%, #FFEBDA 30%, #FFD3AE 62%, #FFA766 100%);
    background-size: 200% 200%;
    animation: mfGradientShift 6s ease infinite;
}

/* Food emojis floating up through the splash. */
@keyframes mfFloatUp {
    0% {
        transform: translateY(55vh) rotate(-10deg) scale(.85);
        opacity: 0;
    }
    12% {
        opacity: .38;
    }
    85% {
        opacity: .25;
    }
    100% {
        transform: translateY(-58vh) rotate(12deg) scale(1.05);
        opacity: 0;
    }
}

/* Food floats BEHIND the brand content (z-index 0 vs 2) and stays faint,
   so it never collides with the wordmark. */
.mf-loader-food {
    position: absolute;
    top: 50%;
    z-index: 0;
    font-size: 27px;
    animation: mfFloatUp 7s linear infinite;
    filter: blur(.6px) drop-shadow(0 4px 10px rgba(255, 90, 0, .15));
    pointer-events: none;
}

/* Soft glowing blobs drifting behind the loader. */
.mf-loader-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(46px);
    opacity: .5;
    animation: mfBlobFloat 9s ease-in-out infinite;
    pointer-events: none;
}

.mf-loader-blob-1 {
    width: 42vw;
    height: 42vw;
    max-width: 460px;
    max-height: 460px;
    top: -10vh;
    left: -8vw;
    background: #FF8A3D;
    opacity: .38;
}

.mf-loader-blob-2 {
    width: 34vw;
    height: 34vw;
    max-width: 380px;
    max-height: 380px;
    bottom: -12vh;
    right: -6vw;
    background: #FFC79A;
    opacity: .55;
    animation-delay: -3s;
}

.mf-loader-blob-3 {
    width: 22vw;
    height: 22vw;
    max-width: 240px;
    max-height: 240px;
    top: 38%;
    right: 16%;
    background: #FF7BA9;
    opacity: .22;
    animation-delay: -6s;
}

.mf-loader-brand {
    position: relative;
    z-index: 2;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.01em;
    /* Solid brand orange with one narrow sheen sweeping across — reads as a clean
       wordmark, never as broken rendering. */
    background: linear-gradient(100deg,
        #E04E00 0%, #E04E00 42%, #FF9E60 50%, #E04E00 58%, #E04E00 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mfShimmer 3s linear infinite;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, .85));
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .mf-loader-brand {
        background: none;
        -webkit-text-fill-color: initial;
        color: #E04E00;
    }
}

.mf-loader-tagline {
    position: relative;
    z-index: 2;
    font-size: 13.5px;
    font-weight: 600;
    color: #8A5B3A;
    letter-spacing: .02em;
}

.mf-loader-page .mf-loader-ring {
    position: relative;
    z-index: 2;
}

.mf-loader-page .mf-loader-dots {
    position: relative;
    z-index: 2;
}

.mf-loader-page .mf-loader-core {
    background: #FFFFFF;
}

.mf-loader-page .mf-loader-dots span {
    background: #FF5A00;
}

.mf-loader-label {
    position: relative;
    z-index: 2;
    font-size: 12.5px;
    color: #A06B45;
    animation: mfFadeUp .5s ease both;
}

/* Small company mark pinned to the splash footer. */
.mf-loader-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 2;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(138, 91, 58, .5);
}

.mf-loader-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    padding: 5px;
    background: conic-gradient(from 0deg, #FF5A00, #FFB27D, rgba(255, 90, 0, .06), #FF5A00);
    animation: mfSpin 1.1s linear infinite;
    box-shadow: 0 10px 30px rgba(255, 90, 0, .22);
}

.mf-loader-ring-sm {
    width: 56px;
    height: 56px;
    padding: 4px;
}

.mf-loader-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    animation: mfSpin 1.1s linear infinite reverse; /* keeps the emoji upright */
}

.mf-loader-ring-sm .mf-loader-core {
    font-size: 24px;
}

.mf-loader-dots {
    display: flex;
    gap: 7px;
}

.mf-loader-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    animation: mfDots 1.2s infinite ease-in-out;
}

.mf-loader-dots span:nth-child(2) { animation-delay: .15s; }
.mf-loader-dots span:nth-child(3) { animation-delay: .30s; }

.mf-loader-label {
    animation: mfFadeUp .5s ease both;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- Branded app bar (frosted glass) ---------- */

.mf-appbar {
    background: rgba(255, 251, 247, .78) !important;
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    color: #241F1B !important;
    box-shadow: 0 1px 0 rgba(36, 31, 27, .06), 0 8px 24px rgba(36, 31, 27, .05) !important;
}

.mf-appbar .mud-typography,
.mf-appbar .mud-button-root,
.mf-appbar .mud-icon-root {
    color: #241F1B !important;
}

/* Brand: gradient tile + gradient wordmark. */
.mf-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.mf-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF5A00, #FF9A5C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    box-shadow: 0 6px 16px rgba(255, 90, 0, .35);
    transition: transform .15s ease;
}

.mf-brand:hover .mf-brand-mark {
    transform: rotate(-8deg) scale(1.06);
}

.mf-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: linear-gradient(100deg, #241F1B 30%, #FF5A00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pill nav buttons. */
.mf-appbar .mf-nav-pill {
    border-radius: 999px !important;
    padding: 6px 16px !important;
    font-weight: 600;
    transition: background .15s ease;
}

.mf-appbar .mf-nav-pill:hover {
    background: rgba(255, 90, 0, .10) !important;
    color: #E04E00 !important;
}

.mf-appbar .mf-nav-pill:hover .mud-icon-root {
    color: #E04E00 !important;
}

/* Cart button pops in brand orange. */
.mf-appbar .mf-cart-btn .mud-icon-root {
    color: #FF5A00 !important;
}

/* Modern rounded nav links in the dark drawer (admin + partner portals). */
.mud-drawer .mud-nav-link {
    border-radius: 12px;
    margin: 3px 10px;
    width: auto;
    transition: background .15s ease;
}

.mud-drawer .mud-nav-link:hover {
    background: rgba(255, 255, 255, .06);
}

.mud-drawer .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(255, 90, 0, .30), rgba(255, 90, 0, .05));
    color: #FF9A5C !important;
    box-shadow: inset 3px 0 0 #FF5A00;
}

.mud-drawer .mud-nav-link.active .mud-icon-root {
    color: #FF9A5C !important;
}

/* ---------- Admin activity page ---------- */

@keyframes mfPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); }
    50% { box-shadow: 0 0 0 6px rgba(18, 161, 80, 0); }
}

.mf-presence-card {
    min-width: 150px;
    max-width: 170px;
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.mf-presence-avatar {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5A00, #FF9A5C);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mf-presence-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #12A150;
    border: 2px solid var(--mud-palette-surface);
    animation: mfPulse 1.8s ease-out infinite;
}

.mf-activity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--mud-palette-divider-light, var(--mud-palette-lines-default));
    animation: mfFadeUp .25s ease both;
}

/* Compact search pill in the top bar (desktop). */
.mf-appbar .mf-topsearch {
    align-items: center;
    gap: 8px;
    min-width: 280px;
    max-width: 360px;
    margin: 0 16px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(36, 31, 27, .05);
    border: 1.5px solid rgba(36, 31, 27, .08);
    color: var(--mud-palette-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.mf-appbar .mf-topsearch:hover {
    border-color: rgba(255, 90, 0, .55);
    background: #fff;
    box-shadow: 0 6px 18px rgba(255, 90, 0, .14);
}

/* Avatar with a gradient ring. */
.mf-appbar .mud-avatar {
    background: linear-gradient(135deg, #FF5A00, #FF9A5C) !important;
    color: #fff !important;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(255, 90, 0, .45), 0 4px 12px rgba(255, 90, 0, .25);
}

/* ---------- Talabat-style home ---------- */

.mf-hero {
    background: linear-gradient(140deg, #FF5A00 0%, #FF7A33 60%, #FF9A5C 100%);
    border-radius: 0 0 26px 26px;
    padding: 26px 0 58px;
    color: #fff;
    margin: -24px -24px 0;
}

.mf-hero .mud-typography {
    color: #fff;
}

.mf-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.mf-address-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

/* Search field that overlaps the hero's bottom edge. */
.mf-hero-search {
    margin-top: -26px;
    position: relative;
    z-index: 2;
}

.mf-hero-search .mud-input-control {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(36, 31, 27, .14);
}

/* Horizontally scrolling rows (cuisines, promos, order-again). */
.mf-hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mf-hscroll::-webkit-scrollbar {
    display: none;
}

.mf-cuisine-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 74px;
    cursor: pointer;
    user-select: none;
}

.mf-cuisine-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.mf-cuisine-item:hover .mf-cuisine-circle {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 31, 27, .10);
}

.mf-cuisine-item.selected .mf-cuisine-circle {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover);
    box-shadow: 0 6px 18px rgba(255, 90, 0, .25);
}

.mf-cuisine-item .mf-cuisine-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    max-width: 78px;
    line-height: 1.15;
}

.mf-cuisine-item.selected .mf-cuisine-label {
    color: var(--mud-palette-primary);
}

.mf-promo-card {
    min-width: 250px;
    border-radius: 18px;
    padding: 18px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: default;
    box-shadow: 0 8px 22px rgba(36, 31, 27, .14);
}

.mf-promo-code {
    display: inline-block;
    background: rgba(255, 255, 255, .22);
    border: 1px dashed rgba(255, 255, 255, .7);
    border-radius: 8px;
    padding: 2px 10px;
    font-weight: 700;
    letter-spacing: .06em;
    width: fit-content;
}

.mf-again-card {
    min-width: 150px;
    max-width: 150px;
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.mf-again-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 31, 27, .10);
}

/* Heart button on restaurant cards. */
.mf-fav-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(36, 31, 27, .18);
    transition: transform .12s ease;
}

.mf-fav-btn:hover {
    transform: scale(1.12);
}

/* Time chip overlaying the card banner. */
.mf-time-chip {
    position: absolute;
    bottom: -12px;
    right: 14px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(36, 31, 27, .12);
}

.mf-free-delivery {
    color: #12A150;
    font-weight: 700;
}

/* Section headings with a "see more" affordance. */
.mf-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 10px;
}

/* ---------- AI smart-search dialog ---------- */

@keyframes mfGlowPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255, 90, 0, .35), 0 8px 40px rgba(255, 90, 0, .22); }
    50% { box-shadow: 0 0 0 3px rgba(255, 122, 51, .55), 0 8px 48px rgba(255, 90, 0, .34); }
}

@keyframes mfSparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: .9; }
    50% { transform: scale(1.25) rotate(12deg); opacity: 1; }
}

@keyframes mfShimmerRow {
    to { background-position: -200% 0; }
}

/* The dialog surface itself — fullscreen, so no rounding. */
.mf-search-dialog {
    border-radius: 0 !important;
    overflow: hidden;
}

/* Glowing gradient-border search box. */
.mf-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 16px;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--mud-palette-surface), var(--mud-palette-surface)),
                      linear-gradient(110deg, #FF5A00, #FF9E60, #E0356B, #FF5A00);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: mfGlowPulse 2.6s ease-in-out infinite;
}

.mf-search-box .mf-search-spark {
    font-size: 20px;
    animation: mfSparkle 1.8s ease-in-out infinite;
}

.mf-search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16.5px;
    font-weight: 500;
    padding: 13px 0;
    color: var(--mud-palette-text-primary);
    font-family: inherit;
}

.mf-search-box input::placeholder {
    color: var(--mud-palette-text-secondary);
    opacity: .8;
}

/* The pill on the home page that opens the dialog. */
.mf-search-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    box-shadow: 0 10px 30px rgba(36, 31, 27, .14);
    color: var(--mud-palette-text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.mf-search-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 34px rgba(255, 90, 0, .18);
}

/* One search result row. */
.mf-search-hit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .12s ease;
    animation: mfFadeUp .25s ease both;
}

.mf-search-hit:hover {
    background: var(--mud-palette-primary-hover);
}

.mf-search-hit .mf-hit-emoji {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--mud-palette-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

/* Shimmering placeholder rows while "thinking". */
.mf-search-shimmer {
    height: 58px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: linear-gradient(90deg,
        var(--mud-palette-gray-light) 25%,
        var(--mud-palette-gray-lighter) 37%,
        var(--mud-palette-gray-light) 63%);
    background-size: 200% 100%;
    animation: mfShimmerRow 1.2s linear infinite;
}

/* Suggestion chips shown before typing. */
.mf-search-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.mf-search-suggestion:hover {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover);
    transform: translateY(-1px);
}

/* ---------- Rider app ---------- */

@keyframes mfDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
    50% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
}

.mf-duty-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #2A211B, #4A382A);
    box-shadow: 0 12px 34px rgba(36, 31, 27, .30);
    animation: mfFadeUp .35s ease both;
}

.mf-duty-card.online {
    background: linear-gradient(135deg, #FF5A00, #FF9A5C);
    box-shadow: 0 14px 42px rgba(255, 90, 0, .40);
}

.mf-duty-card .mud-typography { color: #fff; }

.mf-duty-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #9AA0A6;
    display: inline-block;
}

.mf-duty-card.online .mf-duty-dot {
    background: #B5FFD0;
    animation: mfDot 1.6s ease-out infinite;
}

.mf-duty-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

/* Job (available delivery) cards with a pickup → dropoff route visual. */
.mf-job-card {
    border-radius: 18px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    padding: 16px;
    margin-bottom: 12px;
    animation: mfFadeUp .3s ease both;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.mf-job-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 90, 0, .45);
    box-shadow: 0 10px 28px rgba(255, 90, 0, .14);
}

.mf-route-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mf-route-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #FF5A00;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255, 90, 0, .18);
}

.mf-route-dot.dest {
    background: #12A150;
    box-shadow: 0 0 0 3px rgba(18, 161, 80, .18);
}

.mf-route-line {
    width: 2px;
    height: 16px;
    margin-inline-start: 4.5px;
    background: repeating-linear-gradient(180deg, var(--mud-palette-lines-inputs) 0 3px, transparent 3px 7px);
}

.mf-earn-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    border-radius: 14px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #0E8442, #12A150);
    color: #fff;
    box-shadow: 0 6px 16px rgba(18, 161, 80, .30);
}

/* Delivery-flow progress segments on the active job. */
.mf-flow {
    display: flex;
    gap: 6px;
    margin: 10px 0 4px;
}

.mf-flow span {
    flex: 1;
    height: 7px;
    border-radius: 4px;
    background: var(--mud-palette-gray-light);
    transition: background .3s ease;
}

.mf-flow span.done {
    background: linear-gradient(90deg, #FF5A00, #FF8A4D);
}

/* ---------- Modern chat ---------- */

@keyframes mfChatIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.95);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mfEq {
    0%, 100% { height: 6px; }
    50% { height: 18px; }
}

@keyframes mfRecPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .45); }
    50% { box-shadow: 0 0 0 8px rgba(217, 45, 32, 0); }
}

.mf-chat-scroll {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 90, 0, .05), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(255, 178, 125, .08), transparent 45%),
        var(--mud-palette-background);
}

.mf-chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
    animation: mfChatIn .28s cubic-bezier(.21, .8, .35, 1) both;
}

.mf-chat-row.mine {
    flex-direction: row-reverse;
}

.mf-chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #77706A, #A8A099);
    box-shadow: 0 2px 8px rgba(36, 31, 27, .18);
}

.mf-chat-bubble {
    max-width: 78%;
    padding: 9px 13px;
    border-radius: 18px 18px 18px 6px;
    background: var(--mud-palette-surface);
    box-shadow: 0 2px 10px rgba(36, 31, 27, .08);
    transition: transform .12s ease;
}

.mf-chat-bubble:hover {
    transform: translateY(-1px);
}

.mf-chat-row.mine .mf-chat-bubble {
    border-radius: 18px 18px 6px 18px;
    background: linear-gradient(135deg, #FF5A00, #FF8A4D);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 90, 0, .30);
}

.mf-chat-row.mine .mf-chat-bubble a { color: #fff; }

.mf-chat-time {
    font-size: 10.5px;
    opacity: .6;
    margin-top: 2px;
    text-align: end;
}

.mf-chat-composer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 251, 247, .85);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.mf-chat-input {
    flex: 1;
    border: 1.5px solid var(--mud-palette-lines-default);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    background: var(--mud-palette-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mf-chat-input:focus {
    border-color: #FF5A00;
    box-shadow: 0 0 0 3px rgba(255, 90, 0, .12);
}

.mf-chat-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mud-palette-text-secondary);
    transition: background .15s ease, transform .12s ease;
}

.mf-chat-icon:hover {
    background: rgba(255, 90, 0, .10);
    color: #FF5A00;
}

.mf-chat-icon:active {
    transform: scale(.88);
}

.mf-chat-icon.recording {
    background: #D92D20;
    color: #fff;
    animation: mfRecPulse 1.4s ease-out infinite;
}

.mf-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #FF5A00, #FF8A4D);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 90, 0, .35);
    transition: transform .12s ease, box-shadow .12s ease;
}

.mf-chat-send:hover {
    transform: scale(1.07);
    box-shadow: 0 8px 22px rgba(255, 90, 0, .45);
}

.mf-chat-send:active {
    transform: scale(.9);
}

.mf-chat-send:disabled {
    opacity: .5;
    transform: none;
}

/* Animated equalizer while a voice note records. */
.mf-chat-eq {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.mf-chat-eq span {
    width: 3.5px;
    border-radius: 2px;
    background: #D92D20;
    animation: mfEq 1s ease-in-out infinite;
}

.mf-chat-eq span:nth-child(2) { animation-delay: .15s; }
.mf-chat-eq span:nth-child(3) { animation-delay: .30s; }
.mf-chat-eq span:nth-child(4) { animation-delay: .45s; }
.mf-chat-eq span:nth-child(5) { animation-delay: .60s; }

/* ---------- Mobile ---------- */

/* Bottom navigation bar — phones only. */
.mf-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1300;
    display: flex;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 -4px 16px rgba(36, 31, 27, .08);
    padding-bottom: env(safe-area-inset-bottom);
}

.mf-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.mf-nav-item.active {
    color: var(--mud-palette-primary);
}

.mf-nav-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: var(--mud-palette-primary);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Floating "view basket" bar on the menu page — phones only. */
.mf-basket-bar {
    position: fixed;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    z-index: 1290;
    border-radius: 14px;
    background: var(--mud-palette-primary);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(255, 90, 0, .35);
    cursor: pointer;
}

@media (min-width: 600px) {
    .mf-bottom-nav, .mf-basket-bar {
        display: none;
    }
}

@media (max-width: 599.98px) {
    /* Room for the fixed bottom bars. */
    .mf-mobile-pad {
        padding-bottom: 140px !important;
    }

    /* Tighter headings and paddings on small screens. */
    .mud-typography-h4 {
        font-size: 1.3rem !important;
    }

    .mud-typography-h5 {
        font-size: 1.15rem !important;
    }

    .mf-track-hero {
        padding: 16px;
    }

    .mf-rest-banner {
        height: 84px;
        font-size: 44px;
    }

    .mf-menu-emoji {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    /* Full-width primary actions (driver flow buttons etc.). */
    .mf-action-btn {
        width: 100%;
    }

    /* The sticky side basket makes no sense stacked under the menu. */
    .mf-cart-panel {
        position: static;
    }

    /* Give tap targets on tables/cards a little more breathing room. */
    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* The hero bleeds to the screen edge — match the tighter mobile container padding. */
    .mf-hero {
        margin: -24px -12px 0;
        padding: 18px 0 52px;
        border-radius: 0 0 22px 22px;
    }

    .mf-hero-inner {
        padding: 0 16px;
    }
}

/* Fullscreen chat top bar */
.mf-chat-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 60px;
    padding: 0 8px;
    background: linear-gradient(120deg, #FF5A00, #FF8A3C);
    box-shadow: 0 2px 14px rgba(255, 90, 0, .35);
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Branded Blazor reconnect overlay (replaces the default white modal) */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    background: rgba(30, 20, 14, .45);
    backdrop-filter: blur(6px);
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected { display: flex; }
.mf-reconnect-card {
    background: var(--mud-palette-surface, #fff);
    border-radius: 22px;
    padding: 26px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    animation: mfFadeUp .25s ease;
}
.mf-reconnect-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(255, 90, 0, .15);
    border-top-color: #FF5A00;
    animation: mfSpin .8s linear infinite;
}
@keyframes mfSpin { to { transform: rotate(360deg); } }
.mf-reconnect-text { font-weight: 600; color: #6b6259; font-size: 14px; }
.mf-reconnect-brand { font-weight: 800; color: #FF5A00; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

/* ===== Activity page: mission control ===== */
.mf-act-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 22px 24px;
    background: linear-gradient(125deg, #1D1410 0%, #2E1A0C 55%, #4A2410 100%);
    box-shadow: 0 16px 40px rgba(46, 26, 12, .35);
    animation: mfFadeUp .3s ease;
}
.mf-act-hero-glow {
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 80% 15%, rgba(255, 90, 0, .30), transparent 42%),
        radial-gradient(circle at 15% 90%, rgba(255, 170, 60, .16), transparent 45%);
    animation: mfGlowDrift 9s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes mfGlowDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(4%, 3%, 0); } }
.mf-live-badge, .mf-live-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    letter-spacing: .14em;
    font-size: 12px;
    color: #7CFC9B;
    background: rgba(76, 175, 80, .14);
    border: 1px solid rgba(124, 252, 155, .35);
    border-radius: 999px;
    padding: 6px 14px;
}
.mf-live-badge-sm { color: #2E7D32; background: rgba(76,175,80,.12); border-color: rgba(76,175,80,.3); letter-spacing: .05em; font-weight: 700; }
.mf-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: mfDot 1.4s ease infinite;
}
.mf-act-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.mf-act-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 12px 16px;
    transition: transform .2s ease, background .2s ease;
}
.mf-act-stat:hover { transform: translateY(-2px); background: rgba(255,255,255,.10); }
.mf-act-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mf-act-stat-num { color: #fff; font-size: 24px; font-weight: 800; line-height: 1; }
.mf-act-stat-label { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 3px; }

.mf-presence-live {
    border: 1px solid rgba(76, 175, 80, .30) !important;
    box-shadow: 0 8px 24px rgba(76, 175, 80, .12);
}
.mf-presence-ring { position: relative; }
.mf-presence-avatar2 {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--mud-palette-surface), 0 0 0 5px rgba(76, 175, 80, .55);
}
.mf-presence-page {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-gray, #F4EFEA);
    border-radius: 999px;
    padding: 2px 10px;
}

.mf-timeline { position: relative; padding-left: 6px; }
.mf-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 90, 0, .5), rgba(255, 90, 0, .06));
    border-radius: 2px;
}
.mf-timeline-row {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 6px 0;
    animation: mfFadeUp .25s ease;
}
.mf-timeline-node {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--mud-palette-surface);
}
.mf-timeline-card {
    flex: 1;
    min-width: 0;
    background: var(--mud-palette-background-gray, #FAF6F1);
    border: 1px solid var(--mud-palette-lines-default, #EFE7DE);
    border-radius: 14px;
    padding: 8px 12px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.mf-timeline-row:hover .mf-timeline-card { transform: translateX(3px); box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.mf-timeline-row.newest .mf-timeline-card {
    border-color: rgba(255, 90, 0, .45);
    box-shadow: 0 6px 18px rgba(255, 90, 0, .12);
}
.mf-timeline-time { font-size: 11px; color: var(--mud-palette-text-secondary); white-space: nowrap; }

.mf-seen-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 6px;
    border-radius: 12px;
    transition: background .15s ease;
}
.mf-seen-row:hover { background: var(--mud-palette-background-gray, #FAF6F1); }
.mf-seen-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mf-seen-status {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-surface);
}
.mf-seen-status.online { background: #4CAF50; animation: mfDot 1.4s ease infinite; }
.mf-seen-status.recent { background: #FFA726; }
.mf-seen-status.off { background: #BDBDBD; }
.mf-seen-meter {
    height: 4px;
    border-radius: 999px;
    background: var(--mud-palette-background-gray, #F1EAE2);
    margin: 4px 0 3px;
    overflow: hidden;
}
.mf-seen-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #FF5A00, #FFA45C);
    transition: width .6s ease;
}

/* Admin chat monitor */
.mf-chatmon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.mf-chatmon-item:hover { background: var(--mud-palette-background-gray, #FAF6F1); transform: translateX(2px); }
.mf-chatmon-item.selected { border-color: rgba(255, 90, 0, .45); background: rgba(255, 90, 0, .06); }
.mf-chatmon-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(255, 90, 0, .14), rgba(255, 170, 60, .18));
}

/* Activity hourly histogram */
.mf-hourbar-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 56px;
}
.mf-hourbar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    min-width: 6px;
}
.mf-hourbar-fill {
    width: 100%;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, #FF8A3C, #FF5A00);
    opacity: .85;
    transition: height .5s ease;
}
.mf-hourbar:hover .mf-hourbar-fill { opacity: 1; }
.mf-hourbar-label { font-size: 9px; color: var(--mud-palette-text-secondary); height: 10px; }

/* Chat monitor v2 */
.mf-chatmon-item.hot {
    border-color: rgba(76, 175, 80, .40);
    box-shadow: 0 4px 16px rgba(76, 175, 80, .10);
}
.mf-chatmon-parties {
    display: flex;
    align-items: center;
    min-width: 52px;
}
.mf-party {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border: 2px solid var(--mud-palette-surface);
}
.mf-party + .mf-party { margin-inline-start: -10px; }
.mf-party.c { background: linear-gradient(135deg, #FF5A00, #FF9A5C); z-index: 3; }
.mf-party.r { background: linear-gradient(135deg, #FB8C00, #FFC107); z-index: 2; }
.mf-party.d { background: linear-gradient(135deg, #1E88E5, #4FC3F7); z-index: 1; }
.mf-chatmon-count {
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #FF5A00, #FF8A3C);
}
.mf-chatmon-count.hot { background: linear-gradient(135deg, #43A047, #7CB342); animation: mfDot 1.4s ease infinite; }
.mf-chat-day {
    text-align: center;
    margin: 12px 0 8px;
}
.mf-chat-day span {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default, #EFE7DE);
    border-radius: 999px;
    padding: 3px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* Talabat-style vertical hero (Market / Pharmacy / Flowers / Shops) */
.mf-vert-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 20px;
    padding: 18px 22px;
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    animation: mfFadeUp .3s ease;
}
.mf-vert-hero-emoji {
    font-size: 44px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
    animation: mfFloat 3s ease-in-out infinite;
}
@keyframes mfFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.mf-vert-hero-bubbles {
    position: absolute;
    inset-inline-end: 10px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: .18;
    font-size: 52px;
    pointer-events: none;
}
.mf-vert-hero-bubbles span:nth-child(2) { font-size: 34px; transform: translateY(-14px); }
.mf-vert-hero-bubbles span:nth-child(3) { font-size: 24px; transform: translateY(12px); }

/* ==================================================================
   Delivery app v2 — modern courier command-center look (dlv-*)
   ================================================================== */

@keyframes dlvRadar {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .45); }
    70% { box-shadow: 0 0 0 16px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes dlvGlow {
    0%, 100% { opacity: .55; }
    50% { opacity: .95; }
}

@keyframes dlvShimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes dlvDash {
    to { background-position-y: -14px; }
}

/* ---------- Command-center hero ---------- */
.dlv-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px 22px 18px;
    color: #F4F6FB;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(255, 90, 0, .16) 0%, transparent 45%),
        radial-gradient(120% 160% at 0% 100%, rgba(59, 111, 224, .12) 0%, transparent 45%),
        linear-gradient(150deg, #171A20 0%, #22262E 60%, #1B1E25 100%);
    box-shadow: 0 18px 44px rgba(18, 20, 26, .38);
    animation: mfFadeUp .35s ease both;
}

.dlv-hero.online {
    background:
        radial-gradient(130% 170% at 100% 0%, rgba(52, 211, 153, .22) 0%, transparent 50%),
        radial-gradient(120% 160% at 0% 100%, rgba(52, 211, 153, .10) 0%, transparent 45%),
        linear-gradient(150deg, #14201B 0%, #1B2A23 60%, #16211C 100%);
}

.dlv-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(60% 90% at 85% -10%, rgba(255, 255, 255, .07), transparent 60%);
    animation: dlvGlow 5s ease-in-out infinite;
}

.dlv-hero .mud-typography { color: #F4F6FB; }

.dlv-hero-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dlv-hero-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 30px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
}

.dlv-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
}

.dlv-status .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9AA0A6;
}

.dlv-hero.online .dlv-status {
    background: rgba(52, 211, 153, .16);
    border-color: rgba(52, 211, 153, .35);
    color: #7CF0C4;
}

.dlv-hero.online .dlv-status .dot {
    background: #34D399;
    animation: dlvRadar 1.8s ease-out infinite;
}

/* Glass stat tiles inside the hero */
.dlv-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.dlv-hstat {
    border-radius: 16px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(8px);
    min-width: 0;
}

.dlv-hstat .k {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    opacity: .62;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dlv-hstat .v {
    font-size: 17px;
    font-weight: 800;
    margin-top: 2px;
    white-space: nowrap;
}

.dlv-hstat .v small {
    font-size: 11.5px;
    font-weight: 600;
    opacity: .65;
}

/* Go online / offline toggle */
.dlv-toggle {
    margin-top: 16px;
    width: 100%;
    border: none;
    cursor: pointer;
    border-radius: 16px;
    padding: 15px 18px;
    font-size: 15.5px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: .2px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 10px 26px rgba(16, 185, 129, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.dlv-toggle:hover { transform: translateY(-1px); filter: brightness(1.05); }
.dlv-toggle:active { transform: translateY(0) scale(.985); }

.dlv-toggle.stop {
    background: linear-gradient(135deg, #3A4150, #262B34);
    box-shadow: 0 10px 26px rgba(18, 20, 26, .35), inset 0 1px 0 rgba(255, 255, 255, .10);
}

.dlv-toggle:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Cards ---------- */
.dlv-card {
    border-radius: 20px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 1px 2px rgba(36, 31, 27, .04), 0 10px 30px rgba(36, 31, 27, .06);
    padding: 18px;
    animation: mfFadeUp .3s ease both;
}

.dlv-card.active-job {
    border: 1.5px solid rgba(255, 90, 0, .4);
    box-shadow: 0 1px 2px rgba(255, 90, 0, .06), 0 14px 38px rgba(255, 90, 0, .12);
}

.dlv-sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 2px 12px;
}

.dlv-sec-title h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.2px;
    margin: 0;
    color: var(--mud-palette-text-primary);
}

.dlv-count {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #FF5A00, #FF8A4D);
    box-shadow: 0 4px 12px rgba(255, 90, 0, .35);
}

/* ---------- Delivery flow stepper ---------- */
.dlv-steps {
    display: flex;
    align-items: flex-start;
    margin: 4px 0 14px;
}

.dlv-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    min-width: 0;
}

.dlv-step .ic {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: var(--mud-palette-gray-light);
    color: var(--mud-palette-text-secondary);
    border: 2px solid var(--mud-palette-lines-default);
    z-index: 1;
    transition: all .25s ease;
}

.dlv-step .lb {
    font-size: 10px;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlv-step::before {
    content: "";
    position: absolute;
    top: 16px;
    inset-inline-start: -50%;
    width: 100%;
    height: 3px;
    background: var(--mud-palette-lines-default);
    z-index: 0;
}

.dlv-step:first-child::before { display: none; }

.dlv-step.done .ic {
    background: linear-gradient(135deg, #FF5A00, #FF8A4D);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 90, 0, .3);
}

.dlv-step.done::before { background: linear-gradient(90deg, #FF5A00, #FF8A4D); }

.dlv-step.done .lb { color: var(--mud-palette-text-primary); }

.dlv-step.now .ic {
    background: #fff;
    border-color: #FF5A00;
    color: #FF5A00;
    box-shadow: 0 0 0 5px rgba(255, 90, 0, .14);
}

.dlv-step.now .lb { color: #FF5A00; }

/* ---------- Route timeline ---------- */
.dlv-route { margin: 6px 0 10px; }

.dlv-route-leg {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dlv-pin {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    background: #FFF1E8;
    border: 1px solid rgba(255, 90, 0, .25);
}

.dlv-pin.dest {
    background: #E9F9F0;
    border-color: rgba(18, 161, 80, .25);
}

.dlv-route-leg .t { min-width: 0; }

.dlv-route-leg .t .n {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dlv-route-leg .t .s {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dlv-route-link {
    width: 3px;
    height: 22px;
    margin-inline-start: 15.5px;
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, #FFB380 0 4px, transparent 4px 9px);
    animation: dlvDash 1.2s linear infinite;
}

/* ---------- Pill actions ---------- */
.dlv-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.dlv-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1.5px solid var(--mud-palette-lines-default);
    transition: all .15s ease;
}

.dlv-pill:hover {
    border-color: #FF5A00;
    color: #FF5A00;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 90, 0, .14);
}

.dlv-pill .mud-icon-root { font-size: 17px; }

/* ---------- Big CTA ---------- */
.dlv-cta {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: none;
    cursor: pointer;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 15.5px;
    font-weight: 800;
    font-family: inherit;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #FF5A00, #FF7E33);
    box-shadow: 0 12px 30px rgba(255, 90, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: transform .15s ease, filter .15s ease;
}

.dlv-cta::after {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: -80%;
    width: 60%;
    height: 100%;
    transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
    transition: inset-inline-start .5s ease;
}

.dlv-cta:hover::after { inset-inline-start: 130%; }
.dlv-cta:hover { transform: translateY(-1px); filter: brightness(1.04); }
.dlv-cta:active { transform: scale(.985); }

.dlv-cta:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.dlv-cta.success {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 12px 30px rgba(16, 185, 129, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.dlv-cta small {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    opacity: .85;
}

/* ---------- Job cards ---------- */
.dlv-job {
    position: relative;
    border-radius: 20px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 1px 2px rgba(36, 31, 27, .04), 0 8px 24px rgba(36, 31, 27, .05);
    padding: 16px;
    margin-bottom: 12px;
    animation: mfFadeUp .3s ease both;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.dlv-job:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 90, 0, .45);
    box-shadow: 0 14px 34px rgba(255, 90, 0, .13);
}

.dlv-job-grid {
    display: flex;
    gap: 14px;
    align-items: stretch;
    flex-wrap: wrap;
}

.dlv-job-main { flex: 1 1 240px; min-width: 0; }

.dlv-job-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 128px;
}

.dlv-earn {
    border-radius: 14px;
    padding: 9px 12px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #0E8442, #16B463);
    box-shadow: 0 8px 20px rgba(18, 161, 80, .3);
}

.dlv-earn .k {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .85;
}

.dlv-earn .v {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.dlv-claim {
    border: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #FF5A00, #FF7E33);
    box-shadow: 0 8px 20px rgba(255, 90, 0, .3);
    transition: transform .14s ease, filter .14s ease;
}

.dlv-claim:hover { transform: translateY(-1px); filter: brightness(1.05); }
.dlv-claim:active { transform: scale(.97); }

.dlv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.dlv-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--mud-palette-gray-lighter);
    border: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

.dlv-tag.hot {
    background: #FFF1E8;
    border-color: rgba(255, 90, 0, .3);
    color: #E04E00;
}

.dlv-tag.paid {
    background: #E9F9F0;
    border-color: rgba(18, 161, 80, .3);
    color: #0E8442;
}

/* ---------- Earnings ---------- */
.dlv-ehero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(255, 255, 255, .14) 0%, transparent 45%),
        linear-gradient(140deg, #0E8442 0%, #16B463 100%);
    box-shadow: 0 16px 40px rgba(14, 132, 66, .35);
    animation: mfFadeUp .35s ease both;
}

.dlv-ehero .mud-typography { color: #fff; }

.dlv-ehero .big {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.dlv-ehero .cap {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: .8;
}

.dlv-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.dlv-stat {
    border-radius: 18px;
    padding: 14px 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 1px 2px rgba(36, 31, 27, .04), 0 8px 22px rgba(36, 31, 27, .05);
    animation: mfFadeUp .35s ease both;
}

.dlv-stat .ic {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 16px;
    margin-bottom: 8px;
    background: #FFF1E8;
}

.dlv-stat .k {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.dlv-stat .v {
    font-size: 20px;
    font-weight: 800;
    color: var(--mud-palette-text-primary);
    letter-spacing: -.3px;
}

.dlv-stat .h {
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

.dlv-hrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    min-width: 0;
}

.dlv-hrow:last-child { border-bottom: none; }

.dlv-hrow .em {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--mud-palette-gray-lighter);
    border: 1px solid var(--mud-palette-lines-default);
}

.dlv-hrow .fee {
    font-weight: 800;
    color: #0E8442;
    white-space: nowrap;
}

/* ---------- Skeleton loading ---------- */
.dlv-skel {
    border-radius: 20px;
    height: 108px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--mud-palette-gray-light) 25%, var(--mud-palette-gray-lighter) 37%, var(--mud-palette-gray-light) 63%);
    background-size: 400px 100%;
    animation: dlvShimmer 1.3s ease-in-out infinite;
}

/* ---------- Verification ---------- */
.dlv-doc {
    border-radius: 18px;
    border: 1.5px dashed var(--mud-palette-lines-inputs);
    background: var(--mud-palette-surface);
    padding: 16px 12px;
    text-align: center;
    min-height: 172px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all .16s ease;
}

.dlv-doc:hover {
    border-color: #FF5A00;
    background: #FFF9F5;
    transform: translateY(-2px);
}

.dlv-doc.filled {
    border-style: solid;
    border-color: rgba(18, 161, 80, .45);
    background: #FBFEFC;
}

.dlv-doc img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
}

/* Larger screens: toggle becomes inline width */
@media (min-width: 700px) {
    .dlv-toggle { width: auto; min-width: 260px; }
}


/* ==================================================================
   Ambient background — customer app (mf-ambient)
   A fixed aurora layer painted between the page background and the
   content: four soft brand-colored glows drifting on slow loops, a
   warm light falling from the top, and a fine film grain. Pure
   gradients + transform animations (no blur filters) so it stays
   cheap on phones. Sits at z-index -1, never intercepts input.
   ================================================================== */

@keyframes mfAmbDriftA {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(6vw, -4vh) scale(1.12); }
    100% { transform: translate(-3vw, 3vh) scale(.96); }
}

@keyframes mfAmbDriftB {
    0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
    50%  { transform: translate(-7vw, 5vh) scale(1.08) rotate(12deg); }
    100% { transform: translate(4vw, -3vh) scale(.94) rotate(-8deg); }
}

@keyframes mfAmbDriftC {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(5vw, 6vh) scale(1.15); }
    100% { transform: translate(-5vw, -4vh) scale(.9); }
}

@keyframes mfAmbBreathe {
    0%, 100% { opacity: .55; }
    50%      { opacity: .85; }
}

.mf-ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Base wash — keeps the corners from feeling empty. */
.mf-ambient::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 55% at 50% -12%, rgba(255, 138, 77, .20) 0%, rgba(255, 138, 77, 0) 60%),
        linear-gradient(180deg, #FBF6F1 0%, #FAF6F2 45%, #F7F1EB 100%);
}

/* Film grain — premium matte texture, static on purpose. */
.mf-ambient::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mf-ambient .glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

/* Brand-orange sun, top start corner. */
.mf-ambient .g1 {
    width: 72vmax; height: 72vmax;
    top: -34vmax; inset-inline-start: -22vmax;
    background: radial-gradient(closest-side, rgba(255, 90, 0, .17), rgba(255, 122, 40, .08) 45%, transparent 72%);
    animation-name: mfAmbDriftA;
    animation-duration: 46s;
}

/* Peach-rose bloom, end side. */
.mf-ambient .g2 {
    width: 58vmax; height: 58vmax;
    top: 12vh; inset-inline-end: -26vmax;
    background: radial-gradient(closest-side, rgba(255, 122, 162, .13), rgba(255, 176, 128, .07) 50%, transparent 72%);
    animation-name: mfAmbDriftB;
    animation-duration: 58s;
}

/* Fresh mint, bottom start — nods to the success green in the UI. */
.mf-ambient .g3 {
    width: 60vmax; height: 60vmax;
    bottom: -30vmax; inset-inline-start: -16vmax;
    background: radial-gradient(closest-side, rgba(38, 190, 120, .11), rgba(127, 224, 176, .05) 50%, transparent 72%);
    animation-name: mfAmbDriftC;
    animation-duration: 52s;
}

/* Cool sky whisper, bottom end — balances the warm tones. */
.mf-ambient .g4 {
    width: 48vmax; height: 48vmax;
    bottom: -18vmax; inset-inline-end: -14vmax;
    background: radial-gradient(closest-side, rgba(122, 167, 232, .10), transparent 70%);
    animation-name: mfAmbDriftA;
    animation-duration: 64s;
    animation-delay: -20s;
}

/* Tiny sparkle field — barely-there floating specks. */
.mf-ambient .stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 90, 0, .18) 1px, transparent 1.5px),
        radial-gradient(rgba(36, 31, 27, .10) 1px, transparent 1.5px);
    background-size: 260px 260px, 340px 340px;
    background-position: 40px 60px, 160px 200px;
    animation: mfAmbBreathe 14s ease-in-out infinite;
    opacity: .6;
}

/* Content must never sit under the aurora on browsers that mishandle
   negative z-index inside transformed ancestors. */
.mf-ambient ~ * { position: relative; z-index: 0; }

@media (prefers-reduced-motion: reduce) {
    .mf-ambient .glow, .mf-ambient .stars { animation: none; }
}

/* Phones: fewer, bigger, calmer. */
@media (max-width: 600px) {
    .mf-ambient .g4 { display: none; }
    .mf-ambient .stars { opacity: .4; }
}


/* ---------- Delivery earnings filter chips ---------- */
.dlv-filter {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--mud-palette-gray-light);
    border: 1px solid var(--mud-palette-lines-default);
}

.dlv-fchip {
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    user-select: none;
    transition: all .15s ease;
    white-space: nowrap;
}

.dlv-fchip:hover { color: #FF5A00; }

.dlv-fchip.on {
    background: linear-gradient(135deg, #FF5A00, #FF7E33);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 90, 0, .3);
}

/* ==================================================================
   Modern horizontal scroller (customer app) — arrows + motion
   JS (mf-scroll.js) enhances every .mf-hscroll: overlay arrows,
   spring scrolling, velocity lean, wheel + drag support.
   ================================================================== */

.mf-scroll-anchor { position: relative; }

/* Overlay bar aligned to the row by JS (top/height inline). */
.mf-sbar {
    position: absolute;
    inset-inline: 0;
    z-index: 3;
    pointer-events: none;
}

.mf-sbtn {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 50%;
    border: 1.5px solid var(--mud-palette-lines-default);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--mud-palette-text-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    padding: 0;
    box-shadow: 0 2px 6px rgba(36, 31, 27, .08), 0 10px 26px rgba(36, 31, 27, .14);
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1),
                opacity .22s ease, border-color .18s ease, color .18s ease,
                box-shadow .22s ease, background .18s ease;
}

.mf-sbtn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.mf-sbtn.prev { inset-inline-start: -6px; }
.mf-sbtn.next { inset-inline-end: -6px; }

.mf-sbtn:hover {
    border-color: #FF5A00;
    color: #FF5A00;
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(255, 90, 0, .12), 0 12px 30px rgba(255, 90, 0, .22);
}

.mf-sbtn:active { transform: scale(.88); }

.mf-sbtn.off {
    opacity: 0;
    transform: scale(.5);
    pointer-events: none;
}

/* Chevrons point outward; flip for RTL. */
[dir="rtl"] .mf-sbtn svg { transform: scaleX(-1); }

/* Soft fade at scrollable edges — mask keeps the ambient bg visible. */
.mf-hscroll[data-mfsc] {
    scroll-snap-type: x proximity;
}

.mf-hscroll[data-mfsc] > * {
    scroll-snap-align: start;
}

.mf-hscroll[data-mfsc].fade-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
}

.mf-hscroll[data-mfsc].fade-start {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px);
    mask-image: linear-gradient(to right, transparent 0, #000 34px);
}

.mf-hscroll[data-mfsc].fade-end {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
}

/* Velocity lean — items tilt with the motion and spring back on stop.
   Entrance keyframes must not keep overriding transforms afterwards. */
.mf-hscroll[data-mfsc] > * {
    animation-fill-mode: backwards;
    transform: skewX(var(--mf-lean, 0deg)) translateX(var(--mf-shift, 0px));
    transition: transform .38s cubic-bezier(.21, .8, .35, 1);
}

/* Grab cursor for drag-to-scroll on desktop. */
@media (hover: hover) and (pointer: fine) {
    .mf-hscroll[data-mfsc] { cursor: grab; }
    .mf-hscroll[data-mfsc].dragging { cursor: grabbing; scroll-snap-type: none; }
    .mf-hscroll[data-mfsc].dragging > * { transition: none; }
}

@media (max-width: 600px) {
    .mf-sbtn { width: 34px; height: 34px; margin-top: -17px; }
    .mf-sbtn svg { width: 17px; height: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .mf-hscroll[data-mfsc] > * { transform: none; transition: none; }
}

