/* =====================================================================
   MAGMA solutions — single page marketing site
   Palette: deep purple / vibrant purple / bright orange / pale lavender
   ===================================================================== */

:root {
    --mm-deep: #1E1039;
    --mm-deep-2: #170C2D;
    --mm-purple: #880290;
    --mm-purple-bright: #B403BF;
    --mm-purple-light: #EE91F3;
    --mm-orange: #F97316;
    --mm-orange-light: #FB923C;
    --mm-ink: #271250;
    --mm-body: #5B5470;
    --mm-muted: #8B84A0;
    --mm-lav: #F8F5FF;
    --mm-line: #EDE6FA;
    --mm-wrap: 1180px;
    --mm-font: 'Poppins', 'Cairo', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --mm-font-ar: 'Cairo', 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Arabic text: Cairo carries the Arabic glyphs, Latin stays in Poppins. */
.rx-ar {
    font-family: var(--mm-font-ar);
    line-height: 1.6;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--mm-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--mm-ink);
    background: var(--mm-lav);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.mm-wrap {
    width: 100%;
    max-width: var(--mm-wrap);
    margin: 0 auto;
    padding: 0 22px;
}

.mm-grad {
    color: var(--mm-purple-bright);
    background: linear-gradient(95deg, #B403BF 0%, #E70DF2 42%, #F97316 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mm-ic {
    display: block;
    flex: 0 0 auto;
}

/* ---------------------------------------------------------------- buttons */

.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.1px;
    padding: 14px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.mm-btn:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 3px;
}

.mm-btn-primary {
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    box-shadow: 0 16px 30px -14px rgba(136, 2, 144, .8);
}

.mm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px -16px rgba(136, 2, 144, .85);
}

.mm-btn-ghost {
    background: #fff;
    color: var(--mm-purple);
    border-color: #F6CEF8;
}

.mm-btn-ghost:hover {
    border-color: var(--mm-purple);
    color: #AE21B5;
    transform: translateY(-2px);
}

.mm-btn-light {
    background: #fff;
    color: var(--mm-purple);
    box-shadow: 0 18px 34px -18px rgba(24, 8, 60, .55);
}

.mm-btn-light:hover { transform: translateY(-2px); }

.mm-btn-sm {
    padding: 11px 22px;
    font-size: 13.5px;
}

.mm-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.mm-linkbtn:focus-visible {
    outline: 2px solid rgba(238, 145, 243, .7);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------ navbar */

.mm-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 247, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(237, 230, 250, .9);
}

.mm-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
}

.mm-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Navbar logo: the client wordmark PNG has a transparent background, so it sits
   directly on the page — no plate, no padding, no radius. The supplied PNG is a
   square canvas with wide empty margins, so the tile still shows only the
   wordmark band of that square (304 x 98 of the canvas, centred) by scaling the
   image inside an overflow-hidden box. That trims the margin in the browser, so
   the lettering fills the box instead of floating in empty space.
   If the PNG file is later re-exported already trimmed, delete .mm-nav-logo-crop
   and give .mm-nav-logo-img a plain height, width auto. */
.mm-nav-logo {
    gap: 0;
    padding: 0;
    flex: 0 0 auto;
}

.mm-nav-logo-tile {
    --mm-logo-h: 38px; /* height of the visible wordmark block */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 0;
    flex: 0 0 auto;
}

.mm-nav-logo-crop {
    position: relative;
    display: block;
    height: var(--mm-logo-h);
    width: calc(var(--mm-logo-h) * 304 / 98);
    overflow: hidden;
    flex: 0 0 auto;
}

.mm-nav-logo-img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: calc(var(--mm-logo-h) * 320 / 98); /* 320 = square canvas, 98 = rows shown */
    width: auto;
    max-width: none;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.mm-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #E70DF2 0%, #B403BF 45%, #F97316 100%);
    box-shadow: 0 10px 22px -12px rgba(180, 3, 191, .95);
    flex: 0 0 auto;
}

.mm-logo-type {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 18px;
    letter-spacing: -.4px;
    white-space: nowrap;
}

.mm-logo-type strong {
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-logo-type em {
    font-style: normal;
    font-weight: 500;
    color: #6F6788;
}

/* -------------------------------------------------------------------- hero */

.mm-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 92px;
    background: linear-gradient(180deg, #FEF5FF 0%, #FDF0FF 58%, #FFFFFF 100%);
}

.mm-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(62px);
    pointer-events: none;
    z-index: 0;
}

.mm-blob-a {
    width: 430px;
    height: 430px;
    top: -170px;
    left: -140px;
    background: radial-gradient(circle at 40% 40%, #F9B4FD, #FBE8FC);
    opacity: .72;
}

.mm-blob-b {
    width: 470px;
    height: 470px;
    top: -150px;
    right: -160px;
    background: radial-gradient(circle at 50% 50%, #FBCFE8, #FFF0F6);
    opacity: .8;
}

.mm-blob-c {
    width: 380px;
    height: 380px;
    bottom: -200px;
    left: 30%;
    background: radial-gradient(circle at 50% 50%, #FED7AA, #FFF7ED);
    opacity: .5;
}

.mm-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    gap: 56px;
    align-items: center;
}

.mm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid #F5D9F7;
    color: var(--mm-purple);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .085em;
    text-transform: uppercase;
    line-height: 1.3;
}

.mm-badge-solid {
    background: #FBEEFB;
    border-color: #F5D9F7;
}

.mm-h1 {
    margin: 20px 0 18px;
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.4px;
    color: var(--mm-ink);
}

.mm-lead {
    margin: 0 0 30px;
    max-width: 520px;
    font-size: 16.5px;
    line-height: 1.66;
    color: var(--mm-body);
}

.mm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mm-hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
    margin-top: 38px;
}

.mm-stat {
    padding-right: 30px;
    border-right: 1px solid #F6DEF7;
}

.mm-stat:last-child {
    padding-right: 0;
    border-right: 0;
}

.mm-stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.2px;
    color: var(--mm-purple);
    background: linear-gradient(135deg, #B403BF 0%, #E70DF2 50%, #F97316 120%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mm-stat-label {
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--mm-muted);
    max-width: 140px;
    overflow-wrap: anywhere;
}

.mm-stat-empty {
    margin: 26px 0 0;
    font-size: 13px;
    color: var(--mm-muted);
}

/* ------------------------------------------------------- dashboard mockup */

.mm-hero-right {
    display: flex;
    justify-content: center;
}

.mm-dash-wrap {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 0 0 34px;
}

.mm-dash {
    position: relative;
    z-index: 2;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #FCEEFC;
    box-shadow: 0 32px 70px -34px rgba(46, 16, 92, .42);
}

.mm-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.mm-dash-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-dash-title .mm-ic { color: var(--mm-purple); }

.mm-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #DCFCE7;
    color: #15803D;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
}

.mm-live i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.mm-mini-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.mm-mini {
    padding: 12px 8px;
    border-radius: 14px;
    text-align: center;
    background: #FBEEFB;
    color: var(--mm-purple);
}

.mm-mini:nth-child(3n+2) {
    background: #FFF1E6;
    color: #EA580C;
}

.mm-mini:nth-child(3n+3) {
    background: #E9FBF0;
    color: #15803D;
}

.mm-mini-value {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.4px;
    word-break: break-word;
}

.mm-mini-label {
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
    opacity: .82;
    overflow-wrap: anywhere;
}

.mm-mini-empty {
    margin: 0 0 18px;
    padding: 14px;
    border-radius: 14px;
    background: #F8F5FF;
    color: var(--mm-muted);
    font-size: 11.5px;
    text-align: center;
}

.mm-menu-list {
    list-style: none;
    margin: 0 100px 16px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mm-menu-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #FEF6FF;
    border: 1px solid #FCEEFC;
    font-size: 13px;
    font-weight: 600;
    color: #3B2C57;
}

.mm-menu-list .mm-dish {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.mm-dish-badge {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #FBE8FC;
    color: #AE21B5;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.mm-menu-list li:nth-child(1) .mm-dish-badge {
    background: #FFEDD5;
    color: #C2410C;
}

.mm-menu-list li:nth-child(2) .mm-dish-badge {
    background: #FEE2E2;
    color: #B91C1C;
}

.mm-menu-list li:nth-child(3) .mm-dish-badge {
    background: #DCFCE7;
    color: #15803D;
}

.mm-menu-list b {
    font-weight: 700;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-dash-actions {
    display: flex;
    gap: 8px;
    margin-right: 100px;
}

.mm-pill-mini {
    flex: 1 1 0;
    padding: 9px 8px;
    border-radius: 999px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.mm-pill-purple { background: linear-gradient(135deg, #B403BF, #880290); }
.mm-pill-orange { background: linear-gradient(135deg, #FB923C, #F97316); }

/* phone mockup overlapping the card */

.mm-phone {
    position: absolute;
    right: -14px;
    bottom: -12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    width: 126px;
    height: 216px;
    padding: 10px 9px;
    border-radius: 22px;
    background: linear-gradient(165deg, #43104A 0%, #210526 100%);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 26px 48px -20px rgba(23, 12, 45, .7);
}

.mm-phone-notch {
    width: 34px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .26);
    flex: 0 0 auto;
}

.mm-phone-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
}

.mm-phone-item {
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .68);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: .02em;
}

.mm-phone-item-active {
    background: linear-gradient(135deg, #E149E9, #880290);
    color: #fff;
}

.mm-phone-btn {
    margin-top: auto;
    padding: 6px 4px;
    border-radius: 6px;
    background: linear-gradient(135deg, #FB923C, #F97316);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.mm-dot {
    position: absolute;
    left: 4px;
    bottom: -4px;
    z-index: 0;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--mm-orange);
    opacity: .92;
}

/* ---------------------------------------------------------------- features */

.mm-features {
    position: relative;
    background: #fff;
    padding: 86px 0 92px;
}

.mm-sec-head {
    max-width: 760px;
    margin: 0 auto 52px;
    text-align: center;
}

.mm-h2 {
    margin: 16px 0 14px;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--mm-ink);
}

.mm-sec-sub {
    margin: 0;
    font-size: 16px;
    line-height: 1.62;
    color: #6E6585;
}

.mm-f-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mm-f-card {
    padding: 24px 20px;
    border-radius: 20px;
    background: #FDF1FE;
    border: 1px solid #FBE8FC;
    color: #8F1D95;
    transition: transform .2s ease, box-shadow .2s ease;
}

.mm-f-card:nth-child(3n+2) {
    background: #FFF4EA;
    border-color: #FBE8D9;
    color: #9A3412;
}

.mm-f-card:nth-child(3n+3) {
    background: #EBFAF1;
    border-color: #DCF2E6;
    color: #14532D;
}

.mm-f-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 42px -30px rgba(46, 16, 92, .45);
}

.mm-f-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 15px;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 12px 22px -14px rgba(46, 16, 92, .32);
}

.mm-f-title {
    margin: 0 0 8px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.2px;
    color: #8F1D95;
    overflow-wrap: anywhere;
}

.mm-f-card:nth-child(3n+2) .mm-f-title { color: #9A3412; }

.mm-f-card:nth-child(3n+3) .mm-f-title { color: #14532D; }

.mm-f-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.62;
    color: #3F3A4D;
    overflow-wrap: anywhere;
}

.mm-empty {
    margin: 0;
    padding: 34px 22px;
    border-radius: 18px;
    border: 1px dashed #F5D9F7;
    background: #FEF6FF;
    color: var(--mm-muted);
    font-size: 14px;
    text-align: center;
}

/* --------------------------------------------------------------- clients */
/* Home page only: one row of client logo cards that loops on its own and
   can also be dragged / swiped. The track is rendered twice in the markup
   (second copy aria-hidden) so the wrap point is exactly one copy wide. */

.mm-clients {
    position: relative;
    background: var(--mm-lav);
    padding: 78px 0 84px;
}

.mm-clients .mm-sec-head { margin-bottom: 46px; }

.mm-clients-viewport {
    --mm-cl-gap: 22px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    padding: 6px 0 14px; /* room for the card shadow */
}

.mm-clients-viewport::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.mm-clients-viewport.is-dragging { cursor: grabbing; }

.mm-clients-viewport:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 4px;
    border-radius: 22px;
}

.mm-clients-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    user-select: none;
    -webkit-user-select: none;
}

.mm-client-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 220px;
    height: 96px;
    margin-right: var(--mm-cl-gap, 22px);
    padding: 0 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #F3ECFB;
    box-shadow: 0 22px 36px -30px rgba(46, 16, 92, .5);
    cursor: inherit;
}

.mm-clients-viewport.is-dragging .mm-client-card { cursor: grabbing; }

/* a logo with a link: the whole card is the anchor */
.mm-client-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
}

.mm-client-link:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 2px;
}

.mm-client-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 48px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .75;
    cursor: inherit;
    -webkit-user-drag: none;
    transition: filter .3s ease, opacity .3s ease;
}

.mm-client-card:hover .mm-client-logo,
.mm-client-card:focus-within .mm-client-logo {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 1000px) {
    .mm-clients { padding: 64px 0 70px; }

    .mm-clients-viewport { --mm-cl-gap: 16px; }

    .mm-client-card {
        width: 188px;
        height: 88px;
        border-radius: 18px;
        padding: 0 14px;
    }

    .mm-client-logo {
        max-width: 132px;
        max-height: 42px;
    }
}

@media (max-width: 620px) {
    .mm-clients { padding: 54px 0 60px; }

    .mm-clients .mm-sec-head { margin-bottom: 30px; }

    .mm-clients-viewport { --mm-cl-gap: 12px; }

    .mm-client-card {
        width: 150px;
        height: 80px;
        border-radius: 16px;
        padding: 0 12px;
    }

    .mm-client-logo {
        max-width: 112px;
        max-height: 36px;
    }
}

/* --------------------------------------------------------------- CTA band */

.mm-cta {
    padding: 74px 0 80px;
    background: #fff;
}

.mm-cta-card {
    position: relative;
    overflow: hidden;
    padding: 54px 40px;
    border-radius: 28px;
    text-align: center;
    color: #fff;
    background: linear-gradient(115deg, #880290 0%, #B403BF 45%, #F97316 100%);
    box-shadow: 0 34px 64px -34px rgba(136, 2, 144, .75);
}

.mm-cta-card::before,
.mm-cta-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.mm-cta-card::before {
    width: 260px;
    height: 260px;
    top: -130px;
    right: -70px;
    background: rgba(255, 255, 255, .13);
}

.mm-cta-card::after {
    width: 200px;
    height: 200px;
    bottom: -120px;
    left: -50px;
    background: rgba(255, 255, 255, .09);
}

.mm-cta-inner {
    position: relative;
    z-index: 1;
}

.mm-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -.9px;
}

.mm-cta p {
    max-width: 540px;
    margin: 0 auto 26px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .92);
}

/* ------------------------------------------------------------------ footer */

.mm-footer {
    background: linear-gradient(180deg, #22123F 0%, #180C2E 100%);
    color: rgba(255, 255, 255, .72);
    padding: 66px 0 26px;
}

.mm-f-cols {
    display: grid;
    grid-template-columns: 2fr .85fr 1.25fr 1fr;
    gap: 40px;
}

.mm-f-cols > * { min-width: 0; }

.mm-f-brand .mm-logo-type strong { color: #fff; }
.mm-f-brand .mm-logo-type em { color: rgba(255, 255, 255, .7); }

.mm-f-tag {
    margin: 18px 0 0;
    max-width: 330px;
    font-size: 13.5px;
    line-height: 1.68;
    color: rgba(255, 255, 255, .66);
    overflow-wrap: anywhere;
}

.mm-f-head {
    margin: 0 0 16px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
}

.mm-f-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mm-f-list li {
    font-size: 13.5px;
    line-height: 1.5;
}

.mm-f-link,
.mm-f-list .mm-linkbtn {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .16s ease;
}

.mm-f-link:hover,
.mm-f-list .mm-linkbtn:hover { color: #fff; }

.mm-f-text { color: rgba(255, 255, 255, .7); overflow-wrap: anywhere; }
.mm-f-muted { color: rgba(255, 255, 255, .45); }

.mm-f-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
    overflow-wrap: anywhere;
}

.mm-f-legal {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mm-f-legal a {
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    transition: color .16s ease;
}

.mm-f-legal a:hover { color: #fff; }

/* -------------------------------------------------------------- skeletons */

.mm-skel {
    display: block;
    border-radius: 10px;
    background: linear-gradient(90deg, #F9EBFA 25%, #FEF5FF 37%, #F9EBFA 63%);
    background-size: 400% 100%;
    animation: mmShimmer 1.5s ease-in-out infinite;
}

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

.mm-skel-value { width: 74px; height: 30px; border-radius: 8px; }
.mm-skel-label { width: 92px; height: 12px; margin-top: 10px; border-radius: 6px; }
.mm-skel-mini { height: 40px; border-radius: 12px; }
.mm-skel-card { height: 196px; border-radius: 20px; }
.mm-skel-line { width: 118px; height: 12px; border-radius: 6px; }

.mm-footer .mm-skel {
    background: linear-gradient(90deg, rgba(255, 255, 255, .08) 25%, rgba(255, 255, 255, .2) 37%, rgba(255, 255, 255, .08) 63%);
    background-size: 400% 100%;
}

.mm-footer .mm-skel-line { width: 140px; }

/* -------------------------------------------------------------- login page */

.mm-auth-main {
    padding: 58px 0 86px;
    background: linear-gradient(180deg, #FEF5FF 0%, #FDF0FF 58%, #FFFFFF 100%);
}

.mm-auth-wrap {
    display: flex;
    justify-content: center;
}

.mm-auth-card {
    width: 100%;
    max-width: 460px;
    padding: 24px 24px 28px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 34px 70px -40px rgba(30, 16, 57, .38), 0 2px 8px rgba(30, 16, 57, .04);
}

.mm-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    border-radius: 999px;
}

.mm-tab {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -.1px;
    line-height: 1.2;
    color: #6F6788;
    padding: 10px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.mm-tab:hover { color: var(--mm-purple); }

.mm-tab.is-active {
    background: #fff;
    color: var(--mm-purple);
    box-shadow: 0 10px 20px -16px rgba(136, 2, 144, .95);
}

.mm-tab:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

.mm-alert {
    display: none;
    margin: 16px 0 0;
    padding: 11px 13px;
    border: 1px solid #FBD5D5;
    border-radius: 12px;
    background: #FEF2F2;
    color: #B42318;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.mm-alert.is-on { display: block; }

.mm-alert.is-ok {
    background: #ECFDF3;
    border-color: #ABEFC6;
    color: #067647;
}

.mm-forgot {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

.mm-forgot + .mm-switch { margin-top: 8px; }

.mm-reset-note {
    margin: 16px 0 0;
    padding: 11px 13px;
    border: 1px solid #F6CEF8;
    border-radius: 12px;
    background: var(--mm-lav);
    color: #4B4463;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.mm-auth-title-sm {
    margin-top: 18px;
    font-size: 16px;
    letter-spacing: -.2px;
}

.mm-input-code {
    font-family: 'Courier New', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .38em;
    text-align: center;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.mm-auth-title {
    margin: 20px 0 0;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.25;
    color: var(--mm-ink);
}

.mm-auth-sub {
    margin: 6px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-field { margin-top: 15px; }

.mm-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #4B4463;
}

.mm-opt {
    font-weight: 500;
    color: var(--mm-muted);
}

/* create account: the 24-hour validity note, and the line shown on success */

.mm-auth-validity {
    margin: 12px 0 0;
    padding: 10px 13px;
    background: var(--mm-lav);
    border: 1px solid #F6CEF8;
    border-radius: 12px;
}

.mm-auth-validity-line {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--mm-purple);
}

.mm-auth-validity-line + .mm-auth-validity-line { margin-top: 5px; }

.mm-auth-created {
    margin: 14px 0 0;
    padding: 11px 13px;
    background: #ECFDF3;
    border: 1px solid #ABEFC6;
    border-radius: 12px;
}

.mm-auth-created-line {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.55;
    color: #067647;
}

.mm-auth-created-line + .mm-auth-created-line { margin-top: 5px; }

.mm-input {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.35;
    color: var(--mm-ink);
    background: #fff;
    border: 1.5px solid #F5D9F7;
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.mm-input::placeholder { color: #A9A2BC; }

.mm-input:focus {
    outline: none;
    border-color: var(--mm-purple-bright);
    box-shadow: 0 0 0 4px rgba(180, 3, 191, .14);
}

.mm-pw {
    position: relative;
    display: block;
}

.mm-pw .mm-input { padding-right: 48px; }

.mm-eye {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: none;
    color: #8B84A0;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.mm-eye:hover {
    color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-eye:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 1px;
}

.mm-eye svg { display: block; }

.mm-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--mm-muted);
}

.mm-btn-block {
    width: 100%;
    margin-top: 20px;
}

.mm-btn:disabled,
.mm-btn[disabled] {
    opacity: .68;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mm-switch {
    margin: 15px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-switch-link {
    color: var(--mm-purple);
    font-weight: 700;
    text-decoration: none;
}

.mm-switch-link:hover {
    color: #AE21B5;
    text-decoration: underline;
}

.mm-hidden { display: none !important; }

/* ----------------------------------------------------------- dashboard page */

body.mm-modal-open { overflow: hidden; }

.mm-dpage { min-height: 100vh; background: var(--mm-lav); }

.mm-dcheck {
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 18px;
    text-align: center;
    font-size: 13.5px;
    color: var(--mm-body);
}

.mm-dcheck-msg { margin: 0; }

.mm-dcheck-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mm-dspin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid #F5D9F7;
    border-top-color: var(--mm-purple);
    animation: mmSpin .8s linear infinite;
}

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

/* top bar

   One row at every width, never wrapping, and nothing floating in it: the
   calculator pill and the ⋯ button are ordinary items in the bar's end-side
   row, so they scroll with the sticky bar and cannot end up over the banner,
   the tabs bar or any text. That also means no band has to be reserved under
   the header: the bar sits straight on top of what follows. */

.mm-dbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 247, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(237, 230, 250, .9);
}

.mm-dbar-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
}

.mm-dbrand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
}

.mm-dbar .mm-nav-logo-tile { --mm-logo-h: 30px; }

.mm-dname {
    min-width: 0;
    max-width: 320px;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.25;
    color: var(--mm-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* the live date + time under the restaurant name (every dashboard section):
   the brand block keeps the logo tile on its left and stacks the name over the
   clock on the right, so the bar stays one single row at every width and the
   calculator pill and the ⋯ button never move. */

.mm-dbar .mm-dbrand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 1px;
}

.mm-dbar .mm-dbrand > .mm-nav-logo-tile {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.mm-dbar .mm-dbrand > .mm-dname {
    grid-column: 2;
    grid-row: 1;
}

.mm-dclock {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    max-width: 320px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: normal;
    font-variant-numeric: tabular-nums;
    color: var(--mm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "View my menu" / "Sign out": desktop only. On phones and tablets the same
   two actions are at the bottom of the ⋯ panel, which is what lets the bar
   stay a single clean row. */

.mm-dbar-actions {
    display: none;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

@media (min-width: 1024px) {
    .mm-dbar-actions { display: flex; }
}

/* the end-side rail: one horizontal row — calculator pill first, then the ⋯
   button 8px after it, vertically centred on each other and flush with the
   bar's end edge, so the ⋯ sits at the very end of the bar. The order mirrors
   with the page direction like the rest of the bar. */

.mm-dbar-rail {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.mm-dsignout {
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-body);
    white-space: nowrap;
}

.mm-dsignout:hover { color: var(--mm-purple); }

/* the calculator pill's own styles live at the end of this file */

/* staff mode banner: under the top bar, above the sections, in the site orange */

.mm-staffbar {
    background: var(--mm-orange);
    color: #2B1200;
}

.mm-staffbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.mm-staffbar-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #2B1200;
    overflow-wrap: anywhere;
}

.mm-staffbar-text strong { font-weight: 800; }

.mm-staffbar-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid rgba(43, 18, 0, .22);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    color: #7A2E00;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.mm-staffbar-btn:hover:not(:disabled) {
    background: #FFF3E6;
    border-color: rgba(43, 18, 0, .4);
}

.mm-staffbar-btn:disabled {
    opacity: .7;
    cursor: default;
}

/* the ⋯ button: the way into the sections panel. It is an ordinary item in the
   bar's end-side row (.mm-dbar-rail), 8px after the calculator pill, vertically
   centred with it and flush with the same end edge, so it travels with the
   sticky bar while the page scrolls and never floats over anything. */

.mm-dnav-btn {
    -webkit-appearance: none;
    appearance: none;
    position: relative;   /* the new-orders badge is pinned to this corner */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background: #fff;
    color: var(--mm-purple);
    box-shadow: 0 14px 26px -18px rgba(30, 16, 57, .6), 0 2px 8px rgba(30, 16, 57, .06);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.mm-dnav-btn:hover {
    background: var(--mm-lav);
    border-color: #F6CEF8;
    color: #AE21B5;
}

.mm-dnav-btn:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 3px;
}

/* a new order still makes itself noticed: the ⋯ pings with the Orders row */
.mm-dnav-btn.is-ping { animation: mmPing .7s ease 2; }

.mm-dnav-dots {
    display: block;
    pointer-events: none;
}

/* the new-orders count on the ⋯ button: the same badge the Orders row wears,
   pinned to the button's top-end corner with a white rim so it reads on the
   white button. It is positioned, so it adds no width to the bar row and can
   never push anything on a narrow phone. Hidden at zero by .mm-hidden. */

.mm-dnav-btn .mm-dnav-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    min-width: 19px;
    height: 19px;
    margin-inline-start: 0;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(30, 16, 57, .22);
    pointer-events: none;
}

/* tabs + panels */

.mm-dmain {
    padding-top: 22px;
    padding-bottom: 72px;
}

/* sections: there is no strip any more.
   The wide-screen pill bar that used to sit here was removed from the markup,
   so its rules (.mm-dtabs, .mm-tab-ico, .mm-tab-ar, .mm-tab-link) are gone too.
   Every section is chosen from the ⋯ panel — see "the sections panel" at the
   end of this file. .mm-tabs / .mm-tab above stay: the login card still uses
   its own two-tab switcher. */

.mm-dpanel { padding-top: 20px; }

.mm-dtitle {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.25;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-dsub {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--mm-body);
}

.mm-dstats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.mm-dstat {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-dstat-num {
    display: block;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--mm-ink);
}

.mm-dstat-lbl {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-dshortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.mm-dhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.mm-dh2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--mm-ink);
}

.mm-dhead-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* menu list */

.mm-dmenu-body { display: block; }

.mm-dcat {
    padding: 16px 18px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-dcat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mm-dcat-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.mm-dcat-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-dcat-ar {
    font-size: 12.5px;
    color: var(--mm-muted);
}

.mm-dcat-actions {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

.mm-dcat-empty {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--mm-muted);
}

.mm-dlinkbtn {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-dlinkbtn:hover { text-decoration: underline; }

.mm-ddishes {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.mm-ddish {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 13px;
    margin-top: 8px;
    background: #FBFAFF;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
}

.mm-ddish-main {
    flex: 1 1 auto;
    min-width: 0;
}

.mm-ddish-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-ddish-ar {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-ddish-facts {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.mm-ddish-price {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--mm-purple);
    white-space: nowrap;
}

.mm-ddish-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    padding-inline-start: 4px;
}

.mm-dpill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.mm-dpill-on { background: #ECFDF3; color: #067647; }
.mm-dpill-off { background: #F2EFF8; color: #6F6788; }

.mm-dmini {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-dmini:hover { color: #AE21B5; text-decoration: underline; }

.mm-dmini-danger { color: #B42318; }
.mm-dmini-danger:hover { color: #912018; }

/* empty state */

.mm-dempty {
    padding: 36px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed #F6CEF8;
    border-radius: 16px;
}

.mm-dempty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-dempty-text {
    margin: 8px auto 0;
    max-width: 340px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-dempty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

/* settings */

.mm-dset {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-dset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.mm-field-wide { grid-column: 1 / -1; }

.mm-dset-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--mm-line);
}

.mm-textarea {
    min-height: 78px;
    resize: vertical;
}

/* look and feel (settings tab) */

.mm-look {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--mm-line);
}

.mm-look-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.mm-swatch {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(30, 16, 57, .14);
}

.mm-swatch.is-active {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mm-purple);
}

.mm-swatch-custom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mm-swatch-custom .mm-label { margin: 0; }

.mm-color {
    width: 44px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--mm-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.mm-hex {
    flex: 0 1 120px;
    width: 120px;
    text-transform: lowercase;
}

.mm-look-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #FCFBFF;
}

.mm-look-dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--mm-purple);
}

.mm-look-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-purple);
}

.mm-look-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--mm-purple);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
}

.mm-look-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    margin-top: 4px;
}

.mm-look-line {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

/* per-restaurant LBP rate (Settings > Look and feel) */

.mm-rate-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mm-rate-inline .mm-input {
    flex: 0 1 150px;
    width: 150px;
}

.mm-rate-unit {
    font-size: 12.5px;
    color: var(--mm-body);
}

.mm-rate-platform { margin: 4px 0 0; }

/* menu background: colour choices, picture and the live preview strip */

.mm-look-sub {
    margin: 22px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--mm-line);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-bg-swatches { margin-top: 4px; }

.mm-bg-preview {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 120px;
    margin-top: 14px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background-color: #fff;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.mm-bg-previewtitle {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--mm-muted);
}

.mm-bg-preview.is-dark .mm-bg-previewtitle { color: #E4DEF3; }

.mm-bg-sample {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 24px -18px rgba(30, 16, 57, .55);
}

.mm-bg-samplename {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-bg-sampleprice {
    font-size: 12px;
    font-weight: 800;
    color: var(--mm-purple);
}

/* toggle */

.mm-switch-row {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mm-switchbox {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    clip-path: inset(50%);
    overflow: hidden;
}

.mm-switch-track {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #F5D9F7;
    transition: background .18s ease;
}

.mm-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(30, 16, 57, .25);
    transition: transform .18s ease;
}

.mm-switchbox:checked + .mm-switch-track {
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
}

.mm-switchbox:checked + .mm-switch-track::after { transform: translateX(18px); }

.mm-switchbox:focus-visible + .mm-switch-track {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 2px;
}

.mm-switch-text {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mm-ink);
}

/* picture fields (dashboard dish + settings logo/cover) */

.mm-pic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1.5px dashed #F6CEF8;
    border-radius: 14px;
    background: #FCFBFF;
    transition: border-color .16s ease, background .16s ease;
}

.mm-pic.is-drag {
    border-color: var(--mm-purple);
    background: #FBEEFB;
}

.mm-pic-thumb {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    color: var(--mm-purple-light);
}

.mm-pic-logo { width: 80px; height: 80px; }

.mm-pic-cover { width: 128px; height: 72px; }

.mm-pic-img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.mm-pic-logo .mm-pic-img { object-fit: contain; padding: 6px; }

.mm-pic-thumb.has-img .mm-pic-ph { display: none; }

.mm-pic-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    place-items: center;
    padding: 4px;
    background: rgba(255, 255, 255, .88);
    color: var(--mm-purple);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.mm-pic-thumb.is-uploading .mm-pic-overlay { display: grid; }

.mm-pic-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.mm-pic-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #F6CEF8;
    border-radius: 10px;
    background: #fff;
    color: var(--mm-purple);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-pic-btn:hover {
    border-color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-pic-btn svg { flex: 0 0 auto; }

.mm-pic-hint {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--mm-muted);
}

.mm-pic-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    clip-path: inset(50%);
    overflow: hidden;
}

.mm-pic-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--mm-body);
}

.mm-pic-status:empty { display: none; }

.mm-pic-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #067647;
    font-weight: 700;
}

.mm-label-sub {
    margin-top: 12px;
    font-weight: 500;
    color: var(--mm-muted);
}

/* password reset requests (staff tab) */

.mm-adm-list { display: block; }

.mm-adm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-adm-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}

.mm-adm-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mm-adm-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.1px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-adm-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-adm-slug { color: var(--mm-purple); font-weight: 600; }

.mm-adm-dot { color: #F9B4FD; }

.mm-adm-time {
    font-size: 11.5px;
    color: var(--mm-muted);
}

.mm-adm-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-adm-phone.is-empty {
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-adm-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
}

.mm-adm-actions { flex: 0 0 auto; }

.mm-dpill-code { background: #FBEEFB; color: var(--mm-purple); }

.mm-code-wrap { margin-top: 16px; }

.mm-code-card {
    padding: 16px;
    background: #fff;
    border: 1px solid #F6CEF8;
    border-radius: 16px;
    box-shadow: 0 18px 34px -30px rgba(136, 2, 144, .5);
}

.mm-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    background: var(--mm-lav);
    border: 1px dashed #E3C8E4;
    border-radius: 12px;
}

.mm-code {
    font-family: 'Courier New', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: .22em;
    line-height: 1.15;
    color: var(--mm-ink);
    word-break: break-all;
}

.mm-code-meta {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-code-note {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--mm-muted);
}

.mm-code-warn {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: #B42318;
}

.mm-code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.mm-code-nowa {
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    background: #FFFBEB;
    color: #92400E;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.mm-btn-wa {
    background: #25D366;
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(37, 211, 102, .9);
}

.mm-btn-wa:hover {
    background: #1EBE5A;
    transform: translateY(-1px);
}

.mm-btn-wa svg { flex: 0 0 auto; }

/* QR code tab */

.mm-qr-card {
    margin-top: 16px;
    padding: 20px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-qr-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.mm-qr-frame svg {
    display: block;
    width: 220px;
    height: 220px;
}

.mm-qr-loading {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--mm-muted);
}

.mm-qr-link {
    margin: 14px auto 0;
    max-width: 100%;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
    word-break: break-all;
}

.mm-qr-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

/* account validity notice: top of the dashboard, above the sections, on every
   panel. Light purple card with a 4px purple edge; the expired state swaps
   the edge and the titles to red. */

.mm-notice {
    margin: 0 0 18px;
    padding: 20px 22px;
    background: #FBEEFB;
    border: 1px solid #F6CEF8;
    border-left: 4px solid var(--mm-purple);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .3);
}

.mm-notice.is-expired {
    background: #FFF7ED;
    border-color: #FED7AA;
    border-left-color: #DC2626;
}

.mm-notice-title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.3;
    color: var(--mm-purple);
    overflow-wrap: anywhere;
}

.mm-notice.is-expired .mm-notice-title { color: #B42318; }

.mm-notice-title-ar {
    margin: 4px 0 0;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--mm-purple);
    overflow-wrap: anywhere;
}

.mm-notice.is-expired .mm-notice-title-ar { color: #B42318; }

.mm-notice-text {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-notice-text-ar {
    margin: 5px 0 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-notice-left {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--mm-purple);
    font-variant-numeric: tabular-nums;
}

.mm-notice-left-ar {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--mm-purple);
    font-variant-numeric: tabular-nums;
}

.mm-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mm-notice-btn {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 11px 20px;
    background: var(--mm-purple);
    color: #fff;
    box-shadow: 0 16px 30px -18px rgba(136, 2, 144, .8);
    white-space: normal;
    text-align: start;
}

.mm-notice-btn:hover {
    background: #A204AB;
    color: #fff;
}

.mm-notice-btn .rx-ar { font-size: 12.5px; font-weight: 600; }

@media (max-width: 640px) {
    .mm-notice { padding: 16px 16px 18px; }
    .mm-notice-title { font-size: 15.5px; }
    .mm-notice-btn { width: 100%; align-items: center; text-align: center; }
}

/* owner status line + subscriptions (staff tab) */

.mm-ostatus {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--mm-body);
}

.mm-ostatus.is-warn {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid #FBD5D5;
    border-radius: 999px;
    background: #FEF2F2;
    color: #B42318;
    font-weight: 700;
}

.mm-subs-search { max-width: 380px; }

.mm-subs-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2px;
}

.mm-subs-intro {
    flex: 1 1 320px;
    margin: 0;
}

.mm-rate-card {
    flex: 0 0 auto;
    width: 300px;
    max-width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-rate-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mm-rate-row .mm-label { margin-bottom: 0; }

.mm-rate-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mm-rate-input {
    flex: 1 1 auto;
    min-width: 0;
}

.mm-rate-hint {
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--mm-muted);
}

.mm-rate-msg {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.mm-rate-msg:empty { display: none; }

.mm-rate-msg.is-ok { color: #067647; }
.mm-rate-msg.is-err { color: #B42318; }

.mm-subs-list { display: block; margin-top: 4px; }

.mm-sub-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 14px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-sub-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 260px;
    min-width: 0;
}

.mm-sub-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mm-sub-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.1px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-sub-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-sub-slug { color: var(--mm-purple); font-weight: 600; }

.mm-sub-when {
    font-size: 11.5px;
    color: var(--mm-muted);
}

.mm-sub-warn {
    margin: 6px 0 0;
    padding: 8px 10px;
    border: 1px solid #FBD5D5;
    border-radius: 10px;
    background: #FEF2F2;
    color: #B42318;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.mm-sub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

.mm-sub-act {
    padding: 7px 12px;
    border: 1px solid #F6CEF8;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-sub-act:hover:not(:disabled) {
    border-color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-sub-act:disabled {
    opacity: .6;
    cursor: default;
}

.mm-sub-act-alt { border-style: dashed; }

.mm-sub-act-danger {
    border-color: #FBD5D5;
    color: #B42318;
}

.mm-sub-act-danger:hover:not(:disabled) {
    border-color: #B42318;
    background: #FEF2F2;
}

/* "Edit menu": opens that restaurant's dashboard in staff mode */

.mm-sub-act-edit {
    border-color: #FDBA74;
    background: #FFF7ED;
    color: #9A3412;
}

.mm-sub-act-edit:hover:not(:disabled) {
    border-color: #EA580C;
    background: #FFEDD5;
}

/* show / hand over a login password (site owner) */

.mm-sub-email {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mm-sub-pwbtn {
    flex: 0 0 auto;
    padding: 3px 10px;
    border: 1px solid #F6CEF8;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--mm-purple);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-sub-pwbtn:hover {
    border-color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-sub-pwerr,
.mm-sub-rowerr {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #B42318;
    overflow-wrap: anywhere;
}

.mm-sub-pw {
    flex: 1 1 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid #F6CEF8;
    border-radius: 12px;
    background: #FBFAFF;
}

.mm-sub-pw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mm-sub-pw-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-sub-pw-hide {
    border: 0;
    padding: 0;
    background: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-sub-pw-hide:hover { text-decoration: underline; }

.mm-sub-pw-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.mm-sub-pw-code {
    flex: 1 1 180px;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 10px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.45;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
}

.mm-sub-pw-copy {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1px solid #F6CEF8;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-sub-pw-copy:hover {
    border-color: var(--mm-purple);
    background: var(--mm-lav);
}

/* the same pill as "Copy", in WhatsApp green */
.mm-sub-pw-wa {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #25D366;
    border-radius: 999px;
    background: #25D366;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.mm-sub-pw-wa:visited { color: #fff; }

.mm-sub-pw-wa:hover,
.mm-sub-pw-wa:focus-visible {
    background: #1EBE5A;
    border-color: #1EBE5A;
    color: #fff;
    text-decoration: none;
}

.mm-sub-pw-wa-ico {
    flex: 0 0 auto;
    display: block;
}

.mm-sub-pw-note {
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

/* add-menu result + delete confirmation */

.mm-amdone-title {
    margin: 12px 0 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: #067647;
}

.mm-amdone-label {
    margin: 14px 0 4px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-amdone-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-amdone-value {
    flex: 1 1 180px;
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
    word-break: break-all;
}

.mm-amdone-pass {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px dashed #E3C8E4;
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-amdone-pass .mm-code {
    flex: 1 1 160px;
    min-width: 0;
    font-size: 22px;
    letter-spacing: .12em;
}

.mm-amdone-warn {
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid #FBD5D5;
    border-radius: 10px;
    background: #FEF2F2;
    color: #B42318;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
}

.mm-del-list {
    margin: 4px 0 0;
    padding-inline-start: 18px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-del-list strong { color: var(--mm-ink); }

.mm-del-link {
    display: inline-block;
    color: var(--mm-purple);
    font-weight: 600;
    word-break: break-all;
}

.mm-del-warn {
    margin-top: 12px;
    font-weight: 700;
    color: #B42318;
}

.mm-dpill-nolimit { background: #ECFDF3; color: #067647; }
.mm-dpill-trial { background: #FFF7ED; color: #C2410C; }
.mm-dpill-plan { background: #FBEEFB; color: var(--mm-purple); }
.mm-dpill-pending { background: #FFFBEB; color: #92400E; }
.mm-dpill-exp { background: #FEF2F2; color: #B42318; }

/* orders: the new-orders badge, worn by the Orders row in the ⋯ panel and by
   the ⋯ button itself (.mm-dnav-badge below pins it to the button's corner) */

.mm-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-inline-start: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mm-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

@keyframes mmPing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 3, 191, 0); }
    50% { box-shadow: 0 0 0 4px rgba(180, 3, 191, .35); }
}

.mm-ord-list { display: block; margin-top: 4px; }

.mm-ord-row {
    padding: 14px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-ord-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.mm-ord-time {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-ord-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mm-ord-items li {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-ord-total {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-ord-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-ord-meta a {
    color: var(--mm-purple);
    font-weight: 700;
    text-decoration: none;
}

/* the employee who took the order at the POS: a small muted chip in the
   same meta row as the customer's name and phone */
.mm-ord-cashier {
    padding: 1px 8px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: var(--mm-lav);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-ord-addr {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-ord-map {
    display: inline-block;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
}

.mm-ord-map:hover { text-decoration: underline; }

.mm-ord-note {
    margin: 8px 0 0;
    padding-inline-start: 10px;
    border-inline-start: 3px solid #F6CEF8;
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.5;
    color: var(--mm-body);
}

.mm-ord-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mm-dpill-new { background: #FFF7ED; color: #C2410C; }
.mm-dpill-done { background: #ECFDF3; color: #067647; }

/* modals */

.mm-dmodal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.mm-dmodal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mm-dmodal-bd {
    position: absolute;
    inset: 0;
    background: rgba(23, 12, 45, .55);
}

.mm-dmodal-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 40px 80px -30px rgba(23, 12, 45, .6);
}

.mm-dmodal-sm { max-width: 400px; }

/* the sheets that carry the drawer's two boxes side by side */
.mm-dmodal-doc.mm-dmodal-wide { max-width: 640px; }

.mm-dmodal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: #fff;
    border-bottom: 1px solid var(--mm-line);
    border-radius: 18px 18px 0 0;
}

.mm-dmodal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-dmodal-x {
    padding: 2px 6px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    color: var(--mm-muted);
    cursor: pointer;
}

.mm-dmodal-x:hover {
    color: var(--mm-ink);
    background: var(--mm-lav);
}

.mm-dmodal-body { padding: 4px 18px 18px; }

.mm-dmodal-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    background: #fff;
    border-top: 1px solid var(--mm-line);
}

.mm-dfield-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* add-ons repeater inside the dish form */

.mm-addons {
    display: grid;
    gap: 8px;
}

.mm-addons-empty {
    margin: 0;
    font-size: 12px;
    color: var(--mm-muted);
}

.mm-addon-head {
    display: grid;
    grid-template-columns: 1fr 1fr 96px 34px;
    gap: 8px;
    margin: 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-addon-row {
    display: grid;
    grid-template-columns: 1fr 1fr 96px 34px;
    gap: 8px;
    align-items: center;
}

.mm-addon-row .mm-input {
    padding: 9px 11px;
    font-size: 13.5px;
    border-radius: 10px;
}

.mm-addon-x {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #FEE4E2;
    border-radius: 10px;
    background: #FEF2F2;
    color: #B42318;
    font-family: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.mm-addon-x:hover {
    background: #FEE4E2;
    border-color: #FDA29B;
}

.mm-addon-add {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-addon-add:hover { text-decoration: underline; }

.mm-ord-addons {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* the size of an ordered line: the dashboard's order list and the receipt */
.mm-ord-size {
    font-weight: 700;
    color: var(--mm-purple);
}

.mm-po-size { font-weight: 700; }

/* ------------------------- dish sizes (dish form) -----------------------
   The sizes repeater under the add-ons editor: one block per size, each with
   its own name, price and add-ons. New classes only. */

.mm-sizes {
    display: grid;
    gap: 10px;
}

.mm-size-empty { margin: 0; }

.mm-size-block {
    padding: 11px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #FCFBFF;
}

.mm-size-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.mm-size-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--mm-purple);
}

.mm-size-title .rx-ar { font-weight: 600; text-transform: none; }

.mm-size-x {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #FEE4E2;
    border-radius: 8px;
    background: #FEF2F2;
    color: #B42318;
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.mm-size-x:hover {
    background: #FEE4E2;
    border-color: #FDA29B;
}

.mm-size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 96px;
    gap: 8px;
}

.mm-size-grid .mm-input {
    padding: 9px 11px;
    font-size: 13.5px;
    border-radius: 10px;
}

.mm-size-addons-lbl {
    margin: 10px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--mm-body);
}

.mm-size-addons-lbl .rx-ar { font-weight: 600; }

.mm-size-addons .mm-addon-head,
.mm-size-addons .mm-addon-row {
    grid-template-columns: minmax(0, 1fr) 96px 34px;
}

.mm-size-block .mm-addon-add { margin-top: 8px; }

.mm-size-add { margin-top: 10px; }

.mm-size-add .rx-ar { font-weight: 600; }

.mm-ddish-sizes {
    padding: 2px 8px;
    border-radius: 999px;
    background: #FBEEFB;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--mm-purple);
}

.mm-ddish-sizes .rx-ar { font-weight: 600; }

@media (max-width: 599px) {
    .mm-size-grid { grid-template-columns: minmax(0, 1fr); }

    .mm-size-addons .mm-addon-head,
    .mm-size-addons .mm-addon-row { grid-template-columns: minmax(0, 1fr) 84px 34px; }
}

/* --------------------- the size picker (both menus) ---------------------
   The radio pills at the top of the dish sheet: one per size, its name in the
   visitor's (or cashier's) language and its price. Used by the public menu's
   options sheet and the POS one, so the two look the same. New classes. */

.mm-opt-sizelbl {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-sizepick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.mm-sizepill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1.5px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.mm-sizepill:hover { border-color: var(--qr-accent-mid, #EE91F3); }

.mm-sizepill.is-active {
    border-color: var(--qr-accent, #880290);
    background: var(--qr-accent-pale, #FBEEFB);
}

.mm-sizepill-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-sizepill-price {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--mm-body);
}

.mm-sizepill.is-active .mm-sizepill-name,
.mm-sizepill.is-active .mm-sizepill-price { color: var(--qr-accent, #880290); }

.mm-sizepill:focus-visible {
    outline: 2px solid var(--qr-accent-mid, #EE91F3);
    outline-offset: 2px;
}

/* the chosen size on a line: the public menu's cart and the POS ticket */
.mm-cart-size {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--qr-accent, #880290);
    overflow-wrap: anywhere;
}

.mm-posline-size {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--mm-purple);
    overflow-wrap: anywhere;
}

.mm-dconfirm-text {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-derr {
    margin: 10px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    color: #B42318;
    overflow-wrap: anywhere;
}

.mm-derr:empty { display: none; }

/* change password (dashboard drawer → small modal): the three password boxes
   with their show/hide eye. Logical insets, so the eye sits on the end side of
   the field in both LTR and RTL. */

.mm-pass-box {
    position: relative;
    display: block;
}

.mm-pass-box .mm-input { padding-inline-end: 48px; }

.mm-pass-eye {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 50%;
    inset-inline-end: 5px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: none;
    color: #8B84A0;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.mm-pass-eye:hover {
    color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-pass-eye:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 1px;
}

.mm-pass-eye svg { display: block; }

/* toast */

.mm-dtoast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 300;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #067647;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 18px 34px -18px rgba(6, 118, 71, .9);
    transform: translate(-50%, 14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.mm-dtoast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mm-btn-danger {
    background: #DC2626;
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(220, 38, 38, .9);
}

.mm-btn-danger:hover {
    background: #C81E1E;
    transform: translateY(-1px);
}

/* ------------------------- client logos (staff tab) ---------------------- */

.mm-logos-count {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--mm-muted);
}

.mm-logos-count:empty { display: none; }

/* the Arabic line sits under its English one, in both places */
#mm-dpanel-logos .mm-dsub .mm-ar-inline {
    display: block;
    margin-top: 4px;
}

#mm-logos-empty .rx-ar {
    display: block;
    margin-top: 6px;
}

.mm-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(238px, 100%), 1fr));
    align-items: start;
    gap: 12px;
    margin-top: 12px;
}

.mm-logo-card {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

/* first paint, before the list arrives (it is replaced by the slots) */
.mm-logos-loading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 22px 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* an empty slot: dashed tile with the upload button */
.mm-logo-card-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 232px;
    text-align: center;
    background: #FCFBFF;
    border: 1.5px dashed #F6CEF8;
    box-shadow: none;
}

.mm-logo-tile {
    display: grid;
    place-items: center;
    height: 92px;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
}

.mm-logo-tile img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 74px;
    object-fit: contain;
}

.mm-logo-tile-ph {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-logo-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.mm-logo-order {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-logo-field { margin-top: 10px; }

.mm-logo-field .mm-label {
    margin-bottom: 4px;
    font-size: 11.5px;
}

.mm-logo-field .mm-input {
    padding: 9px 11px;
    font-size: 13.5px;
    border-radius: 10px;
}

.mm-logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.mm-logo-actions .mm-sub-act,
.mm-logo-card-empty .mm-sub-act {
    padding: 6px 10px;
    font-size: 11.5px;
    line-height: 1.35;
}

/* the upload trigger is a label, so it carries the button look by hand */
label.mm-sub-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

label.mm-sub-act:focus-within {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

label.mm-sub-act.is-disabled {
    opacity: .55;
    pointer-events: none;
}

.mm-logo-save {
    border-color: var(--mm-purple);
    background: var(--mm-purple);
    color: #fff;
}

.mm-logo-save:hover:not(:disabled) {
    border-color: #AE21B5;
    background: #AE21B5;
}

.mm-logo-drop-ic {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #FBEEFB;
    color: var(--mm-purple-light);
}

.mm-logo-drop-text {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* ------------------------------------------------------- public menu page */

/* Nothing here forces full viewport height: the content flows naturally
   (header, categories, dishes, footer, spacer). A short menu simply ends
   above the bottom of the screen and the empty area below is the page
   background, which is where the fixed order pill floats. The spacer at the
   end of the flow reserves the same room at the end of a long menu. */
.mm-qr-page {
    --mm-qr-pill: 48px;
    /* overridden at runtime from the restaurant's AccentColor / FontEn / FontAr.
       The defaults below are the public menu's own purple and stay untouched by
       the site brand colour: a restaurant with no accent set keeps this look. */
    --qr-accent: #6D28D9;
    --qr-on-accent: #ffffff;
    --qr-accent-soft: #DCCDF9;
    --qr-accent-pale: #F8F5FF;
    --qr-accent-mid: #C4B5FD;
    --qr-accent-light: #C4B5FD;
    --qr-thumb-a: #EDE7FB;
    --qr-thumb-b: #F7F3FF;
    --qr-hover: #EBE3FB;
    /* header gradient, derived from the accent (defaults = the original purple) */
    --qr-cover-a: #7C3AED;
    --qr-cover-b: #6D28D9;
    --qr-cover-c: #4C1D95;
    /* menu shell surface, overridden at runtime from BgColor / BgImage:
       the picture sits under a soft veil so the dishes stay readable */
    --qr-shell-bg: #ffffff;
    --qr-shell-image: none;
    --qr-veil: transparent;
    --qr-font-en: var(--mm-font);
    --qr-font-ar: var(--mm-font-ar);
    background: var(--mm-lav);
}

.mm-qr {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--qr-font-en);
    background-color: var(--qr-shell-bg, #ffffff);
    /* first layer = the veil, painted over the picture */
    background-image: linear-gradient(var(--qr-veil, transparent), var(--qr-veil, transparent)), var(--qr-shell-image, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Arabic mode: the restaurant's Arabic font for the whole menu content */
.mm-qr[dir="rtl"] { font-family: var(--qr-font-ar); }

/* Arabic lines on the English page keep the Arabic font */
.mm-qr-page .rx-ar { font-family: var(--qr-font-ar); }

/* ------------------------- menu background (owner set) -------------------
   BgColor paints the shell; BgImage covers it under a soft veil (see the
   --qr-shell-* variables above). The footer, the spacer and the sticky
   category bar go transparent so the surface runs behind them, and a dark
   colour switches the texts that sit straight on the shell to light values.
   Dish cards keep their own white surface. */

.mm-qr-page.is-custom-bg .mm-qr-foot,
.mm-qr-page.is-custom-bg .mm-qr-spacer { background: transparent; }

.mm-qr-page.is-custom-bg .mm-qr-nav { background: rgba(255, 255, 255, .74); }

.mm-qr-page.is-dark-bg .mm-qr-name,
.mm-qr-page.is-dark-bg .mm-qr-footname { color: #ffffff; }

.mm-qr-page.is-dark-bg .mm-qr-tagline,
.mm-qr-page.is-dark-bg .mm-qr-secar,
.mm-qr-page.is-dark-bg .mm-qr-credit,
.mm-qr-page.is-dark-bg .mm-qr-rate,
.mm-qr-page.is-dark-bg .mm-qr-preparing .mm-qr-statetext { color: #DAD3E8; }

.mm-qr-page.is-dark-bg .mm-qr-secname,
.mm-qr-page.is-dark-bg .mm-qr-credit a { color: var(--qr-accent-light); }

.mm-qr-page.is-dark-bg .mm-qr-dot { color: rgba(255, 255, 255, .45); }

.mm-qr-page.is-dark-bg .mm-qr-nav {
    background: rgba(17, 24, 39, .62);
    border-bottom-color: rgba(255, 255, 255, .18);
}

.mm-qr-page.is-dark-bg .mm-qr-tab {
    border-color: rgba(255, 255, 255, .36);
    background: rgba(255, 255, 255, .10);
    color: #F3F0FA;
}

.mm-qr-page.is-dark-bg .mm-qr-tab:hover,
.mm-qr-page.is-dark-bg .mm-qr-tab:focus-visible {
    border-color: #ffffff;
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.mm-qr-page.is-dark-bg .mm-qr-tab.is-active {
    border-color: var(--qr-accent);
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
}

.mm-qr-page.is-dark-bg .mm-qr-foot { border-top-color: rgba(255, 255, 255, .18); }

/* header */

.mm-qr-head { display: block; }

.mm-qr-cover {
    position: relative;
    height: 168px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--qr-cover-a) 0%, var(--qr-cover-b) 55%, var(--qr-cover-c) 100%);
}

.mm-qr-coverimg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mm-qr-switches {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 20px);
    z-index: 2;
}

.mm-qr-langrow {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 22px -14px rgba(23, 12, 45, .7);
}

.mm-qr-lang {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .03em;
    color: #6F6788;
    cursor: pointer;
}

.mm-qr-lang.is-active {
    background: var(--qr-accent);
    color: var(--qr-on-accent);
}

.mm-qr-langsep {
    font-size: 12px;
    color: var(--qr-accent-mid);
}

.mm-qr-headcard {
    padding: 0 16px 18px;
    text-align: center;
}

.mm-qr-logo {
    position: relative;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: -42px auto 12px;
    overflow: hidden;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 28px -20px rgba(30, 16, 57, .55);
    color: var(--qr-accent);
}

.mm-qr-logoinit {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.mm-qr-logoimg {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
}

.mm-qr-name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.25;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-qr-tagline {
    margin: 6px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-qr-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.mm-qr-fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: var(--qr-accent-pale);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-qr-fact svg { flex: 0 0 auto; color: var(--qr-accent); }

.mm-qr-fact a {
    color: inherit;
    text-decoration: none;
}

.mm-qr-fact a:hover { color: var(--qr-accent); }

/* sticky category chips */

.mm-qr-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--mm-line);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mm-qr-nav::-webkit-scrollbar { display: none; }

.mm-qr-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-ink);
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.mm-qr-tab:hover,
.mm-qr-tab:focus-visible {
    border-color: var(--qr-accent);
    color: var(--qr-accent);
    outline: none;
}

.mm-qr-tab.is-active {
    border-color: var(--qr-accent);
    background: var(--qr-accent);
    color: var(--qr-on-accent);
}

/* sections + dishes */

.mm-qr-sec {
    padding: 18px 14px 4px;
    scroll-margin-top: 68px;
}

.mm-qr-secname {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--qr-accent);
}

.mm-qr-secar {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-qr-dish {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 30px -28px rgba(30, 16, 57, .45);
}

.mm-qr-dish.is-off { opacity: .62; }

.mm-qr-thumb {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--qr-thumb-a) 0%, var(--qr-thumb-b) 100%);
    color: var(--qr-accent);
}

.mm-qr-thumbinit {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.mm-qr-thumbimg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-qr-dinfo {
    flex: 1 1 auto;
    min-width: 0;
}

.mm-qr-dname {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-qr-dar {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
    text-overflow: clip;
}

.mm-qr-ddesc {
    margin: 5px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-qr-dside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.mm-qr-dprice {
    font-size: 14px;
    font-weight: 800;
    color: var(--qr-accent);
    white-space: nowrap;
}

.mm-qr-off {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #FEF2F2;
    color: #B42318;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.mm-qr-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    transition: background .16s ease;
}

.mm-qr-wa:hover { background: #1EBE5A; }
.mm-qr-wa svg { display: block; }

/* add / stepper on a dish row */

.mm-qr-dcart {
    display: flex;
    margin-top: 8px;
}

.mm-qr-add {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--qr-accent);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-qr-add:hover {
    border-color: var(--qr-accent);
    background: var(--qr-accent-pale);
}

.mm-qr-qty {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 999px;
    background: #fff;
}

.mm-qr-qbtn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--qr-accent-pale);
    color: var(--qr-accent);
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.mm-qr-qbtn:hover { background: var(--qr-hover); }

.mm-qr-qnum {
    min-width: 26px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--qr-accent);
}

/* the available add-ons: one tiny line under the dish name, so the customer
   knows before tapping Options */

.mm-qr-daddons {
    margin: 4px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

/* "Options" replaces "+ Add" on a dish that has add-ons */

.mm-qr-options {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mm-qr-optcount {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    font-size: 11px;
    font-weight: 800;
}

/* floating bar: WhatsApp helper pill, or the cart bar once the cart has items */

.mm-qr-bar {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: flex;
    justify-content: center;
    max-width: calc(100vw - 28px);
    transform: translateX(-50%);
}

.mm-qr-order {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--mm-qr-pill);
    padding: 0 20px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 18px 32px -14px rgba(37, 211, 102, .95);
}

.mm-qr-order:hover { background: #1EBE5A; }

.mm-qr-cartbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--mm-qr-pill);
    padding: 0 10px 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 18px 32px -14px rgba(30, 16, 57, .55);
}

.mm-qr-cartbar-sep { opacity: .5; }

.mm-qr-cartbar-view {
    margin-inline-start: 4px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    font-size: 13px;
}

/* cart sheet: bottom sheet on phones, side panel on desktop */

body.mm-cart-locked { overflow: hidden; }

.mm-cart {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.mm-cart.is-open { display: block; }

.mm-cart-bd {
    position: absolute;
    inset: 0;
    background: rgba(23, 12, 45, .55);
}

.mm-cart-doc {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 60px -30px rgba(23, 12, 45, .6);
}

.mm-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--mm-line);
    border-radius: 18px 18px 0 0;
}

.mm-cart-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-cart-x {
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    color: var(--mm-muted);
    cursor: pointer;
}

.mm-cart-x:hover {
    color: var(--mm-ink);
    background: var(--mm-lav);
}

.mm-cart-body {
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.mm-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mm-line);
}

.mm-cart-rowmain {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mm-cart-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-cart-unit {
    font-size: 12px;
    color: var(--mm-muted);
}

.mm-cart-rowctl {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.mm-cart-remove {
    border: 0;
    padding: 0;
    background: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #B42318;
    cursor: pointer;
}

.mm-cart-remove:hover { text-decoration: underline; }

.mm-cart-empty {
    margin: 18px 0;
    text-align: center;
    font-size: 13px;
    color: var(--mm-muted);
}

.mm-cart-totalrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-cart-totalrow strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--mm-ink);
}

/* the chosen add-ons on a cart line */

.mm-cart-picks {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

/* options sheet: the dish, its add-ons, a quantity and the live line total */

.mm-opt-base {
    margin: 2px 0 12px;
    font-size: 13px;
    color: var(--mm-muted);
}

.mm-opt-base strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--qr-accent);
}

.mm-opt-list {
    display: grid;
    gap: 8px;
}

.mm-opt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-opt-row:hover { border-color: var(--qr-accent-mid); }

.mm-opt-row:has(.mm-opt-box:checked) {
    border-color: var(--qr-accent);
    background: var(--qr-accent-pale);
}

.mm-opt-box {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--qr-accent);
    cursor: pointer;
}

.mm-opt-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-opt-price {
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--qr-accent);
    white-space: nowrap;
}

.mm-opt-qtyrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.mm-opt-qlabel {
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-opt-totalrow {
    margin-top: 4px;
    border-top: 1px solid var(--mm-line);
}

.mm-opt-foot {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--mm-line);
    background: #fff;
}

.mm-opt-foot .mm-btn-block { margin-top: 0; }

.mm-cart-geo { margin-top: 12px; }

.mm-cart-geomsg {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

.mm-cart-geomsg.is-ok {
    color: #067647;
    font-weight: 700;
}

.mm-cart-geomsg.is-ok a {
    color: var(--qr-accent);
    font-weight: 700;
}

.mm-cart-geomsg.is-warn {
    color: #B42318;
    font-weight: 600;
}

.mm-cart-msg {
    margin: 10px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
}

.mm-cart-msg:empty { display: none; }

.mm-cart-msg.is-warn { color: #B42318; }
.mm-cart-msg.is-ok { color: #067647; }

.mm-cart-tick { font-weight: 800; }

#mm-cart-send { margin-top: 14px; }

.mm-cart-toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 300;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #067647;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 18px 34px -18px rgba(6, 118, 71, .9);
    transform: translate(-50%, 12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.mm-cart-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 720px) {
    .mm-cart-doc {
        inset-inline: auto 0;
        top: 0;
        bottom: 0;
        width: 420px;
        max-height: none;
        border-radius: 18px 0 0 18px;
    }

    .mm-cart-head { border-radius: 18px 0 0 0; }
}

/* -------------------- table reservations (public menu) --------------------
   The "Reserve a table" pill sits in the same cluster as the language and
   currency switchers; the sheet itself is centred on desktop and a bottom
   sheet on phones, the same shape as the cart. Everything here is new: the
   menu page looks exactly as before when a restaurant has no reservations. */

.mm-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 22px -14px rgba(23, 12, 45, .7);
}

.mm-book-btn:hover { background: var(--qr-accent); }

.mm-book-btn:focus-visible {
    outline: 3px solid var(--qr-accent-mid);
    outline-offset: 2px;
}

.mm-book-btn-ico {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.mm-book-btn-short { display: none; }

.mm-book {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: none;
}

.mm-book.is-open {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mm-book-bd {
    position: absolute;
    inset: 0;
    background: rgba(23, 12, 45, .55);
}

.mm-book-doc {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 92vh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 60px -30px rgba(23, 12, 45, .6);
}

.mm-book-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mm-line);
    border-radius: 18px 18px 0 0;
}

.mm-book-headtext { min-width: 0; }

.mm-book-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-book-sub {
    margin: 3px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-book-sub:empty { display: none; }

.mm-book-x {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    color: var(--mm-muted);
    cursor: pointer;
}

.mm-book-x:hover {
    color: var(--mm-ink);
    background: var(--mm-lav);
}

.mm-book-body {
    padding: 2px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.mm-book-form .mm-field { margin-top: 12px; }

.mm-book-form .mm-label { margin-bottom: 5px; }

.mm-book-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mm-book-err {
    margin: 12px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #B42318;
}

.mm-book-err:empty { display: none; }

#mm-book-send { margin-top: 14px; }

/* the card that replaces the form once the request is in */
.mm-book-ok {
    padding: 12px 0 2px;
    text-align: center;
}

.mm-book-oktitle {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.35;
    color: var(--qr-accent);
}

.mm-book-okrows {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.mm-book-okrows li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 12px;
    background: var(--qr-accent-pale);
    font-size: 13px;
    color: var(--mm-body);
}

.mm-book-okrows strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-book-pending {
    margin: 12px 0 0;
    padding: 9px 12px;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    background: #FFFBEB;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #92400E;
}

.mm-book-wa { margin-top: 14px; }

.mm-book-again { margin-top: 10px; }

/* the sheet follows the menu's own fonts and accent, like the cart does */
.mm-qr-page .mm-book { font-family: var(--qr-font-en); }

.mm-qr-page .mm-book[dir="rtl"] { font-family: var(--qr-font-ar); }

.mm-book .mm-input { border-color: var(--qr-accent-soft); }

.mm-book .mm-input:focus {
    border-color: var(--qr-accent);
    box-shadow: 0 0 0 4px var(--qr-accent-pale);
}

.mm-book .mm-textarea { min-height: 62px; resize: vertical; }

@media (max-width: 599px) {
    .mm-book-btn { padding: 0 10px; }

    .mm-book-btn-long { display: none; }

    .mm-book-btn-short { display: inline; }
}

@media (min-width: 720px) {
    .mm-book.is-open { align-items: center; padding: 24px; }

    .mm-book-doc {
        max-width: 460px;
        max-height: 88vh;
        border-radius: 18px;
        box-shadow: 0 40px 80px -30px rgba(23, 12, 45, .6);
    }

    .mm-book-head { border-radius: 18px 18px 0 0; }
}

/* ------------------------- visitor ratings (public menu) -----------------
   The summary of what the guests said and the card that asks the visitor,
   both just above the footer. `.mm-stars` / `.mm-star` are shared with the
   dashboard's reviews tab. New classes only. */

.mm-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.mm-star {
    display: inline-flex;
    color: #D9D2E8;
}

.mm-star.is-on { color: #F59E0B; }

.mm-star svg { display: block; }

.mm-revs {
    margin: 18px 14px 0;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .45);
}

.mm-revs-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mm-revs-avg {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
    color: var(--mm-ink);
}

.mm-revs-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mm-revs-count {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-revs-stars .mm-star svg {
    width: 16px;
    height: 16px;
}

.mm-revs-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mm-rev {
    padding: 10px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-rev-stars .mm-star svg {
    width: 13px;
    height: 13px;
}

.mm-rev-text {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-rev-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-rev-dot { color: var(--qr-accent-mid); }

/* the card that asks for a rating */

.mm-rate {
    margin: 18px 14px 0;
    padding: 18px 16px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .45);
}

.mm-rate-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--mm-ink);
}

.mm-rate-sub {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-rate-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 14px 0 4px;
}

.mm-rate-star {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #D9D2E8;
    cursor: pointer;
    transition: transform .14s ease, color .14s ease, background .14s ease;
}

.mm-rate-star svg {
    width: 30px;
    height: 30px;
    display: block;
}

.mm-rate-star:hover {
    color: #F59E0B;
    background: #FFF7ED;
    transform: translateY(-1px);
}

.mm-rate-star.is-on { color: #F59E0B; }

.mm-rate-star:focus-visible {
    outline: 3px solid var(--qr-accent-mid);
    outline-offset: 2px;
}

.mm-rate-lbl {
    display: block;
    margin: 12px 0 5px;
    text-align: start;
    font-size: 12px;
    font-weight: 700;
    color: #4B4463;
}

.mm-rate .mm-input {
    border-color: var(--qr-accent-soft);
    text-align: start;
}

.mm-rate .mm-input:focus {
    border-color: var(--qr-accent);
    box-shadow: 0 0 0 4px var(--qr-accent-pale);
}

.mm-rate .mm-textarea { min-height: 62px; resize: vertical; }

.mm-rate-err {
    margin: 10px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #B42318;
}

.mm-rate-err:empty { display: none; }

#mm-rate-send { margin-top: 14px; }

.mm-rate-thanks {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: #067647;
}

.mm-rate-donestars {
    margin-top: 8px;
    justify-content: center;
}

.mm-rate-donestars .mm-star svg {
    width: 24px;
    height: 24px;
}

.mm-rate-again {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--qr-accent);
    text-decoration: underline;
    cursor: pointer;
}

.mm-rate-again:hover { color: var(--qr-accent); opacity: .85; }

/* footer + states */

/* The order pill is fixed over the bottom of the viewport. The spacer below
   the footer is a real element in the flow, so the space it reserves is
   always there and the pill only ever floats over empty space. */
.mm-qr-spacer {
    flex: 0 0 auto;
    width: 100%;
    height: calc(48px + 14px + 24px + env(safe-area-inset-bottom, 0px));
    background: var(--mm-lav);
    pointer-events: none;
}

.mm-qr-foot {
    padding: 24px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    border-top: 1px solid var(--mm-line);
    background: var(--mm-lav);
}

.mm-qr-preparing {
    padding: 34px 20px 48px;
    text-align: center;
}

/* expired subscription: one centred message, in the visitor's language, under
   the menu header (logo + restaurant name) and above the usual footer */
.mm-qr-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46vh;
    margin: 18px 14px 24px;
    padding: 36px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 30px 60px -40px rgba(30, 16, 57, .4);
}

.mm-qr-unavail-title {
    margin: 0;
    max-width: 420px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.5;
    color: var(--mm-purple);
    overflow-wrap: anywhere;
}

.mm-qr-footname {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-qr-credit {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.8;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-qr-credit a {
    color: var(--qr-accent);
    font-weight: 700;
    text-decoration: none;
}

.mm-qr-credit a:hover { text-decoration: underline; }

.mm-qr-rate {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--mm-muted);
}

.mm-qr-dot { color: var(--qr-accent-mid); }

/* Info states: a centred card in a tall block, followed in the markup by the
   same spacer, so nothing can end up under the fixed pill. */
.mm-qr-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82vh;
    padding: 32px 18px;
}

.mm-qr-statecard {
    width: 100%;
    max-width: 420px;
    padding: 28px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 30px 60px -40px rgba(30, 16, 57, .4);
}

.mm-qr-statetitle {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.3;
    color: var(--mm-ink);
}

.mm-qr-statetext {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-qr-statelink {
    display: inline-flex;
    margin-top: 18px;
}

/* The lines under the English one in the "couldn't load" card: the same text
   in Arabic, in Cairo and right to left, a touch smaller than the English. */
.mm-qr-statetitle-ar {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.5;
}

.mm-qr-statetext-ar { margin-top: 2px; }

/* skeleton */

.mm-qr-skcover { height: 168px; background: linear-gradient(135deg, var(--qr-thumb-a) 0%, var(--qr-thumb-b) 100%); }

.mm-qr-skcard {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 0 16px 18px;
}

.mm-qr-sklogo {
    width: 84px;
    height: 84px;
    margin-top: -42px;
    border-radius: 20px;
}

.mm-qr-skline { width: 58%; height: 14px; }
.mm-qr-skline-short { width: 38%; height: 12px; }

.mm-qr-skbody {
    display: grid;
    gap: 10px;
    padding: 18px 14px;
}

.mm-qr-skdish { height: 88px; border-radius: 16px; }

/* accent-coloured primary buttons and fields inside the public menu */

.mm-qr-page .mm-btn-primary {
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    box-shadow: 0 16px 30px -14px rgba(30, 16, 57, .45);
}

.mm-qr-page .mm-btn-primary:hover { background: var(--qr-accent); }

/* Secondary controls in the cart sheet belong to the menu too: they keep the
   restaurant's accent (the same colour they had when the menu default and the
   old site brand purple happened to match) instead of the site brand. */
.mm-qr-page .mm-btn-ghost {
    color: var(--qr-accent);
    border-color: var(--qr-accent-soft);
}

.mm-qr-page .mm-btn-ghost:hover {
    border-color: var(--qr-accent);
    color: var(--qr-accent);
    background: var(--qr-accent-pale);
}

.mm-qr-page .mm-btn:focus-visible { outline-color: var(--qr-accent-mid); }

.mm-qr-page .mm-linkbtn:focus-visible { outline-color: var(--qr-accent-mid); }

.mm-cart .mm-input { border-color: var(--qr-accent-soft); }

/* the loading skeleton shimmers in the menu's own tints, not the site brand */
.mm-qr-page .mm-skel {
    background: linear-gradient(90deg, var(--qr-thumb-a) 25%, var(--qr-thumb-b) 37%, var(--qr-thumb-a) 63%);
    background-size: 400% 100%;
}

.mm-cart .mm-input:focus {
    border-color: var(--qr-accent);
    box-shadow: 0 0 0 4px var(--qr-accent-pale);
}

.mm-qr-page .mm-cart { font-family: var(--qr-font-en); }

.mm-qr-page .mm-cart[dir="rtl"] { font-family: var(--qr-font-ar); }

.mm-qr-page .mm-qr-bar { font-family: var(--qr-font-en); }

.mm-qr-page .mm-qr-bar[dir="rtl"] { font-family: var(--qr-font-ar); }

/* ------------------------------------------- loading splash (public menu) */

/* The 5 s cover of the visitor's menu. It is fixed over everything, painted
   in the menu page's own white so nothing flashes behind it, and the script
   in menu.view removes the node 400 ms after the fade — nothing is left to
   take a click. Its accent comes from the restaurant's --qr-accent, with the
   brand purple as the fallback. */

.mm-splash {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    padding: 24px;
    background: #ffffff;
    font-family: var(--qr-font-en);
    opacity: 1;
    transition: opacity .4s ease;
}

.mm-splash.is-out { opacity: 0; pointer-events: none; }

/* after it has gone once, a re-render in the same visit cannot bring it back */
.mm-splash-off .mm-splash { display: none !important; }

/* the page behind the cover does not scroll while the cover is up */
body.mm-splash-on { overflow: hidden; }

.mm-splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* fixed box: swapping the MAGMA mark for the restaurant's logo moves nothing */
.mm-splash-logobox {
    position: relative;
    width: 180px;
    height: 140px;
    max-width: 70vw;
    animation: mm-splash-in .5s ease-out both, mm-splash-pulse 2.4s ease-in-out .5s infinite;
}

.mm-splash-logo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 140px;
    margin: auto;
    object-fit: contain;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

@keyframes mm-splash-in {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}

/* the soft "still loading" breath, opacity only so it never fights the
   entrance scale */
@keyframes mm-splash-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .68; }
}

.mm-splash-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 8px;
}

.mm-splash-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--qr-accent, #880290);
    opacity: .3;
    animation: mm-splash-dot 1.1s ease-in-out infinite;
}

.mm-splash-dots span:nth-child(2) { animation-delay: .16s; }
.mm-splash-dots span:nth-child(3) { animation-delay: .32s; }

@keyframes mm-splash-dot {
    0%, 100% { opacity: .28; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.mm-splash-foot {
    position: absolute;
    right: 0;
    bottom: 24px;
    left: 0;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    font-family: var(--mm-font);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8b8b8b;
}

@media (min-width: 640px) {
    .mm-splash-logobox { width: 220px; }

    .mm-splash-logo { max-width: 220px; }
}

/* same 5 s, same fade-out, no pulse and no scale */
@media (prefers-reduced-motion: reduce) {
    .mm-splash { transition: none; }

    .mm-splash-logobox { animation: none; }

    .mm-splash-dots span {
        animation: none;
        opacity: .55;
        transform: none;
    }
}

/* the cover never reaches paper */
@media print {
    .mm-splash { display: none !important; }
}

@media (min-width: 640px) {
    .mm-qr-page { padding: 26px 0 44px; }

    .mm-qr {
        border-radius: 22px;
        box-shadow: 0 34px 70px -46px rgba(30, 16, 57, .45);
    }

    .mm-qr-cover {
        height: 220px;
        border-radius: 22px 22px 0 0;
    }

    .mm-qr-skcover { height: 220px; border-radius: 22px 22px 0 0; }

    .mm-qr-sec { padding: 22px 22px 6px; }

    .mm-qr-secname { font-size: 18px; }

    .mm-qr-name { font-size: 25px; }

    .mm-qr-thumb { width: 76px; height: 76px; }

    /* the spacer is now the last element, so it carries the card's bottom corners */
    .mm-qr-foot { border-radius: 0; }

    .mm-qr-spacer { border-radius: 0 0 22px 22px; }
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
    .mm-f-cols {
        grid-template-columns: 1.6fr 1fr 1.2fr;
        gap: 34px;
    }

    .mm-f-col-contact { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
    .mm-f-grid { grid-template-columns: repeat(2, 1fr); }

    .mm-hero-inner {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .mm-hero { padding: 40px 0 76px; }

    .mm-hero-left { max-width: 640px; }

    .mm-hero-right { justify-content: flex-start; }

    .mm-dash-wrap { max-width: 470px; }
}

@media (max-width: 820px) {
    .mm-f-cols { grid-template-columns: 1fr 1fr; }

    .mm-f-brand { grid-column: 1 / -1; }

    .mm-f-col-contact { grid-column: 1 / -1; }

    .mm-features { padding: 64px 0 70px; }

    .mm-sec-head { margin-bottom: 38px; }

    .mm-cta { padding: 56px 0 62px; }

    .mm-cta-card { padding: 40px 24px; border-radius: 24px; }

    .mm-footer { padding-top: 52px; }

    .mm-f-bottom { margin-top: 34px; }
}

@media (max-width: 560px) {
    .mm-wrap { padding: 0 18px; }

    .mm-nav-inner { min-height: 66px; }

    .mm-nav-logo-tile { --mm-logo-h: 28px; }

    .mm-auth-main { padding: 34px 0 58px; }

    .mm-auth-card { padding: 18px 16px 22px; border-radius: 16px; }

    .mm-auth-title { font-size: 19px; }

    .mm-input { font-size: 16px; }

    .mm-dbar-inner { min-height: 58px; gap: 10px; }

    .mm-dbar .mm-nav-logo-tile { --mm-logo-h: 26px; }

    .mm-dname { font-size: 13.5px; max-width: none; }

    .mm-dclock { font-size: 10.5px; max-width: none; }

    /* staff banner: text on one line, the button under it */
    .mm-staffbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .mm-staffbar-text { font-size: 12.5px; }

    .mm-staffbar-btn { width: 100%; }

    .mm-dmain { padding-top: 16px; padding-bottom: 56px; }

    .mm-dtitle { font-size: 20px; }

    .mm-dstats { gap: 10px; margin-top: 16px; }

    .mm-dstat { padding: 13px 12px; border-radius: 14px; }

    .mm-dstat-num { font-size: 23px; }

    .mm-dstat-lbl { font-size: 11px; }

    .mm-dcat { padding: 14px; border-radius: 14px; margin-bottom: 16px; }

    .mm-ddish { flex-wrap: wrap; align-items: center; gap: 10px 12px; }

    .mm-ddish-main { flex: 1 1 100%; }

    .mm-ddish-facts { flex: 1 1 auto; }

    .mm-ddish-actions { flex: 0 0 auto; margin-inline-start: auto; }

    .mm-dset { padding: 16px; border-radius: 16px; }

    .mm-pic { flex-direction: column; align-items: stretch; }

    .mm-pic-thumb,
    .mm-pic-logo,
    .mm-pic-cover { width: 100%; height: 150px; }

    .mm-pic-side { width: 100%; }

    .mm-pic-btn { width: 100%; justify-content: center; }

    .mm-adm-row { flex-direction: column; align-items: stretch; gap: 10px; }

    .mm-adm-actions .mm-btn { width: 100%; }

    .mm-code-box { justify-content: center; }

    .mm-code { font-size: 24px; letter-spacing: .16em; }

    .mm-code-box .mm-btn { width: 100%; }

    .mm-qr-card { padding: 16px; }

    .mm-qr-actions { flex-direction: column; }

    .mm-qr-actions .mm-btn { width: 100%; }

    .mm-sub-main { flex: 1 1 100%; }

    .mm-sub-actions { flex: 1 1 100%; }

    .mm-sub-act { flex: 1 1 auto; text-align: center; }

    .mm-rate-card { width: 100%; }

    .mm-ord-actions .mm-btn { width: 100%; }

    #mm-addmenu-modal .mm-dmodal-foot,
    #mm-delmenu-modal .mm-dmodal-foot {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    #mm-addmenu-modal .mm-dmodal-foot .mm-btn,
    #mm-delmenu-modal .mm-dmodal-foot .mm-btn { width: 100%; }

    .mm-dset-grid { grid-template-columns: 1fr; }

    .mm-addon-row {
        grid-template-columns: 1fr 34px;
        align-items: start;
    }

    .mm-addon-name,
    .mm-addon-ar,
    .mm-addon-price,
    .mm-addon-row .mm-addon-name,
    .mm-addon-row .mm-addon-ar,
    .mm-addon-row .mm-addon-price { grid-column: 1; }

    .mm-addon-x {
        grid-column: 2;
        grid-row: 1;
    }

    .mm-addon-head { display: none; }

    .mm-look-grid { grid-template-columns: 1fr; }

    .mm-hex { flex: 1 1 auto; width: auto; }

    .mm-dset-foot { justify-content: stretch; }

    .mm-dset-foot .mm-btn { width: 100%; }

    .mm-dmodal.is-open { align-items: flex-end; padding: 0; }

    .mm-dmodal-doc { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }

    .mm-dmodal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

    .mm-logo-type { font-size: 16px; }

    .mm-logo-mark { width: 34px; height: 34px; border-radius: 10px; }

    .mm-btn-sm { padding: 10px 16px; font-size: 12px; }

    .mm-h1 { letter-spacing: -1px; }

    .mm-hero-actions { gap: 10px; }

    .mm-hero-actions .mm-btn { width: 100%; }

    .mm-hero-stats { gap: 22px; }

    .mm-stat { padding-right: 22px; }

    .mm-stat-value { font-size: 26px; }

    .mm-f-grid { grid-template-columns: 1fr; }

    .mm-dash { padding: 16px; border-radius: 20px; }

    .mm-menu-list li { font-size: 12.5px; }

    .mm-phone {
        width: 96px;
        height: 176px;
        right: -6px;
        bottom: -12px;
        border-radius: 16px;
        padding: 8px 7px;
    }

    .mm-phone-item { font-size: 7.2px; padding: 4px 6px; }

    .mm-phone-btn { font-size: 6.4px; padding: 5px 3px; }

    .mm-menu-list { margin-right: 82px; }

    .mm-dash-actions { margin-right: 82px; }

    .mm-dot { width: 68px; height: 68px; left: 0; bottom: -10px; }

    .mm-f-cols { grid-template-columns: 1fr; gap: 30px; }

    .mm-f-brand { grid-column: auto; }

    .mm-f-col-contact { grid-column: auto; }

    .mm-f-bottom { flex-direction: column; align-items: flex-start; }

    .mm-f-legal { gap: 16px; }
}

/* the bar's live date + time on a narrow phone: one line, still readable,
   never wrapped and never pushing the restaurant name */
@media (max-width: 420px) {
    .mm-dclock { font-size: 10px; }
}

/* --------------------------------------- floating WhatsApp button (home only) */

/* Four layers, so no two animations fight over the same transform:
   .mm-wa-fab   = the fixed rail, pinned to the bottom-right corner.
   .mm-wa-track = tiny horizontal scroll nudge; the only element the scroll
                  handler writes a transform on.
   .mm-wa-bob   = the idle float keyframes.
   .mm-wa-btn   = the circular link itself (hover / press scale).          */

.mm-wa-fab {
    position: fixed;
    bottom: 24px;
    right: 20px; /* physical right edge in LTR and RTL alike */
    z-index: 60;
    width: 56px;
    height: 56px;
    direction: ltr;
    transform: none;
    pointer-events: none; /* only the circle takes clicks, not the halo */
}

.mm-wa-track {
    display: block;
    width: 100%;
    height: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform .25s ease-out;
    will-change: transform;
}

.mm-wa-bob {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    animation: mm-wa-bob 3s ease-in-out infinite alternate;
}

@keyframes mm-wa-bob {
    from { transform: translate3d(0, -3px, 0); }
    to { transform: translate3d(0, 3px, 0); }
}

.mm-wa-halo {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, .5);
    pointer-events: none;
    animation: mm-wa-pulse 2.2s ease-out infinite;
}

@keyframes mm-wa-pulse {
    from { transform: scale(1); opacity: .5; }
    to { transform: scale(1.5); opacity: 0; }
}

.mm-wa-btn {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, box-shadow .18s ease;
}

.mm-wa-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(37, 211, 102, .45);
}

.mm-wa-btn:active { transform: scale(.94); }

.mm-wa-btn:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .5);
    outline-offset: 3px;
}

.mm-wa-glyph {
    display: block;
    width: 30px;
    height: 30px;
    fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
    .mm-wa-bob { animation: none; transform: none; }

    .mm-wa-halo { animation: none; opacity: 0; }

    .mm-wa-fab { transform: none; }

    /* completely static: no nudge, no glide */
    .mm-wa-track {
        transform: none;
        transition: none;
        will-change: auto;
    }

    .mm-wa-btn { transition: none; }

    .mm-wa-btn:hover,
    .mm-wa-btn:active { transform: none; }
}

/* Phones: same bottom-right placement, 4px lower and 6px closer to the edge,
   and a smaller circle. */

@media (max-width: 640px) {
    .mm-wa-fab {
        bottom: 18px;
        right: 14px;
        width: 52px;
        height: 52px;
    }

    .mm-wa-glyph { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .mm-skel { animation: none; }

    .mm-btn,
    .mm-f-card { transition: none; }

    .mm-btn:hover,
    .mm-f-card:hover { transform: none; }
}

/* --------------------------------------------------------- POS / cashier */

/* The cashier screen borrows the public menu's option rows and quantity
   steppers (.mm-opt-*, .mm-qr-qty), so it carries the same accent variables —
   here set to the site brand purple instead of a restaurant's accent. */

.mm-pospage {
    --qr-accent: var(--mm-purple);
    --qr-on-accent: #ffffff;
    --qr-accent-soft: #F6CEF8;
    --qr-accent-pale: #FBEEFB;
    --qr-accent-mid: #EE91F3;
    --qr-hover: #FBEEFB;
    min-height: 100vh;
    background: var(--mm-lav);
}

.mm-pospage[dir="rtl"] { font-family: var(--mm-font-ar); }

/* ------------------------------- top bar ------------------------------- */

.mm-posbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #fff;
    border-bottom: 1px solid var(--mm-line);
    box-shadow: 0 14px 30px -26px rgba(30, 16, 57, .55);
}

/* ONE row at every width: the bar never wraps and never changes height. The
   brand takes whatever is left and its name truncates, so the controls pinned
   to the end (shift pill, clock, ⋯ — and today's controls on a wide screen)
   always keep their place and are never cut off. */

.mm-posbar-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    padding-top: 0;
    padding-bottom: 0;
}

.mm-posbrand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-decoration: none;
}

.mm-poslogo {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 13px;
    overflow: hidden;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.mm-poslogo-img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.mm-posnames {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.mm-pos-rest {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

.mm-pos-sub {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* the figures, the shift pill and the clock: they never wrap and never shrink,
   so nothing is ever cut off at the end of the bar */

.mm-posbar-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.mm-posstat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-posstatnum {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.2;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-posstatlabel {
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--mm-muted);
    white-space: nowrap;
}

.mm-posclock {
    flex: 0 0 auto;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.2px;
    color: var(--mm-purple);
    white-space: nowrap;
}

/* the cash shift in the same row: a quiet button while no shift is open, a
   pill with the opening time and the cash expected in the drawer while one is */

.mm-posshiftwrap {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.mm-posshift {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mm-purple);
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.mm-posshift:hover {
    background: #FBEEFB;
    border-color: #F6CEF8;
}

.mm-posshift.is-on {
    background: #FBEEFB;
    border-color: #F6CEF8;
    color: var(--mm-ink);
}

.mm-posshift-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.mm-posshift-txt { font-weight: 800; }

.mm-posshift-amt {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--mm-purple);
}

/* the summary inside the shift sheets */

.mm-posshift-sum { display: block; }

.mm-posshift-head {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-posshift-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 5px 0;
    font-size: 13px;
    color: var(--mm-body);
}

.mm-posshift-row + .mm-posshift-row { border-top: 1px dashed #F2EFF8; }

.mm-posshift-lbl { min-width: 0; }

.mm-posshift-row strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-posshift-row.is-total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-posshift-row.is-total strong {
    font-size: 15px;
    color: var(--mm-purple);
}

.mm-posshift-diff-row.is-pos strong { color: #067647; }

.mm-posshift-diff-row.is-neg strong { color: #B42318; }

/* the live difference line of the close sheet */
.mm-posshift-diff {
    margin: 12px 0 0;
    padding: 9px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    color: var(--mm-body);
    font-variant-numeric: tabular-nums;
}

.mm-posshift-diff.is-pos {
    color: #067647;
    background: #ECFDF3;
    border-color: #ABEFC6;
}

.mm-posshift-diff.is-neg {
    color: #B42318;
    background: #FEF3F2;
    border-color: #FECDCA;
}

.mm-posshift-empty {
    margin: 0;
    font-size: 13px;
    color: var(--mm-muted);
}

/* the employee's duty hours: from 10 minutes before the end (and for as long
   as the shift stays open after it) the pill pulses between its normal look
   and the app's warning amber, and the shift sheet says when it ends */

.mm-posshift.mm-shift-alert {
    border-color: #FED7AA;
    background: #FFF7ED;
    color: #C2410C;
    animation: mmShiftAlert 1.1s ease-in-out infinite;
}

.mm-posshift.mm-shift-alert .mm-posshift-amt { color: #C2410C; }

@keyframes mmShiftAlert {
    0%,
    100% {
        border-color: #FED7AA;
        background: #FFF7ED;
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
        transform: scale(1);
    }

    50% {
        border-color: #FB923C;
        background: #FFEDD5;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, .18);
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-posshift.mm-shift-alert {
        animation: none;
        border-color: #FB923C;
        background: #FFF7ED;
        box-shadow: none;
        transform: none;
    }
}

/* the small line in the shift sheet: the employee's end of duty */
.mm-posshift-note {
    margin: 10px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-body);
    text-align: center;
}

.mm-posshift-note.is-over {
    border-color: #FED7AA;
    background: #FFF7ED;
    color: #C2410C;
}

/* the drawer's two boxes on the shift sheet: the dollars and the pounds,
   side by side on a wide screen and one under the other on a phone */

.mm-posshift-boxes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.mm-posshift-box {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 13px;
    background: var(--mm-lav);
}

.mm-posshift-box-title {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -.1px;
    color: var(--mm-ink);
}

.mm-posshift-box .mm-posshift-row {
    padding: 4px 0;
    font-size: 12.5px;
}

.mm-posshift-box .mm-posshift-row strong { font-size: 12.5px; }

.mm-posshift-box .mm-posshift-row.is-total {
    margin-top: 2px;
    padding-top: 8px;
}

.mm-posshift-box .mm-posshift-row.is-total strong { font-size: 14px; }

/* the close sheet: two counted boxes, each with the expected value under it
   and the live difference below that */

.mm-posshift-close { display: block; }

.mm-posshift-close .mm-field { margin-top: 14px; }

.mm-posshift-exp {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
}

.mm-posshift-close .mm-posshift-diff { margin-top: 8px; }

@media (max-width: 560px) {
    .mm-posshift-boxes { grid-template-columns: minmax(0, 1fr); }
}

.mm-posbar-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-inline-start: 0;
}

/* the ⋯ button: the very last item of the bar, hidden while everything still
   fits inline (≥1200) and the way into the sheet below it */

.mm-pos-more {
    display: none;
    flex: 0 0 auto;
}

@media (max-width: 1199px) {
    .mm-pos-more { display: inline-flex; }
}

/* the calculator entry in the cashier top bar: icon + a short label on wide
   screens, a 40 x 40 icon button on a phone. The label follows the POS
   language through the page's own dir attribute. */

.mm-poscalc {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 40px;
    padding: 7px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.1px;
    line-height: 1.2;
    color: var(--mm-purple);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.mm-poscalc:hover {
    background: var(--mm-lav);
    border-color: #F6CEF8;
    color: #B403BF;
}

.mm-poscalc:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

.mm-poscalc-ico {
    display: inline-flex;
    align-items: center;
}

.mm-poscalc-ar { display: none; }

[dir="rtl"] .mm-poscalc-ar { display: inline; }

[dir="rtl"] .mm-poscalc-en { display: none; }

/* short forms — "Calc" / "حاسبة" — stay in the markup for a label that has to
   shrink; with the calculator inline only from 768px up, the full label always
   fits, so they are never shown. */
.mm-poscalc-en-s,
.mm-poscalc-ar-s { display: none; }

/* the staff strip: who is on the till and the way out. Only an employee signed
   in with a code sees it, and it only has room inline on a wide bar — below
   1200 the sheet carries the same Sign out. */

.mm-posstaff {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

.mm-posstaff-hello {
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 34vw;
}

.mm-posstaff-out {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mm-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.mm-posstaff-out:hover { color: #B403BF; }

.mm-posstaff-out:disabled {
    color: var(--mm-muted);
    cursor: default;
}

.mm-posstaff-out:focus-visible {
    outline: 2px solid rgba(136, 2, 144, .35);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------------------- the POS menu (⋯ sheet) ------------------------
   The same panel the dashboard's ⋯ opens: a dark sheet that slides in from
   the inline-end edge, over a dim backdrop, with the bar's controls inside.
   The rows reuse the dashboard's .mm-drow look. */

body.mm-pos-more-lock { overflow: hidden; }

.mm-posmore {
    position: fixed;
    inset: 0;
    z-index: 190;
    overflow: hidden;
    visibility: hidden;
    transition: visibility 0s linear .22s;
}

.mm-posmore.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.mm-posmore-bd {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .22s ease;
}

.mm-posmore.is-open .mm-posmore-bd { opacity: 1; }

.mm-posmore-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(88vw, 320px);
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 12px calc(14px + env(safe-area-inset-bottom));
    background: var(--mm-deep);
    color: #EFEAF7;
    box-shadow: -22px 0 48px -20px rgba(0, 0, 0, .6);
    transform: translateX(100%);
    transition: transform .22s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

/* the sheet comes in from the inline-end edge: the left one when the POS is
   reading right to left */
[dir="rtl"] .mm-posmore-panel {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 22px 0 48px -20px rgba(0, 0, 0, .6);
}

.mm-posmore.is-open .mm-posmore-panel { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
    .mm-posmore-panel,
    .mm-posmore-bd { transition-duration: 1ms; }
}

.mm-posmore-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 2px 12px;
    margin-bottom: 10px;
    background: var(--mm-deep);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.mm-posmore-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.3;
    color: #fff;
}

.mm-posmore-slash {
    padding: 0 1px;
    color: var(--mm-purple-light);
}

.mm-posmore-x {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .16s ease, border-color .16s ease;
}

.mm-posmore-x:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .34);
}

.mm-posmore-x:focus-visible {
    outline: 3px solid rgba(238, 145, 243, .6);
    outline-offset: 2px;
}

.mm-posmore-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 10px;
}

.mm-posmore-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

/* the two figures the bar shows, repeated: a plain row, not a button */
.mm-posmore-fact { cursor: default; }

.mm-posmore-fact:hover { background: rgba(255, 255, 255, .04); }

.mm-posmore-fig {
    flex: 0 0 auto;
    margin-inline-start: auto;
    font-size: 13.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #fff;
}

/* the currency and language switches */
.mm-posmore-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 7px 11px;
}

.mm-posmore-switch-lbl {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: #DCD5EA;
}

.mm-posmore-switch-lbl .rx-ar {
    font-size: 11.5px;
    font-weight: 600;
    color: #A79AC4;
}

.mm-posmore .mm-posseg {
    flex: 0 0 auto;
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
}

.mm-posmore .mm-posseg-btn { color: #CFC6E0; }

.mm-posmore .mm-posseg-btn:hover:not(:disabled) { color: #fff; }

.mm-posmore .mm-posseg-btn.is-active {
    background: rgba(180, 3, 191, .5);
    color: #fff;
    box-shadow: none;
}

.mm-posmore .mm-posseg-btn:focus-visible {
    outline: 2px solid rgba(238, 145, 243, .75);
    outline-offset: 2px;
}

/* small segmented controls: currency, language, order type, payment */

.mm-posseg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: #FBEEFB;
}

.mm-posseg-btn {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.1px;
    line-height: 1.2;
    color: #6F6788;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.mm-posseg-btn:hover:not(:disabled) { color: var(--mm-purple); }

.mm-posseg-btn.is-active {
    background: #fff;
    color: var(--mm-purple);
    box-shadow: 0 8px 18px -16px rgba(136, 2, 144, .95);
}

.mm-posseg-btn:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

.mm-posseg-btn:disabled {
    opacity: .45;
    cursor: default;
}

.mm-posseg-big {
    display: flex;
    width: 100%;
    background: var(--mm-lav);
}

.mm-posseg-big .mm-posseg-btn {
    flex: 1 1 0;
    padding: 10px 6px;
    font-size: 12.5px;
}

/* ------------------------------ two columns ---------------------------- */

.mm-posmain {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 96px;
    align-items: start;
}

.mm-posleft {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.mm-possearchinput {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 14px;
}

.mm-poschips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mm-poschips::-webkit-scrollbar { display: none; }

.mm-poschip {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    padding: 9px 16px;
    border: 1.5px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    color: #4B4463;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.mm-poschip:hover { border-color: #EE91F3; }

.mm-poschip.is-active {
    border-color: var(--mm-purple);
    background: var(--mm-purple);
    color: #fff;
}

.mm-poschip:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

/* ---- item cards ---- */

.mm-posgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.mm-poscard {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1.5px solid var(--mm-line);
    border-radius: 16px;
    background: #fff;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.mm-poscard:hover:not(:disabled) {
    border-color: #EE91F3;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -24px rgba(30, 16, 57, .6);
}

.mm-poscard:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

.mm-poscard.is-off {
    background: #F7F5FB;
    opacity: .55;
    cursor: not-allowed;
}

.mm-poscard-thumb {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #FBEEFB 0%, #F8F5FF 100%);
}

.mm-poscard-init {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: #C9A6E8;
}

.mm-poscard-img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-poscard-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-poscard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
}

.mm-poscard-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-purple);
    white-space: nowrap;
}

.mm-poscard-flag {
    padding: 3px 7px;
    border-radius: 999px;
    background: #F2EFF8;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--mm-muted);
    white-space: nowrap;
}

.mm-poscard-flag-opt {
    background: #FFF1E4;
    color: #B45309;
}

.mm-posempty {
    margin: 0;
    padding: 22px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* ---- right column ---- */

.mm-posright {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mm-posalert { margin: 0; }

.mm-posticket {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .5);
}

.mm-posticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-posh2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-posbadge {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--mm-purple);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.mm-posbadge-new { background: var(--mm-orange); }

.mm-posticket-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    max-height: 42vh;
    overflow-y: auto;
}

.mm-posline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--mm-line);
}

.mm-posline:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.mm-posline-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mm-posline-name {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-posline-addons {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-posline-unit {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-posline-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.mm-posline-total {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-posline-x {
    border: 0;
    padding: 2px 4px;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #B42318;
    cursor: pointer;
}

.mm-posline-x:hover { background: #FEF2F2; }

/* the menu's stepper, a touch smaller for a ticket row */
.mm-posticket .mm-qr-qbtn {
    width: 30px;
    height: 30px;
    font-size: 15px;
}

.mm-posticket .mm-qr-qnum {
    min-width: 22px;
    font-size: 13px;
}

.mm-posorder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--mm-line);
}

.mm-posorder .mm-field { margin-top: 0; }

/* the two cash boxes under the payment row: what the customer handed over in
   dollars and in pounds, the total due in both, the remaining and the change */

.mm-poscashpay { display: block; }

.mm-poscashpay .mm-field { margin-top: 0; }

.mm-poscashpay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.mm-poscash-figs {
    display: grid;
    gap: 5px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed var(--mm-line);
}

.mm-poscash-due strong { color: var(--mm-ink); }

.mm-poscash-due-alt strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-poscash-remaining strong { color: #B42318; }

.mm-poscash-change strong { color: #067647; }

.mm-poscash-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
}

.mm-poscash-switch-lbl {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--mm-body);
}

.mm-poscash-switch .mm-posseg { flex: 0 0 auto; }

/* the opening amount of each box, side by side in the open-shift sheet */
.mm-posshift-open-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.mm-posshift-rate {
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
    .mm-poscashpay-grid,
    .mm-posshift-open-grid { grid-template-columns: minmax(0, 1fr); }
}

/* the delivery fields stack with the same rhythm as the ticket itself */
#mm-pos-cust-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mm-posactions .mm-btn:disabled,
.mm-posmobile .mm-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mm-postotals {
    display: grid;
    gap: 6px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-posrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-posrow strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-posgrand {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--mm-line);
    font-size: 13.5px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-posgrand strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.7px;
    color: var(--mm-purple);
}

/* ---------------------------- coupon of the ticket ----------------------
   A code box and "Apply" under the manual discount, the applied code as a
   chip under them, and its own line in the totals between Discount and
   Total. New classes only — the ticket above is untouched. */

.mm-poscoupon {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.mm-poscoupon-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mm-poscoupon-apply {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mm-poscoupchip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin-top: 8px;
    padding-block: 4px;
    padding-inline: 10px 6px;
    border: 1px dashed #D8B4FE;
    border-radius: 999px;
    background: #FBEEFB;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--mm-purple);
}

.mm-poscoupchip-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
    overflow-wrap: anywhere;
}

.mm-poscoupchip-amt { white-space: nowrap; }

.mm-poscoupchip-x {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(136, 2, 144, .12);
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-poscoupchip-x:hover { background: rgba(136, 2, 144, .22); }

.mm-poscoupchip-x:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 1px;
}

.mm-poscouprow-lbl {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mm-poscouprow-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* ---------------------------- loyalty on the ticket ---------------------
   The "Points" button beside the phone, the member's card under it (with its
   redeem box) and the points line of the totals. New classes only. */

.mm-posphone {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.mm-posphone .mm-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.mm-pospoints-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
}

.mm-pospoints-btn:disabled {
    opacity: .45;
    cursor: default;
    transform: none;
}

.mm-posloy { margin-top: 8px; }

.mm-posloy-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 6px;
    padding-inline: 10px 6px;
    border: 1px solid #D8B4FE;
    border-radius: 12px;
    background: #FBEEFB;
    font-size: 12.5px;
    color: var(--mm-body);
}

.mm-posloy-name {
    min-width: 0;
    max-width: 100%;
    font-weight: 800;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-posloy-bal {
    font-weight: 700;
    color: var(--mm-purple);
    white-space: nowrap;
}

.mm-posloy-bal strong {
    font-size: 14px;
    font-weight: 800;
}

.mm-posloy-worth {
    font-weight: 800;
    color: #067647;
    white-space: nowrap;
}

.mm-posloy-x {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-inline-start: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(136, 2, 144, .12);
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-posloy-x:hover { background: rgba(136, 2, 144, .22); }

.mm-posloy-x:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 1px;
}

.mm-posloy-redeem {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.mm-posloy-rlbl {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
    white-space: nowrap;
}

.mm-posloy-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 8px 10px;
    font-size: 13.5px;
}

.mm-posloy-rval {
    flex: 0 0 auto;
    min-width: 52px;
    font-size: 12.5px;
    font-weight: 800;
    text-align: end;
    color: #067647;
    white-space: nowrap;
}

.mm-posloy-new {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-posloymsg {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #B45309;
}

/* the "+12 points for the customer" line of the last saved order */
.mm-posloyhint {
    margin: 0 0 10px;
    padding: 9px 12px;
    border: 1px solid #ABEFC6;
    border-radius: 12px;
    background: #ECFDF3;
    font-size: 12.5px;
    font-weight: 800;
    text-align: center;
    color: #067647;
}

.mm-posactions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.mm-posactions .mm-btn-block { margin-top: 0; }

.mm-posclear {
    align-self: center;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #B42318;
}

.mm-posclear:hover { text-decoration: underline; }

.mm-posspin {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-inline-end: 7px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mmSpin .8s linear infinite;
}

/* ---- recent orders rail ---- */

.mm-posrecent {
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 20px 40px -36px rgba(30, 16, 57, .45);
}

.mm-posrecent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-posrecent-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.1px;
    color: var(--mm-ink);
}

.mm-posrlist { display: block; }

.mm-posrrow {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-bottom: 1px solid #F5F1FC;
    font-size: 12px;
    color: var(--mm-body);
}

.mm-posrrow:last-child { border-bottom: 0; }

.mm-posr-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 7px;
    background: var(--mm-lav);
    color: var(--mm-purple);
}

.mm-posr-time {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--mm-ink);
}

.mm-posr-num {
    font-weight: 700;
    color: var(--mm-muted);
    white-space: nowrap;
}

/* time, with the cashier's name as a small muted line under it */
.mm-posr-when {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mm-posr-cashier {
    max-width: 30vw;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--mm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mm-posr-total {
    margin-inline-start: auto;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-posr-print {
    border: 0;
    padding: 3px 6px;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--mm-purple);
    white-space: nowrap;
    cursor: pointer;
}

.mm-posr-print:hover { background: #FBEEFB; }

/* ---- phone sticky bar ---- */

.mm-posmobile { display: none; }

@media (min-width: 981px) {
    .mm-posright {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        padding-inline-end: 2px;
    }
}

@media (max-width: 980px) {
    .mm-posmain {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding-bottom: 118px;
    }

    .mm-posright { width: 100%; }

    .mm-posseg-btn { padding: 7px 10px; }

    .mm-posgrid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

    .mm-posticket-body { max-height: none; }

    .mm-posmobile {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--mm-line);
        box-shadow: 0 -14px 30px -26px rgba(30, 16, 57, .6);
    }

    .mm-posmobile-total {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .mm-posmobile-label {
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--mm-muted);
    }

    .mm-posmobile-total strong {
        font-size: 17px;
        font-weight: 800;
        letter-spacing: -.4px;
        color: var(--mm-purple);
        white-space: nowrap;
    }

    .mm-posmobile .mm-btn {
        padding: 12px 22px;
        font-size: 13.5px;
        white-space: nowrap;
    }
}

@media (max-width: 560px) {
    .mm-posgrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }

    .mm-poscard { padding: 8px; border-radius: 14px; }

    .mm-poscard-name { font-size: 12.5px; }

    .mm-posseg-btn { padding: 6px 9px; font-size: 11px; }

    .mm-posorder { padding: 12px 13px 14px; }

    .mm-posticket-head { padding: 11px 13px; }

    .mm-posgrand strong { font-size: 20px; }
}

/* ---------------------- POS top bar: one row, always ----------------------
   The bar keeps a single line at every width. What does not fit steps aside
   into the ⋯ sheet — the brand never stops growing, so it is the only thing
   that gives up space, and its name truncates instead of pushing a control
   out of the bar. */

/* 768–1199: the two figures, currency, language, Dashboard and the staff
   strip live in the sheet; the calculator stays inline */
@media (max-width: 1199px) {
    .mm-posstat { display: none; }

    .mm-posstaff { display: none; }

    #mm-pos-curseg,
    #mm-pos-langseg,
    #mm-pos-back { display: none; }

    #mm-pos-calc { min-height: 38px; padding: 6px 12px; }

    .mm-posclock { font-size: 12.5px; }
}

/* <768: the name only, and the calculator moves into the sheet too */
@media (max-width: 767px) {
    .mm-posbar-inner {
        height: 54px;
        min-height: 54px;
        max-height: 54px;
        gap: 8px;
    }

    .mm-pos-sub { display: none; }

    #mm-pos-calc { display: none; }

    .mm-pos-more {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 13px;
    }

    .mm-posclock {
        font-size: 12px;
        padding: 0 2px;
    }

    .mm-posshift {
        gap: 5px;
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* <480: the shift pill keeps its label and its opening time, and drops the
   amount so the clock can stay whole */
@media (max-width: 479px) {
    .mm-posshift-amt { display: none; }

    .mm-posclock { font-size: 11px; }
}

/* the narrowest phones: the pill keeps its word, the icon steps out, and
   everything still fits on the one line */
@media (max-width: 360px) {
    .mm-posbar-inner { gap: 6px; }

    .mm-poslogo {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 15px;
    }

    .mm-posbrand { gap: 6px; }

    .mm-posshift-ico { display: none; }

    .mm-posclock {
        font-size: 10px;
        padding: 0;
    }

    .mm-pos-more {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
}

/* the POS never prints itself, only the receipts it builds */
@media print {
    .mm-posshell,
    .mm-posmobile,
    .mm-pos-toast { display: none !important; }

    .mm-po-type {
        margin: 2mm 0 0;
        font-size: 11pt;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #000;
    }

    .mm-po-pay {
        margin: 1mm 0 0;
        font-size: 9.5pt;
        font-weight: 700;
        color: #000;
    }
}

/* --------------------------------------------------- print: QR table card */

.mm-print-card { display: none; }
.mm-print-orders { display: none; }
.mm-print-shift { display: none; }

@media print {
    @page {
        size: A5 portrait;
        margin: 10mm;
    }

    /* nothing but the requested print block reaches the paper */
    body * { visibility: hidden !important; }

    body:not(.mm-printing-orders) .mm-print-card,
    body:not(.mm-printing-orders) .mm-print-card * { visibility: visible !important; }

    body.mm-printing-orders .mm-print-orders,
    body.mm-printing-orders .mm-print-orders * { visibility: visible !important; }

    body.mm-printing-shift .mm-print-shift,
    body.mm-printing-shift .mm-print-shift * { visibility: visible !important; }

    /* nothing else takes space on the paper */
    .mm-dpage > *:not(.mm-print-card):not(.mm-print-orders):not(.mm-print-shift) { display: none !important; }

    body.mm-printing-orders .mm-print-card { display: none !important; }
    body:not(.mm-printing-orders) .mm-print-orders { display: none !important; }

    body:not(.mm-printing-orders) .mm-print-card {
        display: block !important;
        width: 100%;
        background: #fff;
        text-align: center;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.mm-printing-orders .mm-print-orders {
        display: block !important;
        width: 100%;
        background: #fff;
        color: #000;
        font-family: var(--mm-font);
    }

    /* a shift statement prints alone: after the two rules above, so it wins */
    body.mm-printing-shift .mm-print-card,
    body.mm-printing-shift .mm-print-orders { display: none !important; }

    body.mm-printing-shift .mm-print-shift {
        display: block !important;
        width: 100%;
        background: #fff;
        color: #000;
        font-family: var(--mm-font);
    }

    .mm-print-logo { margin: 0 auto 6mm; }

    .mm-print-logo img {
        max-width: 40mm;
        max-height: 26mm;
        object-fit: contain;
    }

    .mm-print-name {
        margin: 0;
        font-family: var(--mm-font);
        font-size: 20pt;
        font-weight: 800;
        letter-spacing: -.3pt;
        color: #880290;
    }

    .mm-print-rule {
        display: block;
        width: 26mm;
        height: 1.4mm;
        margin: 3mm auto 0;
        border-radius: 999px;
        background: #F97316;
    }

    .mm-print-line {
        margin: 3.5mm 0 0;
        font-size: 12pt;
        font-weight: 700;
        line-height: 1.3;
        color: #271250;
    }

    .mm-print-line-ar {
        margin: 1.5mm 0 0;
        font-size: 12pt;
        font-weight: 700;
        line-height: 1.5;
        color: #271250;
    }

    /* the code itself stays black on white so any printer can scan it */
    .mm-print-qr {
        margin: 7mm auto 0;
        width: 95mm;
        max-width: 100%;
    }

    .mm-print-qr svg {
        display: block;
        width: 95mm;
        height: auto;
    }

    .mm-print-link {
        margin: 5mm 0 0;
        font-size: 8pt;
        line-height: 1.4;
        color: #6F6788;
        word-break: break-all;
    }

    /* ------------------------- printed order receipt ---------------------- */

    .mm-print-order {
        color: #000;
        font-size: 10.5pt;
        line-height: 1.45;
        page-break-after: always;
        break-after: page;
    }

    /* the last receipt must not force a page break — the date/time stamp line
       follows it in the printed orders block, so :last-of-type is what keeps
       one sheet per receipt with no trailing blank page */
    .mm-print-order:last-child,
    .mm-print-order:last-of-type {
        page-break-after: auto;
        break-after: auto;
    }

    .mm-po-rest {
        margin: 0;
        font-size: 17pt;
        font-weight: 800;
        letter-spacing: -.2pt;
        color: #000;
    }

    .mm-po-contact {
        margin: 1.5mm 0 0;
        font-size: 9.5pt;
        color: #000;
    }

    .mm-po-label {
        display: block;
        margin: 6mm 0 0;
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: #000;
    }

    .mm-po-date {
        margin: 1.5mm 0 0;
        font-size: 13pt;
        font-weight: 700;
        color: #000;
    }

    .mm-po-ref {
        margin: 1mm 0 0;
        font-size: 9.5pt;
        font-weight: 700;
        color: #000;
    }

    /* the cashier who took the order, only printed when the order has one */
    .mm-po-cashier {
        margin: 1mm 0 0;
        font-size: 9.5pt;
        font-weight: 700;
        color: #000;
    }

    .mm-po-customer {
        margin: 3mm 0 0;
        font-size: 10.5pt;
        color: #000;
    }

    .mm-po-table {
        width: 100%;
        margin: 5mm 0 0;
        border-collapse: collapse;
        font-size: 10pt;
        color: #000;
    }

    .mm-po-table th,
    .mm-po-table td {
        padding: 1.6mm 1mm;
        text-align: left;
        vertical-align: top;
        border-bottom: .3mm solid #000;
    }

    .mm-po-table th {
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .mm-po-table tbody td { border-bottom: .2mm solid #bbb; }

    .mm-po-addons {
        font-size: 8.5pt;
        color: #000;
    }

    .mm-po-qty {
        width: 14mm;
        text-align: center;
    }

    .mm-po-money {
        width: 26mm;
        text-align: right;
        white-space: nowrap;
    }

    .mm-po-total-label {
        font-weight: 800;
        text-transform: uppercase;
        border-bottom: none;
    }

    .mm-po-total {
        font-size: 12pt;
        font-weight: 800;
        border-bottom: none;
    }

    .mm-po-note {
        margin: 5mm 0 0;
        padding: 3mm;
        border: .35mm solid #000;
        color: #000;
    }

    .mm-po-note-label {
        display: block;
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .mm-po-note p {
        margin: 1.5mm 0 0;
        font-size: 10pt;
    }

    .mm-po-addr {
        margin: 5mm 0 0;
        color: #000;
    }

    .mm-po-addr .mm-po-label { margin-top: 0; }

    .mm-po-addr p {
        margin: 1.5mm 0 0;
        font-size: 10pt;
    }

    .mm-po-map {
        font-size: 8.5pt;
        word-break: break-all;
    }

    .mm-po-footer {
        margin: 7mm 0 0;
        padding-top: 2mm;
        border-top: .2mm solid #bbb;
        font-size: 7.5pt;
        color: #000;
    }

    /* The date and time of printing, never the order's own time (that line
       stays where it is). Last line of the printed QR card, of the printed
       orders block and of every POS receipt: small, muted black, centred, no
       box and no background. The print hosts are hidden on screen, so this
       only ever reaches paper. */
    .mm-print-stamp,
    .mm-po-stamp {
        margin: 4mm 0 0;
        padding: 0;
        font-family: var(--mm-font);
        font-size: 9pt;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: normal;
        text-align: center;
        color: #3F3F46;
        background: none;
        border: 0;
    }

    /* under the QR card's last line */
    .mm-print-card .mm-print-stamp { margin-top: 6mm; }

    /* ----------------------- printed shift statement ------------------- */

    .mm-print-shiftdoc {
        color: #000;
        font-size: 10.5pt;
        line-height: 1.45;
    }

    .mm-ps-rest {
        margin: 0;
        font-size: 17pt;
        font-weight: 800;
        letter-spacing: -.2pt;
        color: #000;
    }

    .mm-ps-title {
        margin: 1.5mm 0 0;
        font-size: 12.5pt;
        font-weight: 800;
        letter-spacing: .02em;
        color: #000;
    }

    .mm-ps-title-ar {
        margin: 1mm 0 0;
        font-size: 12pt;
        font-weight: 800;
        color: #000;
    }

    .mm-ps-meta {
        margin: 2.5mm 0 0;
        font-size: 10pt;
        color: #000;
    }

    .mm-ps-meta-lbl { font-weight: 600; }

    .mm-ps-meta strong { font-weight: 800; }

    .mm-ps-table {
        width: 100%;
        margin: 5mm 0 0;
        border-collapse: collapse;
        font-size: 10.5pt;
        color: #000;
    }

    .mm-ps-table td {
        padding: 1.7mm 1mm;
        vertical-align: top;
        border-bottom: .2mm solid #bbb;
    }

    .mm-ps-lbl { text-align: start; }

    .mm-ps-lbl-ar { font-size: 9.5pt; }

    .mm-ps-val {
        text-align: end;
        font-weight: 700;
        white-space: nowrap;
    }

    .mm-ps-table tr.mm-ps-strong td {
        border-bottom: .3mm solid #000;
        font-weight: 800;
    }

    /* the two boxes of the drawer and the orders that follow them */
    .mm-ps-box-title {
        margin: 5mm 0 0;
        font-size: 11pt;
        font-weight: 800;
        letter-spacing: .01em;
        color: #000;
        break-after: avoid;
    }

    .mm-ps-box-title .mm-ps-lbl-ar {
        font-size: 9.5pt;
        font-weight: 600;
    }

    .mm-ps-table-sub {
        margin: 1.5mm 0 0;
        font-size: 9.5pt;
    }

    .mm-ps-table-sub td { border-bottom: .15mm dotted #999; }

    .mm-ps-table thead .mm-ps-th {
        padding: 0 1mm 1mm;
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
        text-align: start;
        border-bottom: .25mm solid #000;
    }

    .mm-ps-table thead .mm-ps-th.mm-ps-val { text-align: end; }

    .mm-ps-nowrap { white-space: nowrap; }

    .mm-ps-note {
        margin: 5mm 0 0;
        padding: 3mm;
        border: .35mm solid #000;
        color: #000;
    }

    .mm-ps-note-label {
        display: block;
        font-size: 8.5pt;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .mm-ps-note p {
        margin: 1.5mm 0 0;
        font-size: 10pt;
    }

    /* the moment of printing, exactly like the receipts carry it */
    .mm-ps-stamp {
        margin: 6mm 0 0;
        padding: 0;
        font-size: 9pt;
        font-weight: 600;
        text-align: center;
        color: #3F3F46;
        background: none;
        border: 0;
    }
}

/* ----------------------------------------------------------- accounting */

/* The Accounting tab (dashboard): period bar, four stat cards, a six-month
   bar chart built from plain divs, the expenses list and its add/edit modal.
   It is an addition only — every class below is new and prefixed mm-acc-. */

#mm-dtab-accounting { white-space: nowrap; }

.mm-ar-inline {
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

/* sub tabs */

.mm-acc-subtabs {
    display: inline-flex;
    gap: 6px;
    max-width: 100%;
    margin-top: 12px;
    padding: 5px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    border-radius: 999px;
}

.mm-acc-subtab {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #6F6788;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.mm-acc-subtab .rx-ar {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-subtab:hover { color: var(--mm-purple); }

.mm-acc-subtab.is-active {
    background: #fff;
    color: var(--mm-purple);
    box-shadow: 0 10px 20px -16px rgba(136, 2, 144, .95);
}

.mm-acc-subtab.is-active .rx-ar {
    color: var(--mm-purple);
    opacity: .85;
}

.mm-acc-subtab:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

/* period bar */

.mm-acc-period {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-top: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-acc-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mm-acc-qbtn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #4B4463;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.mm-acc-qbtn .rx-ar {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-qbtn:hover {
    border-color: #F6CEF8;
    color: var(--mm-purple);
}

.mm-acc-qbtn.is-active {
    background: #FBEEFB;
    border-color: #F6CEF8;
    color: var(--mm-purple);
}

.mm-acc-qbtn.is-active .rx-ar {
    color: var(--mm-purple);
    opacity: .85;
}

.mm-acc-qbtn:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 2px;
}

.mm-acc-dates {
    display: flex;
    gap: 10px;
    margin-inline-start: auto;
}

.mm-acc-date {
    display: block;
    margin: 0;
}

.mm-acc-date .mm-label {
    margin-bottom: 4px;
    font-size: 11px;
}

.mm-acc-date .mm-input {
    width: 158px;
    padding: 9px 11px;
    font-size: 13px;
}

.mm-acc-newexp {
    flex: 0 0 auto;
}

/* the line under the period bar: the range actually shown, and its currency */

.mm-acc-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-note .rx-ar { font-size: 11.5px; }

.mm-acc-note:empty { display: none; }

.mm-acc-note-cur {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #FBEEFB;
    color: var(--mm-purple);
    font-size: 11px;
    font-weight: 800;
}

/* stat cards */

.mm-acc-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.mm-acc-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.15;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-acc-alt {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
    white-space: nowrap;
}

.mm-acc-stat-lbl {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-acc-stat-lbl .rx-ar {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-net.is-pos .mm-acc-stat-num { color: #067647; }
.mm-acc-net.is-neg .mm-acc-stat-num { color: #B42318; }

/* cards (chart, categories) */

.mm-acc-card {
    margin-top: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-acc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.mm-acc-card-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-acc-card-title .rx-ar {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-acc-leg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mm-acc-leg .rx-ar { font-size: 11px; color: var(--mm-muted); }

.mm-acc-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.mm-acc-dot-sales { background: var(--mm-purple); }
.mm-acc-dot-exp { background: var(--mm-orange); }

/* the six-month chart: plain divs, no library and no images */

.mm-acc-chart { margin-top: 12px; }

.mm-acc-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
}

.mm-acc-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mm-acc-pair {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 132px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-acc-bar {
    display: block;
    width: 14px;
    min-height: 2px;
    border-radius: 5px 5px 0 0;
}

.mm-acc-bar-sales { background: linear-gradient(180deg, #B403BF 0%, #880290 100%); }
.mm-acc-bar-exp { background: linear-gradient(180deg, #FB923C 0%, var(--mm-orange) 100%); }
.mm-acc-bar.is-zero { min-height: 2px; background: #F2EFF8; }

.mm-acc-glabel {
    display: block;
    margin-top: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--mm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mm-acc-chart-empty {
    margin: 18px 0 4px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--mm-muted);
}

.mm-acc-chart-empty .rx-ar { display: block; }

/* expenses by category */

.mm-acc-cats {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.mm-acc-cat-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.mm-acc-cat-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-acc-cat-name .rx-ar {
    margin-inline-start: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-cat-amt {
    flex: 0 0 auto;
    text-align: end;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-acc-cat-amt .mm-acc-alt {
    margin-top: 1px;
    font-size: 10.5px;
}

.mm-acc-cat-track {
    position: relative;
    height: 8px;
    margin-top: 6px;
    border-radius: 999px;
    background: #F2EFF8;
    overflow: hidden;
}

.mm-acc-cat-fill {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #B403BF 0%, var(--mm-purple) 100%);
}

.mm-acc-cat-pct {
    display: block;
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-acc-cats-empty {
    margin: 14px 0 4px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--mm-muted);
}

.mm-acc-cats-empty .rx-ar { display: block; }

/* the expenses list */

.mm-acc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 16px;
}

.mm-acc-filters .mm-field {
    flex: 1 1 220px;
    margin-top: 0;
}

.mm-acc-filters .mm-acc-search { flex: 2 1 260px; }

.mm-acc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-acc-loading .mm-dspin {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.mm-acc-loading .rx-ar { font-size: 12px; color: var(--mm-muted); }

.mm-acc-thead {
    display: grid;
    grid-template-columns: 96px 128px minmax(0, 1fr) 118px 132px 104px 92px;
    gap: 10px;
    padding: 0 15px 6px;
    margin-top: 16px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-acc-list { display: block; }

.mm-acc-row {
    display: grid;
    grid-template-columns: 96px 128px minmax(0, 1fr) 118px 132px 104px 92px;
    gap: 10px;
    align-items: center;
    padding: 12px 15px;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-acc-cell { min-width: 0; }

.mm-acc-cell-date .mm-acc-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-body);
    white-space: nowrap;
}

.mm-acc-catname {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-acc-catar {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    color: var(--mm-muted);
}

.mm-acc-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-acc-rownote {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--mm-muted);
    overflow-wrap: anywhere;
}

.mm-acc-vendor { font-size: 12.5px; color: var(--mm-body); overflow-wrap: anywhere; }

.mm-acc-muted { font-size: 12px; color: var(--mm-muted); }

.mm-acc-amt {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-acc-cell-amount .mm-acc-alt { font-size: 10.5px; }

.mm-acc-pay {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1.25;
}

.mm-acc-pay .rx-ar { font-size: 10px; font-weight: 600; }

.mm-acc-acts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mm-acc-total {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-acc-total strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-acc-total .mm-acc-alt { margin-top: 2px; }

.mm-acc-total-ar {
    display: block;
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-body);
}

/* the add / edit and delete modals */

.mm-acc-spin {
    width: 14px;
    height: 14px;
    border-width: 2px;
    flex: 0 0 auto;
}

.mm-acc-del-what {
    margin: 0 0 4px;
    padding: 10px 12px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-acc-del-what strong { color: var(--mm-ink); }

.mm-acc-del-ar {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--mm-muted);
}

@media (max-width: 900px) {
    .mm-acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .mm-acc-stat-num { font-size: 20px; }
}

@media (max-width: 780px) {
    .mm-acc-period { padding: 12px; }

    .mm-acc-quick { width: 100%; }

    .mm-acc-qbtn { flex: 1 1 auto; justify-content: center; }

    .mm-acc-dates {
        width: 100%;
        margin-inline-start: 0;
    }

    .mm-acc-date { flex: 1 1 0; min-width: 0; }

    .mm-acc-date .mm-input { width: 100%; }

    .mm-acc-newexp { width: 100%; }

    .mm-acc-thead { display: none; }

    .mm-acc-card { padding: 14px; }

    .mm-acc-pair { height: 108px; }

    .mm-acc-bar { width: 10px; }

    .mm-acc-row {
        display: block;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .mm-acc-cell {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 5px 0;
        border-bottom: 1px dashed #F2EFF8;
    }

    .mm-acc-cell:last-child { border-bottom: 0; }

    .mm-acc-cell::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: .03em;
        text-transform: uppercase;
        color: var(--mm-muted);
    }

    .mm-acc-val {
        margin-inline-start: auto;
        text-align: end;
        min-width: 0;
    }

    .mm-acc-cell-date .mm-acc-val { white-space: normal; }

    .mm-acc-catname,
    .mm-acc-catar,
    .mm-acc-amt,
    .mm-acc-cell-amount .mm-acc-alt { text-align: end; }

    .mm-acc-pay {
        align-items: flex-end;
        text-align: end;
    }

    .mm-acc-cell-acts {
        justify-content: flex-end;
        padding-top: 10px;
        border-bottom: 0;
    }

    .mm-acc-cell-acts::before { content: none; }

    .mm-acc-acts { margin-inline-start: auto; }
}

@media (max-width: 420px) {
    .mm-acc-stats { gap: 10px; }

    .mm-acc-stat-num { font-size: 18px; }

    .mm-acc-card { padding: 12px; }

    .mm-acc-pair { height: 96px; }

    .mm-acc-glabel { font-size: 10px; }
}

@media (max-width: 560px) {
    #mm-exp-modal .mm-dfield-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-acc-subtab,
    .mm-acc-qbtn { transition: none; }
}

/* ------------------------------------------------- accounting, part two */

/* Other income, payroll, suppliers and the Excel export were added to the
   tab later: five stat cards, a breakdown line, two category cards, and one
   row grid per list kind. Everything below is new and prefixed mm-acc-. */

/* the five cards on the overview */

.mm-acc-stats.mm-acc-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.mm-acc-unpaid.is-warn .mm-acc-stat-num { color: #C2410C; }

/* the breakdown line under the cards */

.mm-acc-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 14px 0 0;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-acc-breakdown:empty { display: none; }

.mm-acc-bd-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    font-size: 12px;
}

.mm-acc-bd-lbl {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-acc-bd-lbl .rx-ar {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-acc-bd-amt {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-acc-bd-alt {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
    white-space: nowrap;
}

/* the two category cards, side by side when there is room */

.mm-acc-cards2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mm-acc-cat-fill.is-in { background: linear-gradient(90deg, #FB923C 0%, var(--mm-orange) 100%); }

/* the outgoing bar and its legend dot wear the client's orange */

.mm-acc-bar-exp { background: linear-gradient(180deg, #FB923C 0%, #FF751F 100%); }

.mm-acc-dot-exp { background: #FF751F; }

/* the payroll and suppliers blocks: two lists one under the other */

.mm-acc-block { margin-top: 20px; }

.mm-acc-block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-acc-block-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mm-acc-mini-search {
    width: 190px;
    padding: 9px 11px;
    font-size: 13px;
}

.mm-acc-statusfilter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mm-acc-block .mm-acc-thead { margin-top: 12px; }

/* the duty detection entry point at the top of the payroll sub-tab: the
   client's purple for the button and the link, their orange on the small
   icon only. It wears .mm-acc-card, so radius, border, padding and shadow
   are the ones every other card in the tab already has. */

.mm-duty-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
}

.mm-duty-head {
    flex: 1 1 320px;
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 12px;
}

.mm-duty-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(135deg, #FF9A4D 0%, #FF751F 100%);
    color: #fff;
    box-shadow: 0 10px 18px -12px rgba(255, 117, 31, .95);
}

.mm-duty-ico svg { display: block; }

.mm-duty-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.mm-duty-title {
    display: block;
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

/* in Arabic the title is the main title, so it keeps its size and only
   drops the tight Latin letter-spacing */
.mm-duty-title .rx-ar {
    display: inline-block;
    letter-spacing: 0;
}

.mm-duty-text {
    margin: 5px 0 0;
    max-width: 62ch;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--mm-body);
}

.mm-duty-actions {
    flex: 0 1 auto;
    min-width: 0;
}

.mm-duty-open {
    padding: 12px 22px;
    font-size: 14px;
}

.mm-duty-open svg { flex: 0 0 auto; }

.mm-duty-more {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
}

.mm-duty-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 1px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
    border-bottom: 1px solid rgba(136, 2, 144, .3);
}

.mm-duty-link:hover {
    color: #B403BF;
    border-bottom-color: currentColor;
}

.mm-duty-link:focus-visible {
    outline: 2px solid rgba(136, 2, 144, .35);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 780px) {
    .mm-duty-actions { flex: 1 1 100%; }
    .mm-duty-open { width: 100%; }
}

@media (max-width: 560px) {
    .mm-duty-ico { width: 30px; height: 30px; border-radius: 10px; }
    .mm-duty-title { font-size: 14px; }
    .mm-duty-text { font-size: 12.5px; }
}

/* an unpaid invoice reads orange, a paid one green (mm-dpill-on) */

.mm-acc-pay.is-warn {
    background: #FFF7ED;
    color: #C2410C;
}


.mm-acc-outstanding {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--mm-line);
}

.mm-acc-outstanding:empty { display: none; }

.mm-acc-outstanding strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-ink);
}

/* one row grid per list kind (the base rules above are the expenses grid) */

.mm-acc-thead.mm-acc-grid-inc,
.mm-acc-grid-inc .mm-acc-row {
    grid-template-columns: 96px 140px minmax(0, 1fr) 132px 112px 122px;
}

.mm-acc-thead.mm-acc-grid-pay,
.mm-acc-grid-pay .mm-acc-row {
    grid-template-columns: 92px minmax(0, 1fr) 104px 96px 128px 104px 122px;
}

.mm-acc-thead.mm-acc-grid-staff,
.mm-acc-grid-staff .mm-acc-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 128px 150px 118px 122px;
}

.mm-acc-thead.mm-acc-grid-sup,
.mm-acc-grid-sup .mm-acc-row {
    grid-template-columns: minmax(0, 1.2fr) 130px minmax(0, 1.2fr) 130px 118px 122px;
}

.mm-acc-thead.mm-acc-grid-inv,
.mm-acc-grid-inv .mm-acc-row {
    grid-template-columns: 92px minmax(0, 1fr) 106px 104px 128px 118px 104px 122px;
}

/* ---------------------- shift statements (POS drawer) ---------------------
   A card at the end of the Accounting tab, listing the shifts closed on the
   POS, plus the sheet that opens on "View". Every class is new and prefixed
   mm-shift- / mm-acc-grid-shift. */

.mm-shifts-block { margin-top: 28px; }

.mm-acc-thead.mm-acc-grid-shift,
.mm-acc-grid-shift .mm-acc-row {
    grid-template-columns: 112px minmax(0, 1fr) 64px 104px 124px 124px 124px 212px;
}

/* a closed shift keeps two boxes: the dollars of the box over the pounds, so
   the expected, counted and difference cells carry two figures */
.mm-acc-grid-shift .mm-acc-cell-money .mm-acc-amt {
    font-size: 12.5px;
    white-space: nowrap;
}

.mm-acc-grid-shift .mm-acc-cell-money .mm-acc-alt {
    font-size: 10.5px;
    white-space: nowrap;
}

/* three small buttons in one row: they may sit on two lines inside the cell
   rather than push the row wider than the card */
.mm-acc-grid-shift .mm-acc-acts {
    flex-wrap: wrap;
    gap: 8px;
}

.mm-acc-cell-orders .mm-acc-vendor { font-weight: 700; color: var(--mm-ink); }

.mm-acc-cell-money .mm-acc-vendor {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-shift-diff.is-pos { color: #067647; }

.mm-shift-diff.is-neg { color: #B42318; }

/* one statement, inside the modal */

.mm-shift-figs { display: block; }

.mm-shift-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 6px 0;
    font-size: 13px;
    color: var(--mm-body);
}

.mm-shift-line + .mm-shift-line { border-top: 1px dashed #F2EFF8; }

.mm-shift-lbl { min-width: 0; }

.mm-shift-line strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-shift-line.is-total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-shift-line.is-total strong {
    font-size: 15px;
    color: var(--mm-purple);
}

.mm-shift-diff.is-pos strong { color: #067647; }

.mm-shift-diff.is-neg strong { color: #B42318; }

/* the drawer's two boxes: the dollars and the pounds, side by side on a wide
   screen and one under the other on a phone */

.mm-shift-boxes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.mm-shift-box {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 13px;
    background: var(--mm-lav);
}

.mm-shift-box-title {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-shift-box .mm-shift-line {
    padding: 5px 0;
    font-size: 12.5px;
}

.mm-shift-box .mm-shift-line strong { font-size: 12.5px; }

.mm-shift-box .mm-shift-line.is-total {
    margin-top: 2px;
    padding-top: 8px;
}

.mm-shift-box .mm-shift-line.is-total strong { font-size: 14px; }

/* one other cash movement of that box */
.mm-shift-line.mm-shift-move strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-shift-line.mm-shift-move .mm-shift-lbl {
    font-size: 11.5px;
    color: var(--mm-muted);
    font-weight: 600;
}

@media (max-width: 560px) {
    .mm-shift-boxes { grid-template-columns: minmax(0, 1fr); }
}

/* the orders of that shift */

.mm-shift-orders { margin-top: 18px; }

.mm-shift-orders-title {
    margin: 0 0 8px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-shift-orders-title .rx-ar {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-shift-ordhead,
.mm-shift-ord {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.15fr) 104px;
    gap: 10px;
    align-items: center;
}

.mm-shift-ordhead {
    padding: 0 12px 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-shift-ord {
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    border-radius: 11px;
    font-size: 12.5px;
    color: var(--mm-body);
}

.mm-shift-ord-time {
    font-weight: 700;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
}

.mm-shift-ord-type { overflow-wrap: anywhere; }

.mm-shift-ord-pay {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.mm-shift-ord-total {
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
    text-align: end;
}

.mm-shift-empty {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: var(--mm-muted);
}

@media (max-width: 560px) {
    /* phones: the time, the type over the payment, and the total on the end */
    .mm-shift-ordhead { display: none; }

    .mm-shift-ord {
        grid-template-columns: 56px minmax(0, 1fr) 88px;
        grid-template-areas:
            "time type total"
            "time pay total";
        row-gap: 2px;
    }

    .mm-shift-ord-time { grid-area: time; }

    .mm-shift-ord-type { grid-area: type; }

    .mm-shift-ord-pay {
        grid-area: pay;
        font-size: 11.5px;
        color: var(--mm-muted);
    }

    .mm-shift-ord-total { grid-area: total; }
}

/* the export button at the end of the period bar */

.mm-acc-export {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mm-acc-export svg { flex: 0 0 auto; }

@media (max-width: 1040px) {
    .mm-acc-stats.mm-acc-stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .mm-acc-cards2 { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 900px) {
    .mm-acc-stats.mm-acc-stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    /* five sub-tabs no longer fit: the row scrolls sideways instead */
    .mm-acc-subtabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 16px;
    }

    .mm-acc-subtabs::-webkit-scrollbar { display: none; }

    .mm-acc-subtab {
        flex: 0 0 auto;
        padding: 8px 12px;
    }

    .mm-acc-mini-search { width: 100%; }

    .mm-acc-block-actions { width: 100%; }

    .mm-acc-block-actions .mm-btn { width: 100%; }

    .mm-acc-statusfilter { width: 100%; }

    .mm-acc-statusfilter .mm-acc-qbtn { flex: 1 1 auto; justify-content: center; }

    .mm-acc-export { width: 100%; }

    .mm-acc-breakdown { gap: 8px 16px; padding: 12px 14px; }

    .mm-acc-bd-item { flex: 1 1 100%; justify-content: space-between; }
}

@media (max-width: 420px) {
    .mm-acc-bd-amt { font-size: 12.5px; }
}

@media (max-width: 560px) {
    #mm-exp-modal .mm-dfield-row,
    #mm-staff-modal .mm-dfield-row,
    #mm-pay-modal .mm-dfield-row,
    #mm-inv-modal .mm-dfield-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ================================= order steps inside the cart sheet
   The public menu (menu.view) asks Dine-in or Delivery inside the same
   #mm-cart sheet: step 1 the items + the type, step 2 the table, step 3
   the review form. Everything keeps the restaurant's accent (--qr-accent). */

.mm-cart-headactions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.mm-cart-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--qr-accent);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.mm-cart-back:hover {
    border-color: var(--qr-accent);
    background: var(--qr-accent-pale);
}

.mm-cart-back:focus-visible {
    outline: 2px solid var(--qr-accent);
    outline-offset: 2px;
}

.mm-cart-back svg { flex: 0 0 auto; }

#mm-cart[dir="rtl"] .mm-cart-back svg { transform: scaleX(-1); }

.mm-step-title {
    margin: 18px 0 0;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.35;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

/* step 1: Dine-in / Delivery */

.mm-type-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 640px) {
    .mm-type-cards { grid-template-columns: 1fr 1fr; }
}

.mm-type-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid var(--mm-line);
    border-radius: 14px;
    background: #fff;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.mm-type-card:hover {
    border-color: var(--qr-accent-mid);
    background: var(--qr-accent-pale);
    transform: translateY(-1px);
}

.mm-type-card:focus-visible {
    outline: 2px solid var(--qr-accent);
    outline-offset: 2px;
}

.mm-type-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--qr-accent-pale);
    color: var(--qr-accent);
}

.mm-type-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mm-type-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-type-sub {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--mm-muted);
}

/* step 2: the tables */

.mm-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

.mm-step-head .mm-step-title { margin: 0; }

.mm-step-refresh {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--qr-accent);
    cursor: pointer;
}

.mm-step-refresh:hover {
    border-color: var(--qr-accent);
    background: var(--qr-accent-pale);
}

.mm-tables-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 640px) {
    .mm-tables-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.mm-tcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 66px;
    padding: 10px 8px;
    border: 1.5px solid var(--qr-accent-soft);
    border-radius: 14px;
    background: #fff;
    font-family: inherit;
    font-weight: 800;
    color: var(--mm-ink);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

button.mm-tcard:hover {
    border-color: var(--qr-accent);
    background: var(--qr-accent-pale);
    transform: translateY(-1px);
}

button.mm-tcard:focus-visible {
    outline: 2px solid var(--qr-accent);
    outline-offset: 2px;
}

.mm-tcard.is-busy {
    border-color: var(--mm-line);
    background: #F7F5FB;
    color: var(--mm-muted);
    cursor: not-allowed;
    opacity: .72;
}

.mm-tcard-name {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.3px;
    overflow-wrap: anywhere;
    text-align: center;
}

.mm-tcard-note {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #C2410C;
}

.mm-tcard-skel {
    height: 66px;
    border-radius: 14px;
}

#mm-table-continue { margin-top: 14px; }

/* step 3: the review row */

.mm-cart-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--qr-accent-soft);
    border-radius: 12px;
    background: var(--qr-accent-pale);
}

.mm-cart-choice-text {
    min-width: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-cart-change {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--qr-accent);
    text-decoration: underline;
    cursor: pointer;
}

.mm-cart-change:hover { color: var(--mm-purple); }

/* ============================================== tables (dashboard tab) */

/* The Tables tab: the add row, one card per table, and the details of the
   order sitting on a busy table. Every class here is new. */

.mm-tables-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-tables-add > .mm-input {
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
}

.mm-tables-add > .mm-btn { flex: 0 0 auto; }

/* the "How many?" box: the count and one Add tables button, beside the add
   row on a wide screen and on their own line on a phone */
.mm-tables-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

.mm-tables-bulk-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--mm-body);
}

.mm-tables-bulk-label .rx-ar {
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-tables-add .mm-tables-count-input {
    flex: 0 0 auto;
    width: 80px;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* "12 tables / ١٢ طاولة" above the grid */
.mm-tables-count-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--mm-muted);
}

.mm-tables-count-line:empty { display: none; }

.mm-tables-count-line .rx-ar { color: var(--mm-body); }

.mm-tables-count-sep { color: #C9C1DA; }

/* the cards flow down the page: no fixed height, no sideways scroll */
.mm-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    align-items: start;
    gap: 12px;
    margin-top: 14px;
}

.mm-table-grid .mm-dempty {
    grid-column: 1 / -1;
    margin-top: 0;
}

.mm-table-card {
    min-width: 0;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-table-card.is-busy {
    border-color: #FED7AA;
    background: #FFFDF9;
}

.mm-table-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mm-table-name {
    min-width: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.2;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-dpill-open { background: #ECFDF3; color: #067647; }
.mm-dpill-busy { background: #FFF7ED; color: #C2410C; }

.mm-table-x {
    margin-inline-start: auto;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--mm-line);
    border-radius: 50%;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    color: var(--mm-muted);
    cursor: pointer;
}

.mm-table-x:hover {
    border-color: #F6CEF8;
    background: var(--mm-lav);
    color: var(--mm-purple);
}

.mm-table-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-table-cust { font-weight: 700; color: var(--mm-ink); }

.mm-table-total { font-weight: 800; color: var(--mm-ink); }

.mm-table-time {
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
}

.mm-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* the table a dine-in order was taken at (Orders tab) */
.mm-ord-table {
    padding: 1px 8px;
    border: 1px solid #F6CEF8;
    border-radius: 999px;
    background: var(--mm-lav);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-purple);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .mm-tables-add > .mm-input,
    .mm-tables-add > .mm-btn { flex: 1 1 100%; }

    .mm-tables-bulk { flex: 1 1 100%; }

    .mm-tables-bulk-label { flex: 1 1 100%; }

    .mm-tables-bulk .mm-btn { flex: 1 1 auto; }
}

/* ==================================================== F9 calculator (global)

   Lives in the app shell (src/index.js), so it exists on every route: the
   panel is appended to <body>, outside the [app] mount, and no view render
   can touch it. Opened with F9 anywhere, or by tapping the round F9 button
   on touch widths; closed with F9 again, Esc or the × in its header.

   Direction: the shell script copies the app's direction onto the panel
   (dir="ltr" / dir="rtl"), so the card flips to the bottom-left corner in
   Arabic while its numbers and keys stay left-to-right.                   */

.rx-calc {
    position: fixed;
    bottom: 16px;
    right: 16px;
    left: auto;
    z-index: 10000;
    width: 320px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 60px -26px rgba(30, 16, 57, .6), 0 6px 18px rgba(30, 16, 57, .1);
    font-family: var(--mm-font);
    color: var(--mm-ink);
    -webkit-tap-highlight-color: transparent;
}

.rx-calc[hidden] { display: none !important; }

/* RTL: the whole card moves to the bottom-left corner */
.rx-calc[dir="rtl"] {
    right: auto;
    left: 16px;
}

.rx-calc:focus { outline: none; }

.rx-calc:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .35);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- header */

.rx-calc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px 11px 14px;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
}

.rx-calc-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    margin-inline-end: auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.2;
}

.rx-calc-title-ar {
    font-family: var(--mm-font-ar);
    font-size: 13px;
    font-weight: 700;
    opacity: .92;
}

.rx-calc-hint {
    flex: 0 0 auto;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 6px;
    background: rgba(255, 255, 255, .2);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .06em;
    direction: ltr;
    unicode-bidi: isolate;
}

.rx-calc-x {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-family: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .14s ease;
}

.rx-calc-x:hover { background: rgba(255, 255, 255, .32); }

.rx-calc-x:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --------------------------------------------------------------- display */

.rx-calc-screen {
    padding: 11px 14px 12px;
    background: var(--mm-lav);
    border-bottom: 1px solid var(--mm-line);
}

/* the expression as typed: small, grey, clamped with an ellipsis */
.rx-calc-expr {
    min-height: 17px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mm-muted);
    text-align: right;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* the big result: right-aligned, thousand separators, tabular figures */
.rx-calc-out {
    margin-top: 1px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.7px;
    line-height: 1.18;
    color: var(--mm-ink);
    text-align: right;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rx-calc-out.is-long {
    font-size: 22px;
    letter-spacing: -.4px;
}

.rx-calc-out.is-error {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
    color: #C02626;
    white-space: normal;
    font-variant-numeric: normal;
}

.rx-calc-out-ar {
    margin-top: 2px;
    font-family: var(--mm-font-ar);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #C02626;
    text-align: right;
}

.rx-calc-out-ar[hidden] { display: none !important; }

/* ----------------------------------------------------------------- keys */

.rx-calc-keys {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px 14px;
    /* the keypad keeps the calculator order in every language */
    direction: ltr;
}

.rx-calc-key {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 48px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: var(--mm-ink);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform .12s ease, background .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.rx-calc-key:active { transform: scale(.955); }

.rx-calc-key:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .38);
    outline-offset: 2px;
}

/* digits: light grey */
.rx-calc-num {
    background: #F6F2FC;
    border-color: #EDE6FA;
    color: var(--mm-ink);
}

.rx-calc-num:hover { background: #EDE6FA; }

/* clear / backspace / sign: quiet, purple type */
.rx-calc-fn {
    background: #fff;
    border-color: var(--mm-line);
    color: var(--mm-purple);
    font-size: 16px;
}

.rx-calc-fn:hover {
    background: var(--mm-lav);
    border-color: #F6CEF8;
}

/* operators: site purple */
.rx-calc-op {
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    box-shadow: 0 10px 18px -12px rgba(136, 2, 144, .95);
}

.rx-calc-op:hover { filter: brightness(1.07); }

/* equals: the accent gradient */
.rx-calc-eq {
    background: linear-gradient(135deg, #F97316 0%, #B403BF 100%);
    color: #fff;
    font-size: 19px;
    box-shadow: 0 10px 20px -12px rgba(180, 3, 191, .95);
}

.rx-calc-eq:hover { filter: brightness(1.06); }

/* ------------------------------------------------ floating tap button (F9) */

/* Only for the screens where staff work: the dashboard and the cashier.
   The shell script adds .is-app from its sync(), which reads the route
   (/dashboard, /pos, /cashier); the public home page, the customer menu
   pages, /login and /pos-login never get it, so the button is simply not
   shown there — F9 and Escape keep working everywhere. */
.rx-calc-fab {
    position: fixed;
    bottom: 16px;
    right: 16px;
    left: auto;
    z-index: 9999;
    display: none; /* desktop: the keyboard is right there */
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    font-family: var(--mm-font);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    direction: ltr;
    opacity: .92;
    box-shadow: 0 14px 26px -14px rgba(136, 2, 144, .95);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform .14s ease, opacity .14s ease;
}

.rx-calc-fab[hidden] { display: none !important; }

.rx-calc-fab[dir="rtl"] {
    right: auto;
    left: 16px;
}

.rx-calc-fab:hover { opacity: 1; }

.rx-calc-fab:active { transform: scale(.94); }

.rx-calc-fab:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .4);
    outline-offset: 3px;
}

/* tablets and phones: a keyboard may not be connected, so the tap button
   appears — but only on the dashboard / POS screens (.is-app), and it sits
   above any sticky bottom bar (POS ticket bar, the home page's WhatsApp
   button, the public menu's WhatsApp/cart pill) */
@media (max-width: 1100px) {
    .rx-calc-fab.is-app { display: grid; }
}

.rx-calc-fab.is-lifted {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* a modal or a bottom sheet is open: the round button stays out of the way */
.rx-calc-fab.is-tucked { display: none !important; }

/* --------------------------------------------------------- phone widths */

@media (max-width: 480px) {
    /* near-full-width bottom sheet with big touch targets */
    .rx-calc {
        right: 0;
        left: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -26px 60px -30px rgba(30, 16, 57, .65);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .rx-calc[dir="rtl"] {
        right: 0;
        left: 0;
    }

    .rx-calc-head { padding: 12px 12px 12px 14px; }

    .rx-calc-title { font-size: 15px; }

    .rx-calc-x {
        width: 40px;
        height: 40px;
        font-size: 21px;
    }

    .rx-calc-screen { padding: 12px 14px 13px; }

    .rx-calc-expr { font-size: 13px; }

    .rx-calc-out { font-size: 34px; }

    .rx-calc-out.is-long { font-size: 24px; }

    .rx-calc-out.is-error { font-size: 15px; }

    .rx-calc-keys {
        gap: 8px;
        padding: 12px 12px 14px;
    }

    .rx-calc-key {
        min-height: 54px;
        font-size: 19px;
        border-radius: 14px;
    }

    .rx-calc-eq { font-size: 21px; }

    .rx-calc-fab {
        width: 50px;
        height: 50px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rx-calc-key,
    .rx-calc-x,
    .rx-calc-fab { transition: none; }

    .rx-calc-key:active,
    .rx-calc-fab:active { transform: none; }
}

@media print {
    .rx-calc,
    .rx-calc-fab { display: none !important; }
}

/* ---------------- dashboard: the calculator pill ------------------------

   The first item of the bar's end-side row (.mm-dbar-rail): a normal item
   inside the sticky bar, on every dashboard tab, with the ⋯ button 8px after
   it. Nothing is fixed and no width needs reserving anywhere.

   --mm-calcfab-w is the single place its width is defined; the pill and the ⋯
   share the same end edge. */

#mm-dpage {
    --mm-calcfab-w: 176px;
}

.mm-calcfab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: var(--mm-calcfab-w, 176px);
    min-height: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--mm-purple);
    font-family: var(--mm-font);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -.1px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 16px 30px -20px rgba(30, 16, 57, .7), 0 2px 10px rgba(30, 16, 57, .07);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mm-calcfab:hover {
    background: var(--mm-lav);
    border-color: #F6CEF8;
}

.mm-calcfab:focus-visible {
    outline: 3px solid rgba(180, 3, 191, .38);
    outline-offset: 3px;
}

.mm-calcfab-ico {
    display: block;
    flex: 0 0 auto;
}

.mm-calcfab-ar {
    font-family: var(--mm-font-ar);
    font-size: 11px;
    font-weight: 700;
    color: #8B84A0;
}

/* the short pair takes over on narrow screens; a label is never dropped */
.mm-calcfab-en-s,
.mm-calcfab-ar-s { display: none; }

@media (max-width: 620px) {
    #mm-dpage { --mm-calcfab-w: 116px; }

    .mm-calcfab {
        gap: 4px;
        padding: 0 11px;
        font-size: 11.5px;
    }

    .mm-calcfab-ar { font-size: 10.5px; }

    .mm-calcfab-en,
    .mm-calcfab-ar { display: none; }

    .mm-calcfab-en-s { display: inline; }

    .mm-calcfab-ar-s { display: inline; }
}

/* ================= dashboard: the sections panel (right drawer) ==========

   Every section is listed in this panel, which slides in from the right edge
   as if it came out of the ⋯ button under the calculator pill. It is the only
   list of sections now (the wide-screen pill bar was removed), so this panel is
   the way in to every section on every width — and to "View my menu" /
   "Sign out", which the top bar only shows from 1024px up.

   It is placed with physical right/top/bottom, so it always comes from the
   right edge; only the text inside follows the panel's dir (set from the app's
   language when it opens).

   Same trick as the calculator panel: one 220ms transform transition, and the
   wrapper's visibility is delayed on close so the slide out is seen.
   z-index: under the dashboard modals (200), over the sticky bar (60) that
   holds the calculator pill and the ⋯ button. */

body.mm-dnav-lock { overflow: hidden; }

.mm-dnav {
    position: fixed;
    inset: 0;
    z-index: 190;
    overflow: hidden;
    visibility: hidden;
    transition: visibility 0s linear .22s;
}

.mm-dnav.is-open {
    visibility: visible;
    transition-delay: 0s;
}

.mm-dnav-bd {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .22s ease;
}

.mm-dnav.is-open .mm-dnav-bd { opacity: 1; }

.mm-dnav-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(88vw, 320px);
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 12px calc(14px + env(safe-area-inset-bottom));
    background: var(--mm-deep);
    color: #EFEAF7;
    box-shadow: -22px 0 48px -20px rgba(0, 0, 0, .6);
    transform: translateX(100%);
    transition: transform .22s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.mm-dnav.is-open .mm-dnav-panel { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
    .mm-dnav-panel,
    .mm-dnav-bd { transition-duration: 1ms; }
}

/* head: title + ✕ */

.mm-dnav-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 2px 12px;
    margin-bottom: 10px;
    background: var(--mm-deep);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.mm-dnav-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.3;
    color: #fff;
}

.mm-dnav-slash {
    color: var(--mm-purple-light);
    padding: 0 1px;
}

.mm-dnav-x {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .16s ease, border-color .16s ease;
}

.mm-dnav-x:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .34);
}

.mm-dnav-x:focus-visible {
    outline: 3px solid rgba(238, 145, 243, .6);
    outline-offset: 2px;
}

/* the sections */

.mm-dnav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 10px;
}

.mm-dnav-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.mm-drow {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 48px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.1px;
    line-height: 1.25;
    text-align: start;
    text-decoration: none;
    color: #DCD5EA;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.mm-drow:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.mm-drow:focus-visible {
    outline: 2px solid rgba(238, 145, 243, .75);
    outline-offset: 2px;
}

.mm-drow.is-active {
    background: rgba(180, 3, 191, .3);
    border-color: rgba(238, 145, 243, .45);
    color: #fff;
}

.mm-drow.is-ping { animation: mmPing .7s ease 2; }

.mm-drow-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: #A79AC4;
}

.mm-drow-ico svg { display: block; }

.mm-drow:hover .mm-drow-ico { color: #EBD9F2; }

.mm-drow.is-active .mm-drow-ico { color: var(--mm-purple-light); }

.mm-drow-lbl {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
    min-width: 0;
}

.mm-drow-en {
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mm-drow-ar {
    font-size: 11.5px;
    font-weight: 600;
    color: #A79AC4;
}

.mm-drow.is-active .mm-drow-ar { color: rgba(255, 255, 255, .82); }

.mm-drow .mm-tab-badge {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

/* "View my menu" / "Sign out": the top bar's two buttons, reachable here too */
.mm-drow-foot { color: #EFEAF7; }

.mm-drow-foot + .mm-drow-foot { border-top: 1px solid rgba(255, 255, 255, .06); }

/* ------------------------------------- menu ad (the public menu, once) */

/* A card over a soft backdrop, built by showMenuAd() and appended next to the
   menu page. Its accent and fonts are copied from #mm-qr-page while it is
   built, so it keeps the restaurant's own look. Sits over the cart sheet
   (200) and under the toast (300); no scroll lock. */

.mm-ad {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    font-family: var(--qr-font-en, var(--mm-font));
}

.mm-ad[dir="rtl"] { font-family: var(--qr-font-ar, var(--mm-font-ar)); }

.mm-ad-bd {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.mm-ad-card {
    position: relative;
    width: min(92vw, 360px);
    max-width: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.mm-ad-media { position: relative; }

.mm-ad-piclink { display: block; }

.mm-ad-img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    background: #F3EFFA;
}

.mm-ad-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(23, 12, 45, .62);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.5;
}

.mm-ad[dir="rtl"] .mm-ad-pill {
    left: auto;
    right: 10px;
}

.mm-ad-x {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(23, 12, 45, .62);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mm-ad[dir="rtl"] .mm-ad-x {
    right: auto;
    left: 10px;
}

.mm-ad-x:hover { background: rgba(23, 12, 45, .82); }

.mm-ad-x:focus-visible,
.mm-ad-more:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .8);
    outline-offset: 2px;
}

.mm-ad-more {
    display: block;
    padding: 13px 18px;
    background: var(--qr-accent, #6D28D9);
    color: var(--qr-on-accent, #ffffff);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.mm-ad-more:hover { filter: brightness(1.06); }

/* -------------------------------------------- menu ad tab (owner only) */

.mm-ad-preview {
    display: block;
    width: 100%;
    max-height: 180px;
    margin: 0 0 10px;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background: #FCFBFF;
    object-fit: contain;
}

.mm-ad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.mm-ad-status {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-ad-status span { display: block; }

.mm-ad-status.is-on { color: #067647; }

.mm-ad-alert span { display: block; }

.mm-ad-alert span:empty { display: none; }

@media print {
    .mm-dnav { display: none !important; }

    /* the section switches, the calculator pill and the ⋯ are screen-only */
    .mm-dbar-actions,
    .mm-calcfab,
    .mm-dnav-btn { display: none !important; }

    /* the menu ad is a screen-only card */
    .mm-ad { display: none !important; }
}

/* ===================== settings: sound and the receipt printer ==========
   Two cards under the settings form (the new-order beep and the ESC/POS
   printer). Both are device settings kept in localStorage — no API, so they
   save themselves the moment a control changes and have no Save button. */

.mm-dset-extra { margin-top: 16px; }

.mm-dset-title {
    margin: 0 0 12px;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-dset-title .rx-ar {
    margin-inline-start: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-dset-extra .mm-field:first-child { margin-top: 0; }

/* the two languages of a hint, one under the other */
.mm-dset-extra .mm-hint { margin-top: 8px; }

.mm-dset-extra .mm-hint span {
    display: block;
    line-height: 1.55;
}

.mm-dset-extra .mm-switch-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mm-dset-extra .mm-switch-text .rx-ar {
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-printer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.mm-printer-state {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--mm-muted);
}

.mm-printer-state.is-on { color: #067647; }

.mm-printer-state.is-warn { color: #C2410C; }

@media (max-width: 640px) {
    .mm-printer-row .mm-btn { flex: 1 1 auto; justify-content: center; }

    .mm-printer-state { flex: 1 1 100%; }
}

/* ================================================== reports (sales) tab
   The dashboard's Reports section: the range bar, the five big cards, the
   six smaller ones, the gross-sales chart, the top dishes and the 24 peak
   hours. Everything below is drawn by repRender() from the one answer of
   POST /api/reports.php?action=sales; no figure lives in the markup or here.
   Plain divs, no chart library, and the same purple/orange pair the rest of
   the dashboard uses. */

.mm-rep-controls { align-items: flex-start; }

.mm-rep-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mm-rep-group .mm-label {
    margin: 0;
    font-size: 11px;
}

.mm-rep-gbtns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* the note line under the controls: range, grouping and where the figures
   come from */

.mm-rep-note-group {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.mm-rep-note-group .rx-ar { font-size: 11.5px; }

.mm-rep-asof {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    margin-inline-start: auto;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-rep-asof .rx-ar { font-size: 11px; }

/* refresh, print and the spreadsheet */

.mm-rep-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mm-rep-actions .mm-btn { white-space: nowrap; }

.mm-rep-actions .mm-btn[disabled] {
    opacity: .55;
    cursor: default;
}

/* the six smaller cards under the five big ones */

.mm-rep-cards2 {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.mm-rep-stat-sm { padding: 14px; }

.mm-rep-num-sm {
    font-size: 16.5px;
    letter-spacing: -.3px;
}

.mm-rep-stat-sm .mm-acc-stat-lbl {
    margin-top: 6px;
    font-size: 11.5px;
}

/* the gross-sales chart: one bar per period, its height its share of the
   tallest one, the label under it, a tooltip on hover and on tap */

.mm-rep-chart {
    margin-top: 14px;
    overflow: hidden;
}

.mm-rep-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    /* room above the tallest bar for the tooltip of a hovered column */
    padding: 50px 2px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mm-rep-col {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 16px;
}

.mm-rep-colbar {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 130px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-rep-bar {
    position: relative;
    display: block;
    width: 100%;
    max-width: 46px;
    min-height: 2px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, #B403BF 0%, #880290 100%);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: filter .16s ease;
}

.mm-rep-bar.is-zero {
    min-height: 2px;
    background: #F2EFF8;
    cursor: default;
}

.mm-rep-bar:hover { filter: brightness(1.08); }

.mm-rep-bar:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .5);
    outline-offset: 2px;
}

.mm-rep-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    z-index: 6;
    display: block;
    min-width: 96px;
    max-width: 170px;
    padding: 7px 9px;
    border-radius: 10px;
    background: var(--mm-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 12px 26px -16px rgba(30, 16, 57, .7);
    transition: opacity .14s ease;
}

.mm-rep-tip-lbl {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
}

.mm-rep-tip-row {
    display: block;
    font-weight: 600;
    color: #EDE6FA;
}

.mm-rep-bar:hover .mm-rep-tip,
.mm-rep-bar:focus-visible .mm-rep-tip,
.mm-rep-bar.is-on .mm-rep-tip {
    opacity: 1;
    visibility: visible;
}

.mm-rep-x {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--mm-muted);
}

/* the one-line legend under the chart */

.mm-rep-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    margin: 14px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-rep-legend .rx-ar {
    font-size: 11px;
    color: var(--mm-muted);
}

.mm-rep-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--mm-purple);
}

.mm-rep-chart-empty,
.mm-rep-list-empty {
    margin: 18px 0 4px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--mm-muted);
}

.mm-rep-chart-empty .rx-ar,
.mm-rep-list-empty .rx-ar { display: block; }

/* top dishes: name, quantity, revenue and a thin proportional bar */

.mm-rep-top {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mm-rep-top-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.mm-rep-top-name {
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-rep-top-num {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 7px;
}

.mm-rep-top-qty {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    font-size: 11px;
    font-weight: 800;
    color: var(--mm-purple);
}

.mm-rep-top-rev {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mm-rep-track {
    height: 6px;
    margin-top: 5px;
    border-radius: 999px;
    background: #F2EFF8;
    overflow: hidden;
}

.mm-rep-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #B403BF 0%, var(--mm-purple) 100%);
}

/* peak hours: 24 small bars, the hour under each one */

.mm-rep-hours {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    align-items: end;
    gap: 3px;
    margin-top: 14px;
}

.mm-rep-hour {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mm-rep-hourcol {
    display: flex;
    align-items: flex-end;
    height: 68px;
    border-bottom: 1px solid var(--mm-line);
}

.mm-rep-hourbar {
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 3px 3px 0 0;
    background: #D9C7F5;
}

.mm-rep-hourbar.is-busy { background: linear-gradient(180deg, #B403BF 0%, var(--mm-purple) 100%); }

.mm-rep-hourbar.is-zero { background: #F2EFF8; }

.mm-rep-hourx {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    color: var(--mm-muted);
}

@media (max-width: 1040px) {
    .mm-rep-cards2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .mm-rep-asof { margin-inline-start: 0; }
    .mm-rep-group { width: 100%; }
    .mm-rep-gbtns .mm-acc-qbtn { flex: 1 1 auto; justify-content: center; }
    .mm-rep-actions .mm-btn { flex: 1 1 auto; justify-content: center; }
    .mm-rep-colbar { height: 108px; }
    .mm-rep-col { min-width: 14px; }
}

@media (max-width: 620px) {
    .mm-rep-cards2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mm-rep-stat-sm { padding: 12px; }
    .mm-rep-num-sm { font-size: 15px; }
    .mm-rep-hourcol { height: 54px; }
    .mm-rep-hourx { font-size: 8px; }
}

@media (max-width: 480px) {
    /* 24 hour numbers no longer fit side by side: every other one is enough */
    .mm-rep-hour:nth-child(2n) .mm-rep-hourx { visibility: hidden; }
    .mm-rep-x { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-rep-bar,
    .mm-rep-tip { transition: none; }
}

/* ---------------------- reservations tab (dashboard) ---------------------
   The owner's own tab: one day at a time, with the switch that puts the
   whole thing on the public menu. Everything here is new and only used by
   that panel, so nothing else on the dashboard changes. */

.mm-resv-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mm-resv-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #fff;
}

.mm-resv-date {
    width: auto;
    min-width: 152px;
    padding: 9px 10px;
    font-size: 13.5px;
    border-radius: 9px;
}

.mm-resv-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--mm-lav);
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: var(--mm-purple);
    cursor: pointer;
}

.mm-resv-arrow:hover { background: #FBEEFB; }

.mm-resv-arrow:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .45);
    outline-offset: 1px;
}

.mm-resv-switch { margin-inline-start: auto; }

.mm-resv-hint {
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    background: #FFFBEB;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.55;
    color: #92400E;
}

.mm-resv-hint .rx-ar { display: block; }

.mm-resv-total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-resv-total:empty { display: none; }

.mm-resv-row {
    padding: 14px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
    transition: opacity .16s ease;
}

.mm-resv-row.is-busy {
    opacity: .55;
    pointer-events: none;
}

.mm-resv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.mm-resv-time {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-resv-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-resv-name { font-weight: 700; color: var(--mm-ink); }

.mm-resv-party {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-resv-party svg { color: var(--mm-purple); }

.mm-resv-party strong { font-weight: 800; color: var(--mm-ink); }

.mm-resv-phone {
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
}

.mm-resv-phone:hover { text-decoration: underline; }

.mm-resv-note {
    margin: 8px 0 0;
    padding-inline-start: 10px;
    border-inline-start: 3px solid #F6CEF8;
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-resv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* the four states of a booking */
.mm-dpill-confirmed { background: #ECFDF3; color: #067647; }
.mm-dpill-seated { background: #EFF8FF; color: #175CD3; }
.mm-dpill-cancelled { background: #F2EFF8; color: #6F6788; }

@media (max-width: 599px) {
    .mm-resv-nav { flex: 1 1 100%; }

    .mm-resv-date {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mm-resv-switch {
        margin-inline-start: 0;
        align-items: flex-start;
    }
}

/* ------------------------- coupons tab (dashboard) -----------------------
   The discount codes the cashier types at the till. New classes only, all of
   them used by this panel and its two sheets alone. */

.mm-coup-list { display: block; margin-top: 4px; }

.mm-coup-row {
    padding: 14px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
    transition: opacity .16s ease;
}

.mm-coup-row.is-off { opacity: .72; }

.mm-coup-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* the code itself: a monospace pill, the same look as a real coupon code */
.mm-coup-code {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px dashed #D8B4FE;
    border-radius: 8px;
    background: #FBEEFB;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.3;
    color: var(--mm-purple);
    overflow-wrap: anywhere;
}

.mm-coup-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--mm-lav);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--mm-body);
}

.mm-coup-badge .rx-ar { font-size: 11px; }

.mm-coup-value {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-coup-head .mm-dpill { margin-inline-start: auto; }

.mm-coup-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-coup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-coup-switch { margin-inline-end: auto; }

/* the coupon form */

.mm-coup-codefield {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mm-coup-valrow {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.mm-coup-valrow .mm-input { flex: 1 1 auto; width: auto; min-width: 0; }

.mm-coup-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 46px;
    padding: 0 12px;
    border: 1.5px solid #F5D9F7;
    border-radius: 12px;
    background: var(--mm-lav);
    font-size: 14px;
    font-weight: 800;
    color: var(--mm-purple);
}

@media (max-width: 599px) {
    .mm-coup-head .mm-dpill { margin-inline-start: 0; }
}

/* ------------------------- loyalty tab (dashboard) -----------------------
   The programme card (its switch and its two numbers), the search box and the
   members. New classes only, used by this panel alone. */

.mm-loy-card {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-loy-switch { align-items: flex-start; }

.mm-loy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.mm-loy-grid .mm-field { margin-top: 0; }

.mm-loy-grid .mm-label .rx-ar { display: block; }

.mm-loy-explain {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--mm-body);
}

.mm-loy-explain .rx-ar { display: block; margin-top: 2px; }

.mm-loy-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.mm-loy-saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ECFDF3;
    font-size: 12px;
    font-weight: 800;
    color: #067647;
}

.mm-loy-search { margin-top: 14px; }

.mm-loy-count {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 12px 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-loy-count:empty { display: none; }

.mm-loy-count .rx-ar { color: var(--mm-body); }

.mm-loy-list { display: block; }

.mm-loy-row {
    padding: 13px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-loy-rowhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mm-loy-name {
    min-width: 0;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-loy-name.is-none {
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-loy-pill {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: #FBEEFB;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--mm-purple);
}

.mm-loy-pill-lbl { font-weight: 700; }

.mm-loy-pill .rx-ar { font-weight: 600; }

.mm-loy-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-loy-worth { font-weight: 800; color: #067647; }

@media (max-width: 599px) {
    .mm-loy-grid { grid-template-columns: 1fr; }
}

/* ------------------------- reviews tab (dashboard) -----------------------
   The summary strip and the rows of what the guests said. New classes only;
   the stars (.mm-stars / .mm-star) are the ones the public menu uses. */

.mm-rev-strip { margin-bottom: 12px; }

.mm-rev-strip.mm-hidden { display: none; }

.mm-rev-stripbox {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-rev-stripavg {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-rev-avg {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--mm-ink);
}

.mm-rev-stripstars .mm-star svg {
    width: 17px;
    height: 17px;
}

.mm-rev-stripcounts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--mm-body);
}

.mm-rev-count strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-rev-count .rx-ar {
    font-size: 11.5px;
    color: var(--mm-muted);
}

.mm-rev-list { display: block; }

.mm-rev-row {
    padding: 13px 16px;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
    transition: opacity .16s ease;
}

.mm-rev-row.is-hidden { opacity: .72; }

.mm-rev-row.is-busy {
    opacity: .55;
    pointer-events: none;
}

.mm-rev-rowhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mm-rev-row .mm-rev-text { font-size: 13px; }

.mm-rev-row .mm-rev-meta { font-size: 12px; }

.mm-rev-noname {
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-rev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--mm-line);
}

/* ---------------------------------------------- printed sales report */

.mm-print-reports { display: none; }

@media print {
    /* the report prints on its own: the other print blocks stay off the paper */
    body.mm-printing-report .mm-print-card,
    body.mm-printing-report .mm-print-orders,
    body.mm-printing-report .mm-print-shift { display: none !important; }

    body.mm-printing-report #mm-print-reports,
    body.mm-printing-report #mm-print-reports * { visibility: visible !important; }

    body.mm-printing-report .mm-dpage > #mm-print-reports {
        display: block !important;
        width: 100%;
        background: #fff;
        color: #000;
        font-family: var(--mm-font);
    }

    .mm-pr-doc {
        color: #000;
        font-size: 10pt;
        line-height: 1.45;
    }

    .mm-pr-rest {
        margin: 0;
        font-size: 17pt;
        font-weight: 800;
        letter-spacing: -.2pt;
        color: #000;
    }

    .mm-pr-title {
        margin: 1.5mm 0 0;
        font-size: 12.5pt;
        font-weight: 800;
        color: #000;
    }

    .mm-pr-title-ar {
        margin: 1mm 0 0;
        font-size: 12pt;
        font-weight: 800;
        color: #000;
    }

    .mm-pr-meta {
        margin: 2.5mm 0 0;
        font-size: 9.5pt;
        font-weight: 600;
        color: #000;
    }

    .mm-pr-table {
        width: 100%;
        margin: 4mm 0 0;
        border-collapse: collapse;
        font-size: 9.5pt;
        color: #000;
    }

    .mm-pr-table td,
    .mm-pr-table th {
        padding: 1.4mm 1mm;
        vertical-align: top;
        border-bottom: .2mm solid #bbb;
    }

    .mm-pr-lbl { text-align: start; }

    .mm-pr-lbl-ar { font-size: 8.5pt; }

    .mm-pr-num {
        text-align: end;
        font-weight: 700;
        white-space: nowrap;
    }

    .mm-pr-table thead .mm-pr-th {
        padding: 0 1mm 1mm;
        font-size: 8pt;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        text-align: start;
        border-bottom: .25mm solid #000;
    }

    .mm-pr-table thead .mm-pr-th.mm-pr-num { text-align: end; }

    .mm-pr-strong td {
        font-weight: 800;
        border-bottom: .3mm solid #000;
    }

    .mm-pr-h2 {
        margin: 5mm 0 0;
        font-size: 11pt;
        font-weight: 800;
        color: #000;
        break-after: avoid;
    }

    .mm-pr-h2 .rx-ar {
        font-size: 9.5pt;
        font-weight: 600;
    }
}

/* ------------------------- delivery tab (dashboard) ----------------------
   The owner's delivery screen: the three figures of the day, the live map,
   the drivers and the delivery orders. New classes only, used by that panel
   and by the driver's own phone screen (/driver) at the end of this file. */

.mm-del-now {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mm-body);
    white-space: nowrap;
}

.mm-del-now-lbl { font-weight: 700; }

.mm-del-now-lbl .rx-ar { font-weight: 600; }

.mm-del-now-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--mm-purple);
}

.mm-del-kpis { margin-bottom: 16px; }

.mm-dstat-ar {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-del-card {
    padding: 16px 18px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-del-cardhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mm-del-h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-del-h3 .rx-ar {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-del-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-del-legend .rx-ar { font-weight: 500; }

.mm-del-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--mm-muted);
}

.mm-del-dot.is-assigned { background: #F97316; }
.mm-del-dot.is-on_way { background: var(--mm-purple); }
.mm-del-dot.is-dest {
    background: #fff;
    border: 2px solid var(--mm-purple);
}

/* the map: an explicit height at every width, so Leaflet always has a box */
.mm-del-mapwrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--mm-line);
    background: #EEE9F8;
}

.mm-del-map {
    position: relative;
    z-index: 0;            /* keeps the tiles under the sticky top bar */
    width: 100%;
    height: 320px;
    background: #EEE9F8;
}

.mm-del-map .leaflet-container { font-family: var(--mm-font); }

.mm-del-mapnote {
    position: absolute;
    inset-inline: 12px;
    bottom: 12px;
    z-index: 2;
    margin: 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--mm-line);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--mm-body);
}

.mm-del-mapnote .rx-ar { display: block; font-weight: 600; }

.mm-del-maperr {
    margin: 10px 0 0;
    padding: 9px 12px;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    background: #FFFBEB;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.55;
    color: #92400E;
}

.mm-del-maperr .rx-ar { display: block; }

/* the pins Leaflet draws (divIcon): a small round marker per status.
   Two classes deep, so the leaflet.css defaults (.leaflet-div-icon) lose. */
.mm-del-map .mm-del-ic { background: none; border: 0; }

.mm-del-pin {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    background: #F97316;
    box-shadow: 0 3px 8px rgba(30, 16, 57, .4);
}

.mm-del-pin-drv.is-assigned { background: #F97316; }
.mm-del-pin-drv.is-picked { background: #175CD3; }
.mm-del-pin-drv.is-on_way { background: var(--mm-purple); }
.mm-del-pin-drv.is-arrived { background: #0F766E; }

.mm-del-pin-dest {
    background: #fff;
    border: 3px solid var(--mm-purple);
}

/* the driver form */
.mm-del-formgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.mm-del-formgrid .mm-field { margin-top: 0; margin-bottom: 12px; }

.mm-del-formgrid .mm-label .rx-ar { display: block; font-size: 11.5px; font-weight: 600; }

.mm-del-codefield {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .18em;
}

.mm-del-formfoot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.mm-del-codeout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px dashed #D8B4FE;
    border-radius: 12px;
    background: #FBEEFB;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-ink);
}

.mm-del-codeout-lbl .rx-ar { display: block; font-weight: 600; color: var(--mm-body); }

.mm-del-codeout-code {
    padding: 3px 10px;
    border-radius: 8px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2em;
    color: var(--mm-purple);
}

.mm-del-applink {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-del-applink-lbl {
    font-size: 12px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-del-applink-lbl .rx-ar { display: block; font-size: 11.5px; font-weight: 600; color: var(--mm-body); }

.mm-del-applink-url {
    flex: 1 1 200px;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

/* the drivers */
.mm-del-drivers { display: block; }

.mm-del-drv {
    padding: 12px 14px;
    margin-top: 10px;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background: #FBFAFF;
}

.mm-del-drvhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mm-del-drvname {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-del-drvstate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-body);
    white-space: nowrap;
}

.mm-del-drvstate.is-on { color: #067647; }

.mm-del-live {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C4BED4;
}

.mm-del-live.is-on {
    background: #12B76A;
    box-shadow: 0 0 0 3px rgba(18, 183, 106, .18);
}

.mm-del-drvfacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-del-drvphone {
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
}

.mm-del-drvphone:hover { text-decoration: underline; }

.mm-del-drvcode {
    padding: 2px 8px;
    border: 1px dashed #D8B4FE;
    border-radius: 7px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--mm-purple);
}

.mm-del-drvshift {
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-del-drvoff {
    padding: 2px 8px;
    border-radius: 999px;
    background: #F2EFF8;
    font-size: 11px;
    font-weight: 700;
    color: #6F6788;
}

.mm-del-drvactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--mm-line);
}

/* the delivery orders */
.mm-del-orders { display: block; }

.mm-del-count {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-del-count:empty { display: none; }

.mm-del-order {
    padding: 14px 16px;
    margin-top: 10px;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
    transition: opacity .16s ease;
}

.mm-del-order.is-busy {
    opacity: .55;
    pointer-events: none;
}

.mm-del-orderhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mm-del-orderhead .mm-dpill { margin-inline-start: auto; }

.mm-del-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-del-when {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-del-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-del-cust { font-weight: 700; color: var(--mm-ink); }

.mm-del-phone {
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
}

.mm-del-phone:hover { text-decoration: underline; }

.mm-del-addr {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-del-maplink {
    display: inline-block;
    margin-inline-start: 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--mm-purple);
    text-decoration: none;
}

.mm-del-maplink:hover { text-decoration: underline; }

.mm-del-note {
    margin: 8px 0 0;
    padding-inline-start: 10px;
    border-inline-start: 3px solid #F6CEF8;
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.5;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

/* the items exactly as the customer wrote them: one per line */
.mm-del-items {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #FBFAFF;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-del-total {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-purple);
}

.mm-del-assign {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-del-select {
    flex: 1 1 180px;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 13.5px;
}

.mm-del-drvline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 12.5px;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-del-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* the six states of a delivery */
.mm-dpill-waiting { background: #FFF7ED; color: #C2410C; }
.mm-dpill-assigned { background: #FFF7ED; color: #C2410C; }
.mm-dpill-picked { background: #EFF8FF; color: #175CD3; }
.mm-dpill-on_way { background: #FBEEFB; color: var(--mm-purple); }
.mm-dpill-arrived { background: #ECFDF5; color: #0F766E; }
.mm-dpill-delivered { background: #ECFDF3; color: #067647; }
.mm-dpill-cancelled { background: #F2EFF8; color: #6F6788; }

@media (max-width: 640px) {
    .mm-del-map { height: 260px; }
    .mm-del-card { padding: 14px; border-radius: 14px; }
    .mm-del-formgrid { grid-template-columns: minmax(0, 1fr); }
    .mm-del-orderhead .mm-dpill { margin-inline-start: 0; }
    .mm-del-select { flex: 1 1 100%; }
    .mm-del-assign .mm-btn { width: 100%; }
    .mm-del-actions .mm-btn { width: 100%; }
    .mm-del-applink-url { flex: 1 1 100%; }
}

/* ======================= the driver's phone screen ======================
   /driver: one page for the delivery employee, no dashboard shell. Arabic
   first, big touch targets, 16px text at the smallest. Its own classes, all
   prefixed .mm-drv, used by that page alone. */

.mm-drv {
    min-height: 100vh;
    background: var(--mm-lav);
    color: var(--mm-ink);
    font-family: var(--mm-font-ar);
    font-size: 16px;
    line-height: 1.55;
    padding-bottom: 32px;
}

.mm-drv-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    box-shadow: 0 12px 26px -18px rgba(30, 16, 57, .7);
}

.mm-drv-barid {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.mm-drv-rest {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    overflow-wrap: anywhere;
}

.mm-drv-name {
    font-size: 13px;
    font-weight: 600;
    opacity: .9;
    overflow-wrap: anywhere;
}

.mm-drv-clock {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    white-space: nowrap;
}

.mm-drv-logout {
    padding: 10px 16px;
    border: 1.5px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    min-height: 44px;
}

.mm-drv-logout:hover { background: rgba(255, 255, 255, .16); }

.mm-drv-main {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 16px 14px 0;
}

.mm-drv-card {
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-drv-h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--mm-ink);
}

.mm-drv-h2-en {
    display: block;
    font-family: var(--mm-font);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-drv-sharestate {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--mm-muted);
}

.mm-drv-sharestate.is-on { color: #067647; }

.mm-drv-live {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C4BED4;
}

.mm-drv-live.is-on {
    background: #12B76A;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, .16);
}

.mm-drv-meta {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-drv-meta strong { color: var(--mm-ink); }

/* the English half of an Arabic line, in the site's Latin face */
.mm-drv .mm-drv-en {
    font-family: var(--mm-font);
    font-size: 13px;
}

.mm-drv-meta .mm-drv-en {
    display: block;
    margin-top: 2px;
    color: var(--mm-muted);
}

.mm-drv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.mm-drv-big {
    flex: 1 1 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 26px -16px rgba(136, 2, 144, .8);
}

.mm-drv-big:disabled {
    opacity: .6;
    box-shadow: none;
    cursor: default;
}

.mm-drv-big-ghost {
    background: #fff;
    border: 2px solid #F6CEF8;
    color: var(--mm-purple);
    box-shadow: none;
}

.mm-drv-big .mm-drv-en {
    font-family: var(--mm-font);
    font-size: 13px;
    font-weight: 700;
    opacity: .9;
}

.mm-drv-big-ghost:hover { border-color: var(--mm-purple); }

.mm-drv-big-stop {
    background: #fff;
    border: 2px solid #FECACA;
    color: #B42318;
    box-shadow: none;
}

/* the small notes under the share card */
.mm-drv-note {
    margin: 10px 0 0;
    padding: 9px 12px;
    border-radius: 12px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.55;
    color: #92400E;
}

.mm-drv-note.is-err {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B42318;
}

.mm-drv-note .mm-drv-en {
    display: block;
    font-family: var(--mm-font);
    font-size: 12px;
    font-weight: 600;
    opacity: .85;
}

/* the delivery cards */
.mm-drv-dcard {
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-inline-start: 5px solid var(--mm-purple);
    border-radius: 18px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-drv-dcard.is-arrived { border-inline-start-color: #0F766E; }
.mm-drv-dcard.is-picked { border-inline-start-color: #175CD3; }

.mm-drv-dcard.is-busy {
    opacity: .6;
    pointer-events: none;
}

.mm-drv-dhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mm-drv-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-drv-when {
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-drv-badge {
    margin-inline-start: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: #FBEEFB;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mm-purple);
    white-space: nowrap;
}

.mm-drv-cust {
    margin: 10px 0 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-drv-addr {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--mm-body);
    overflow-wrap: anywhere;
}

.mm-drv-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #ECFDF3;
    border: 2px solid #A7F3D0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    color: #067647;
    text-decoration: none;
}

.mm-drv-call:hover { border-color: #12B76A; }

.mm-drv-items {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #FBFAFF;
    font-size: 16px;
    line-height: 1.65;
    white-space: pre-line;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-drv-totalrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-drv-total {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--mm-purple);
}

.mm-drv-dist {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mm-lav);
    font-size: 13.5px;
    font-weight: 800;
    color: var(--mm-body);
}

.mm-drv-dactions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.mm-drv-dactions .mm-drv-big { width: 100%; }

/* delivered today: folded away under one line */
.mm-drv-done {
    margin-bottom: 14px;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.mm-drv-done-sum {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 800;
    color: var(--mm-ink);
    cursor: pointer;
}

.mm-drv-done-list { padding: 0 12px 12px; }

.mm-drv-done .mm-drv-dcard {
    box-shadow: none;
    border-inline-start-color: #12B76A;
    background: #FBFAFF;
}

/* the login card and the other states */
.mm-drv-state {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 60px 18px 0;
}

.mm-drv-login {
    padding: 22px 18px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 20px 40px -30px rgba(30, 16, 57, .5);
    text-align: center;
}

.mm-drv-login-logo {
    display: block;
    width: 74px;
    height: 74px;
    margin: 0 auto 12px;
    object-fit: contain;
}

.mm-drv-login-title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--mm-ink);
}

.mm-drv-login-sub {
    margin: 6px 0 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-drv-login-sub .mm-drv-en { display: block; font-family: var(--mm-font); font-size: 12.5px; }

.mm-drv-code {
    width: 100%;
    padding: 16px 14px;
    border: 2px solid var(--mm-line);
    border-radius: 14px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .35em;
    text-align: center;
    color: var(--mm-ink);
}

.mm-drv-code:focus {
    outline: 0;
    border-color: var(--mm-purple);
    box-shadow: 0 0 0 3px rgba(180, 3, 191, .18);
}

.mm-drv-login .mm-drv-big { width: 100%; margin-top: 14px; }

.mm-drv-err {
    margin: 12px 0 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #B42318;
}

.mm-drv-err:empty { display: none; }

.mm-drv-spin {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(136, 2, 144, .2);
    border-top-color: var(--mm-purple);
    border-radius: 50%;
    animation: mm-drv-spin .8s linear infinite;
}

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

.mm-drv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-drv-empty {
    padding: 34px 18px;
    border: 1px dashed #F6CEF8;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-drv-empty strong { display: block; font-size: 16.5px; color: var(--mm-ink); }

.mm-drv-empty .mm-drv-en { display: block; font-family: var(--mm-font); font-size: 13px; color: var(--mm-muted); }

@media (max-width: 380px) {
    .mm-drv-code { font-size: 22px; letter-spacing: .25em; }
    .mm-drv-clock { font-size: 13.5px; padding: 5px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-drv-spin { animation: none; }
}

/* ==================== the customer's tracking page ======================
   /track?t=<token> — the page behind the link the menu hands out after an
   order and the one that travels in the WhatsApp message. Phone first: soft
   cards, plenty of air, text readable at arm's length, the restaurant's own
   accent colour. New classes only (.mm-track-*), used by that page alone. */

.mm-track {
    --qr-accent: #880290;
    --qr-on-accent: #ffffff;
    --qr-accent-pale: #FBEEFB;
    --qr-accent-soft: #F3D6F5;
    --qr-accent-mid: #C86BCE;
    min-height: 100vh;
    padding-bottom: 44px;
    background: #F7F4FE;
    font-family: var(--mm-font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--mm-ink);
}

.mm-track[dir="rtl"] { font-family: var(--mm-font-ar); }

/* ------------------------------- the bar ------------------------------- */

.mm-track-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--mm-line);
    backdrop-filter: blur(6px);
}

.mm-track-id {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mm-track-logo {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid var(--mm-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 10px 20px -16px rgba(30, 16, 57, .6);
    color: var(--qr-accent);
}

.mm-track-logoinit {
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.mm-track-logoimg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.mm-track-idtext {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* the invalid-link card keeps only the language pair in the bar */
.mm-track-top.is-bare { justify-content: flex-end; }

.mm-track-top.is-bare .mm-track-id,
.mm-track-top.is-bare .mm-track-call { display: none; }

.mm-track-rest {
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-track-order {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-muted);
}

.mm-track-topacts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mm-track-call {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 14px 26px -16px rgba(30, 16, 57, .6);
}

.mm-track-call:hover { filter: brightness(1.06); }

.mm-track-call svg { flex: 0 0 auto; }

/* ------------------------------- the body ------------------------------ */

.mm-track-main {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 16px 14px 0;
}

.mm-track-card {
    padding: 18px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .5);
}

.mm-track-h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-track-cardhead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.mm-track-updated {
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
}

.mm-track-updated:empty { display: none; }

/* the big status */
.mm-track-hero { text-align: center; }

.mm-track-heroico {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--qr-accent-pale);
    color: var(--qr-accent);
}

.mm-track-hero.is-done .mm-track-heroico {
    background: #ECFDF3;
    color: #067647;
}

.mm-track-hero.is-off .mm-track-heroico {
    background: #F2EFF8;
    color: #6F6788;
}

.mm-track-status {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.25;
    color: var(--mm-ink);
}

.mm-track-herosub {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--mm-body);
}

/* delivered / cancelled */
.mm-track-final {
    padding: 22px 18px;
    margin-bottom: 14px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .5);
}

.mm-track-final.is-done {
    background: linear-gradient(160deg, #ECFDF3 0%, #ffffff 78%);
    border: 1px solid #A7F3D0;
    color: #05603A;
}

.mm-track-final.is-off {
    background: linear-gradient(160deg, #F8F5FF 0%, #ffffff 78%);
    border: 1px solid var(--mm-line);
    color: #4B4463;
}

.mm-track-finalico {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 14px 26px -18px rgba(30, 16, 57, .5);
}

.mm-track-finaltitle {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.3;
}

.mm-track-finalsub {
    margin: 6px 0 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--mm-body);
}

/* ------------------------------ the steps ------------------------------ */

.mm-track-tl {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.mm-track-step {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
}

.mm-track-step:last-child { padding-bottom: 0; }

/* the rail between two dots */
.mm-track-step::before {
    content: "";
    position: absolute;
    inset-inline-start: 9px;
    top: 20px;
    bottom: 0;
    width: 2px;
    border-radius: 2px;
    background: var(--mm-line);
}

.mm-track-step:last-child::before { display: none; }

.mm-track-step.is-done::before { background: var(--qr-accent-soft); }

.mm-track-dot {
    display: block;
    width: 12px;
    height: 12px;
    margin-inline-start: 4px;
    border: 2px solid #D9D1EC;
    border-radius: 50%;
    background: #fff;
}

.mm-track-step.is-done .mm-track-dot {
    border-color: var(--qr-accent);
    background: var(--qr-accent);
}

.mm-track-step.is-current .mm-track-dot {
    box-shadow: 0 0 0 4px var(--qr-accent-pale);
}

.mm-track-steplbl {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--mm-muted);
}

.mm-track-step.is-done .mm-track-steplbl,
.mm-track-step.is-current .mm-track-steplbl {
    color: var(--mm-ink);
}

.mm-track-steptime {
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-track-step.is-current .mm-track-steptime { color: var(--qr-accent); }

/* ------------------------------- the map ------------------------------- */

.mm-track-mapwrap {
    overflow: hidden;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    background: #EFEBF9;
}

.mm-track-map {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 320px;
    background: #EFEBF9;
}

.mm-track-mapnote {
    margin: 0;
    padding: 26px 18px;
    border: 1px dashed var(--qr-accent-soft);
    border-radius: 16px;
    background: var(--qr-accent-pale);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    color: var(--mm-body);
}

.mm-track-maperr {
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    background: #FFFBEB;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: #92400E;
}

/* the two pins Leaflet draws (two classes deep, so leaflet.css loses) */
.mm-track-map .mm-track-ic { background: none; border: 0; }

/* the driver's pin glides to the new position instead of jumping */
.mm-track-map .mm-track-ic-driver { transition: transform .8s linear; }

.mm-track-pin {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 9px rgba(30, 16, 57, .45);
}

.mm-track-pin.is-driver { background: var(--qr-accent); }

.mm-track-pin.is-dest {
    background: #fff;
    border: 3px solid var(--qr-accent);
}

/* ----------------------------- the driver ------------------------------ */

.mm-track-driver {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mm-track-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--qr-accent-pale);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--qr-accent);
}

.mm-track-driverinfo {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.mm-track-driverlbl {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-track-drivername {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-track-distance {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-track-distance:empty { display: none; }

.mm-track-drivercall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    background: #ECFDF3;
    border: 2px solid #A7F3D0;
    font-size: 14px;
    font-weight: 800;
    color: #067647;
    text-decoration: none;
    white-space: nowrap;
}

.mm-track-drivercall:hover { border-color: #12B76A; }

/* ------------------------------ the order ------------------------------ */

.mm-track-items { margin-top: 12px; }

.mm-track-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--mm-line);
}

.mm-track-item:last-child { border-bottom: 0; }

.mm-track-itemqty {
    font-size: 14px;
    font-weight: 800;
    color: var(--qr-accent);
    font-variant-numeric: tabular-nums;
}

.mm-track-itemname {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-track-itemsize,
.mm-track-itemadd {
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-track-itemprice {
    font-size: 14px;
    font-weight: 700;
    color: var(--mm-body);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-track-itemtext {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #FBFAFF;
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-track-totalrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mm-line);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-track-total {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--qr-accent);
    font-variant-numeric: tabular-nums;
}

.mm-track-side {
    margin: 12px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-track-lbl {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

/* ------------------------------ the states ----------------------------- */

.mm-track-state {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 56px 18px 0;
}

.mm-track-statecard {
    padding: 26px 20px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 20px;
    box-shadow: 0 20px 40px -34px rgba(30, 16, 57, .5);
    text-align: center;
}

.mm-track-statetext {
    margin: 10px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--mm-body);
}

.mm-track-spin {
    display: inline-block;
    width: 26px;
    height: 26px;
    border: 3px solid var(--qr-accent-soft);
    border-top-color: var(--qr-accent);
    border-radius: 50%;
    animation: mm-track-spin .8s linear infinite;
}

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

.mm-track-badico {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--qr-accent-pale);
    color: var(--qr-accent);
}

.mm-track-badtitle {
    margin: 12px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--mm-ink);
}

.mm-track-badlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 16px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--qr-accent);
    color: var(--qr-on-accent);
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
}

.mm-track-badlink:hover { filter: brightness(1.06); }

@media (max-width: 640px) {
    .mm-track-map { height: 260px; }
    .mm-track-card { padding: 16px; border-radius: 18px; }
    .mm-track-status { font-size: 21px; }
    .mm-track-driver { flex-wrap: wrap; }
    .mm-track-drivercall { width: 100%; margin-top: 4px; }
    .mm-track-top { padding: 10px 12px; }
    .mm-track-call { padding: 0 14px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-track-spin { animation: none; }
    .mm-track-map .mm-track-ic-driver { transition: none; }
}

/* --------------- "order sent" + tracking button (public menu) -----------
   The small card the menu opens right after a successful order, once the
   delivery API has handed back the tracking link. Nothing else on the menu
   changes; without a link the card is never shown. */

.mm-tracksent {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 310;
    width: calc(100vw - 28px);
    max-width: 392px;
    padding: 14px 16px 16px;
    border: 1px solid var(--mm-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 48px -26px rgba(23, 12, 45, .65);
    transform: translate(-50%, 16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.mm-tracksent.is-on {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    pointer-events: auto;
    transition: opacity .2s ease, transform .2s ease;
}

.mm-tracksent-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-tracksent-ico {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ECFDF3;
    color: #067647;
}

.mm-tracksent-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--mm-ink);
}

.mm-tracksent-title small {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-tracksent-x {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--mm-lav);
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    color: var(--mm-body);
    cursor: pointer;
}

.mm-tracksent-x:hover { background: #EFE9FA; }

.mm-tracksent .mm-btn {
    width: 100%;
    margin-top: 12px;
    min-height: 48px;
    border-radius: 14px;
}

@media (max-width: 420px) {
    .mm-tracksent { max-width: calc(100vw - 20px); }
}

/* ====================== delivery fee and driver chips ===================
   The fee line (public menu cart, POS totals, dashboard order cards) and the
   one-tap driver chips (Delivery tab, Orders tab, POS order cards). Both are
   plain flex blocks that stack on a phone. */

/* --- the fee line under a total ---------------------------------------- */

.mm-del-fee,
.mm-ord-fee {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 10px;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-del-fee-lbl .rx-ar,
.mm-ord-fee-lbl .rx-ar { font-weight: 600; color: var(--mm-muted); }

.mm-del-fee-num,
.mm-ord-fee-num { font-weight: 800; color: var(--mm-purple); }

/* --- the assign block of a delivery order (Delivery tab) --------------- */

.mm-del-assignblock {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--mm-line);
}

.mm-del-assignlbl {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-del-assignlbl .rx-ar {
    text-transform: none;
    font-weight: 600;
}

.mm-del-assignhint {
    margin: 8px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-del-nodrv {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #FFF7ED;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #C2410C;
}

.mm-del-nodrv .rx-ar { display: block; font-weight: 600; }

/* --- the chips themselves ---------------------------------------------- */

.mm-del-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mm-del-chip,
.mm-posdrvchip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 13px;
    border: 1.5px solid var(--mm-line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-ink);
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, color .14s ease;
    max-width: 100%;
}

.mm-del-chip:hover,
.mm-posdrvchip:hover { border-color: #D8B4FE; background: #FBFAFF; }

.mm-del-chip.is-active,
.mm-posdrvchip.is-active {
    border-color: var(--mm-purple);
    background: var(--mm-purple);
    color: #fff;
}

.mm-del-chipname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14ch;
}

.mm-del-chipcheck { font-size: 12px; font-weight: 800; }

.mm-del-chipdot,
.mm-posdrvdot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C4BED4;
}

.mm-del-chipdot.is-on,
.mm-posdrvdot.is-on {
    background: #12B76A;
    box-shadow: 0 0 0 3px rgba(18, 183, 106, .18);
}

.mm-del-chipdot.is-off,
.mm-posdrvdot.is-off { background: #C4BED4; }

/* --- a paused driver stays in the list, marked ------------------------- */

.mm-del-drv.is-paused { background: #FAF9FD; }

.mm-del-drvstate.is-paused { color: #6F6788; }

.mm-del-live.is-paused { background: #A79FB8; }

/* --- the compact chips of the Orders tab ------------------------------- */

.mm-ord-drv {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    background: #FBFAFF;
}

.mm-ord-drvlbl {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 7px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--mm-muted);
}

.mm-ord-drvlbl .rx-ar { text-transform: none; font-weight: 600; }

.mm-ord-drvlbl strong {
    text-transform: none;
    font-size: 12.5px;
    color: var(--mm-ink);
}

.mm-del-chips.is-compact .mm-del-chip {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
}

.mm-ord-row.is-busy,
.mm-posrrow.is-busy {
    opacity: .55;
    pointer-events: none;
}

/* --- the POS: the fee row and the driver chips on an order card -------- */

.mm-posdrv {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 12px 10px;
    border-bottom: 1px solid #F5F1FC;
}

.mm-posdrv-lbl {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--mm-muted);
}

.mm-posdrv-note {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-posdrvchip {
    min-height: 28px;
    padding: 3px 9px;
    font-size: 11.5px;
    gap: 5px;
}

.mm-posdrvchip .mm-posdrvdot { width: 6px; height: 6px; }

/* --- the public menu: the fee line and the checkout summary ------------ */

.mm-cart-feerow {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-body);
}

.mm-cart-feerow strong { font-weight: 800; color: var(--mm-purple); }

.mm-cart-sum {
    display: grid;
    gap: 6px;
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--mm-line);
    border-radius: 14px;
    background: #FBFAFF;
}

.mm-cart-sumrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-body);
}

.mm-cart-sumrow strong { font-weight: 800; color: var(--mm-ink); }

.mm-cart-sumrow.is-total {
    padding-top: 6px;
    border-top: 1px solid var(--mm-line);
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-cart-sumrow.is-total strong { color: var(--mm-purple); }

/* --- the reports: the delivery fees of the range ----------------------- */

.mm-rep-fees {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin: 12px 0 4px;
    padding: 11px 14px;
    border: 1px dashed #D8B4FE;
    border-radius: 12px;
    background: #FBFAFF;
    font-size: 13px;
    color: var(--mm-body);
}

.mm-rep-fees-lbl {
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-rep-fees-lbl .rx-ar { font-weight: 600; color: var(--mm-muted); }

.mm-rep-fees-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--mm-purple);
    font-variant-numeric: tabular-nums;
}

.mm-rep-fees-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

@media (max-width: 640px) {
    .mm-del-chipname { max-width: 10ch; }
    .mm-rep-fees { border-radius: 10px; }
}

/* =====================================================================
   POS — driver cash panel
   The cashier's board of the delivery drivers: the cash each one carries,
   his open orders with their ticks, the settle sheet and the give-cash sheet.
   Everything here belongs to the POS screen only; the classes are prefixed
   mm-drvs- / mm-settle- so nothing else on the site can pick them up.
   ===================================================================== */

/* the three sheets are full screen on a phone (the cashier works on one) and
   a wide, tall sheet on a desktop */
.mm-dmodal-doc.mm-drvs-doc { max-width: 720px; }

.mm-drvs-body { padding-top: 12px; }

/* no open shift: money may not move */
.mm-drvs-banner {
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 1px solid #FBD9A6;
    border-radius: 12px;
    background: #FFF7E8;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #8A5A05;
}

.mm-drvs-banner span { display: block; }

.mm-drvs-banner .rx-ar {
    margin-top: 3px;
    font-weight: 600;
}

/* what this shift has taken in and given out so far */
.mm-drvs-shift {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
    font-size: 12px;
    color: var(--mm-body);
}

.mm-drvs-shifttl {
    font-weight: 800;
    color: var(--mm-ink);
}

.mm-drvs-shiftfig { font-variant-numeric: tabular-nums; }

.mm-drvs-shiftfig strong {
    font-size: 12.5px;
    color: var(--mm-ink);
}

/* ------------------------------- the cards -------------------------- */

.mm-drvs-list {
    display: grid;
    gap: 12px;
}

.mm-drvs-empty,
.mm-drvs-noorders,
.mm-settle-empty {
    margin: 0;
    padding: 14px 4px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--mm-muted);
    text-align: center;
}

.mm-drvs-card {
    padding: 13px;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 34px -30px rgba(30, 16, 57, .5);
}

.mm-drvs-card.is-paused { background: #FBF9FE; }

.mm-drvs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mm-drvs-id { min-width: 0; }

.mm-drvs-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mm-drvs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 4px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-drvs-phone {
    color: var(--mm-purple);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.mm-drvs-phone:hover { text-decoration: underline; }

.mm-drvs-hours { font-variant-numeric: tabular-nums; }

.mm-drvs-badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
}

.mm-drvs-badge.is-on {
    background: #E7F8EF;
    color: #10804A;
}

.mm-drvs-badge.is-off {
    background: #F3EFFA;
    color: var(--mm-muted);
}

/* the three figures: carrying, owes, float */
.mm-drvs-figs {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 11px;
}

.mm-drvs-fig {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-drvs-fig.is-main {
    border-color: #E4D6FB;
    background: linear-gradient(135deg, #F6F0FF 0%, #FBF8FF 100%);
}

.mm-drvs-lbl {
    display: block;
    margin-bottom: 3px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-drvs-fig strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.mm-drvs-fig strong + strong { margin-top: 2px; }

.mm-drvs-fig .mm-drvs-big { font-size: 17px; font-weight: 800; color: var(--mm-purple); }

.mm-drvs-fig .mm-drvs-big2 { font-size: 12.5px; font-weight: 700; color: var(--mm-purple); }

/* --------------------------- his open orders ----------------------- */

.mm-drvs-orders { margin-top: 12px; }

.mm-drvs-ordershead {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-drvs-order {
    display: grid;
    grid-template-columns: 26px minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 7px 4px;
    border-top: 1px dashed var(--mm-line);
    font-size: 12px;
    font-weight: 600;
    color: var(--mm-body);
    cursor: pointer;
}

.mm-drvs-order:first-of-type { border-top: 0; }

/* a big tick: the cashier taps this with a thumb */
.mm-drvs-check {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--mm-purple);
    cursor: pointer;
}

.mm-drvs-oref { font-weight: 800; color: var(--mm-ink); }

.mm-drvs-otime {
    color: var(--mm-muted);
    font-variant-numeric: tabular-nums;
}

.mm-drvs-ototal { color: var(--mm-ink); font-variant-numeric: tabular-nums; }

.mm-drvs-ocash {
    font-weight: 800;
    color: var(--mm-purple);
    font-variant-numeric: tabular-nums;
}

/* --------------------------- the two buttons ----------------------- */

.mm-drvs-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.mm-drvs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid #E4D6FB;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: var(--mm-purple);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.mm-drvs-btn:hover:not(:disabled) {
    border-color: var(--mm-purple);
    background: var(--mm-lav);
}

.mm-drvs-btn.is-main {
    border-color: transparent;
    background: linear-gradient(135deg, #B403BF 0%, #880290 100%);
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(136, 2, 144, .75);
}

.mm-drvs-btn.is-main:hover:not(:disabled) {
    background: linear-gradient(135deg, #C105CC 0%, #96029F 100%);
    transform: translateY(-1px);
}

.mm-drvs-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------------------------- the settle sheet ---------------------- */

.mm-settle-drv {
    margin: 0 0 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mm-ink);
}

.mm-settle-h3 {
    margin: 14px 0 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--mm-muted);
}

.mm-settle-orders {
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.mm-settle-order {
    display: grid;
    grid-template-columns: 26px minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 10px;
    border-top: 1px dashed var(--mm-line);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mm-body);
    cursor: pointer;
}

.mm-settle-order:first-child { border-top: 0; }

.mm-settle-order.is-off { opacity: .5; }

.mm-settle-oref { font-weight: 800; color: var(--mm-ink); }

.mm-settle-otime { color: var(--mm-muted); font-variant-numeric: tabular-nums; }

.mm-settle-ocash {
    font-weight: 800;
    color: var(--mm-purple);
    font-variant-numeric: tabular-nums;
}

.mm-settle-figs {
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
    background: var(--mm-lav);
}

.mm-settle-figs .mm-posshift-row { padding: 3px 0; }

.mm-settle-float { margin-top: 4px; }

.mm-settle-floatlbl {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
}

.mm-settle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* the two counted boxes: big enough for a thumb, with the live difference
   under each of them */
.mm-input.mm-input-lg {
    min-height: 48px;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mm-settle-grid .mm-posshift-diff { margin-top: 7px; }

/* ------------------- the shift statement's driver lines ------------- */

.mm-posshift-drvmoney {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--mm-line);
    border-radius: 13px;
    background: #fff;
}

.mm-posshift-drvmoney .mm-posshift-box-title + .mm-posshift-row { margin-top: 2px; }

.mm-posshift-drvmoney .mm-posshift-row strong { font-variant-numeric: tabular-nums; }

.mm-posshift-drvmoney .mm-posshift-box-title:not(:first-child) {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--mm-line);
}

/* ---------------------------- on a phone --------------------------- */

@media (max-width: 640px) {
    /* the board and the settle sheet fill the screen: head and foot stay, the
       middle scrolls. The little give-cash sheet stays a card. */
    .mm-dmodal.mm-drvs-full.is-open {
        align-items: stretch;
        padding: 0;
    }

    .mm-dmodal.mm-drvs-full .mm-dmodal-doc {
        width: 100%;
        max-width: none;
        max-height: none;
        height: 100%;
        border-radius: 0;
    }

    .mm-dmodal.mm-drvs-full .mm-dmodal-head { border-radius: 0; }

    .mm-drvs-figs { grid-template-columns: 1fr 1fr; }

    .mm-drvs-fig.is-main { grid-column: 1 / -1; }

    .mm-settle-grid { grid-template-columns: 1fr; }

    .mm-drvs-actions { grid-template-columns: 1fr; }

    .mm-drvs-order {
        grid-template-columns: 24px minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.1fr);
        font-size: 11.5px;
    }

    .mm-settle-order {
        grid-template-columns: 24px minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.2fr);
    }
}

/* =====================================================================
   Dashboard — driver statement
   The pickers, the seven figures and the movements table of the driver
   statement tab. Prefix mm-dc- so nothing else on the site can reach it;
   the period bar and the cards are the accounting/reports classes.
   ===================================================================== */

.mm-dc-pickers {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-top: 14px;
}

.mm-dc-pick {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-dc-select {
    min-height: 42px;
    font-weight: 700;
}

/* the period bar already carries its own card: no second top margin */
.mm-dc-period { margin-top: 0; }

/* seven figures: as many in a row as the screen allows */
.mm-dc-stats { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }

/* the second line of a card wraps here (a pound figure can be long) */
.mm-dc-stats .mm-acc-alt { white-space: normal; }

/* the difference card turns red the moment anything is left over or missing */
.mm-dc-diffcard.is-off {
    border-color: #FBD5D5;
    background: #FFF6F6;
}

.mm-dc-diffcard.is-off .mm-acc-stat-num { color: #B42318; }
.mm-dc-diffcard.is-off .mm-acc-stat-lbl { color: #912018; }

/* ---------------------------- the movements ------------------------- */

.mm-dc-card {
    margin-top: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 16px;
    box-shadow: 0 16px 32px -28px rgba(30, 16, 57, .34);
}

.mm-dc-cardhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mm-dc-h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
}

.mm-dc-h3 .rx-ar {
    margin-inline-start: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mm-dc-count {
    min-width: 22px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--mm-lav);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--mm-purple);
    text-align: center;
}

.mm-dc-empty {
    margin: 10px 0 0;
    padding: 12px 4px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--mm-muted);
    text-align: center;
}

.mm-dc-empty .rx-ar { display: block; margin-top: 2px; }

.mm-dc-tablewrap {
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mm-dc-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12.5px;
}

.mm-dc-th {
    position: sticky;
    top: 0;
    padding: 7px 9px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-align: start;
    white-space: nowrap;
    color: var(--mm-muted);
    background: #fff;
    border-bottom: 1px solid var(--mm-line);
}

.mm-dc-th .rx-ar {
    text-transform: none;
    letter-spacing: 0;
    font-size: 10px;
}

.mm-dc-td {
    padding: 8px 9px;
    vertical-align: top;
    color: var(--mm-body);
    border-bottom: 1px solid var(--mm-line);
    overflow-wrap: anywhere;
}

.mm-dc-row:last-child .mm-dc-td { border-bottom: 0; }

.mm-dc-row:hover .mm-dc-td { background: #FCFAFF; }

.mm-dc-num {
    text-align: end;
    font-weight: 700;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-dc-th.mm-dc-num { text-align: end; }

.mm-dc-nowrap { white-space: nowrap; }

.mm-dc-row.is-settle .mm-dc-td:nth-child(2) { color: #067647; }
.mm-dc-row.is-float .mm-dc-td:nth-child(2) { color: #B45309; }

@media (max-width: 900px) {
    .mm-dc-pickers { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .mm-dc-stats { grid-template-columns: 1fr 1fr; }
    .mm-dc-card,
    .mm-dc-pick,
    .mm-dc-period { border-radius: 14px; }
    .mm-dc-table { min-width: 640px; }
}

/* =====================================================================
   Driver app — the cash card under the driver's name
   Two figures and what he still owes. Hidden until the board answers, and
   hidden again if it never does: this screen is used on a phone while
   driving, so the card stays one short block and nothing else.
   ===================================================================== */

.mm-drv-cash {
    padding: 12px 14px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FFF8E6 0%, #FFFDF8 100%);
    border-color: #F5E2B0;
}

.mm-drv-cash-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: #7A4E05;
}

.mm-drv-cash-title .mm-drv-en {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    font-weight: 600;
    color: #8A6A1F;
}

.mm-drv-cash-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
}

.mm-drv-cash-fig {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.mm-drv-cash-fig strong {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.1;
    color: var(--mm-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mm-drv-cash-cur {
    font-family: var(--mm-font);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #8A6A1F;
}

.mm-drv-cash-owed {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #7A4E05;
    font-variant-numeric: tabular-nums;
}

.mm-drv-cash-owed strong { font-weight: 800; }

.mm-drv-cash-owed .mm-drv-en {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: #8A6A1F;
    opacity: .9;
}

/* =====================================================================
   POS top bar — the permanent Drivers button
   The same ghost pill as the Dashboard link, sitting beside the calculator
   and the ⋯. It opens the very same #mm-pos-drvs panel as the row in the ⋯
   sheet (data-act="drv-open"), so it carries no logic of its own.

   Room: on a wide bar, the icon and both labels — the two labels are stacked,
   so the Arabic costs no extra width. From 767 px down the button is the icon
   alone, the same weight as the ⋯ beside it; under 561 px the bar also closes
   its gaps and drops the shift pill's amount, and between 361 and 479 px both
   shift buttons keep only their drawer icon. That is what keeps the single
   58 px row whole on a 380 px phone, where the whole row is measured to stay
   inside the 336 px of content the wrap leaves.
   ===================================================================== */

.mm-posdrvbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 6px 12px;
    line-height: 1.15;
    white-space: nowrap;
}

.mm-posdrvbtn-ico {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.mm-posdrvbtn-lbl {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.mm-posdrvbtn-en {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.1px;
    color: var(--mm-purple);
}

.mm-posdrvbtn-ar {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--mm-purple);
    opacity: .8;
}

.mm-posdrvbtn:hover .mm-posdrvbtn-ar { opacity: 1; }

/* 768–1199: the bar has stepped a few controls into the sheet, the button
   keeps its two labels and only tightens a little */
@media (max-width: 1199px) {
    .mm-posdrvbtn {
        min-height: 38px;
        padding: 5px 10px;
        gap: 6px;
    }
}

/* <768: the calculator and the Dashboard link have stepped into the ⋯ sheet
   and the bar is at its phone layout — the icon alone, the same weight as the
   ⋯ button beside it */
@media (max-width: 767px) {
    .mm-posdrvbtn {
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 13px;
    }

    .mm-posdrvbtn-lbl { display: none; }
}

/* the tight phones: closer gaps, a smaller icon button and a shift pill
   without its amount — this is what keeps a 380 px row whole */
@media (max-width: 560px) {
    .mm-posdrvbtn {
        min-width: 36px;
        min-height: 36px;
        border-radius: 12px;
    }

    .mm-posbar-inner { gap: 6px; }

    .mm-posshift-amt { display: none; }
}

/* 361–479 only: both shift buttons (the running pill and "Open shift") drop
   their word and keep their drawer icon — that icon still opens the shift
   sheet, and its aria-label says what it is. This is the last piece of room
   the Drivers button needs at 380 px. Below 361 the pill is text-only anyway
   (the existing 360 px rules hide the icon), so its word comes back and
   nothing is left empty. */
@media (min-width: 361px) and (max-width: 479px) {
    #mm-pos-shift-open-label,
    .mm-posshift-txt { display: none; }

    .mm-posshift {
        justify-content: center;
        min-width: 34px;
        padding: 4px;
    }
}

/* the tiny phones (≤360): the one row has room for the new button or for the
   date-and-time, not for both — the clock steps aside here and the shift, the
   drivers and the ⋯ all stay. From 361 px up the clock is always on screen. */
@media (max-width: 360px) {
    .mm-posclock { display: none; }
}

/* the POS shell never prints, and the button belongs to it */
@media print {
    .mm-posdrvbtn { display: none !important; }
}

/* a 90-day range: thin columns, and the strip scrolls inside the card only */

.mm-rep-bars.is-many .mm-rep-col { min-width: 7px; }

.mm-rep-bars.is-many .mm-rep-x { font-size: 8px; }

/* ======================== overview: the charts block =======================
   The block under the two shortcut buttons of the Overview panel: the summary
   line, the sales per day, the top five dishes, the 24 peak hours and the
   three payment chips. Everything inside it is painted by mmchRender() from
   the one answer of POST /api/reports.php?action=sales; no figure lives in the
   markup or here. Plain divs on flex and grid, no chart library and no CDN,
   the same purple palette and the same theme variables as the rest of the
   dashboard (so the block always follows the panel it sits in).
   Phone first: one column, and nothing scrolls sideways at 390 px.
   ========================================================================== */

.mmch {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--mm-line);
}

.mmch-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.mmch-headtext { min-width: 0; }

.mmch-sub { margin: 6px 0 0; }

.mmch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mmch-chips { row-gap: 6px; }

.mmch-refresh { white-space: nowrap; }

.mmch-refresh[disabled] { opacity: .6; cursor: default; }

/* the one-line summary: Sales, Orders, Average ticket, Profit */

.mmch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mmch-sum {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 999px;
}

.mmch-sum-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mmch-sum-lbl .rx-ar {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mmch-sum-num {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mmch-sum.is-pos .mmch-sum-num { color: #067647; }
.mmch-sum.is-neg .mmch-sum-num { color: #B42318; }

/* where the figures come from and when they were read */

.mmch-asof {
    margin: 10px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--mm-muted);
}

.mmch-asof span { display: block; }

/* the skeleton: three calm blocks while the answer travels */

.mmch-skel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.mmch-skelslab {
    display: block;
    height: 84px;
    border-radius: 16px;
    background: linear-gradient(90deg, #F2EFF8 25%, #FAF8FF 37%, #F2EFF8 63%);
    background-size: 400% 100%;
    animation: mmch-shimmer 1.5s ease infinite;
}

@keyframes mmch-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* the charts step back, faintly, while a fresh answer travels */

.mmch-dim { opacity: .5; }

/* the one inline failure line — never a redirect and never a blank block */

.mmch-err {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #9A3412;
}

.mmch-errtext {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-width: 0;
}

.mmch-errtext .rx-ar { font-size: 12px; font-weight: 600; }

.mmch-errwhy {
    flex: 1 1 100%;
    font-size: 11.5px;
    font-weight: 500;
    color: #B45309;
    overflow-wrap: anywhere;
}

/* an empty period still shows its zeros, with one calm line above them */

.mmch-empty {
    margin: 14px 0 0;
    padding: 12px 14px;
    background: var(--mm-lav);
    border: 1px dashed var(--mm-line);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
    color: var(--mm-muted);
}

.mmch-empty .rx-ar { display: block; }

.mmch-none {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    text-align: center;
    color: var(--mm-muted);
}

.mmch-none .rx-ar { display: block; }

/* the three cards: one column on a phone, two from tablet up */

.mmch-body {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.mmch-body > .mmch-card { margin-top: 0; }

/* chart 1 — sales per day: one bar per period, its height its share of the
   tallest one, its label under it, a tooltip on hover and on tap */

.mmch-days { margin-top: 6px; }

.mmch-days-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    /* room above the tallest bar for the tooltip of a tapped column */
    padding-top: 64px;
}

.mmch-col {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
}

.mmch-colbar {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 128px;
    border-bottom: 1px solid var(--mm-line);
}

.mmch-bar {
    position: relative;
    display: block;
    width: 100%;
    max-width: 44px;
    min-height: 2px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, #B403BF 0%, #880290 100%);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: filter .16s ease;
}

.mmch-bar.is-zero {
    min-height: 2px;
    background: #F2EFF8;
    cursor: default;
}

.mmch-bar:hover { filter: brightness(1.08); }

.mmch-bar:focus-visible {
    outline: 2px solid rgba(180, 3, 191, .5);
    outline-offset: 2px;
}

.mmch-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    z-index: 6;
    display: block;
    min-width: 80px;
    max-width: 108px;
    padding: 7px 9px;
    border-radius: 10px;
    background: var(--mm-ink);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 12px 26px -16px rgba(30, 16, 57, .7);
    transition: opacity .14s ease;
}

/* the bars near either end of the chart carry their tooltip inside the card
   (the class is put on those bars by mmchPaintDays), so nothing can push the
   page sideways on a narrow screen */

.mmch-tip.is-start { left: 0; transform: none; text-align: start; }

.mmch-tip.is-end { left: auto; right: 0; transform: none; text-align: end; }

.mmch-tip-lbl {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
}

.mmch-tip-row {
    display: block;
    font-weight: 600;
    color: #EDE6FA;
}

.mmch-bar:hover .mmch-tip,
.mmch-bar:focus-visible .mmch-tip,
.mmch-bar.is-on .mmch-tip {
    opacity: 1;
    visibility: visible;
}

.mmch-x {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    font-size: 9.5px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--mm-muted);
}

/* more than 31 periods: thin bars, and every second label only */

.mmch-days-bars.is-many { gap: 2px; }

.mmch-days-bars.is-many .mmch-bar { border-radius: 3px 3px 0 0; }

.mmch-days-bars.is-many .mmch-x { font-size: 8px; }

/* the one-line hint under the day chart */

.mmch-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 12px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mm-body);
}

.mmch-legend .rx-ar {
    font-size: 11px;
    color: var(--mm-muted);
}

/* chart 2 — the top five dishes: name, quantity, revenue, a thin bar */

.mmch-top {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.mmch-top-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.mmch-top-name {
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mm-ink);
    overflow-wrap: anywhere;
}

.mmch-top-num {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 7px;
}

.mmch-top-qty {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mm-lav);
    border: 1px solid var(--mm-line);
    font-size: 11px;
    font-weight: 800;
    color: var(--mm-purple);
}

.mmch-top-rev {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mmch-track {
    height: 6px;
    margin-top: 5px;
    border-radius: 999px;
    background: #F2EFF8;
    overflow: hidden;
}

.mmch-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #B403BF 0%, var(--mm-purple) 100%);
}

/* chart 3 — peak hours: 24 thin bars, 00..23 under them */

.mmch-hours { margin-top: 12px; }

.mmch-hours-bars {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    align-items: end;
    gap: 2px;
}

.mmch-hour {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mmch-hourcol {
    display: flex;
    align-items: flex-end;
    height: 70px;
    border-bottom: 1px solid var(--mm-line);
}

.mmch-hourbar {
    display: block;
    width: 100%;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: #D9C7F5;
}

.mmch-hourbar.is-busy { background: linear-gradient(180deg, #B403BF 0%, var(--mm-purple) 100%); }

.mmch-hourbar.is-zero { background: #F2EFF8; }

.mmch-hourx {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: -.2px;
    text-align: center;
    color: var(--mm-muted);
}

/* the three payment chips: plain amounts, no chart */

.mmch-chiprow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mmch-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--mm-line);
    border-radius: 12px;
}

.mmch-chip-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mm-body);
}

.mmch-chip-lbl .rx-ar {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--mm-muted);
}

.mmch-chip-val {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mm-ink);
    white-space: nowrap;
}

.mmch-chip-alt {
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-muted);
    white-space: nowrap;
}

/* tablet and up: two columns, the day chart across both */

@media (min-width: 768px) {
    .mmch-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .mmch-card-days { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
    .mmch-actions { width: 100%; }

    .mmch-chips { flex: 1 1 auto; }

    .mmch-chips .mm-acc-qbtn { flex: 1 1 auto; justify-content: center; }

    .mmch-colbar { height: 104px; }

    .mmch-days-bars { gap: 2px; padding-top: 62px; }

    .mmch-hourcol { height: 58px; }
}

@media (max-width: 430px) {
    .mmch-sum { flex: 1 1 100%; justify-content: space-between; }

    .mmch-chip { flex: 1 1 100%; }

    .mmch-hourx { font-size: 7.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .mmch-skelslab { animation: none; }

    .mmch-bar,
    .mmch-tip { transition: none; }
}


